diff --git a/README.md b/README.md index 5fb2c00c..4eb54a99 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ The action's step needs to run after your test suite has outputted an LCOV file. | `flag-name` | _optional (unique required if parallel)_ | Job flag name, e.g. "Unit", "Functional", or "Integration". Will be shown in the Coveralls UI. | | `parallel` | _optional_ | Set to true for parallel (or matrix) based steps, where multiple posts to Coveralls will be performed in the check. `flag-name` needs to be set and unique, e.g. `flag-name: run-${{ matrix.test_number }}` | | `parallel-finished` | _optional_ | Set to true in the last job, after the other parallel jobs steps have completed, this will send a webhook to Coveralls to set the build complete. | +| `carryforward` | _optional_ | Comma separated flags used to carryforward results from previous builds if some of the parallel jobs are missing. Used only with `parallel-finished`. | | `coveralls-endpoint` | _optional_ | Hostname and protocol: `https://`; Specifies a [Coveralls Enterprise](https://enterprise.coveralls.io/) hostname. | | `base-path` | _optional_ | Path to the root folder of the project the coverage was collected in. Should be used in monorepos so that coveralls can process the LCOV correctly (e.g. packages/my-project) | | `git-branch` | _optional_ | Default: GITHUB_REF environment variable. Override the branch name. | diff --git a/action.yml b/action.yml index 70a4be75..b4bb1d17 100644 --- a/action.yml +++ b/action.yml @@ -18,6 +18,9 @@ inputs: parallel-finished: description: 'Set to true for the last action when using "parallel: true".' required: false + carryforward: + description: 'Comma separated flags used to carryforward results from previous builds if some of the parallel jobs are missing.' + required: false coveralls-endpoint: description: 'Coveralls Enterprise server (more info: https://enterprise.coveralls.io)' required: false diff --git a/lib/lcov-processor.js b/lib/lcov-processor.js index 75c16231..33737704 100644 --- a/lib/lcov-processor.js +++ b/lib/lcov-processor.js @@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.adjustLcovBasePath = void 0; const path_1 = __importDefault(require("path")); /** * Adjusts the base path of all the paths in an LCOV file @@ -11,5 +10,4 @@ const path_1 = __importDefault(require("path")); * @param lcovFile a string containing an entire LCOV file * @param basePath the base path to join with the LCOV file paths */ -const adjustLcovBasePath = (lcovFile, basePath) => lcovFile.replace(/^SF:(.+)$/gm, (_, match) => `SF:${path_1.default.join(basePath, match)}`); -exports.adjustLcovBasePath = adjustLcovBasePath; +exports.adjustLcovBasePath = (lcovFile, basePath) => lcovFile.replace(/^SF:(.+)$/gm, (_, match) => `SF:${path_1.default.join(basePath, match)}`); diff --git a/lib/run.js b/lib/run.js index 9b16cadb..c950b567 100644 --- a/lib/run.js +++ b/lib/run.js @@ -1,37 +1,23 @@ "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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; 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); } + 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 __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; +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.run = void 0; const core = __importStar(require("@actions/core")); const fs_1 = __importDefault(require("fs")); const request_1 = __importDefault(require("request")); @@ -71,9 +57,14 @@ function run() { } const runId = process.env.GITHUB_RUN_ID; process.env.COVERALLS_SERVICE_JOB_ID = runId; + const carryforward = core.getInput('carryforward'); + if (carryforward != '') { + process.env.COVERALLS_CARRYFORWARD_FLAGS = carryforward; + } if (core.getInput('parallel-finished') != '') { const payload = { "repo_token": githubToken, + "carryforward": process.env.COVERALLS_CARRYFORWARD_FLAGS, "repo_name": process.env.GITHUB_REPOSITORY, "payload": { "build_num": runId, "status": "done" } }; diff --git a/lib/run.spec.js b/lib/run.spec.js index e9915681..5c943752 100644 --- a/lib/run.spec.js +++ b/lib/run.spec.js @@ -1,21 +1,9 @@ "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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); + 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 }); @@ -64,6 +52,7 @@ describe('Run', () => { it('should run parallel finished', () => { setup(); getInput.withArgs('parallel-finished').returns(1); + getInput.withArgs('carryforward').returns('job1,job2'); getInput.withArgs('coveralls-endpoint').returns('https://coveralls.io'); sandbox.stub(request, 'post'); run_1.run().then((result) => { diff --git a/node_modules/.bin/mocha b/node_modules/.bin/mocha index 43c668d9..c2c121b9 120000 --- a/node_modules/.bin/mocha +++ b/node_modules/.bin/mocha @@ -1 +1 @@ -../mocha/bin/mocha \ No newline at end of file +../mocha/bin/mocha.js \ No newline at end of file diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md index 5ad27eed..3c20c8ea 100644 --- a/node_modules/@actions/core/README.md +++ b/node_modules/@actions/core/README.md @@ -16,11 +16,14 @@ import * as core from '@actions/core'; #### Inputs/Outputs -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. +Action inputs can be read with `getInput` which returns a `string` or `getBooleanInput` which parses a boolean based on the [yaml 1.2 specification](https://yaml.org/spec/1.2/spec.html#id2804923). If `required` set to be false, the input should have a default value in `action.yml`. + +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 }); - +const myBooleanInput = core.getBooleanInput('booleanInputName', { required: true }); +const myMultilineInput = core.getMultilineInput('multilineInputName', { required: true }); core.setOutput('outputKey', 'outputVal'); ``` @@ -62,11 +65,10 @@ catch (err) { // setFailed logs the message and sets a failing exit code 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. 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). @@ -89,6 +91,9 @@ try { } // Do stuff + core.info('Output to the actions build log') + + core.notice('This is a message that will also emit an annotation') } catch (err) { core.error(`Error ${err}, action may still succeed though`); @@ -112,11 +117,123 @@ const result = await core.group('Do something async', async () => { }) ``` +#### Annotations + +This library has 3 methods that will produce [annotations](https://docs.github.com/en/rest/reference/checks#create-a-check-run). +```js +core.error('This is a bad error. This will also fail the build.') + +core.warning('Something went wrong, but it\'s not bad enough to fail the build.') + +core.notice('Something happened that you might want to know about.') +``` + +These will surface to the UI in the Actions page and on Pull Requests. They look something like this: + +![Annotations Image](../../docs/assets/annotations.png) + +These annotations can also be attached to particular lines and columns of your source files to show exactly where a problem is occuring. + +These options are: +```typescript +export interface AnnotationProperties { + /** + * A title for the annotation. + */ + title?: string + + /** + * The name of the file for which the annotation should be created. + */ + file?: string + + /** + * The start line for the annotation. + */ + startLine?: number + + /** + * The end line for the annotation. Defaults to `startLine` when `startLine` is provided. + */ + endLine?: number + + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + */ + startColumn?: number + + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + * Defaults to `startColumn` when `startColumn` is provided. + */ + endColumn?: number +} +``` + +#### Styling output + +Colored output is supported in the Action logs via standard [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). 3/4 bit, 8 bit and 24 bit colors are all supported. + +Foreground colors: + +```js +// 3/4 bit +core.info('\u001b[35mThis foreground will be magenta') + +// 8 bit +core.info('\u001b[38;5;6mThis foreground will be cyan') + +// 24 bit +core.info('\u001b[38;2;255;0;0mThis foreground will be bright red') +``` + +Background colors: + +```js +// 3/4 bit +core.info('\u001b[43mThis background will be yellow'); + +// 8 bit +core.info('\u001b[48;5;6mThis background will be cyan') + +// 24 bit +core.info('\u001b[48;2;255;0;0mThis background will be bright red') +``` + +Special styles: + +```js +core.info('\u001b[1mBold text') +core.info('\u001b[3mItalic text') +core.info('\u001b[4mUnderlined text') +``` + +ANSI escape codes can be combined with one another: + +```js +core.info('\u001b[31;46mRed foreground with a cyan background and \u001b[1mbold text at the end'); +``` + +> Note: Escape codes reset at the start of each line + +```js +core.info('\u001b[35mThis foreground will be magenta') +core.info('This foreground will reset to the default') +``` + +Manually typing escape codes can be a little difficult, but you can use third party modules such as [ansi-styles](https://github.com/chalk/ansi-styles). + +```js +const style = require('ansi-styles'); +core.info(style.color.ansi16m.hex('#abcdef') + 'Hello world!') +``` + #### Action state -You can use this library to save state and get state for sharing information between a given wrapper action: +You can use this library to save state and get state for sharing information between a given wrapper action: + +**action.yml**: -**action.yml** ```yaml name: 'Wrapper action sample' inputs: @@ -137,10 +254,82 @@ core.saveState("pidToKill", 12345); ``` In action's `cleanup.js`: + ```js const core = require('@actions/core'); var pid = core.getState("pidToKill"); process.kill(pid); -``` \ No newline at end of file +``` + +#### OIDC Token + +You can use these methods to interact with the GitHub OIDC provider and get a JWT ID token which would help to get access token from third party cloud providers. + +**Method Name**: getIDToken() + +**Inputs** + +audience : optional + +**Outputs** + +A [JWT](https://jwt.io/) ID Token + +In action's `main.ts`: +```js +const core = require('@actions/core'); +async function getIDTokenAction(): Promise { + + const audience = core.getInput('audience', {required: false}) + + const id_token1 = await core.getIDToken() // ID Token with default audience + const id_token2 = await core.getIDToken(audience) // ID token with custom audience + + // this id_token can be used to get access token from third party cloud providers +} +getIDTokenAction() +``` + +In action's `actions.yml`: + +```yaml +name: 'GetIDToken' +description: 'Get ID token from Github OIDC provider' +inputs: + audience: + description: 'Audience for which the ID token is intended for' + required: false +outputs: + id_token1: + description: 'ID token obtained from OIDC provider' + id_token2: + description: 'ID token obtained from OIDC provider' +runs: + using: 'node12' + main: 'dist/index.js' +``` + +#### Filesystem path helpers + +You can use these methods to manipulate file paths across operating systems. + +The `toPosixPath` function converts input paths to Posix-style (Linux) paths. +The `toWin32Path` function converts input paths to Windows-style paths. These +functions work independently of the underlying runner operating system. + +```js +toPosixPath('\\foo\\bar') // => /foo/bar +toWin32Path('/foo/bar') // => \foo\bar +``` + +The `toPlatformPath` function converts input paths to the expected value on the runner's operating system. + +```js +// On a Windows runner. +toPlatformPath('/foo/bar') // => \foo\bar + +// On a Linux runner. +toPlatformPath('\\foo\\bar') // => /foo/bar +``` diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts index 94d5e449..53f8f4b8 100644 --- a/node_modules/@actions/core/lib/command.d.ts +++ b/node_modules/@actions/core/lib/command.d.ts @@ -1,4 +1,4 @@ -interface CommandProperties { +export interface CommandProperties { [key: string]: any; } /** @@ -13,9 +13,3 @@ interface CommandProperties { */ export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; export declare function issue(name: string, message?: string): void; -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -export declare function toCommandValue(input: any): string; -export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js index af28d2b1..0b28c66b 100644 --- a/node_modules/@actions/core/lib/command.js +++ b/node_modules/@actions/core/lib/command.js @@ -1,13 +1,27 @@ "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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.issue = exports.issueCommand = void 0; const os = __importStar(require("os")); +const utils_1 = require("./utils"); /** * Commands * @@ -61,28 +75,14 @@ class Command { return cmdStr; } } -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = toCommandValue; function escapeData(s) { - return toCommandValue(s) + return utils_1.toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return toCommandValue(s) + return utils_1.toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map index ae755652..51c7c637 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":[],"mappings":";;;;;;;;;AAAA,uCAAwB;AAWxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GA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I,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 8bb5093c..1defb572 100644 --- a/node_modules/@actions/core/lib/core.d.ts +++ b/node_modules/@actions/core/lib/core.d.ts @@ -4,6 +4,8 @@ export interface InputOptions { /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ required?: boolean; + /** Optional. Whether leading/trailing whitespace will be trimmed for the input. Defaults to true */ + trimWhitespace?: boolean; } /** * The code to exit an action @@ -18,6 +20,37 @@ export declare enum ExitCode { */ Failure = 1 } +/** + * Optional properties that can be sent with annotatation commands (notice, error, and warning) + * See: https://docs.github.com/en/rest/reference/checks#create-a-check-run for more information about annotations. + */ +export interface AnnotationProperties { + /** + * A title for the annotation. + */ + title?: string; + /** + * The path of the file for which the annotation should be created. + */ + file?: string; + /** + * The start line for the annotation. + */ + startLine?: number; + /** + * The end line for the annotation. Defaults to `startLine` when `startLine` is provided. + */ + endLine?: number; + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + */ + startColumn?: number; + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + * Defaults to `startColumn` when `startColumn` is provided. + */ + endColumn?: number; +} /** * Sets env variable for this action and future actions in the job * @param name the name of the variable to set @@ -35,13 +68,35 @@ export declare function setSecret(secret: string): void; */ export declare function addPath(inputPath: string): void; /** - * Gets the value of an input. The value is also trimmed. + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. * * @param name name of the input to get * @param options optional. See InputOptions. * @returns string */ export declare function getInput(name: string, options?: InputOptions): string; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +export declare function getMultilineInput(name: string, options?: InputOptions): string[]; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +export declare function getBooleanInput(name: string, options?: InputOptions): boolean; /** * Sets the value of an output. * @@ -73,13 +128,21 @@ export declare function debug(message: string): void; /** * Adds an error issue * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -export declare function error(message: string | Error): void; +export declare function error(message: string | Error, properties?: AnnotationProperties): void; /** - * Adds an warning issue + * Adds a warning issue * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -export declare function warning(message: string | Error): void; +export declare function warning(message: string | Error, properties?: AnnotationProperties): void; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +export declare function notice(message: string | Error, properties?: AnnotationProperties): void; /** * Writes info to log with console.log. * @param message info message @@ -120,3 +183,16 @@ export declare function saveState(name: string, value: any): void; * @returns string */ export declare function getState(name: string): string; +export declare function getIDToken(aud?: string): Promise; +/** + * Summary exports + */ +export { summary } from './summary'; +/** + * @deprecated use core.summary + */ +export { markdownSummary } from './summary'; +/** + * Path exports + */ +export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils'; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js index c838f4e2..48df6ad0 100644 --- a/node_modules/@actions/core/lib/core.js +++ b/node_modules/@actions/core/lib/core.js @@ -1,4 +1,23 @@ "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 (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; 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) { @@ -8,17 +27,14 @@ 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 }); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; const command_1 = require("./command"); +const file_command_1 = require("./file-command"); +const utils_1 = require("./utils"); const os = __importStar(require("os")); const path = __importStar(require("path")); +const oidc_utils_1 = require("./oidc-utils"); /** * The code to exit an action */ @@ -43,8 +59,12 @@ var ExitCode; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - const convertedVal = command_1.toCommandValue(val); + const convertedVal = utils_1.toCommandValue(val); process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + } command_1.issueCommand('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; @@ -61,12 +81,20 @@ exports.setSecret = setSecret; * @param inputPath */ function addPath(inputPath) { - command_1.issueCommand('add-path', {}, inputPath); + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueFileCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } exports.addPath = addPath; /** - * Gets the value of an input. The value is also trimmed. + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. * * @param name name of the input to get * @param options optional. See InputOptions. @@ -77,9 +105,52 @@ function getInput(name, options) { if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } + if (options && options.trimWhitespace === false) { + return val; + } return val.trim(); } exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; /** * Sets the value of an output. * @@ -88,7 +159,12 @@ exports.getInput = getInput; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function setOutput(name, value) { - command_1.issueCommand('set-output', { name }, value); + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput; /** @@ -134,19 +210,30 @@ exports.debug = debug; /** * Adds an error issue * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function error(message) { - command_1.issue('error', message instanceof Error ? message.toString() : message); +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.error = error; /** - * Adds an warning issue + * Adds a warning issue * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function warning(message) { - command_1.issue('warning', message instanceof Error ? message.toString() : message); +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; /** * Writes info to log with console.log. * @param message info message @@ -206,7 +293,11 @@ exports.group = group; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function saveState(name, value) { - command_1.issueCommand('save-state', { name }, value); + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); } exports.saveState = saveState; /** @@ -219,4 +310,27 @@ function getState(name) { return process.env[`STATE_${name}`] || ''; } exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = require("./summary"); +Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } }); +/** + * @deprecated use core.summary + */ +var summary_2 = require("./summary"); +Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } }); +/** + * Path exports + */ +var path_utils_1 = require("./path-utils"); +Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } }); +Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } }); +Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }); //# 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 68e9f313..99f7fd85 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,uCAA6D;AAE7D,uCAAwB;AACxB,2CAA4B;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,8DAA8D;AAC9D,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAQ;IACnD,MAAM,YAAY,GAAG,wBAAc,CAAC,GAAG,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAA;IAChC,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,YAAY,CAAC,CAAA;AAC/C,CAAC;AAJD,wCAIC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,C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AE,CAAA;IAClD,IAAI,QAAQ,EAAE;QACZ,OAAO,+BAAgB,CAAC,OAAO,EAAE,qCAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;KACtE;IAED,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAA;AAC3D,CAAC;AAPD,8BAOC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC;AAED,SAAsB,UAAU,CAAC,GAAY;;QAC3C,OAAO,MAAM,uBAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACzC,CAAC;CAAA;AAFD,gCAEC;AAED;;GAEG;AACH,qCAAiC;AAAzB,kGAAA,OAAO,OAAA;AAEf;;GAEG;AACH,qCAAyC;AAAjC,0GAAA,eAAe,OAAA;AAEvB;;GAEG;AACH,2CAAqE;AAA7D,yGAAA,WAAW,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,4GAAA,cAAc,OAAA"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index 2a778eac..1f3824de 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,53 +1,24 @@ { - "_from": "@actions/core@^1.2.4", - "_id": "@actions/core@1.2.4", - "_inBundle": false, - "_integrity": "sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==", - "_location": "/@actions/core", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@actions/core@^1.2.4", - "name": "@actions/core", - "escapedName": "@actions%2fcore", - "scope": "@actions", - "rawSpec": "^1.2.4", - "saveSpec": null, - "fetchSpec": "^1.2.4" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.4.tgz", - "_shasum": "96179dbf9f8d951dd74b40a0dbd5c22555d186ab", - "_spec": "@actions/core@^1.2.4", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "deprecated": false, + "name": "@actions/core", + "version": "1.10.0", "description": "Actions core lib", - "devDependencies": { - "@types/node": "^12.0.2" - }, - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", "keywords": [ "github", "actions", "core" ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", "license": "MIT", "main": "lib/core.js", - "name": "@actions/core", + "types": "lib/core.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], "publishConfig": { "access": "public" }, @@ -57,10 +28,19 @@ "directory": "packages/core" }, "scripts": { - "audit-moderate": "npm install && npm audit --audit-level=moderate", + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "types": "lib/core.d.ts", - "version": "1.2.4" + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@types/node": "^12.0.2", + "@types/uuid": "^8.3.4" + } } diff --git a/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md b/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e3..00000000 --- a/node_modules/@babel/traverse/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/traverse/node_modules/debug/LICENSE b/node_modules/@babel/traverse/node_modules/debug/LICENSE deleted file mode 100644 index 658c933d..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -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/@babel/traverse/node_modules/debug/README.md b/node_modules/@babel/traverse/node_modules/debug/README.md deleted file mode 100644 index 88dae35d..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/README.md +++ /dev/null @@ -1,455 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> - -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/@babel/traverse/node_modules/debug/dist/debug.js b/node_modules/@babel/traverse/node_modules/debug/dist/debug.js deleted file mode 100644 index 89ad0c21..00000000 --- a/node_modules/@babel/traverse/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/traverse/node_modules/debug/package.json b/node_modules/@babel/traverse/node_modules/debug/package.json deleted file mode 100644 index 6e7a0cc2..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "debug@4.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "debug@4.1.1", - "_id": "debug@4.1.1", - "_inBundle": false, - "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "_location": "/@babel/traverse/debug", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "debug@4.1.1", - "name": "debug", - "escapedName": "debug", - "rawSpec": "4.1.1", - "saveSpec": null, - "fetchSpec": "4.1.1" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "_spec": "4.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "dependencies": { - "ms": "^2.1.1" - }, - "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", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.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" - }, - "files": [ - "src", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "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: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" -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/browser.js b/node_modules/@babel/traverse/node_modules/debug/src/browser.js deleted file mode 100644 index 5f34c0d0..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/browser.js +++ /dev/null @@ -1,264 +0,0 @@ -/* 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; - } - - const 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 - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, 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(...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); -} - -/** - * 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() { - let 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); - -const {formatters} = module.exports; - -/** - * 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; - } -}; diff --git a/node_modules/@babel/traverse/node_modules/debug/src/common.js b/node_modules/@babel/traverse/node_modules/debug/src/common.js deleted file mode 100644 index 2f82b8dc..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/common.js +++ /dev/null @@ -1,266 +0,0 @@ - -/** - * 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(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) { - let hash = 0; - - for (let 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) { - let prevTime; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const 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 - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const 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); - - const 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() { - const index = createDebug.instances.indexOf(this); - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - return false; - } - - function extend(namespace, delimiter) { - const 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 = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const 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++) { - const instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + 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; - } - - let i; - let 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; diff --git a/node_modules/@babel/traverse/node_modules/debug/src/index.js b/node_modules/@babel/traverse/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f2..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/node.js b/node_modules/@babel/traverse/node_modules/debug/src/node.js deleted file mode 100644 index 5e1f1541..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/node.js +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/ajv/README.md b/node_modules/ajv/README.md index cafbd71c..5aa2078d 100644 --- a/node_modules/ajv/README.md +++ b/node_modules/ajv/README.md @@ -1,22 +1,91 @@ -Ajv logo +Ajv logo # Ajv: Another JSON Schema Validator The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07. -[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) +[![Build Status](https://travis-ci.org/ajv-validator/ajv.svg?branch=master)](https://travis-ci.org/ajv-validator/ajv) [![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm (beta)](https://img.shields.io/npm/v/ajv/beta)](https://www.npmjs.com/package/ajv/v/7.0.0-beta.0) [![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) -[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master) -[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/) +[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master) [![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) +[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin) + + +## Ajv v7 beta is released + +[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes: + +- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements. +- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe. +- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas. +- schemas are compiled to ES6 code (ES5 code generation is supported with an option). +- to improve reliability and maintainability the code is migrated to TypeScript. + +**Please note**: + +- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021). +- all formats are separated to ajv-formats package - they have to be explicitely added if you use them. + +See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details. + +To install the new version: + +```bash +npm install ajv@beta +``` + +See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example. + + +## Mozilla MOSS grant and OpenJS Foundation + +[](https://www.mozilla.org/en-US/moss/)     [](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/) + +Ajv has been awarded a grant from Mozilla’s [Open Source Support (MOSS) program](https://www.mozilla.org/en-US/moss/) in the “Foundational Technology” track! It will sponsor the development of Ajv support of [JSON Schema version 2019-09](https://tools.ietf.org/html/draft-handrews-json-schema-02) and of [JSON Type Definition](https://tools.ietf.org/html/draft-ucarion-json-type-definition-04). + +Ajv also joined [OpenJS Foundation](https://openjsf.org/) – having this support will help ensure the longevity and stability of Ajv for all its users. + +This [blog post](https://www.poberezkin.com/posts/2020-08-14-ajv-json-validator-mozilla-open-source-grant-openjs-foundation.html) has more details. + +I am looking for the long term maintainers of Ajv – working with [ReadySet](https://www.thereadyset.co/), also sponsored by Mozilla, to establish clear guidelines for the role of a "maintainer" and the contribution standards, and to encourage a wider, more inclusive, contribution from the community. + + +## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin) + +Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant! + +Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released. + +Please sponsor Ajv via: +- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it) +- [Ajv Open Collective️](https://opencollective.com/ajv) + +Thank you. + + +#### Open Collective sponsors + + + + + + + + + + + + + ## Using version 6 [JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published. -[Ajv version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). +[Ajv version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). __Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance: @@ -39,8 +108,9 @@ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); - [Performance](#performance) - [Features](#features) - [Getting started](#getting-started) -- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md) +- [Frequently Asked Questions](https://github.com/ajv-validator/ajv/blob/master/FAQ.md) - [Using in browser](#using-in-browser) + - [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) - [Command line interface](#command-line-interface) - Validation - [Keywords](#validation-keywords) @@ -57,6 +127,7 @@ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); - [Untrusted schemas](#untrusted-schemas) - [Circular references in objects](#circular-references-in-javascript-objects) - [Trusted schemas](#security-risks-of-trusted-schemas) + - [ReDoS attack](#redos-attack) - Modifying data during validation - [Filtering data](#filtering-data) - [Assigning defaults](#assigning-defaults) @@ -68,7 +139,8 @@ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); - [Plugins](#plugins) - [Related packages](#related-packages) - [Some packages using Ajv](#some-packages-using-ajv) -- [Tests, Contributing, History, Support, License](#tests) +- [Tests, Contributing, Changes history](#tests) +- [Support, Code of conduct, License](#open-source-software-support) ## Performance @@ -91,29 +163,27 @@ Performance of different validators by [json-schema-benchmark](https://github.co ## Features - Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards: - - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) + - all validation keywords (see [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md)) - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) - support of circular references between schemas - correct string lengths for strings with unicode pairs (can be turned off) - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off) - [validates schemas against meta-schema](#api-validateschema) -- supports [browsers](#using-in-browser) and Node.js 0.10-8.x +- supports [browsers](#using-in-browser) and Node.js 0.10-14.x - [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation - "All errors" validation mode with [option allErrors](#options) - [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages -- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package +- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package - [filtering data](#filtering-data) from additional properties - [assigning defaults](#assigning-defaults) to missing properties and items - [coercing data](#coercing-data-types) to the types specified in `type` keywords - [custom keywords](#defining-custom-keywords) - draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else` - draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail). -- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package - [$data reference](#data-reference) to use values from the validated data as values for the schema keywords - [asynchronous validation](#asynchronous-validation) of custom formats and keywords -Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). - ## Install @@ -130,7 +200,11 @@ Try it in the Node.js REPL: https://tonicdev.com/npm/ajv The fastest validation call: ```javascript +// Node.js require: var Ajv = require('ajv'); +// or ESM/TypeScript import +import Ajv from 'ajv'; + var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} var validate = ajv.compile(schema); var valid = validate(data); @@ -164,6 +238,10 @@ The best performance is achieved when using compiled functions returned by `comp __Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) +__Note for TypeScript users__: `ajv` provides its own TypeScript declarations +out of the box, so you don't need to install the deprecated `@types/ajv` +module. + ## Using in browser @@ -184,21 +262,31 @@ Ajv is tested with these browsers: [![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) -__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)). +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/ajv-validator/ajv/issues/234)). + + +### Ajv and Content Security Policies (CSP) + +If you're using Ajv to compile a schema (the typical use) in a browser document that is loaded with a Content Security Policy (CSP), that policy will require a `script-src` directive that includes the value `'unsafe-eval'`. +:warning: NOTE, however, that `unsafe-eval` is NOT recommended in a secure CSP[[1]](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval), as it has the potential to open the document to cross-site scripting (XSS) attacks. + +In order to make use of Ajv without easing your CSP, you can [pre-compile a schema using the CLI](https://github.com/ajv-validator/ajv-cli#compile-schemas). This will transpile the schema JSON into a JavaScript file that exports a `validate` function that works simlarly to a schema compiled at runtime. + +Note that pre-compilation of schemas is performed using [ajv-pack](https://github.com/ajv-validator/ajv-pack) and there are [some limitations to the schema features it can compile](https://github.com/ajv-validator/ajv-pack#limitations). A successfully pre-compiled schema is equivalent to the same schema compiled at runtime. ## Command line interface -CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports: +CLI is available as a separate npm package [ajv-cli](https://github.com/ajv-validator/ajv-cli). It supports: - compiling JSON Schemas to test their validity -- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/ajv-validator/ajv-pack)) - migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) - validating data file(s) against JSON Schema - testing expected validity of data against JSON Schema - referenced schemas - custom meta-schemas -- files in JSON and JavaScript format +- files in JSON, JSON5, YAML, and JavaScript format - all Ajv options - reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format @@ -207,20 +295,20 @@ CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ Ajv supports all validation keywords from draft-07 of JSON Schema standard: -- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type) -- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf -- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format -- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains) -- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames) -- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const) -- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#ifthenelse) +- [type](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#type) +- [for numbers](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf +- [for strings](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format +- [for arrays](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#ifthenelse) -With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard: +With [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard: -- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. -- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. +- [patternRequired](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. -See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. +See [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md) for more details. ## Annotation keywords @@ -240,7 +328,11 @@ __Please note__: Ajv does not implement validation of the keywords `examples`, ## Formats -The following formats are supported for string validation with "format" keyword: +Ajv implements formats defined by JSON Schema specification and several other formats. It is recommended NOT to use "format" keyword implementations with untrusted data, as they use potentially unsafe regular expressions - see [ReDoS attack](#redos-attack). + +__Please note__: if you need to use "format" keyword to validate untrusted data, you MUST assess their suitability and safety for your validation scenarios. + +The following formats are implemented for string validation with "format" keyword: - _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). - _time_: time with optional time-zone. @@ -260,13 +352,13 @@ The following formats are supported for string validation with "format" keyword: __Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here. -There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, `email`, and `hostname`. See [Options](#options) for details. +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, and `email`. See [Options](#options) for details. You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. -The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can allow specific format(s) that will be ignored. See [Options](#options) for details. -You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). +You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js). ## Combining schemas with $ref @@ -323,7 +415,7 @@ __Please note__: ## $data reference -With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema-org/json-schema-spec/issues/51) for more information about how it works. `$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. @@ -375,7 +467,7 @@ var validData = { ## $merge and $patch keywords -With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). +With the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). To add keywords `$merge` and `$patch` to Ajv instance use this code: @@ -434,7 +526,7 @@ The schemas above are equivalent to this schema: The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. -See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information. +See the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) for more information. ## Defining custom keywords @@ -482,9 +574,9 @@ console.log(validate(2)); // false console.log(validate(4)); // false ``` -Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. -See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. +See [Defining custom keywords](https://github.com/ajv-validator/ajv/blob/master/CUSTOM.md) for more details. ## Asynchronous schema compilation @@ -583,7 +675,7 @@ validate({ userId: 1, postId: 19 }) ### Using transpilers with asynchronous validation functions. -[ajv-async](https://github.com/epoberezkin/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). +[ajv-async](https://github.com/ajv-validator/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). #### Using nodent @@ -627,7 +719,7 @@ Ajv treats JSON schemas as trusted as your application code. This security model If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent: - compiling schemas can cause stack overflow (if they are too deep) -- compiling schemas can be slow (e.g. [#557](https://github.com/epoberezkin/ajv/issues/557)) +- compiling schemas can be slow (e.g. [#557](https://github.com/ajv-validator/ajv/issues/557)) - validating certain data can be slow It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords. @@ -637,7 +729,7 @@ Regardless the measures you take, using untrusted schemas increases security ris ##### Circular references in JavaScript objects -Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/epoberezkin/ajv/issues/802). +Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/ajv-validator/ajv/issues/802). An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references. @@ -646,13 +738,13 @@ An attempt to compile such schemas or validate such data would cause stack overf Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to): -- `pattern` and `format` for large strings - use `maxLength` to mitigate +- `pattern` and `format` for large strings - in some cases using `maxLength` can help mitigate it, but certain regular expressions can lead to exponential validation time even with relatively short strings (see [ReDoS attack](#redos-attack)). +- `patternProperties` for large property names - use `propertyNames` to mitigate, but some regular expressions can have exponential evaluation time as well. - `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate -- `patternProperties` for large property names - use `propertyNames` to mitigate __Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors). -You can validate your JSON schemas against [this meta-schema](https://github.com/epoberezkin/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed: +You can validate your JSON schemas against [this meta-schema](https://github.com/ajv-validator/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed: ```javascript const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json')); @@ -660,13 +752,33 @@ const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json const schema1 = {format: 'email'}; isSchemaSecure(schema1); // false -const schema2 = {format: 'email', maxLength: 256}; +const schema2 = {format: 'email', maxLength: MAX_LENGTH}; isSchemaSecure(schema2); // true ``` __Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results. +##### Content Security Policies (CSP) +See [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) + + +## ReDoS attack + +Certain regular expressions can lead to the exponential evaluation time even with relatively short strings. + +Please assess the regular expressions you use in the schemas on their vulnerability to this attack - see [safe-regex](https://github.com/substack/safe-regex), for example. + +__Please note__: some formats that Ajv implements use [regular expressions](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js) that can be vulnerable to ReDoS attack, so if you use Ajv to validate data from untrusted sources __it is strongly recommended__ to consider the following: + +- making assessment of "format" implementations in Ajv. +- using `format: 'fast'` option that simplifies some of the regular expressions (although it does not guarantee that they are safe). +- replacing format implementations provided by Ajv with your own implementations of "format" keyword that either uses different regular expressions or another approach to format validation. Please see [addFormat](#api-addformat) method. +- disabling format validation by ignoring "format" keyword with option `format: false` + +Whatever mitigation you choose, please assume all formats provided by Ajv as potentially unsafe and make your own assessment of their suitability for your validation scenarios. + + ## Filtering data With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. @@ -737,7 +849,7 @@ The intention of the schema above is to allow objects with either the string pro With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). -While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: +While this behaviour is unexpected (issues [#129](https://github.com/ajv-validator/ajv/issues/129), [#134](https://github.com/ajv-validator/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: ```json { @@ -811,7 +923,7 @@ console.log(data); // [ 1, "foo" ] `default` keywords in other cases are ignored: - not in `properties` or `items` subschemas -- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/ajv-validator/ajv/issues/42)) - in `if` subschema of `switch` keyword - in schemas generated by custom macro keywords @@ -869,7 +981,7 @@ console.log(data); // { "foo": [1], "bar": false } The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). -See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details. +See [Coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md) for details. ## API @@ -987,9 +1099,9 @@ Function should return validation result as `true` or `false`. If object is passed it should have properties `validate`, `compare` and `async`: - _validate_: a string, RegExp or a function as described above. -- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. - _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. -- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/ajv-validator/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. Custom formats can be also added via `formats` option. @@ -1085,6 +1197,7 @@ Defaults: // strict mode options strictDefaults: false, strictKeywords: false, + strictNumbers: false, // asynchronous validation options: transpile: undefined, // requires ajv-async package // advanced options: @@ -1099,7 +1212,7 @@ Defaults: errorDataPath: 'object', // deprecated messages: true, sourceCode: false, - processCode: undefined, // function (str: string): string {} + processCode: undefined, // function (str: string, schema: object): string {} cache: new Cache, serialize: undefined } @@ -1123,12 +1236,13 @@ Defaults: - `"full"` - more restrictive and slow validation. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. - `false` - ignore all format keywords. - _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. +- _keywords_: an object with custom keywords. Keys and values will be passed to `addKeyword` method. - _unknownFormats_: handling of unknown formats. Option values: - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification. - _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. -- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values: +- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. See [Error logging](#error-logging). Option values: - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. - `false` - logging is disabled. @@ -1162,7 +1276,7 @@ Defaults: - `true` - insert defaults by value (object literal is used). - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string). - `"shared"` (deprecated) - insert defaults by reference. If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. -- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values: +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md). Option values: - `false` (default) - no type coercion. - `true` - coerce scalar data types. - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). @@ -1178,11 +1292,13 @@ Defaults: - `false` (default) - unknown keywords are not reported - `true` - if an unknown keyword is present, throw an error - `"log"` - if an unknown keyword is present, log warning - +- _strictNumbers_: validate numbers strictly, failing validation for NaN and Infinity. Option values: + - `false` (default) - NaN or Infinity will pass validation for numeric types + - `true` - NaN or Infinity will not pass validation for numeric types ##### Asynchronous validation options -- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: +- _transpile_: Requires [ajv-async](https://github.com/ajv-validator/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported. - `true` - always transpile with nodent. - `false` - do not transpile; if async functions are not supported an exception will be thrown. @@ -1203,13 +1319,13 @@ Defaults: - _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. - _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. - _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. -- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/ajv-validator/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). - _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. -- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)). +- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n)). - _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). - _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: - - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`. - - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass a function calling `require('js-beautify').js_beautify` as `processCode: code => js_beautify(code)`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/ajv-validator/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. - _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. - _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. @@ -1226,7 +1342,7 @@ Each error is an object with the following properties: - _keyword_: validation keyword. - _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). - _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. -- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package). See below for parameters set by all keywords. - _message_: the standard error message (can be excluded with option `messages` set to false). - _schema_: the schema of the keyword (added with `verbose` option). - _parentSchema_: the schema containing the keyword (added with `verbose` option) @@ -1266,6 +1382,28 @@ Properties of `params` object in errors depend on the keyword that failed valida - custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). +### Error logging + +Using the `logger` option when initiallizing Ajv will allow you to define custom logging. Here you can build upon the exisiting logging. The use of other logging packages is supported as long as the package or its associated wrapper exposes the required methods. If any of the required methods are missing an exception will be thrown. +- **Required Methods**: `log`, `warn`, `error` + +```javascript +var otherLogger = new OtherLogger(); +var ajv = new Ajv({ + logger: { + log: console.log.bind(console), + warn: function warn() { + otherLogger.logWarn.apply(otherLogger, arguments); + }, + error: function error() { + otherLogger.logError.apply(otherLogger, arguments); + console.error.apply(console, arguments); + } + } +}); +``` + + ## Plugins Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions: @@ -1279,16 +1417,16 @@ If you have published a useful plugin please submit a PR to add it to the next s ## Related packages -- [ajv-async](https://github.com/epoberezkin/ajv-async) - plugin to configure async validation mode +- [ajv-async](https://github.com/ajv-validator/ajv-async) - plugin to configure async validation mode - [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats - [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface -- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - plugin for custom error messages -- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages -- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas -- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.) -- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - plugin with keywords $merge and $patch -- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions - +- [ajv-errors](https://github.com/ajv-validator/ajv-errors) - plugin for custom error messages +- [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/ajv-validator/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.) +- [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) - plugin with keywords $merge and $patch +- [ajv-pack](https://github.com/ajv-validator/ajv-pack) - produces a compact module exporting validation functions +- [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) - format validators for draft2019 that aren't already included in ajv (ie. `idn-hostname`, `idn-email`, `iri`, `iri-reference` and `duration`). ## Some packages using Ajv @@ -1325,28 +1463,28 @@ npm test ## Contributing -All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. +All validation functions are generated using doT templates in [dot](https://github.com/ajv-validator/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. -`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder. +`npm run build` - compiles templates to [dotjs](https://github.com/ajv-validator/ajv/tree/master/lib/dotjs) folder. `npm run watch` - automatically compiles templates when files in dot folder change -Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md) +Please see [Contributing guidelines](https://github.com/ajv-validator/ajv/blob/master/CONTRIBUTING.md) ## Changes history -See https://github.com/epoberezkin/ajv/releases +See https://github.com/ajv-validator/ajv/releases -__Please note__: [Changes in version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0). +__Please note__: [Changes in version 7.0.0-beta](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) -[Version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). +[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0). -[Version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0). +## Code of conduct -[Version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0). +Please review and follow the [Code of conduct](https://github.com/ajv-validator/ajv/blob/master/CODE_OF_CONDUCT.md). -[Version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0). +Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team. ## Open-source software support @@ -1356,4 +1494,4 @@ Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/n ## License -[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE) +[MIT](https://github.com/ajv-validator/ajv/blob/master/LICENSE) diff --git a/node_modules/ajv/dist/ajv.bundle.js b/node_modules/ajv/dist/ajv.bundle.js index a6afe993..e4d9d156 100644 --- a/node_modules/ajv/dist/ajv.bundle.js +++ b/node_modules/ajv/dist/ajv.bundle.js @@ -161,8 +161,8 @@ var util = require('./util'); var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31]; -var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i; -var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/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-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; // uri-template: https://tools.ietf.org/html/rfc6570 @@ -170,8 +170,8 @@ var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@| // For the source: https://gist.github.com/dperini/729294 // For test cases: https://mathiasbynens.be/demo/url-regex // @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; @@ -190,11 +190,11 @@ formats.fast = { // date: http://tools.ietf.org/html/rfc3339#section-5.6 date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, 'uri-template': URITEMPLATE, url: URL, // email (sources from jsen validator): @@ -227,7 +227,7 @@ formats.full = { 'uri-template': URITEMPLATE, url: URL, email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: hostname, + hostname: HOSTNAME, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, regex: regex, @@ -280,13 +280,6 @@ function date_time(str) { } -function hostname(str) { - // https://tools.ietf.org/html/rfc1034#section-3.5 - // https://tools.ietf.org/html/rfc1123#section-2 - return str.length <= 255 && HOSTNAME.test(str); -} - - var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." @@ -421,7 +414,7 @@ function compile(schema, root, localRefs, baseId) { + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; - if (opts.processCode) sourceCode = opts.processCode(sourceCode); + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); var validate; try { @@ -1083,8 +1076,6 @@ module.exports = { ucs2length: require('./ucs2length'), varOccurences: varOccurences, varReplace: varReplace, - cleanUpCode: cleanUpCode, - finalCleanUpCode: finalCleanUpCode, schemaHasRules: schemaHasRules, schemaHasRulesExcept: schemaHasRulesExcept, schemaUnknownRules: schemaUnknownRules, @@ -1106,7 +1097,7 @@ function copy(o, to) { } -function checkDataType(dataType, data, negate) { +function checkDataType(dataType, data, strictNumbers, negate) { var EQUAL = negate ? ' !== ' : ' === ' , AND = negate ? ' || ' : ' && ' , OK = negate ? '!' : '' @@ -1119,15 +1110,18 @@ function checkDataType(dataType, data, negate) { NOT + 'Array.isArray(' + data + '))'; case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + ')'; + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; } } -function checkDataTypes(dataTypes, data) { +function checkDataTypes(dataTypes, data, strictNumbers) { switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, true); + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); default: var code = ''; var types = toHash(dataTypes); @@ -1140,7 +1134,7 @@ function checkDataTypes(dataTypes, data) { } if (types.number) delete types.integer; for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); return code; } @@ -1206,42 +1200,6 @@ function varReplace(str, dataVar, expr) { } -var EMPTY_ELSE = /else\s*{\s*}/g - , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g - , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g; -function cleanUpCode(out) { - return out.replace(EMPTY_ELSE, '') - .replace(EMPTY_IF_NO_ELSE, '') - .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))'); -} - - -var ERRORS_REGEXP = /[^v.]errors/g - , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g - , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g - , RETURN_VALID = 'return errors === 0;' - , RETURN_TRUE = 'validate.errors = null; return true;' - , RETURN_ASYNC = /if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/ - , RETURN_DATA_ASYNC = 'return data;' - , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g - , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/; - -function finalCleanUpCode(out, async) { - var matches = out.match(ERRORS_REGEXP); - if (matches && matches.length == 2) { - out = async - ? out.replace(REMOVE_ERRORS_ASYNC, '') - .replace(RETURN_ASYNC, RETURN_DATA_ASYNC) - : out.replace(REMOVE_ERRORS, '') - .replace(RETURN_VALID, RETURN_TRUE); - } - - matches = out.match(ROOTDATA_REGEXP); - if (!matches || matches.length !== 3) return out; - return out.replace(REMOVE_ROOTDATA, ''); -} - - function schemaHasRules(schema, rules) { if (typeof schema == 'boolean') return !schema; for (var key in schema) if (rules[key]) return true; @@ -1320,7 +1278,7 @@ function getData($data, lvl, paths) { function joinPaths (a, b) { if (a == '""') return b; - return (a + ' + ' + b).replace(/' \+ '/g, ''); + return (a + ' + ' + b).replace(/([^\\])' \+ '/g, '$1'); } @@ -1384,7 +1342,7 @@ module.exports = function (metaSchema, keywordsJsonPointers) { keywords[key] = { anyOf: [ schema, - { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' } + { $ref: 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' } ] }; } @@ -1400,7 +1358,7 @@ module.exports = function (metaSchema, keywordsJsonPointers) { var metaSchema = require('./refs/json-schema-draft-07.json'); module.exports = { - $id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js', + $id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js', definitions: { simpleTypes: metaSchema.definitions.simpleTypes }, @@ -1460,6 +1418,12 @@ module.exports = function generate__limit(it, $keyword, $ruleType) { $op = $isMax ? '<' : '>', $notOp = $isMax ? '>' : '<', $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } if ($isDataExcl) { var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = 'exclusive' + $lvl, @@ -1612,6 +1576,9 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } var $op = $keyword == 'maxItems' ? '>' : '<'; out += 'if ( '; if ($isData) { @@ -1691,6 +1658,9 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } var $op = $keyword == 'maxLength' ? '>' : '<'; out += 'if ( '; if ($isData) { @@ -1775,6 +1745,9 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } var $op = $keyword == 'maxProperties' ? '>' : '<'; out += 'if ( '; if ($isData) { @@ -1854,7 +1827,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) { l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { $allSchemasEmpty = false; $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; @@ -1875,7 +1848,6 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) { out += ' ' + ($closingBraces.slice(0, -1)) + ' '; } } - out = it.util.cleanUpCode(out); return out; } @@ -1897,7 +1869,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) { $it.level++; var $nextValid = 'valid' + $it.level; var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); }); if ($noEmptySchema) { var $currentBaseId = $it.baseId; @@ -1946,7 +1918,6 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) { if (it.opts.allErrors) { out += ' } '; } - out = it.util.cleanUpCode(out); } else { if ($breakOnError) { out += ' if (true) { '; @@ -2050,7 +2021,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) { $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; if ($nonEmptySchema) { var $wasComposite = it.compositeRule; @@ -2109,7 +2080,6 @@ module.exports = function generate_contains(it, $keyword, $ruleType) { if (it.opts.allErrors) { out += ' } '; } - out = it.util.cleanUpCode(out); return out; } @@ -2363,6 +2333,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) { $propertyDeps = {}, $ownProperties = it.opts.ownProperties; for ($property in $schema) { + if ($property == '__proto__') continue; var $sch = $schema[$property]; var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; $deps[$property] = $sch; @@ -2488,7 +2459,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) { var $currentBaseId = $it.baseId; for (var $property in $schemaDeps) { var $sch = $schemaDeps[$property]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; if ($ownProperties) { out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; @@ -2509,7 +2480,6 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } @@ -2751,8 +2721,8 @@ module.exports = function generate_if(it, $keyword, $ruleType) { var $nextValid = 'valid' + $it.level; var $thenSch = it.schema['then'], $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; if ($thenPresent || $elsePresent) { var $ifClause; @@ -2830,7 +2800,6 @@ module.exports = function generate_if(it, $keyword, $ruleType) { if ($breakOnError) { out += ' else { '; } - out = it.util.cleanUpCode(out); } else { if ($breakOnError) { out += ' if (true) { '; @@ -2943,7 +2912,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; var $passData = $data + '[' + $i + ']'; $it.schema = $sch; @@ -2966,7 +2935,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { } } } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { $it.schema = $additionalItems; $it.schemaPath = it.schemaPath + '.additionalItems'; $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; @@ -2990,7 +2959,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { $closingBraces += '}'; } } - } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; @@ -3013,7 +2982,6 @@ module.exports = function generate_items(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } @@ -3036,6 +3004,9 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } out += 'var division' + ($lvl) + ';if ('; if ($isData) { out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; @@ -3111,7 +3082,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) { var $it = it.util.copy(it); $it.level++; var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; @@ -3211,7 +3182,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) { l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; $it.errSchemaPath = $errSchemaPath + '/' + $i; @@ -3355,9 +3326,9 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}), + var $schemaKeys = Object.keys($schema || {}).filter(notProto), $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties), + $pPropertyKeys = Object.keys($pProperties).filter(notProto), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, @@ -3367,7 +3338,13 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; if ($ownProperties) { out += ' var ' + ($dataProperties) + ' = undefined;'; @@ -3520,7 +3497,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { while (i3 < l3) { $propertyKey = arr3[i3 += 1]; var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== undefined; @@ -3623,7 +3600,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { while (i4 < l4) { $pProperty = arr4[i4 += 1]; var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { $it.schema = $sch; $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); @@ -3662,7 +3639,6 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } @@ -3683,7 +3659,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) { $it.level++; var $nextValid = 'valid' + $it.level; out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; @@ -3746,7 +3722,6 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } @@ -3907,7 +3882,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) { while (i1 < l1) { $property = arr1[i1 += 1]; var $propertySch = it.schema.properties[$property]; - if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + if (!($propertySch && (it.opts.strictKeywords ? (typeof $propertySch == 'object' && Object.keys($propertySch).length > 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { $required[$required.length] = $property; } } @@ -4180,7 +4155,7 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { } else { out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; if ($typeIsArray) { out += ' if (typeof item == \'string\') item = \'"\' + item; '; } @@ -4330,7 +4305,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); it.baseId = it.baseId || it.rootId; delete it.isTop; - it.dataPathArr = [undefined]; + it.dataPathArr = [""]; if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { var $defaultMsg = 'default is ignored in the schema root'; if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); @@ -4388,47 +4363,39 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { var $schemaPath = it.schemaPath + '.type', $errSchemaPath = it.errSchemaPath + '/type', $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; if ($coerceToTypes) { var $dataType = 'dataType' + $lvl, $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; + out += ' if (' + ($coerced) + ' !== undefined) ; '; var arr1 = $coerceToTypes; if (arr1) { var $type, $i = -1, l1 = arr1.length - 1; while ($i < l1) { $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; - } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; - } if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; if ($type == 'integer') { out += ' && !(' + ($data) + ' % 1)'; } out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; } } } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + out += ' else { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ @@ -4468,7 +4435,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += ' } else { '; + out += ' } if (' + ($coerced) + ' !== undefined) { '; var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; out += ' ' + ($data) + ' = ' + ($coerced) + '; '; @@ -4541,7 +4508,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { $rulesGroup = arr2[i2 += 1]; if ($shouldUseGroup($rulesGroup)) { if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; } if (it.opts.useDefaults) { if ($rulesGroup.type == 'object' && it.schema.properties) { @@ -4709,10 +4676,6 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { } else { out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; } - out = it.util.cleanUpCode(out); - if ($top) { - out = it.util.finalCleanUpCode(out, $async); - } function $shouldUseGroup($rulesGroup) { var rules = $rulesGroup.rules; @@ -4781,7 +4744,7 @@ function addKeyword(keyword, definition) { metaSchema = { anyOf: [ metaSchema, - { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' } + { '$ref': 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' } ] }; } @@ -4883,7 +4846,7 @@ function validateKeyword(definition, throwError) { },{"./definition_schema":12,"./dotjs/custom":22}],40:[function(require,module,exports){ module.exports={ "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#", + "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", "description": "Meta-schema for $data reference (JSON Schema extension proposal)", "type": "object", "required": [ "$data" ], @@ -5072,21 +5035,18 @@ module.exports={ },{}],42:[function(require,module,exports){ 'use strict'; -var isArray = Array.isArray; -var keyList = Object.keys; -var hasProp = Object.prototype.hasOwnProperty; +// do not edit .js files directly - edit src/index.jst + + module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { - var arrA = isArray(a) - , arrB = isArray(b) - , i - , length - , key; + if (a.constructor !== b.constructor) return false; - if (arrA && arrB) { + var length, i, keys; + if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) @@ -5094,35 +5054,29 @@ module.exports = function equal(a, b) { return true; } - if (arrA != arrB) return false; - var dateA = a instanceof Date - , dateB = b instanceof Date; - if (dateA != dateB) return false; - if (dateA && dateB) return a.getTime() == b.getTime(); - var regexpA = a instanceof RegExp - , regexpB = b instanceof RegExp; - if (regexpA != regexpB) return false; - if (regexpA && regexpB) return a.toString() == b.toString(); + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); - var keys = keyList(a); + keys = Object.keys(a); length = keys.length; - - if (length !== keyList(b).length) - return false; + if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) - if (!hasProp.call(b, keys[i])) return false; + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { - key = keys[i]; + var key = keys[i]; + if (!equal(a[key], b[key])) return false; } return true; } + // true if both NaN, false otherwise return a!==a && b!==b; }; @@ -5279,7 +5233,7 @@ function escapeJsonPtr(str) { } },{}],45:[function(require,module,exports){ -/** @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) : @@ -6242,9 +6196,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; } @@ -6447,8 +6401,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 @@ -6469,6 +6424,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 @@ -6499,7 +6505,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; @@ -6587,7 +6593,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); @@ -6626,7 +6632,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; @@ -6650,6 +6656,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; @@ -6741,6 +6749,7 @@ function Ajv(opts) { this._metaOpts = getMetaSchemaOptions(this); if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); addDefaultMetaSchema(this); if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); @@ -7139,6 +7148,14 @@ function addInitialFormats(self) { } +function addInitialKeywords(self) { + for (var name in self._opts.keywords) { + var keyword = self._opts.keywords[name]; + self.addKeyword(name, keyword); + } +} + + function checkUnique(self, id) { if (self._schemas[id] || self._refs[id]) throw new Error('schema with key or id "' + id + '" already exists'); diff --git a/node_modules/ajv/dist/ajv.min.js b/node_modules/ajv/dist/ajv.min.js index fd36d998..7a60eb8a 100644 --- a/node_modules/ajv/dist/ajv.min.js +++ b/node_modules/ajv/dist/ajv.min.js @@ -1,3 +1,3 @@ -/* ajv 6.10.2: Another JSON Schema Validator */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ajv=e()}}(function(){return function o(i,n,l){function c(r,e){if(!n[r]){if(!i[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(u)return u(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var s=n[r]={exports:{}};i[r][0].call(s.exports,function(e){return c(i[r][1][e]||e)},s,s.exports,o,i,n,l)}return n[r].exports}for(var u="function"==typeof require&&require,e=0;e%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,f=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5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{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&s.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2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-fragment":f,"relative-json-pointer":p};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var $=e("./resolve"),D=e("./util"),j=e("./error_classes"),O=e("fast-json-stable-stringify"),I=e("../dotjs/validate"),A=D.ucs2length,C=e("fast-deep-equal"),k=j.Validation;function L(e,r,t){var a=s.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}function z(e,r,t){var a=s.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}function s(e,r,t){for(var a=0;a",g=f?">":"<",P=void 0;if(v){var E=e.util.getData(m.$data,i,e.dataPathArr),w="exclusive"+o,b="exclType"+o,S="exclIsNumber"+o,_="' + "+(R="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+E+"; ";var F;P=p;(F=F||[]).push(s+=" var "+w+"; var "+b+" = typeof "+(E="schemaExcl"+o)+"; if ("+b+" != 'boolean' && "+b+" != 'undefined' && "+b+" != 'number') { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var x=s;s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+b+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+E+" "+y+"= "+a+") ? "+h+" "+g+"= "+E+" : "+h+" "+g+" "+a+" ) : ( ("+w+" = "+E+" === true) ? "+h+" "+g+"= "+a+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { var op"+o+" = "+w+" ? '"+y+"' : '"+y+"='; ",void 0===n&&(c=e.errSchemaPath+"/"+(P=p),a=E,d=v)}else{_=y;if((S="number"==typeof m)&&d){var R="'"+_+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+y+"= "+a+" ? "+h+" "+g+"= "+m+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { "}else{S&&void 0===n?(w=!0,c=e.errSchemaPath+"/"+(P=p),a=m,g+="="):(S&&(a=Math[f?"min":"max"](m,n)),m===(!S||a)?(w=!0,c=e.errSchemaPath+"/"+(P=p),g+="="):(w=!1,_+="="));R="'"+_+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+h+" "+g+" "+a+" || "+h+" !== "+h+") { "}}P=P||r,(F=F||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+R+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+_+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";x=s;return s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" "+h+".length "+("maxItems"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"fewer",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+h+".length ":" ucs2length("+h+") ";var f=r,p=p||[];p.push(s+=" "+("maxLength"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"fewer",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m "+x+") { ";var $=u+"["+x+"]";f.schema=F,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[y]=x;var D=e.validate(f);f.baseId=P,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",a+=" } ",c&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&(e.opts.strictKeywords?"object"==typeof E&&0 "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;D=e.validate(f);f.baseId=P,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",c&&(a+=" if (!"+m+") break; "),a+=" } } ",c&&(a+=" if ("+m+") { ",p+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) ");var f=f||[];f.push(s+=" ) { "),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof i&&0 1) { ";var p=e.schema.items&&e.schema.items.type,m=Array.isArray(p);if(!p||"object"==p||"array"==p||m&&(0<=p.indexOf("object")||0<=p.indexOf("array")))s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else s+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ",s+=" if ("+e.util["checkDataType"+(m?"s":"")](p,"item",!0)+") continue; ",m&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ";s+=" } ",f&&(s+=" } ");var v=v||[];v.push(s+=" if (!"+d+") { "),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var y=s;s=v.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e,r){var t="",s=!0===a.schema.$async,o=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),i=a.self._getId(a.schema);if(a.opts.strictKeywords){var n=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(n){var l="unknown keyword: "+n;if("log"!==a.opts.strictKeywords)throw new Error(l);a.logger.warn(l)}}if(a.isTop&&(t+=" var validate = ",s&&(a.async=!0,t+="async "),t+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(a.opts.sourceCode||a.opts.processCode)&&(t+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof a.schema||!o&&!a.schema.$ref){var c=a.level,u=a.dataLevel,h=a.schema[e="false schema"],d=a.schemaPath+a.util.getProperty(e),f=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,m="data"+(u||""),v="valid"+c;if(!1===a.schema){a.isTop?p=!0:t+=" var "+v+" = false; ",(G=G||[]).push(t),t="",!1!==a.createErrors?(t+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(f)+" , params: {} ",!1!==a.opts.messages&&(t+=" , message: 'boolean schema is false' "),a.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+m+" "),t+=" } "):t+=" {} ";var y=t;t=G.pop(),t+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else t+=a.isTop?s?" return data; ":" validate.errors = null; return true; ":" var "+v+" = true; ";return a.isTop&&(t+=" }; return validate; "),t}if(a.isTop){var g=a.isTop;c=a.level=0,u=a.dataLevel=0,m="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[void 0],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var P="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(P);a.logger.warn(P)}t+=" var vErrors = null; ",t+=" var errors = 0; ",t+=" if (rootData === undefined) rootData = data; "}else{c=a.level,m="data"+((u=a.dataLevel)||"");if(i&&(a.baseId=a.resolve.url(a.baseId,i)),s&&!a.async)throw new Error("async schema in sync schema");t+=" var errs_"+c+" = errors;"}v="valid"+c,p=!a.opts.allErrors;var E="",w="",b=a.schema.type,S=Array.isArray(b);if(b&&a.opts.nullable&&!0===a.schema.nullable&&(S?-1==b.indexOf("null")&&(b=b.concat("null")):"null"!=b&&(b=[b,"null"],S=!0)),S&&1==b.length&&(b=b[0],S=!1),a.schema.$ref&&o){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(o=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(t+=" "+a.RULES.all.$comment.code(a,"$comment")),b){if(a.opts.coerceTypes)var _=a.util.coerceToTypes(a.opts.coerceTypes,b);var F=a.RULES.types[b];if(_||S||!0===F||F&&!Y(F)){d=a.schemaPath+".type",f=a.errSchemaPath+"/type",d=a.schemaPath+".type",f=a.errSchemaPath+"/type";if(t+=" if ("+a.util[S?"checkDataTypes":"checkDataType"](b,m,!0)+") { ",_){var x="dataType"+c,R="coerced"+c;t+=" var "+x+" = typeof "+m+"; ","array"==a.opts.coerceTypes&&(t+=" if ("+x+" == 'object' && Array.isArray("+m+")) "+x+" = 'array'; "),t+=" var "+R+" = undefined; ";var $="",D=_;if(D)for(var j,O=-1,I=D.length-1;O= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=Math.floor,z=String.fromCharCode;function T(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=L(e/r);455L((A-s)/h))&&T("overflow"),s+=f*h;var p=d<=i?1:i+26<=d?26:d-i;if(fL(A/m)&&T("overflow"),h*=m}var v=t.length+1;i=Q(s-u,v,0==u),L(s/v)>A-o&&T("overflow"),o+=L(s/v),s%=v,t.splice(s++,0,o)}return String.fromCodePoint.apply(String,t)},c=function(e){var r=[],t=(e=q(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(z(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,f=d;for(d&&r.push("-");fL((A-s)/w)&&T("overflow"),s+=(p-a)*w,a=p;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&T("overflow"),R==a){for(var $=s,D=36;;D+=36){var j=D<=o?1:o+26<=D?26:D-o;if($>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 f(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]'),Z=new RegExp(K,"g"),G=new RegExp(B,"g"),Y=new RegExp(C("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',J),"g"),W=new RegExp(C("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),X=W;function ee(e){var r=f(e);return r.match(Z)?r:e}var re={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,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4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var R=e("./resolve"),$=e("./util"),j=e("./error_classes"),D=e("fast-json-stable-stringify"),O=e("../dotjs/validate"),I=$.ucs2length,A=e("fast-deep-equal"),k=j.Validation;function C(e,c,u,r){var d=this,p=this._opts,h=[void 0],f={},l=[],t={},m=[],a={},v=[],s=function(e,r,t){var a=L.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}.call(this,e,c=c||{schema:e,refVal:h,refs:f},r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=P;var y=this._formats,g=this.RULES;try{var i=E(e,c,u,r);o.validate=i;var n=o.callValidate;return n&&(n.schema=i.schema,n.errors=null,n.refs=i.refs,n.refVal=i.refVal,n.root=i.root,n.$async=i.$async,p.sourceCode&&(n.source=i.source)),i}finally{(function(e,r,t){var a=L.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}).call(this,e,c,r)}function P(){var e=o.validate,r=e.apply(this,arguments);return P.errors=e.errors,r}function E(e,r,t,a){var s=!r||r&&r.schema==e;if(r.schema!=c.schema)return C.call(d,e,r,t,a);var o=!0===e.$async,i=O({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:j.MissingRef,RULES:g,validate:O,util:$,resolve:R,resolveRef:w,usePattern:_,useDefault:F,useCustomRule:x,opts:p,formats:y,logger:d.logger,self:d}),i=Q(h,z)+Q(l,N)+Q(m,q)+Q(v,T)+i;p.processCode&&(i=p.processCode(i,e));try{var n=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",i)(d,g,y,c,h,m,v,A,I,k);h[0]=n}catch(e){throw d.logger.error("Error compiling schema, function code:",i),e}return n.schema=e,n.errors=null,n.refs=f,n.refVal=h,n.root=s?n:r,o&&(n.$async=!0),!0===p.sourceCode&&(n.source={code:i,patterns:l,defaults:m}),n}function w(e,r,t){r=R.url(e,r);var a,s,o=f[r];if(void 0!==o)return S(a=h[o],s="refVal["+o+"]");if(!t&&c.refs){var i=c.refs[r];if(void 0!==i)return S(a=c.refVal[i],s=b(r,a))}s=b(r);var n,l=R.call(d,E,c,r);if(void 0!==l||(n=u&&u[r])&&(l=R.inlineRef(n,p.inlineRefs)?n:C.call(d,n,c,u,e)),void 0!==l)return S(h[f[r]]=l,s);delete f[r]}function b(e,r){var t=h.length;return h[t]=r,"refVal"+(f[e]=t)}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function _(e){var r=t[e];return void 0===r&&(r=t[e]=l.length,l[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return $.toQuotedString(e);case"object":if(null===e)return"null";var r=D(e),t=a[r];return void 0===t&&(t=a[r]=m.length,m[t]=e),"default"+t}}function x(e,r,t,a){if(!1!==d._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));var o=e.definition.validateSchema;if(o)if(!o(r)){var i="keyword schema is invalid: "+d.errorsText(o.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)n=l.call(d,r,t,a);else if(u)n=u.call(d,r,t,a),!1!==p.validateSchema&&d.validateSchema(n,!0);else if(c)n=c.call(d,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=v.length;return{code:"customRule"+h,validate:v[h]=n}}}function L(e,r,t){for(var a=0;a",_=P?">":"<",F=void 0;if(!y&&"number"!=typeof d&&void 0!==d)throw new Error(r+" must be number");if(!b&&void 0!==w&&"number"!=typeof w&&"boolean"!=typeof w)throw new Error(E+" must be number or boolean");b?(o="exclIsNumber"+u,i="' + "+(n="op"+u)+" + '",c+=" var schemaExcl"+u+" = "+(t=e.util.getData(w.$data,h,e.dataPathArr))+"; ",F=E,(l=l||[]).push(c+=" var "+(a="exclusive"+u)+"; var "+(s="exclType"+u)+" = typeof "+(t="schemaExcl"+u)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { "),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(c+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(c+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ",x=c,c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+s+" == 'number' ? ( ("+a+" = "+g+" === undefined || "+t+" "+S+"= "+g+") ? "+v+" "+_+"= "+t+" : "+v+" "+_+" "+g+" ) : ( ("+a+" = "+t+" === true) ? "+v+" "+_+"= "+g+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { var op"+u+" = "+a+" ? '"+S+"' : '"+S+"='; ",void 0===d&&(f=e.errSchemaPath+"/"+(F=E),g=t,y=b)):(i=S,(o="number"==typeof w)&&y?(n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" ( "+g+" === undefined || "+w+" "+S+"= "+g+" ? "+v+" "+_+"= "+w+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { "):(o&&void 0===d?(a=!0,f=e.errSchemaPath+"/"+(F=E),g=w,_+="="):(o&&(g=Math[P?"min":"max"](w,d)),w===(!o||g)?(a=!0,f=e.errSchemaPath+"/"+(F=E),_+="="):(a=!1,i+="=")),n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+v+" "+_+" "+g+" || "+v+" !== "+v+") { ")),F=F||r,(l=l||[]).push(c),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+n+", limit: "+g+", exclusive: "+a+" } ",!1!==e.opts.messages&&(c+=" , message: 'should be "+i+" ",c+=y?"' + "+g:g+"'"),e.opts.verbose&&(c+=" , schema: ",c+=y?"validate.schema"+p:""+d,c+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ";var x=c;return c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } ",m&&(c+=" else { "),c}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" "+c+".length "+("maxItems"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxItems"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" items' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),t+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ";var d=r,p=p||[];p.push(t+=" "+("maxLength"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be ",t+="maxLength"==r?"longer":"shorter",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" characters' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxProperties"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" properties' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,u=n.baseId,h=!0,d=a;if(d)for(var p,f=-1,m=d.length-1;f "+_+") { ",x=c+"["+_+"]",d.schema=$,d.schemaPath=i+"["+_+"]",d.errSchemaPath=n+"/"+_,d.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),d.dataPathArr[v]=_,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",t+=" } ",l&&(t+=" if ("+f+") { ",p+="}"))}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&0 "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),x=c+"["+m+"]",d.dataPathArr[v]=m,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",l&&(t+=" if (!"+f+") break; "),t+=" } } ",l&&(t+=" if ("+f+") { ",p+="}"))}else{(e.opts.strictKeywords?"object"==typeof o&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+a+" !== parseInt(division"+a+") ",t+=" ) ",u&&(t+=" ) ");var d=d||[];d.push(t+=" ) { "),t="",!1!==e.createErrors?(t+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { multipleOf: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be multiple of ",t+=u?"' + "+h:h+"'"),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var p=t,t=d.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e);h.level++;var d,p,f,m,v="valid"+h.level;return(e.opts.strictKeywords?"object"==typeof o&&0 1) { ",t=e.schema.items&&e.schema.items.type,a=Array.isArray(t),!t||"object"==t||"array"==t||a&&(0<=t.indexOf("object")||0<=t.indexOf("array"))?i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } ":(i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",i+=" if ("+e.util["checkDataType"+(a?"s":"")](t,"item",e.opts.strictNumbers,!0)+") continue; ",a&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),i+=" } ",m&&(i+=" } "),(s=s||[]).push(i+=" if (!"+f+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=m?"validate.schema"+u:""+c,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",o=i,i=s.pop(),i+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d&&(i+=" else { ")):d&&(i+=" if (true) { "),i}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){var n="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(n);a.logger.warn(n)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof a.schema||!s&&!a.schema.$ref){var l=a.level,c=a.dataLevel,u=a.schema[e="false schema"],h=a.schemaPath+a.util.getProperty(e),d=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,f="data"+(c||""),m="valid"+l;return!1===a.schema?(a.isTop?p=!0:r+=" var "+m+" = false; ",(U=U||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",D=r,r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+m+" = true; ",a.isTop&&(r+=" }; return validate; "),r}if(a.isTop){var v=a.isTop,l=a.level=0,c=a.dataLevel=0,f="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var y="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{l=a.level,f="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var g,m="valid"+l,p=!a.opts.allErrors,P="",E="",w=a.schema.type,b=Array.isArray(w);if(w&&a.opts.nullable&&!0===a.schema.nullable&&(b?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],b=!0)),b&&1==w.length&&(w=w[0],b=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),w){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,w));var S=a.RULES.types[w];if(g||b||!0===S||S&&!Z(S)){h=a.schemaPath+".type",d=a.errSchemaPath+"/type",h=a.schemaPath+".type",d=a.errSchemaPath+"/type";if(r+=" if ("+a.util[b?"checkDataTypes":"checkDataType"](w,f,a.opts.strictNumbers,!0)+") { ",g){var _="dataType"+l,F="coerced"+l;r+=" var "+_+" = typeof "+f+"; var "+F+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+a.util.checkDataType(a.schema.type,f,a.opts.strictNumbers)+") "+F+" = "+f+"; } "),r+=" if ("+F+" !== undefined) ; ";var x=g;if(x)for(var R,$=-1,j=x.length-1;$= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=k(e/r);455k((A-a)/h))&&L("overflow"),a+=p*h;var f=d<=o?1:o+26<=d?26:d-o;if(pk(A/m)&&L("overflow"),h*=m}var v=r.length+1,o=z(a-u,v,0==u);k(a/v)>A-s&&L("overflow"),s+=k(a/v),a%=v,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function c(e){var r=[],t=(e=N(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");pk((A-s)/w)&&L("overflow"),s+=(f-a)*w,a=f;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&L("overflow"),R==a){for(var $=s,j=36;;j+=36){var D=j<=o?1:o+26<=j?26:j-o;if($>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 p(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]')),Y=new RegExp(K,"g"),W=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),X=new RegExp(J("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(J("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=p(e);return r.match(Y)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n | null, options?: ErrorsTextOptions): string; errors?: Array | null; + _opts: Options; } interface CustomLogger { @@ -169,8 +170,9 @@ declare namespace ajv { jsonPointers?: boolean; uniqueItems?: boolean; unicode?: boolean; - format?: string; + format?: false | string; formats?: object; + keywords?: object; unknownFormats?: true | string[] | 'ignore'; schemas?: Array | object; schemaId?: '$id' | 'id' | 'auto'; @@ -182,6 +184,7 @@ declare namespace ajv { coerceTypes?: boolean | 'array'; strictDefaults?: boolean | 'log'; strictKeywords?: boolean | 'log'; + strictNumbers?: boolean; async?: boolean | string; transpile?: string | ((code: string) => string); meta?: boolean | object; @@ -195,7 +198,7 @@ declare namespace ajv { errorDataPath?: string, messages?: boolean; sourceCode?: boolean; - processCode?: (code: string) => string; + processCode?: (code: string, schema: object) => string; cache?: object; logger?: CustomLogger | false; nullable?: boolean; @@ -243,6 +246,7 @@ declare namespace ajv { interface CompilationContext { level: number; dataLevel: number; + dataPathArr: string[]; schema: any; schemaPath: string; baseId: string; @@ -251,6 +255,9 @@ declare namespace ajv { formats: { [index: string]: FormatDefinition | undefined; }; + keywords: { + [index: string]: KeywordDefinition | undefined; + }; compositeRule: boolean; validate: (schema: object) => boolean; util: { diff --git a/node_modules/ajv/lib/ajv.js b/node_modules/ajv/lib/ajv.js index 611b9383..06a45b65 100644 --- a/node_modules/ajv/lib/ajv.js +++ b/node_modules/ajv/lib/ajv.js @@ -69,6 +69,7 @@ function Ajv(opts) { this._metaOpts = getMetaSchemaOptions(this); if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); addDefaultMetaSchema(this); if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); @@ -467,6 +468,14 @@ function addInitialFormats(self) { } +function addInitialKeywords(self) { + for (var name in self._opts.keywords) { + var keyword = self._opts.keywords[name]; + self.addKeyword(name, keyword); + } +} + + function checkUnique(self, id) { if (self._schemas[id] || self._refs[id]) throw new Error('schema with key or id "' + id + '" already exists'); diff --git a/node_modules/ajv/lib/compile/equal.js b/node_modules/ajv/lib/compile/equal.js index 4b271d54..d6c2acef 100644 --- a/node_modules/ajv/lib/compile/equal.js +++ b/node_modules/ajv/lib/compile/equal.js @@ -1,5 +1,5 @@ 'use strict'; // do NOT remove this file - it would break pre-compiled schemas -// https://github.com/epoberezkin/ajv/issues/889 +// https://github.com/ajv-validator/ajv/issues/889 module.exports = require('fast-deep-equal'); diff --git a/node_modules/ajv/lib/compile/formats.js b/node_modules/ajv/lib/compile/formats.js index 5c0fb9ef..de94a63b 100644 --- a/node_modules/ajv/lib/compile/formats.js +++ b/node_modules/ajv/lib/compile/formats.js @@ -4,8 +4,8 @@ var util = require('./util'); var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31]; -var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i; -var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i; +var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; +var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; var URI = /^(?:[a-z][a-z0-9+\-.]*:)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*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; // uri-template: https://tools.ietf.org/html/rfc6570 @@ -13,8 +13,8 @@ var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@| // For the source: https://gist.github.com/dperini/729294 // For test cases: https://mathiasbynens.be/demo/url-regex // @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; @@ -33,11 +33,11 @@ formats.fast = { // date: http://tools.ietf.org/html/rfc3339#section-5.6 date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, 'uri-template': URITEMPLATE, url: URL, // email (sources from jsen validator): @@ -70,7 +70,7 @@ formats.full = { 'uri-template': URITEMPLATE, url: URL, email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: hostname, + hostname: HOSTNAME, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, regex: regex, @@ -123,13 +123,6 @@ function date_time(str) { } -function hostname(str) { - // https://tools.ietf.org/html/rfc1034#section-3.5 - // https://tools.ietf.org/html/rfc1123#section-2 - return str.length <= 255 && HOSTNAME.test(str); -} - - var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." diff --git a/node_modules/ajv/lib/compile/index.js b/node_modules/ajv/lib/compile/index.js index f4d3f0d5..97518c42 100644 --- a/node_modules/ajv/lib/compile/index.js +++ b/node_modules/ajv/lib/compile/index.js @@ -113,7 +113,7 @@ function compile(schema, root, localRefs, baseId) { + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; - if (opts.processCode) sourceCode = opts.processCode(sourceCode); + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); var validate; try { diff --git a/node_modules/ajv/lib/compile/util.js b/node_modules/ajv/lib/compile/util.js index 0efa0011..ef07b8c7 100644 --- a/node_modules/ajv/lib/compile/util.js +++ b/node_modules/ajv/lib/compile/util.js @@ -13,8 +13,6 @@ module.exports = { ucs2length: require('./ucs2length'), varOccurences: varOccurences, varReplace: varReplace, - cleanUpCode: cleanUpCode, - finalCleanUpCode: finalCleanUpCode, schemaHasRules: schemaHasRules, schemaHasRulesExcept: schemaHasRulesExcept, schemaUnknownRules: schemaUnknownRules, @@ -36,7 +34,7 @@ function copy(o, to) { } -function checkDataType(dataType, data, negate) { +function checkDataType(dataType, data, strictNumbers, negate) { var EQUAL = negate ? ' !== ' : ' === ' , AND = negate ? ' || ' : ' && ' , OK = negate ? '!' : '' @@ -49,15 +47,18 @@ function checkDataType(dataType, data, negate) { NOT + 'Array.isArray(' + data + '))'; case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + ')'; + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; } } -function checkDataTypes(dataTypes, data) { +function checkDataTypes(dataTypes, data, strictNumbers) { switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, true); + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); default: var code = ''; var types = toHash(dataTypes); @@ -70,7 +71,7 @@ function checkDataTypes(dataTypes, data) { } if (types.number) delete types.integer; for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); return code; } @@ -136,42 +137,6 @@ function varReplace(str, dataVar, expr) { } -var EMPTY_ELSE = /else\s*{\s*}/g - , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g - , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g; -function cleanUpCode(out) { - return out.replace(EMPTY_ELSE, '') - .replace(EMPTY_IF_NO_ELSE, '') - .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))'); -} - - -var ERRORS_REGEXP = /[^v.]errors/g - , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g - , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g - , RETURN_VALID = 'return errors === 0;' - , RETURN_TRUE = 'validate.errors = null; return true;' - , RETURN_ASYNC = /if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/ - , RETURN_DATA_ASYNC = 'return data;' - , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g - , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/; - -function finalCleanUpCode(out, async) { - var matches = out.match(ERRORS_REGEXP); - if (matches && matches.length == 2) { - out = async - ? out.replace(REMOVE_ERRORS_ASYNC, '') - .replace(RETURN_ASYNC, RETURN_DATA_ASYNC) - : out.replace(REMOVE_ERRORS, '') - .replace(RETURN_VALID, RETURN_TRUE); - } - - matches = out.match(ROOTDATA_REGEXP); - if (!matches || matches.length !== 3) return out; - return out.replace(REMOVE_ROOTDATA, ''); -} - - function schemaHasRules(schema, rules) { if (typeof schema == 'boolean') return !schema; for (var key in schema) if (rules[key]) return true; @@ -250,7 +215,7 @@ function getData($data, lvl, paths) { function joinPaths (a, b) { if (a == '""') return b; - return (a + ' + ' + b).replace(/' \+ '/g, ''); + return (a + ' + ' + b).replace(/([^\\])' \+ '/g, '$1'); } diff --git a/node_modules/ajv/lib/data.js b/node_modules/ajv/lib/data.js index 5f1ad85e..f11142be 100644 --- a/node_modules/ajv/lib/data.js +++ b/node_modules/ajv/lib/data.js @@ -38,7 +38,7 @@ module.exports = function (metaSchema, keywordsJsonPointers) { keywords[key] = { anyOf: [ schema, - { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' } + { $ref: 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' } ] }; } diff --git a/node_modules/ajv/lib/definition_schema.js b/node_modules/ajv/lib/definition_schema.js index e5f6b911..ad86d4f0 100644 --- a/node_modules/ajv/lib/definition_schema.js +++ b/node_modules/ajv/lib/definition_schema.js @@ -3,7 +3,7 @@ var metaSchema = require('./refs/json-schema-draft-07.json'); module.exports = { - $id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js', + $id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js', definitions: { simpleTypes: metaSchema.definitions.simpleTypes }, diff --git a/node_modules/ajv/lib/dot/_limit.jst b/node_modules/ajv/lib/dot/_limit.jst index e10806fd..f1521892 100644 --- a/node_modules/ajv/lib/dot/_limit.jst +++ b/node_modules/ajv/lib/dot/_limit.jst @@ -17,6 +17,15 @@ , $op = $isMax ? '<' : '>' , $notOp = $isMax ? '>' : '<' , $errorKeyword = undefined; + + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined + || typeof $schemaExcl == 'number' + || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } }} {{? $isDataExcl }} diff --git a/node_modules/ajv/lib/dot/_limitItems.jst b/node_modules/ajv/lib/dot/_limitItems.jst index a3e078e5..741329e7 100644 --- a/node_modules/ajv/lib/dot/_limitItems.jst +++ b/node_modules/ajv/lib/dot/_limitItems.jst @@ -3,6 +3,8 @@ {{# def.setupKeyword }} {{# def.$data }} +{{# def.numberKeyword }} + {{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { {{ var $errorKeyword = $keyword; }} diff --git a/node_modules/ajv/lib/dot/_limitLength.jst b/node_modules/ajv/lib/dot/_limitLength.jst index cfc8dbb0..285c66bd 100644 --- a/node_modules/ajv/lib/dot/_limitLength.jst +++ b/node_modules/ajv/lib/dot/_limitLength.jst @@ -3,6 +3,8 @@ {{# def.setupKeyword }} {{# def.$data }} +{{# def.numberKeyword }} + {{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { {{ var $errorKeyword = $keyword; }} diff --git a/node_modules/ajv/lib/dot/_limitProperties.jst b/node_modules/ajv/lib/dot/_limitProperties.jst index da7ea776..c4c21551 100644 --- a/node_modules/ajv/lib/dot/_limitProperties.jst +++ b/node_modules/ajv/lib/dot/_limitProperties.jst @@ -3,6 +3,8 @@ {{# def.setupKeyword }} {{# def.$data }} +{{# def.numberKeyword }} + {{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { {{ var $errorKeyword = $keyword; }} diff --git a/node_modules/ajv/lib/dot/allOf.jst b/node_modules/ajv/lib/dot/allOf.jst index 4c283631..0e782fe9 100644 --- a/node_modules/ajv/lib/dot/allOf.jst +++ b/node_modules/ajv/lib/dot/allOf.jst @@ -30,5 +30,3 @@ {{= $closingBraces.slice(0,-1) }} {{?}} {{?}} - -{{# def.cleanUp }} diff --git a/node_modules/ajv/lib/dot/anyOf.jst b/node_modules/ajv/lib/dot/anyOf.jst index 086cf2b3..ea909ee6 100644 --- a/node_modules/ajv/lib/dot/anyOf.jst +++ b/node_modules/ajv/lib/dot/anyOf.jst @@ -39,8 +39,6 @@ } else { {{# def.resetErrors }} {{? it.opts.allErrors }} } {{?}} - - {{# def.cleanUp }} {{??}} {{? $breakOnError }} if (true) { diff --git a/node_modules/ajv/lib/dot/coerce.def b/node_modules/ajv/lib/dot/coerce.def index 86e0e18a..c947ed6a 100644 --- a/node_modules/ajv/lib/dot/coerce.def +++ b/node_modules/ajv/lib/dot/coerce.def @@ -4,55 +4,45 @@ , $coerced = 'coerced' + $lvl; }} var {{=$dataType}} = typeof {{=$data}}; - {{? it.opts.coerceTypes == 'array'}} - if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array'; - {{?}} - var {{=$coerced}} = undefined; - {{ var $bracesCoercion = ''; }} - {{~ $coerceToTypes:$type:$i }} - {{? $i }} - if ({{=$coerced}} === undefined) { - {{ $bracesCoercion += '}'; }} - {{?}} - - {{? it.opts.coerceTypes == 'array' && $type != 'array' }} - if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) { - {{=$coerced}} = {{=$data}} = {{=$data}}[0]; - {{=$dataType}} = typeof {{=$data}}; - /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/ - } - {{?}} + {{? it.opts.coerceTypes == 'array' }} + if ({{=$dataType}} == 'object' && Array.isArray({{=$data}}) && {{=$data}}.length == 1) { + {{=$data}} = {{=$data}}[0]; + {{=$dataType}} = typeof {{=$data}}; + if ({{=it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)}}) {{=$coerced}} = {{=$data}}; + } + {{?}} + if ({{=$coerced}} !== undefined) ; + {{~ $coerceToTypes:$type:$i }} {{? $type == 'string' }} - if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') + else if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') {{=$coerced}} = '' + {{=$data}}; else if ({{=$data}} === null) {{=$coerced}} = ''; {{?? $type == 'number' || $type == 'integer' }} - if ({{=$dataType}} == 'boolean' || {{=$data}} === null + else if ({{=$dataType}} == 'boolean' || {{=$data}} === null || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) {{=$coerced}} = +{{=$data}}; {{?? $type == 'boolean' }} - if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) + else if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) {{=$coerced}} = false; else if ({{=$data}} === 'true' || {{=$data}} === 1) {{=$coerced}} = true; {{?? $type == 'null' }} - if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) + else if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) {{=$coerced}} = null; {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} - if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) + else if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) {{=$coerced}} = [{{=$data}}]; {{?}} {{~}} - - {{= $bracesCoercion }} - - if ({{=$coerced}} === undefined) { + else { {{# def.error:'type' }} - } else { + } + + if ({{=$coerced}} !== undefined) { {{# def.setParentData }} {{=$data}} = {{=$coerced}}; {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} diff --git a/node_modules/ajv/lib/dot/contains.jst b/node_modules/ajv/lib/dot/contains.jst index 925d2c84..4dc99674 100644 --- a/node_modules/ajv/lib/dot/contains.jst +++ b/node_modules/ajv/lib/dot/contains.jst @@ -53,5 +53,3 @@ var {{=$valid}}; {{# def.resetErrors }} {{?}} {{? it.opts.allErrors }} } {{?}} - -{{# def.cleanUp }} diff --git a/node_modules/ajv/lib/dot/definitions.def b/node_modules/ajv/lib/dot/definitions.def index b68e064e..709cce36 100644 --- a/node_modules/ajv/lib/dot/definitions.def +++ b/node_modules/ajv/lib/dot/definitions.def @@ -64,7 +64,8 @@ {{## def.nonEmptySchema:_schema: (it.opts.strictKeywords - ? typeof _schema == 'object' && Object.keys(_schema).length > 0 + ? (typeof _schema == 'object' && Object.keys(_schema).length > 0) + || _schema === false : it.util.schemaHasRules(_schema, it.RULES.all)) #}} @@ -112,12 +113,6 @@ #}} -{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}} - - -{{## def.finalCleanUp: {{ out = it.util.finalCleanUpCode(out, $async); }} #}} - - {{## def.$data: {{ var $isData = it.opts.$data && $schema && $schema.$data @@ -144,6 +139,13 @@ #}} +{{## def.numberKeyword: + {{? !($isData || typeof $schema == 'number') }} + {{ throw new Error($keyword + ' must be number'); }} + {{?}} +#}} + + {{## def.beginDefOut: {{ var $$outStack = $$outStack || []; diff --git a/node_modules/ajv/lib/dot/dependencies.jst b/node_modules/ajv/lib/dot/dependencies.jst index c41f3342..e4bdddec 100644 --- a/node_modules/ajv/lib/dot/dependencies.jst +++ b/node_modules/ajv/lib/dot/dependencies.jst @@ -19,6 +19,7 @@ , $ownProperties = it.opts.ownProperties; for ($property in $schema) { + if ($property == '__proto__') continue; var $sch = $schema[$property]; var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; $deps[$property] = $sch; @@ -76,5 +77,3 @@ var missing{{=$lvl}}; {{= $closingBraces }} if ({{=$errs}} == errors) { {{?}} - -{{# def.cleanUp }} diff --git a/node_modules/ajv/lib/dot/if.jst b/node_modules/ajv/lib/dot/if.jst index 7ccc9b7f..adb50361 100644 --- a/node_modules/ajv/lib/dot/if.jst +++ b/node_modules/ajv/lib/dot/if.jst @@ -65,8 +65,6 @@ {{# def.extraError:'if' }} } {{? $breakOnError }} else { {{?}} - - {{# def.cleanUp }} {{??}} {{? $breakOnError }} if (true) { diff --git a/node_modules/ajv/lib/dot/items.jst b/node_modules/ajv/lib/dot/items.jst index 8c0f5acb..acc932a2 100644 --- a/node_modules/ajv/lib/dot/items.jst +++ b/node_modules/ajv/lib/dot/items.jst @@ -96,5 +96,3 @@ var {{=$valid}}; {{= $closingBraces }} if ({{=$errs}} == errors) { {{?}} - -{{# def.cleanUp }} diff --git a/node_modules/ajv/lib/dot/multipleOf.jst b/node_modules/ajv/lib/dot/multipleOf.jst index 5f8dd33b..6d88a456 100644 --- a/node_modules/ajv/lib/dot/multipleOf.jst +++ b/node_modules/ajv/lib/dot/multipleOf.jst @@ -3,6 +3,8 @@ {{# def.setupKeyword }} {{# def.$data }} +{{# def.numberKeyword }} + var division{{=$lvl}}; if ({{?$isData}} {{=$schemaValue}} !== undefined && ( diff --git a/node_modules/ajv/lib/dot/properties.jst b/node_modules/ajv/lib/dot/properties.jst index 862067e7..5cebb9b1 100644 --- a/node_modules/ajv/lib/dot/properties.jst +++ b/node_modules/ajv/lib/dot/properties.jst @@ -28,9 +28,9 @@ , $nextData = 'data' + $dataNxt , $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}) + var $schemaKeys = Object.keys($schema || {}).filter(notProto) , $pProperties = it.schema.patternProperties || {} - , $pPropertyKeys = Object.keys($pProperties) + , $pPropertyKeys = Object.keys($pProperties).filter(notProto) , $aProperties = it.schema.additionalProperties , $someProperties = $schemaKeys.length || $pPropertyKeys.length , $noAdditional = $aProperties === false @@ -42,8 +42,11 @@ , $currentBaseId = it.baseId; var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { return p !== '__proto__'; } }} @@ -240,5 +243,3 @@ var {{=$nextValid}} = true; {{= $closingBraces }} if ({{=$errs}} == errors) { {{?}} - -{{# def.cleanUp }} diff --git a/node_modules/ajv/lib/dot/propertyNames.jst b/node_modules/ajv/lib/dot/propertyNames.jst index ee52b215..d456ccaf 100644 --- a/node_modules/ajv/lib/dot/propertyNames.jst +++ b/node_modules/ajv/lib/dot/propertyNames.jst @@ -50,5 +50,3 @@ var {{=$errs}} = errors; {{= $closingBraces }} if ({{=$errs}} == errors) { {{?}} - -{{# def.cleanUp }} diff --git a/node_modules/ajv/lib/dot/uniqueItems.jst b/node_modules/ajv/lib/dot/uniqueItems.jst index 22f82f99..e69b8308 100644 --- a/node_modules/ajv/lib/dot/uniqueItems.jst +++ b/node_modules/ajv/lib/dot/uniqueItems.jst @@ -38,7 +38,7 @@ for (;i--;) { var item = {{=$data}}[i]; {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }} - if ({{= it.util[$method]($itemType, 'item', true) }}) continue; + if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue; {{? $typeIsArray}} if (typeof item == 'string') item = '"' + item; {{?}} diff --git a/node_modules/ajv/lib/dot/validate.jst b/node_modules/ajv/lib/dot/validate.jst index f8a1edfc..32087e71 100644 --- a/node_modules/ajv/lib/dot/validate.jst +++ b/node_modules/ajv/lib/dot/validate.jst @@ -81,7 +81,7 @@ it.baseId = it.baseId || it.rootId; delete it.isTop; - it.dataPathArr = [undefined]; + it.dataPathArr = [""]; if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { var $defaultMsg = 'default is ignored in the schema root'; @@ -140,7 +140,7 @@ , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; }} - if ({{= it.util[$method]($typeSchema, $data, true) }}) { + if ({{= it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) }}) { #}} {{? it.schema.$ref && $refKeywords }} @@ -192,7 +192,7 @@ {{~ it.RULES:$rulesGroup }} {{? $shouldUseGroup($rulesGroup) }} {{? $rulesGroup.type }} - if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) { + if ({{= it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) }}) { {{?}} {{? it.opts.useDefaults }} {{? $rulesGroup.type == 'object' && it.schema.properties }} @@ -254,12 +254,6 @@ var {{=$valid}} = errors === errs_{{=$lvl}}; {{?}} -{{# def.cleanUp }} - -{{? $top }} - {{# def.finalCleanUp }} -{{?}} - {{ function $shouldUseGroup($rulesGroup) { var rules = $rulesGroup.rules; diff --git a/node_modules/ajv/lib/dotjs/_limit.js b/node_modules/ajv/lib/dotjs/_limit.js index f02a7601..05a1979d 100644 --- a/node_modules/ajv/lib/dotjs/_limit.js +++ b/node_modules/ajv/lib/dotjs/_limit.js @@ -24,6 +24,12 @@ module.exports = function generate__limit(it, $keyword, $ruleType) { $op = $isMax ? '<' : '>', $notOp = $isMax ? '>' : '<', $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } if ($isDataExcl) { var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = 'exclusive' + $lvl, diff --git a/node_modules/ajv/lib/dotjs/_limitItems.js b/node_modules/ajv/lib/dotjs/_limitItems.js index a27d1188..e092a559 100644 --- a/node_modules/ajv/lib/dotjs/_limitItems.js +++ b/node_modules/ajv/lib/dotjs/_limitItems.js @@ -17,6 +17,9 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } var $op = $keyword == 'maxItems' ? '>' : '<'; out += 'if ( '; if ($isData) { diff --git a/node_modules/ajv/lib/dotjs/_limitLength.js b/node_modules/ajv/lib/dotjs/_limitLength.js index 789f3741..ecbd3fe1 100644 --- a/node_modules/ajv/lib/dotjs/_limitLength.js +++ b/node_modules/ajv/lib/dotjs/_limitLength.js @@ -17,6 +17,9 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } var $op = $keyword == 'maxLength' ? '>' : '<'; out += 'if ( '; if ($isData) { diff --git a/node_modules/ajv/lib/dotjs/_limitProperties.js b/node_modules/ajv/lib/dotjs/_limitProperties.js index 11dc9393..d232755a 100644 --- a/node_modules/ajv/lib/dotjs/_limitProperties.js +++ b/node_modules/ajv/lib/dotjs/_limitProperties.js @@ -17,6 +17,9 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } var $op = $keyword == 'maxProperties' ? '>' : '<'; out += 'if ( '; if ($isData) { diff --git a/node_modules/ajv/lib/dotjs/allOf.js b/node_modules/ajv/lib/dotjs/allOf.js index 4bad914d..fb8c2e4b 100644 --- a/node_modules/ajv/lib/dotjs/allOf.js +++ b/node_modules/ajv/lib/dotjs/allOf.js @@ -17,7 +17,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) { l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { $allSchemasEmpty = false; $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; @@ -38,6 +38,5 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) { out += ' ' + ($closingBraces.slice(0, -1)) + ' '; } } - out = it.util.cleanUpCode(out); return out; } diff --git a/node_modules/ajv/lib/dotjs/anyOf.js b/node_modules/ajv/lib/dotjs/anyOf.js index 01551d54..0600a9d4 100644 --- a/node_modules/ajv/lib/dotjs/anyOf.js +++ b/node_modules/ajv/lib/dotjs/anyOf.js @@ -15,7 +15,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) { $it.level++; var $nextValid = 'valid' + $it.level; var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); }); if ($noEmptySchema) { var $currentBaseId = $it.baseId; @@ -64,7 +64,6 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) { if (it.opts.allErrors) { out += ' } '; } - out = it.util.cleanUpCode(out); } else { if ($breakOnError) { out += ' if (true) { '; diff --git a/node_modules/ajv/lib/dotjs/contains.js b/node_modules/ajv/lib/dotjs/contains.js index cd4dfabe..7d763009 100644 --- a/node_modules/ajv/lib/dotjs/contains.js +++ b/node_modules/ajv/lib/dotjs/contains.js @@ -18,7 +18,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) { $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; if ($nonEmptySchema) { var $wasComposite = it.compositeRule; @@ -77,6 +77,5 @@ module.exports = function generate_contains(it, $keyword, $ruleType) { if (it.opts.allErrors) { out += ' } '; } - out = it.util.cleanUpCode(out); return out; } diff --git a/node_modules/ajv/lib/dotjs/dependencies.js b/node_modules/ajv/lib/dotjs/dependencies.js index 96789360..e4829497 100644 --- a/node_modules/ajv/lib/dotjs/dependencies.js +++ b/node_modules/ajv/lib/dotjs/dependencies.js @@ -17,6 +17,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) { $propertyDeps = {}, $ownProperties = it.opts.ownProperties; for ($property in $schema) { + if ($property == '__proto__') continue; var $sch = $schema[$property]; var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; $deps[$property] = $sch; @@ -142,7 +143,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) { var $currentBaseId = $it.baseId; for (var $property in $schemaDeps) { var $sch = $schemaDeps[$property]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; if ($ownProperties) { out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; @@ -163,6 +164,5 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } diff --git a/node_modules/ajv/lib/dotjs/if.js b/node_modules/ajv/lib/dotjs/if.js index 019f61ab..94d27ad8 100644 --- a/node_modules/ajv/lib/dotjs/if.js +++ b/node_modules/ajv/lib/dotjs/if.js @@ -15,8 +15,8 @@ module.exports = function generate_if(it, $keyword, $ruleType) { var $nextValid = 'valid' + $it.level; var $thenSch = it.schema['then'], $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; if ($thenPresent || $elsePresent) { var $ifClause; @@ -94,7 +94,6 @@ module.exports = function generate_if(it, $keyword, $ruleType) { if ($breakOnError) { out += ' else { '; } - out = it.util.cleanUpCode(out); } else { if ($breakOnError) { out += ' if (true) { '; diff --git a/node_modules/ajv/lib/dotjs/items.js b/node_modules/ajv/lib/dotjs/items.js index d5532f07..bee5d67d 100644 --- a/node_modules/ajv/lib/dotjs/items.js +++ b/node_modules/ajv/lib/dotjs/items.js @@ -66,7 +66,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; var $passData = $data + '[' + $i + ']'; $it.schema = $sch; @@ -89,7 +89,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { } } } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { $it.schema = $additionalItems; $it.schemaPath = it.schemaPath + '.additionalItems'; $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; @@ -113,7 +113,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { $closingBraces += '}'; } } - } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; @@ -136,6 +136,5 @@ module.exports = function generate_items(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } diff --git a/node_modules/ajv/lib/dotjs/multipleOf.js b/node_modules/ajv/lib/dotjs/multipleOf.js index af087d2c..9d6401b8 100644 --- a/node_modules/ajv/lib/dotjs/multipleOf.js +++ b/node_modules/ajv/lib/dotjs/multipleOf.js @@ -16,6 +16,9 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) { } else { $schemaValue = $schema; } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } out += 'var division' + ($lvl) + ';if ('; if ($isData) { out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; diff --git a/node_modules/ajv/lib/dotjs/not.js b/node_modules/ajv/lib/dotjs/not.js index 6aea6599..f50c9378 100644 --- a/node_modules/ajv/lib/dotjs/not.js +++ b/node_modules/ajv/lib/dotjs/not.js @@ -12,7 +12,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) { var $it = it.util.copy(it); $it.level++; var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; diff --git a/node_modules/ajv/lib/dotjs/oneOf.js b/node_modules/ajv/lib/dotjs/oneOf.js index 30988d5e..dfe2fd55 100644 --- a/node_modules/ajv/lib/dotjs/oneOf.js +++ b/node_modules/ajv/lib/dotjs/oneOf.js @@ -26,7 +26,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) { l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; $it.errSchemaPath = $errSchemaPath + '/' + $i; diff --git a/node_modules/ajv/lib/dotjs/properties.js b/node_modules/ajv/lib/dotjs/properties.js index 34a82c62..bc5ee554 100644 --- a/node_modules/ajv/lib/dotjs/properties.js +++ b/node_modules/ajv/lib/dotjs/properties.js @@ -18,9 +18,9 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}), + var $schemaKeys = Object.keys($schema || {}).filter(notProto), $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties), + $pPropertyKeys = Object.keys($pProperties).filter(notProto), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, @@ -30,7 +30,13 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; if ($ownProperties) { out += ' var ' + ($dataProperties) + ' = undefined;'; @@ -183,7 +189,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { while (i3 < l3) { $propertyKey = arr3[i3 += 1]; var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== undefined; @@ -286,7 +292,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { while (i4 < l4) { $pProperty = arr4[i4 += 1]; var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { $it.schema = $sch; $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); @@ -325,6 +331,5 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } diff --git a/node_modules/ajv/lib/dotjs/propertyNames.js b/node_modules/ajv/lib/dotjs/propertyNames.js index b2bf2954..2a54a08f 100644 --- a/node_modules/ajv/lib/dotjs/propertyNames.js +++ b/node_modules/ajv/lib/dotjs/propertyNames.js @@ -14,7 +14,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) { $it.level++; var $nextValid = 'valid' + $it.level; out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; @@ -77,6 +77,5 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) { if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } - out = it.util.cleanUpCode(out); return out; } diff --git a/node_modules/ajv/lib/dotjs/required.js b/node_modules/ajv/lib/dotjs/required.js index 12110a4a..14873eee 100644 --- a/node_modules/ajv/lib/dotjs/required.js +++ b/node_modules/ajv/lib/dotjs/required.js @@ -28,7 +28,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) { while (i1 < l1) { $property = arr1[i1 += 1]; var $propertySch = it.schema.properties[$property]; - if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + if (!($propertySch && (it.opts.strictKeywords ? (typeof $propertySch == 'object' && Object.keys($propertySch).length > 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { $required[$required.length] = $property; } } diff --git a/node_modules/ajv/lib/dotjs/uniqueItems.js b/node_modules/ajv/lib/dotjs/uniqueItems.js index c4f6536b..0736a0ed 100644 --- a/node_modules/ajv/lib/dotjs/uniqueItems.js +++ b/node_modules/ajv/lib/dotjs/uniqueItems.js @@ -29,7 +29,7 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { } else { out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; if ($typeIsArray) { out += ' if (typeof item == \'string\') item = \'"\' + item; '; } diff --git a/node_modules/ajv/lib/dotjs/validate.js b/node_modules/ajv/lib/dotjs/validate.js index cd0efc81..f295824b 100644 --- a/node_modules/ajv/lib/dotjs/validate.js +++ b/node_modules/ajv/lib/dotjs/validate.js @@ -91,7 +91,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); it.baseId = it.baseId || it.rootId; delete it.isTop; - it.dataPathArr = [undefined]; + it.dataPathArr = [""]; if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { var $defaultMsg = 'default is ignored in the schema root'; if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); @@ -149,47 +149,39 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { var $schemaPath = it.schemaPath + '.type', $errSchemaPath = it.errSchemaPath + '/type', $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; if ($coerceToTypes) { var $dataType = 'dataType' + $lvl, $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; + out += ' if (' + ($coerced) + ' !== undefined) ; '; var arr1 = $coerceToTypes; if (arr1) { var $type, $i = -1, l1 = arr1.length - 1; while ($i < l1) { $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; - } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; - } if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; if ($type == 'integer') { out += ' && !(' + ($data) + ' % 1)'; } out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; } } } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + out += ' else { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ @@ -229,7 +221,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += ' } else { '; + out += ' } if (' + ($coerced) + ' !== undefined) { '; var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; out += ' ' + ($data) + ' = ' + ($coerced) + '; '; @@ -302,7 +294,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { $rulesGroup = arr2[i2 += 1]; if ($shouldUseGroup($rulesGroup)) { if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; } if (it.opts.useDefaults) { if ($rulesGroup.type == 'object' && it.schema.properties) { @@ -470,10 +462,6 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { } else { out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; } - out = it.util.cleanUpCode(out); - if ($top) { - out = it.util.finalCleanUpCode(out, $async); - } function $shouldUseGroup($rulesGroup) { var rules = $rulesGroup.rules; diff --git a/node_modules/ajv/lib/keyword.js b/node_modules/ajv/lib/keyword.js index 5fec19a6..06da9a2d 100644 --- a/node_modules/ajv/lib/keyword.js +++ b/node_modules/ajv/lib/keyword.js @@ -46,7 +46,7 @@ function addKeyword(keyword, definition) { metaSchema = { anyOf: [ metaSchema, - { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' } + { '$ref': 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' } ] }; } diff --git a/node_modules/ajv/lib/refs/data.json b/node_modules/ajv/lib/refs/data.json index 87a2d143..64aac5b6 100644 --- a/node_modules/ajv/lib/refs/data.json +++ b/node_modules/ajv/lib/refs/data.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#", + "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", "description": "Meta-schema for $data reference (JSON Schema extension proposal)", "type": "object", "required": [ "$data" ], diff --git a/node_modules/ajv/lib/refs/json-schema-secure.json b/node_modules/ajv/lib/refs/json-schema-secure.json index 66faf84f..0f7aad47 100644 --- a/node_modules/ajv/lib/refs/json-schema-secure.json +++ b/node_modules/ajv/lib/refs/json-schema-secure.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-secure.json#", + "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/json-schema-secure.json#", "title": "Meta-schema for the security assessment of JSON Schemas", "description": "If a JSON Schema fails validation against this meta-schema, it may be unsafe to validate untrusted data", "definitions": { diff --git a/node_modules/ajv/package.json b/node_modules/ajv/package.json index 4eacfc4f..559a933c 100644 --- a/node_modules/ajv/package.json +++ b/node_modules/ajv/package.json @@ -1,45 +1,72 @@ { - "_args": [ - [ - "ajv@6.10.2", - "/Users/nickmerwin/www/coveralls-github-action" - ] + "name": "ajv", + "version": "6.12.6", + "description": "Another JSON Schema Validator", + "main": "lib/ajv.js", + "typings": "lib/ajv.d.ts", + "files": [ + "lib/", + "dist/", + "scripts/", + "LICENSE", + ".tonic_example.js" ], - "_from": "ajv@6.10.2", - "_id": "ajv@6.10.2", - "_inBundle": false, - "_integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "_location": "/ajv", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ajv@6.10.2", - "name": "ajv", - "escapedName": "ajv", - "rawSpec": "6.10.2", - "saveSpec": null, - "fetchSpec": "6.10.2" + "scripts": { + "eslint": "eslint lib/{compile/,}*.js spec/{**/,}*.js scripts --ignore-pattern spec/JSON-Schema-Test-Suite", + "jshint": "jshint lib/{compile/,}*.js", + "lint": "npm run jshint && npm run eslint", + "test-spec": "mocha spec/{**/,}*.spec.js -R spec", + "test-fast": "AJV_FAST_TEST=true npm run test-spec", + "test-debug": "npm run test-spec -- --inspect-brk", + "test-cov": "nyc npm run test-spec", + "test-ts": "tsc --target ES5 --noImplicitAny --noEmit spec/typescript/index.ts", + "bundle": "del-cli dist && node ./scripts/bundle.js . Ajv pure_getters", + "bundle-beautify": "node ./scripts/bundle.js js-beautify", + "build": "del-cli lib/dotjs/*.js \"!lib/dotjs/index.js\" && node scripts/compile-dots.js", + "test-karma": "karma start", + "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma", + "test-all": "npm run test-cov && if-node-version 10 npm run test-browser", + "test": "npm run lint && npm run build && npm run test-all", + "prepublish": "npm run build && npm run bundle", + "watch": "watch \"npm run build\" ./lib/dot" }, - "_requiredBy": [ - "/har-validator" - ], - "_resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "_spec": "6.10.2", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Evgeny Poberezkin" + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/ajv-validator/ajv.git" }, + "keywords": [ + "JSON", + "schema", + "validator", + "validation", + "jsonschema", + "json-schema", + "json-schema-validator", + "json-schema-validation" + ], + "author": "Evgeny Poberezkin", + "license": "MIT", "bugs": { - "url": "https://github.com/epoberezkin/ajv/issues" + "url": "https://github.com/ajv-validator/ajv/issues" }, + "homepage": "https://github.com/ajv-validator/ajv", + "tonicExampleFilename": ".tonic_example.js", "dependencies": { - "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" }, - "description": "Another JSON Schema Validator", "devDependencies": { "ajv-async": "^1.0.0", "bluebird": "^3.5.3", @@ -47,82 +74,33 @@ "browserify": "^16.2.0", "chai": "^4.0.1", "coveralls": "^3.0.1", - "del-cli": "^2.0.0", + "del-cli": "^3.0.0", "dot": "^1.0.3", - "eslint": "^6.0.0", + "eslint": "^7.3.1", "gh-pages-generator": "^0.2.3", "glob": "^7.0.0", "if-node-version": "^1.0.0", "js-beautify": "^1.7.3", "jshint": "^2.10.2", "json-schema-test": "^2.0.0", - "karma": "^4.0.1", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.1.1", - "karma-sauce-launcher": "^2.0.0", - "mocha": "^6.0.0", - "nyc": "^14.0.0", + "karma": "^5.0.0", + "karma-chrome-launcher": "^3.0.0", + "karma-mocha": "^2.0.0", + "karma-sauce-launcher": "^4.1.3", + "mocha": "^8.0.1", + "nyc": "^15.0.0", "pre-commit": "^1.1.1", "require-globify": "^1.3.0", - "typescript": "^2.8.3", - "uglify-js": "^3.3.24", + "typescript": "^3.9.5", + "uglify-js": "^3.6.9", "watch": "^1.0.0" }, - "files": [ - "lib/", - "dist/", - "scripts/", - "LICENSE", - ".tonic_example.js" - ], - "homepage": "https://github.com/epoberezkin/ajv", - "keywords": [ - "JSON", - "schema", - "validator", - "validation", - "jsonschema", - "json-schema", - "json-schema-validator", - "json-schema-validation" - ], - "license": "MIT", - "main": "lib/ajv.js", - "name": "ajv", - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/ajv.git" - }, - "scripts": { - "build": "del-cli lib/dotjs/*.js \"!lib/dotjs/index.js\" && node scripts/compile-dots.js", - "bundle": "del-cli dist && node ./scripts/bundle.js . Ajv pure_getters", - "bundle-beautify": "node ./scripts/bundle.js js-beautify", - "eslint": "eslint lib/{compile/,}*.js spec/{**/,}*.js scripts --ignore-pattern spec/JSON-Schema-Test-Suite", - "jshint": "jshint lib/{compile/,}*.js", - "lint": "npm run jshint && npm run eslint", - "prepublish": "npm run build && npm run bundle", - "test": "npm run lint && npm run build && npm run test-all", - "test-all": "npm run test-ts && npm run test-cov && if-node-version 10 npm run test-browser", - "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma", - "test-cov": "nyc npm run test-spec", - "test-debug": "npm run test-spec -- --inspect-brk", - "test-fast": "AJV_FAST_TEST=true npm run test-spec", - "test-karma": "karma start", - "test-spec": "mocha spec/{**/,}*.spec.js -R spec", - "test-ts": "tsc --target ES5 --noImplicitAny --noEmit spec/typescript/index.ts", - "watch": "watch \"npm run build\" ./lib/dot" + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/ajv" }, - "tonicExampleFilename": ".tonic_example.js", - "typings": "lib/ajv.d.ts", - "version": "6.10.2" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } } diff --git a/node_modules/ajv/scripts/info b/node_modules/ajv/scripts/info old mode 100755 new mode 100644 diff --git a/node_modules/ajv/scripts/prepare-tests b/node_modules/ajv/scripts/prepare-tests old mode 100755 new mode 100644 diff --git a/node_modules/ajv/scripts/publish-built-version b/node_modules/ajv/scripts/publish-built-version old mode 100755 new mode 100644 index 2796ed25..1b571237 --- a/node_modules/ajv/scripts/publish-built-version +++ b/node_modules/ajv/scripts/publish-built-version @@ -8,7 +8,7 @@ if [[ -n $TRAVIS_TAG && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then git config user.email "$GIT_USER_EMAIL" git config user.name "$GIT_USER_NAME" - git clone https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv-dist.git ../ajv-dist + git clone https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv-dist.git ../ajv-dist rm -rf ../ajv-dist/dist mkdir ../ajv-dist/dist diff --git a/node_modules/ajv/scripts/travis-gh-pages b/node_modules/ajv/scripts/travis-gh-pages old mode 100755 new mode 100644 index 46ded161..b3d4f3d0 --- a/node_modules/ajv/scripts/travis-gh-pages +++ b/node_modules/ajv/scripts/travis-gh-pages @@ -5,7 +5,7 @@ set -e if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { rm -rf ../gh-pages - git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages + git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv.git ../gh-pages mkdir -p ../gh-pages/_source cp *.md ../gh-pages/_source cp LICENSE ../gh-pages/_source diff --git a/node_modules/ansi-colors/README.md b/node_modules/ansi-colors/README.md index 49916771..dcdbcb50 100644 --- a/node_modules/ansi-colors/README.md +++ b/node_modules/ansi-colors/README.md @@ -1,4 +1,4 @@ -# ansi-colors [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/ansi-colors.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/ansi-colors) +# ansi-colors [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) > Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs). @@ -141,6 +141,48 @@ _(`gray` is the U.S. spelling, `grey` is more commonly used in the Canada and U. * reset +## Aliases + +Create custom aliases for styles. + +```js +const colors = require('ansi-colors'); + +colors.alias('primary', colors.yellow); +colors.alias('secondary', colors.bold); + +console.log(colors.primary.secondary('Foo')); +``` + +## Themes + +A theme is an object of custom aliases. + +```js +const colors = require('ansi-colors'); + +colors.theme({ + danger: colors.red, + dark: colors.dim.gray, + disabled: colors.gray, + em: colors.italic, + heading: colors.bold.underline, + info: colors.cyan, + muted: colors.dim, + primary: colors.blue, + strong: colors.bold, + success: colors.green, + underline: colors.underline, + warning: colors.yellow +}); + +// Now, we can use our custom styles alongside the built-in styles! +console.log(colors.danger.strong.em('Error!')); +console.log(colors.warning('Heads up!')); +console.log(colors.info('Did you know...')); +console.log(colors.success.bold('It worked!')); +``` + ## Performance **Libraries tested** @@ -246,14 +288,13 @@ You might also be interested in these projects: | **Commits** | **Contributor** | | --- | --- | -| 38 | [jonschlinkert](https://github.com/jonschlinkert) | -| 38 | [doowb](https://github.com/doowb) | +| 48 | [jonschlinkert](https://github.com/jonschlinkert) | +| 42 | [doowb](https://github.com/doowb) | | 6 | [lukeed](https://github.com/lukeed) | | 2 | [Silic0nS0ldier](https://github.com/Silic0nS0ldier) | | 1 | [dwieeb](https://github.com/dwieeb) | | 1 | [jorgebucaran](https://github.com/jorgebucaran) | | 1 | [madhavarshney](https://github.com/madhavarshney) | -| 1 | [Weishi93](https://github.com/Weishi93) | | 1 | [chapterjason](https://github.com/chapterjason) | ### Author @@ -266,9 +307,9 @@ You might also be interested in these projects: ### License -Copyright © 2018, [Brian Woodward](https://github.com/doowb). +Copyright © 2019, [Brian Woodward](https://github.com/doowb). Released under the [MIT License](LICENSE). *** -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on December 03, 2018._ \ 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 July 01, 2019._ \ No newline at end of file diff --git a/node_modules/ansi-colors/index.js b/node_modules/ansi-colors/index.js index 4e8ed08a..8e264190 100644 --- a/node_modules/ansi-colors/index.js +++ b/node_modules/ansi-colors/index.js @@ -1,114 +1,177 @@ 'use strict'; -const colors = { enabled: true, visible: true, styles: {}, keys: {} }; +const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +const identity = val => val; -if ('FORCE_COLOR' in process.env) { - colors.enabled = process.env.FORCE_COLOR !== '0'; -} +/* eslint-disable no-control-regex */ +// this is a modified version of https://github.com/chalk/ansi-regex (MIT License) +const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; -const ansi = style => { - style.open = `\u001b[${style.codes[0]}m`; - style.close = `\u001b[${style.codes[1]}m`; - style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'); - return style; -}; +const create = () => { + const colors = { enabled: true, visible: true, styles: {}, keys: {} }; -const wrap = (style, str, nl) => { - let { open, close, regex } = style; - str = open + (str.includes(close) ? str.replace(regex, close + open) : str) + close; - // see https://github.com/chalk/chalk/pull/92, thanks to the - // chalk contributors for this fix. However, we've confirmed that - // this issue is also present in Windows terminals - return nl ? str.replace(/\r?\n/g, `${close}$&${open}`) : str; -}; + if ('FORCE_COLOR' in process.env) { + colors.enabled = process.env.FORCE_COLOR !== '0'; + } -const style = (input, stack) => { - if (input === '' || input == null) return ''; - if (colors.enabled === false) return input; - if (colors.visible === false) return ''; - let str = '' + input; - let nl = str.includes('\n'); - let n = stack.length; - while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl); - return str; -}; + const ansi = style => { + let open = style.open = `\u001b[${style.codes[0]}m`; + let close = style.close = `\u001b[${style.codes[1]}m`; + let regex = style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'); + style.wrap = (input, newline) => { + if (input.includes(close)) input = input.replace(regex, close + open); + let output = open + input + close; + // see https://github.com/chalk/chalk/pull/92, thanks to the + // chalk contributors for this fix. However, we've confirmed that + // this issue is also present in Windows terminals + return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output; + }; + return style; + }; -const define = (name, codes, type) => { - colors.styles[name] = ansi({ name, codes }); - let t = colors.keys[type] || (colors.keys[type] = []); - t.push(name); - - Reflect.defineProperty(colors, name, { - get() { - let color = input => style(input, color.stack); - Reflect.setPrototypeOf(color, colors); - color.stack = this.stack ? this.stack.concat(name) : [name]; - return color; + const wrap = (style, input, newline) => { + return typeof style === 'function' ? style(input) : style.wrap(input, newline); + }; + + const style = (input, stack) => { + if (input === '' || input == null) return ''; + if (colors.enabled === false) return input; + if (colors.visible === false) return ''; + let str = '' + input; + let nl = str.includes('\n'); + let n = stack.length; + if (n > 0 && stack.includes('unstyle')) { + stack = [...new Set(['unstyle', ...stack])].reverse(); } - }); -}; + while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl); + return str; + }; -define('reset', [0, 0], 'modifier'); -define('bold', [1, 22], 'modifier'); -define('dim', [2, 22], 'modifier'); -define('italic', [3, 23], 'modifier'); -define('underline', [4, 24], 'modifier'); -define('inverse', [7, 27], 'modifier'); -define('hidden', [8, 28], 'modifier'); -define('strikethrough', [9, 29], 'modifier'); - -define('black', [30, 39], 'color'); -define('red', [31, 39], 'color'); -define('green', [32, 39], 'color'); -define('yellow', [33, 39], 'color'); -define('blue', [34, 39], 'color'); -define('magenta', [35, 39], 'color'); -define('cyan', [36, 39], 'color'); -define('white', [37, 39], 'color'); -define('gray', [90, 39], 'color'); -define('grey', [90, 39], 'color'); - -define('bgBlack', [40, 49], 'bg'); -define('bgRed', [41, 49], 'bg'); -define('bgGreen', [42, 49], 'bg'); -define('bgYellow', [43, 49], 'bg'); -define('bgBlue', [44, 49], 'bg'); -define('bgMagenta', [45, 49], 'bg'); -define('bgCyan', [46, 49], 'bg'); -define('bgWhite', [47, 49], 'bg'); - -define('blackBright', [90, 39], 'bright'); -define('redBright', [91, 39], 'bright'); -define('greenBright', [92, 39], 'bright'); -define('yellowBright', [93, 39], 'bright'); -define('blueBright', [94, 39], 'bright'); -define('magentaBright', [95, 39], 'bright'); -define('cyanBright', [96, 39], 'bright'); -define('whiteBright', [97, 39], 'bright'); - -define('bgBlackBright', [100, 49], 'bgBright'); -define('bgRedBright', [101, 49], 'bgBright'); -define('bgGreenBright', [102, 49], 'bgBright'); -define('bgYellowBright', [103, 49], 'bgBright'); -define('bgBlueBright', [104, 49], 'bgBright'); -define('bgMagentaBright', [105, 49], 'bgBright'); -define('bgCyanBright', [106, 49], 'bgBright'); -define('bgWhiteBright', [107, 49], 'bgBright'); + const define = (name, codes, type) => { + colors.styles[name] = ansi({ name, codes }); + let keys = colors.keys[type] || (colors.keys[type] = []); + keys.push(name); -/* eslint-disable no-control-regex */ -const re = colors.ansiRegex = /\u001b\[\d+m/gm; -colors.hasColor = colors.hasAnsi = str => { - re.lastIndex = 0; - return !!str && typeof str === 'string' && re.test(str); -}; + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value); + }, + get() { + let color = input => style(input, color.stack); + Reflect.setPrototypeOf(color, colors); + color.stack = this.stack ? this.stack.concat(name) : [name]; + return color; + } + }); + }; + + define('reset', [0, 0], 'modifier'); + define('bold', [1, 22], 'modifier'); + define('dim', [2, 22], 'modifier'); + define('italic', [3, 23], 'modifier'); + define('underline', [4, 24], 'modifier'); + define('inverse', [7, 27], 'modifier'); + define('hidden', [8, 28], 'modifier'); + define('strikethrough', [9, 29], 'modifier'); + + define('black', [30, 39], 'color'); + define('red', [31, 39], 'color'); + define('green', [32, 39], 'color'); + define('yellow', [33, 39], 'color'); + define('blue', [34, 39], 'color'); + define('magenta', [35, 39], 'color'); + define('cyan', [36, 39], 'color'); + define('white', [37, 39], 'color'); + define('gray', [90, 39], 'color'); + define('grey', [90, 39], 'color'); + + define('bgBlack', [40, 49], 'bg'); + define('bgRed', [41, 49], 'bg'); + define('bgGreen', [42, 49], 'bg'); + define('bgYellow', [43, 49], 'bg'); + define('bgBlue', [44, 49], 'bg'); + define('bgMagenta', [45, 49], 'bg'); + define('bgCyan', [46, 49], 'bg'); + define('bgWhite', [47, 49], 'bg'); + + define('blackBright', [90, 39], 'bright'); + define('redBright', [91, 39], 'bright'); + define('greenBright', [92, 39], 'bright'); + define('yellowBright', [93, 39], 'bright'); + define('blueBright', [94, 39], 'bright'); + define('magentaBright', [95, 39], 'bright'); + define('cyanBright', [96, 39], 'bright'); + define('whiteBright', [97, 39], 'bright'); + + define('bgBlackBright', [100, 49], 'bgBright'); + define('bgRedBright', [101, 49], 'bgBright'); + define('bgGreenBright', [102, 49], 'bgBright'); + define('bgYellowBright', [103, 49], 'bgBright'); + define('bgBlueBright', [104, 49], 'bgBright'); + define('bgMagentaBright', [105, 49], 'bgBright'); + define('bgCyanBright', [106, 49], 'bgBright'); + define('bgWhiteBright', [107, 49], 'bgBright'); + + colors.ansiRegex = ANSI_REGEX; + colors.hasColor = colors.hasAnsi = str => { + colors.ansiRegex.lastIndex = 0; + return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str); + }; + + colors.alias = (name, color) => { + let fn = typeof color === 'string' ? colors[color] : color; + + if (typeof fn !== 'function') { + throw new TypeError('Expected alias to be the name of an existing color (string) or a function'); + } + + if (!fn.stack) { + Reflect.defineProperty(fn, 'name', { value: name }); + colors.styles[name] = fn; + fn.stack = [name]; + } + + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value); + }, + get() { + let color = input => style(input, color.stack); + Reflect.setPrototypeOf(color, colors); + color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack; + return color; + } + }); + }; + + colors.theme = custom => { + if (!isObject(custom)) throw new TypeError('Expected theme to be an object'); + for (let name of Object.keys(custom)) { + colors.alias(name, custom[name]); + } + return colors; + }; + + colors.alias('unstyle', str => { + if (typeof str === 'string' && str !== '') { + colors.ansiRegex.lastIndex = 0; + return str.replace(colors.ansiRegex, ''); + } + return ''; + }); + + colors.alias('noop', str => str); + colors.none = colors.clear = colors.noop; -colors.unstyle = str => { - re.lastIndex = 0; - return typeof str === 'string' ? str.replace(re, '') : str; + colors.stripColor = colors.unstyle; + colors.symbols = require('./symbols'); + colors.define = define; + return colors; }; -colors.none = colors.clear = colors.noop = str => str; // no-op, for programmatic usage -colors.stripColor = colors.unstyle; -colors.symbols = require('./symbols'); -colors.define = define; -module.exports = colors; +module.exports = create(); +module.exports.create = create; diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json index c1eedcf1..e1109314 100644 --- a/node_modules/ansi-colors/package.json +++ b/node_modules/ansi-colors/package.json @@ -1,75 +1,40 @@ { - "_args": [ - [ - "ansi-colors@3.2.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "ansi-colors@3.2.3", - "_id": "ansi-colors@3.2.3", - "_inBundle": false, - "_integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "_location": "/ansi-colors", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ansi-colors@3.2.3", - "name": "ansi-colors", - "escapedName": "ansi-colors", - "rawSpec": "3.2.3", - "saveSpec": null, - "fetchSpec": "3.2.3" - }, - "_requiredBy": [ - "/mocha" + "name": "ansi-colors", + "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", + "version": "4.1.1", + "homepage": "https://github.com/doowb/ansi-colors", + "author": "Brian Woodward (https://github.com/doowb)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jason Schilling (https://sourecode.de)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Jordan (https://github.com/Silic0nS0ldier)" ], - "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "_spec": "3.2.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Brian Woodward", - "url": "https://github.com/doowb" - }, + "repository": "doowb/ansi-colors", "bugs": { "url": "https://github.com/doowb/ansi-colors/issues" }, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jason Schilling", - "url": "https://sourecode.de" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Jordan", - "url": "https://github.com/Silic0nS0ldier" - } - ], - "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", - "devDependencies": { - "decache": "^4.4.0", - "gulp-format-md": "^1.0.0", - "justified": "^1.0.1", - "mocha": "^5.2.0", - "text-table": "^0.2.0" - }, - "engines": { - "node": ">=6" - }, + "license": "MIT", "files": [ "index.js", "symbols.js", "types/index.d.ts" ], - "homepage": "https://github.com/doowb/ansi-colors", + "main": "index.js", + "types": "./types/index.d.ts", + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "decache": "^4.5.1", + "gulp-format-md": "^2.0.0", + "justified": "^1.0.1", + "mocha": "^6.1.4", + "text-table": "^0.2.0" + }, "keywords": [ "ansi", "bgblack", @@ -110,17 +75,6 @@ "white", "yellow" ], - "license": "MIT", - "main": "index.js", - "name": "ansi-colors", - "repository": { - "type": "git", - "url": "git+https://github.com/doowb/ansi-colors.git" - }, - "scripts": { - "test": "mocha" - }, - "types": "./types/index.d.ts", "verb": { "toc": false, "layout": "default", @@ -151,6 +105,5 @@ "colors", "kleur" ] - }, - "version": "3.2.3" + } } diff --git a/node_modules/ansi-colors/symbols.js b/node_modules/ansi-colors/symbols.js index 9643d8d0..ee159457 100644 --- a/node_modules/ansi-colors/symbols.js +++ b/node_modules/ansi-colors/symbols.js @@ -1,46 +1,70 @@ 'use strict'; +const isHyper = process.env.TERM_PROGRAM === 'Hyper'; const isWindows = process.platform === 'win32'; const isLinux = process.platform === 'linux'; -const windows = { +const common = { + ballotDisabled: '☒', + ballotOff: '☐', + ballotOn: '☑', bullet: '•', - check: '√', - cross: '×', - ellipsis: '...', + bulletWhite: '◦', + fullBlock: '█', heart: '❤', - info: 'i', + identicalTo: '≡', line: '─', + mark: '※', middot: '·', minus: '-', - plus: '+', + multiplication: '×', + obelus: '÷', + pencilDownRight: '✎', + pencilRight: '✏', + pencilUpRight: '✐', + percent: '%', + pilcrow2: '❡', + pilcrow: '¶', + plusMinus: '±', + section: '§', + starsOff: '☆', + starsOn: '★', + upDownArrow: '↕' +}; + +const windows = Object.assign({}, common, { + check: '√', + cross: '×', + ellipsisLarge: '...', + ellipsis: '...', + info: 'i', question: '?', - questionSmall: '﹖', + questionSmall: '?', pointer: '>', pointerSmall: '»', + radioOff: '( )', + radioOn: '(*)', warning: '‼' -}; +}); -const other = { +const other = Object.assign({}, common, { ballotCross: '✘', - bullet: '•', check: '✔', cross: '✖', + ellipsisLarge: '⋯', ellipsis: '…', - heart: '❤', info: 'ℹ', - line: '─', - middot: '·', - minus: '-', - plus: '+', question: '?', questionFull: '?', questionSmall: '﹖', pointer: isLinux ? '▸' : '❯', pointerSmall: isLinux ? '‣' : '›', + radioOff: '◯', + radioOn: '◉', warning: '⚠' -}; +}); -module.exports = isWindows ? windows : other; +module.exports = (isWindows && !isHyper) ? windows : other; +Reflect.defineProperty(module.exports, 'common', { enumerable: false, value: common }); Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows }); Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other }); diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js index c4aaecf5..616ff837 100644 --- a/node_modules/ansi-regex/index.js +++ b/node_modules/ansi-regex/index.js @@ -1,10 +1,10 @@ 'use strict'; -module.exports = () => { +module.exports = ({onlyFirst = false} = {}) => { const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' ].join('|'); - return new RegExp(pattern, 'g'); + return new RegExp(pattern, onlyFirst ? undefined : 'g'); }; diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json index f1457ecb..017f5311 100644 --- a/node_modules/ansi-regex/package.json +++ b/node_modules/ansi-regex/package.json @@ -1,89 +1,55 @@ { - "_args": [ - [ - "ansi-regex@3.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "ansi-regex@3.0.0", - "_id": "ansi-regex@3.0.0", - "_inBundle": false, - "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "_location": "/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": [ - "/strip-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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" + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "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" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } } diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md index 22db1c34..4d848bc3 100644 --- a/node_modules/ansi-regex/readme.md +++ b/node_modules/ansi-regex/readme.md @@ -1,4 +1,4 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) +# ansi-regex > Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) @@ -23,9 +23,33 @@ ansiRegex().test('cake'); '\u001B[4mcake\u001B[0m'.match(ansiRegex()); //=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] ``` +## API + +### ansiRegex(options?) + +Returns a regex for matching ANSI escape codes. + +#### options + +Type: `object` + +##### onlyFirst + +Type: `boolean`
+Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + ## FAQ ### Why do you test for codes not in the ECMA 48 standard? @@ -41,6 +65,14 @@ On the historical side, those ECMA standards were established in the early 90's - [Josh Junon](https://github.com/qix-) -## License +--- -MIT +
+ + 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. +
+
diff --git a/node_modules/cliui/CHANGELOG.md b/node_modules/cliui/CHANGELOG.md index d9e6fbb9..37f259a5 100644 --- a/node_modules/cliui/CHANGELOG.md +++ b/node_modules/cliui/CHANGELOG.md @@ -2,6 +2,20 @@ 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. +# [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10) + + +### Bug Fixes + +* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae)) + + +### BREAKING CHANGES + +* Drop support for node < 6. + + + # [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23) diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md index 7861976f..deacfa0d 100644 --- a/node_modules/cliui/README.md +++ b/node_modules/cliui/README.md @@ -46,7 +46,7 @@ console.log(ui.toString()) cliui exposes a simple layout DSL: -If you create a single `ui.row`, passing a string rather than an +If you create a single `ui.div`, passing a string rather than an object: * `\n`: characters will be interpreted as new rows. diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json index 0aa34093..64936f71 100644 --- a/node_modules/cliui/package.json +++ b/node_modules/cliui/package.json @@ -1,40 +1,17 @@ { - "_args": [ - [ - "cliui@4.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "cliui@4.1.0", - "_id": "cliui@4.1.0", - "_inBundle": false, - "_integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "_location": "/cliui", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cliui@4.1.0", - "name": "cliui", - "escapedName": "cliui", - "rawSpec": "4.1.0", - "saveSpec": null, - "fetchSpec": "4.1.0" - }, - "_requiredBy": [ - "/yargs", - "/yargs-unparser/yargs" - ], - "_resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "_spec": "4.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" + "name": "cliui", + "version": "5.0.0", + "description": "easily create complex multi-column command-line-interfaces", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc mocha", + "coverage": "nyc --reporter=text-lcov mocha | coveralls", + "release": "standard-version" }, - "bugs": { - "url": "https://github.com/yargs/cliui/issues" + "repository": { + "type": "git", + "url": "http://github.com/yargs/cliui.git" }, "config": { "blanket": { @@ -48,28 +25,14 @@ "output-reporter": "spec" } }, - "dependencies": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "description": "easily create complex multi-column command-line-interfaces", - "devDependencies": { - "chai": "^3.5.0", - "chalk": "^1.1.2", - "coveralls": "^2.11.8", - "mocha": "^3.0.0", - "nyc": "^10.0.0", - "standard": "^8.0.0", - "standard-version": "^3.0.0" - }, - "engine": { - "node": ">=4" + "standard": { + "ignore": [ + "**/example/**" + ], + "globals": [ + "it" + ] }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/yargs/cliui#readme", "keywords": [ "cli", "command-line", @@ -79,26 +42,26 @@ "wrap", "table" ], + "author": "Ben Coe ", "license": "ISC", - "main": "index.js", - "name": "cliui", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/yargs/cliui.git" - }, - "scripts": { - "coverage": "nyc --reporter=text-lcov mocha | coveralls", - "pretest": "standard", - "release": "standard-version", - "test": "nyc mocha" + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" }, - "standard": { - "ignore": [ - "**/example/**" - ], - "globals": [ - "it" - ] + "devDependencies": { + "chai": "^4.2.0", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "mocha": "^6.0.2", + "nyc": "^13.3.0", + "standard": "^12.0.1", + "standard-version": "^5.0.2" }, - "version": "4.1.0" + "files": [ + "index.js" + ], + "engine": { + "node": ">=6" + } } diff --git a/node_modules/code-point-at/index.js b/node_modules/code-point-at/index.js deleted file mode 100644 index 0432fe6a..00000000 --- a/node_modules/code-point-at/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable babel/new-cap, xo/throw-new-error */ -'use strict'; -module.exports = function (str, pos) { - if (str === null || str === undefined) { - throw TypeError(); - } - - str = String(str); - - var size = str.length; - var i = pos ? Number(pos) : 0; - - if (Number.isNaN(i)) { - i = 0; - } - - if (i < 0 || i >= size) { - return undefined; - } - - var first = str.charCodeAt(i); - - if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) { - var second = str.charCodeAt(i + 1); - - if (second >= 0xDC00 && second <= 0xDFFF) { - return ((first - 0xD800) * 0x400) + second - 0xDC00 + 0x10000; - } - } - - return first; -}; diff --git a/node_modules/code-point-at/license b/node_modules/code-point-at/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/code-point-at/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/code-point-at/package.json b/node_modules/code-point-at/package.json deleted file mode 100644 index f7c498b9..00000000 --- a/node_modules/code-point-at/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_args": [ - [ - "code-point-at@1.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "code-point-at@1.1.0", - "_id": "code-point-at@1.1.0", - "_inBundle": false, - "_integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "_location": "/code-point-at", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "code-point-at@1.1.0", - "name": "code-point-at", - "escapedName": "code-point-at", - "rawSpec": "1.1.0", - "saveSpec": null, - "fetchSpec": "1.1.0" - }, - "_requiredBy": [ - "/wrap-ansi/string-width" - ], - "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "_spec": "1.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/code-point-at/issues" - }, - "description": "ES2015 `String#codePointAt()` ponyfill", - "devDependencies": { - "ava": "*", - "xo": "^0.16.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/code-point-at#readme", - "keywords": [ - "es2015", - "ponyfill", - "polyfill", - "shim", - "string", - "str", - "code", - "point", - "at", - "codepoint", - "unicode" - ], - "license": "MIT", - "name": "code-point-at", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/code-point-at.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.1.0" -} diff --git a/node_modules/code-point-at/readme.md b/node_modules/code-point-at/readme.md deleted file mode 100644 index 4c97730e..00000000 --- a/node_modules/code-point-at/readme.md +++ /dev/null @@ -1,32 +0,0 @@ -# code-point-at [![Build Status](https://travis-ci.org/sindresorhus/code-point-at.svg?branch=master)](https://travis-ci.org/sindresorhus/code-point-at) - -> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save code-point-at -``` - - -## Usage - -```js -var codePointAt = require('code-point-at'); - -codePointAt('🐴'); -//=> 128052 - -codePointAt('abc', 2); -//=> 99 -``` - -## API - -### codePointAt(input, [position]) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/coveralls/README.md b/node_modules/coveralls/README.md index 08b73b6c..c0cb324c 100644 --- a/node_modules/coveralls/README.md +++ b/node_modules/coveralls/README.md @@ -4,7 +4,17 @@ [Coveralls.io](https://coveralls.io/) support for Node.js. Get the great coverage reporting of coveralls.io and add a cool coverage button (like the one above) to your README. -Supported CI services: [Travis CI](https://travis-ci.org/), [CodeShip](https://codeship.com/), [CircleCI](https://circleci.com/), [Jenkins](https://jenkins.io/), [Gitlab CI](https://gitlab.com/), [AppVeyor](https://www.appveyor.com/), [Buildkite](https://buildkite.com/), [GitHub Actions CI](https://github.com/features/actions), [CodeFresh](https://codefresh.io) +## Supported CI services: + +* [Travis CI](https://travis-ci.org/) +* [CodeShip](https://codeship.com/) +* [CircleCI](https://circleci.com/) +* [Jenkins](https://jenkins.io/) +* [Gitlab CI](https://gitlab.com/) +* [AppVeyor](https://www.appveyor.com/) +* [Buildkite](https://buildkite.com/) +* [GitHub Actions CI](https://github.com/features/actions) +* [CodeFresh](https://codefresh.io/) ## Installation: @@ -26,7 +36,7 @@ This script `bin/coveralls.js` can take standard input from any tool that emits Once your app is instrumented for coverage, and building, you need to pipe the lcov output to `./node_modules/coveralls/bin/coveralls.js`. -This library currently supports [Travis CI](https://travis-ci.org/) with no extra effort beyond piping the lcov output to coveralls. However, if you're using a different build system, there are a few environment variables that are necessary: +This library currently supports [Travis CI](https://travis-ci.org/) with no extra effort beyond piping the lcov output to coveralls. However, if you're using a different build system, there are a few **necessary** environment variables: - `COVERALLS_SERVICE_NAME` (the name of your build system) - `COVERALLS_REPO_TOKEN` (the secret repo token from coveralls.io) @@ -34,22 +44,28 @@ This library currently supports [Travis CI](https://travis-ci.org/) with no extr There are optional environment variables for other build systems as well: -- `COVERALLS_SERVICE_NUMBER` (an id that uniquely identifies the build) -- `COVERALLS_SERVICE_JOB_ID` (an id that uniquely identifies the build's job) -- `COVERALLS_RUN_AT` (a date string for the time that the job ran. RFC 3339 dates work. This defaults to your build system's date/time if you don't set it.) -- `COVERALLS_PARALLEL` (more info here: ) +- `COVERALLS_FLAG_NAME` (a flag name to differentiate jobs, e.g. Unit, Functional, Integration) +- `COVERALLS_SERVICE_NUMBER` (a number that uniquely identifies the build) +- `COVERALLS_SERVICE_JOB_ID` (an ID that uniquely identifies the build's job) +- `COVERALLS_SERVICE_JOB_NUMBER` (a number that uniquely identifies the build's job) +- `COVERALLS_RUN_AT` (a date string for the time that the job ran. RFC 3339 dates work. This defaults to your build system's date/time if you don't set it) +- `COVERALLS_PARALLEL` (set to `true` when running jobs in parallel, requires a completion webhook. More info here: ) ### GitHub Actions CI If you are using GitHub Actions CI, you should look into [coverallsapp/github-action](https://github.com/coverallsapp/github-action). -If you prefer to use this package you can do it like this: +Parallel runs example [workflow.yml](https://github.com/coverallsapp/coveralls-node-demo/blob/master/.github/workflows/workflow.yml) -```yml -env: - COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}" - COVERALLS_GIT_BRANCH: "${{ github.ref }}" -``` +### [CircleCI Orb](https://circleci.com/) + +Here's our Orb for quick integration: [coveralls/coveralls](https://circleci.com/orbs/registry/orb/coveralls/coveralls) + +Workflow example: [config.yml](https://github.com/coverallsapp/coveralls-node-demo/blob/master/.circleci/config.yml) + +### [Travis-CI](https://travis-ci.org/) + +Parallel jobs example: [.travis.yml](https://github.com/coverallsapp/coveralls-node-demo/blob/master/.travis.yml) ### [Jest](https://jestjs.io/) @@ -76,7 +92,7 @@ Check out an example [here](https://github.com/Ethan-Arrowood/harperdb-connect/b ### [Mocha](https://mochajs.org/) + [JSCoverage](https://github.com/fishbar/jscoverage) -Instrumenting your app for coverage is probably harder than it needs to be (read [here](http://seejohncode.com/2012/03/13/setting-up-mocha-jscoverage//)), but that's also a necessary step. +Instrumenting your app for coverage is probably harder than it needs to be (read [here](http://seejohncode.com/2012/03/13/setting-up-mocha-jscoverage/)), but that's also a necessary step. In mocha, if you've got your code instrumented for coverage, the command for a Travis CI build would look something like this: @@ -102,7 +118,7 @@ istanbul cover jasmine-node --captureExceptions spec/ && cat ./coverage/lcov.inf ### [Nodeunit](https://github.com/caolan/nodeunit) + [JSCoverage](https://github.com/fishbar/jscoverage) -Depend on nodeunit, jscoverage and coveralls: +Depend on nodeunit, jscoverage, and coveralls: ```sh npm install nodeunit jscoverage coveralls --save-dev @@ -154,7 +170,7 @@ Works with almost any testing framework. Simply execute nyc npm test && nyc report --reporter=text-lcov | coveralls ``` -### [TAP](https://github.com/isaacs/node-tap) +### [TAP](https://github.com/tapjs/node-tap) Simply run your tap tests with the `COVERALLS_REPO_TOKEN` environment variable set and tap will automatically use `nyc` to report @@ -179,9 +195,9 @@ If you want to send commit data to coveralls, you can set the `COVERALLS_GIT_COM ## Contributing -I generally don't accept pull requests that are untested, or break the build, because I'd like to keep the quality high (this is a coverage tool after all!). +I generally don't accept pull requests that are untested or break the build, because I'd like to keep the quality high (this is a coverage tool after all!). -I also don't care for "soft-versioning" or "optimistic versioning" (dependencies that have ^, x, > in them, or anything other than numbers and dots). There have been too many problems with bad semantic versioning in dependencies, and I'd rather have a solid library than a bleeding edge one. +I also don't care for "soft-versioning" or "optimistic versioning" (dependencies that have ^, x, > in them, or anything other than numbers and dots). There have been too many problems with bad semantic versioning in dependencies, and I'd rather have a solid library than a bleeding-edge one. [ci-image]: https://github.com/nickmerwin/node-coveralls/workflows/Tests/badge.svg diff --git a/node_modules/coveralls/lib/convertLcovToCoveralls.js b/node_modules/coveralls/lib/convertLcovToCoveralls.js index 65ec381a..bcbb9933 100644 --- a/node_modules/coveralls/lib/convertLcovToCoveralls.js +++ b/node_modules/coveralls/lib/convertLcovToCoveralls.js @@ -7,19 +7,23 @@ const logger = require('./logger')(); const detailsToCoverage = (length, details) => { const coverage = new Array(length); + details.forEach(obj => { coverage[obj.line - 1] = obj.hit; }); + return coverage; }; const detailsToBranches = details => { const branches = []; + details.forEach(obj => { ['line', 'block', 'branch', 'taken'].forEach(key => { branches.push(obj[key] || 0); }); }); + return branches; }; @@ -67,7 +71,7 @@ const convertLcovToCoveralls = (input, options, cb) => { if (options.flag_name) { postJson.flag_name = options.flag_name; } - + if (options.git) { postJson.git = options.git; } @@ -79,15 +83,19 @@ const convertLcovToCoveralls = (input, options, cb) => { if (options.service_name) { postJson.service_name = options.service_name; } - + if (options.service_number) { postJson.service_number = options.service_number; } - + if (options.service_job_id) { postJson.service_job_id = options.service_job_id; } + if (options.service_job_number) { + postJson.service_job_number = options.service_job_number; + } + if (options.service_pull_request) { postJson.service_pull_request = options.service_pull_request; } @@ -99,9 +107,7 @@ const convertLcovToCoveralls = (input, options, cb) => { if (options.parallel) { postJson.parallel = options.parallel; } - if (options.flag_name) { - postJson.flag_name = options.flag_name; - } + parsed.forEach(file => { file.file = cleanFilePath(file.file); const currentFilePath = path.resolve(filepath, file.file); @@ -109,6 +115,7 @@ const convertLcovToCoveralls = (input, options, cb) => { postJson.source_files.push(convertLcovFileObject(file, filepath)); } }); + return cb(null, postJson); }); }; @@ -136,7 +143,7 @@ module.exports = convertLcovToCoveralls; example output from lcov parser: - [ +[ { "file": "index.js", "lines": { @@ -158,6 +165,10 @@ example output from lcov parser: { "line": 5, "hit": 1 - }, + } + ] + } + } +] */ diff --git a/node_modules/coveralls/lib/fetchGitData.js b/node_modules/coveralls/lib/fetchGitData.js index ee692469..76742221 100644 --- a/node_modules/coveralls/lib/fetchGitData.js +++ b/node_modules/coveralls/lib/fetchGitData.js @@ -1,6 +1,6 @@ 'use strict'; -const { exec } = require('child_process'); +const { execFile } = require('child_process'); require('./logger')(); function fetchGitData(git, cb) { @@ -40,7 +40,7 @@ function fetchGitData(git, cb) { } //-- Use git? - exec(`git rev-parse --verify ${git.head.id}`, err => { + execFile('git', ['rev-parse', '--verify', git.head.id], err => { if (err) { // git is not available... git.head.author_name = git.head.author_name || 'Unknown Author'; @@ -56,7 +56,7 @@ function fetchGitData(git, cb) { } function fetchBranch(git, cb) { - exec('git branch', (err, branches) => { + execFile('git', ['branch'], (err, branches) => { if (err) { return cb(err); } @@ -69,7 +69,7 @@ function fetchBranch(git, cb) { const REGEX_COMMIT_DETAILS = /\nauthor (.+?) <([^>]*)>.+\ncommitter (.+?) <([^>]*)>.+[\S\s]*?\n\n(.*)/m; function fetchHeadDetails(git, cb) { - exec(`git cat-file -p ${git.head.id}`, (err, response) => { + execFile('git', ['cat-file', '-p', git.head.id], (err, response) => { if (err) { return cb(err); } @@ -89,7 +89,7 @@ function fetchHeadDetails(git, cb) { } function fetchRemotes(git, cb) { - exec('git remote -v', (err, remotes) => { + execFile('git', ['remote', '-v'], (err, remotes) => { if (err) { return cb(err); } diff --git a/node_modules/coveralls/lib/getOptions.js b/node_modules/coveralls/lib/getOptions.js index 7fcbf089..3ac55794 100644 --- a/node_modules/coveralls/lib/getOptions.js +++ b/node_modules/coveralls/lib/getOptions.js @@ -24,6 +24,7 @@ const getBaseOptions = cb => { if (process.env.TRAVIS) { options.service_name = 'travis-ci'; + options.service_number = process.env.TRAVIS_BUILD_NUMBER; options.service_job_id = process.env.TRAVIS_JOB_ID; options.service_pull_request = process.env.TRAVIS_PULL_REQUEST; git_commit = 'HEAD'; @@ -53,7 +54,8 @@ const getBaseOptions = cb => { if (process.env.CIRCLECI) { options.service_name = 'circleci'; - options.service_job_id = process.env.CIRCLE_BUILD_NUM; + options.service_number = process.env.CIRCLE_WORKFLOW_ID; + options.service_job_number = process.env.CIRCLE_BUILD_NUM; if (process.env.CI_PULL_REQUEST) { const pr = process.env.CI_PULL_REQUEST.split('/pull/'); @@ -147,6 +149,10 @@ const getBaseOptions = cb => { options.service_number = process.env.COVERALLS_SERVICE_NUMBER; } + if (process.env.COVERALLS_SERVICE_JOB_NUMBER) { + options.service_job_number = process.env.COVERALLS_SERVICE_JOB_NUMBER; + } + if (process.env.COVERALLS_SERVICE_JOB_ID) { options.service_job_id = process.env.COVERALLS_SERVICE_JOB_ID; } @@ -180,6 +186,7 @@ const getBaseOptions = cb => { if (coveralls_yaml_conf.repo_token) { options.repo_token = coveralls_yaml_conf.repo_token; } + if (coveralls_yaml_conf.service_name) { options.service_name = coveralls_yaml_conf.service_name; } @@ -190,7 +197,7 @@ const getBaseOptions = cb => { options.repo_token = process.env.COVERALLS_REPO_TOKEN; } - if ('travis-pro' === options.service_name && !options.repo_token) { + if (options.service_name === 'travis-pro' && !options.repo_token) { logger.warn('Repo token could not be determined. Continuing without it. ' + 'This is necessary for private repos only, so may not be an issue at all.'); } diff --git a/node_modules/coveralls/package.json b/node_modules/coveralls/package.json index 601a1eb6..dede1200 100644 --- a/node_modules/coveralls/package.json +++ b/node_modules/coveralls/package.json @@ -1,143 +1,113 @@ { - "_args": [ - [ - "coveralls@3.0.13", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "coveralls@3.0.13", - "_id": "coveralls@3.0.13", - "_inBundle": false, - "_integrity": "sha512-Bch6FJI4ebK6Mwr+DjFCJbb/RayNwn5pscSDE4Ux6cgjNkAcjdgGZBRfQnuYTt5tY81MqGK8m2r+xc5FDF513A==", - "_location": "/coveralls", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "coveralls@3.0.13", - "name": "coveralls", - "escapedName": "coveralls", - "rawSpec": "3.0.13", - "saveSpec": null, - "fetchSpec": "3.0.13" - }, - "_requiredBy": [ - "/" + "name": "coveralls", + "description": "takes json-cov output into stdin and POSTs to coveralls.io", + "version": "3.1.1", + "keywords": [ + "coverage", + "coveralls" ], - "_resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.13.tgz", - "_spec": "3.0.13", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Gregg Caines" - }, - "bin": { - "coveralls": "./bin/coveralls.js" + "author": "Gregg Caines", + "license": "BSD-2-Clause", + "repository": { + "type": "git", + "url": "git://github.com/nickmerwin/node-coveralls.git" }, "bugs": { "url": "https://github.com/nickmerwin/node-coveralls/issues" }, + "homepage": "https://github.com/nickmerwin/node-coveralls#readme", + "maintainers": [ + "Nick Merwin (https://coveralls.io)" + ], "contributors": [ - { - "name": "Gregg Caines", - "email": "gregg@caines.ca", - "url": "http://caines.ca" - }, - { - "name": "Joshua Ma", - "email": "github@joshma.com", - "url": "http://joshma.com" - }, - { - "name": "Alan Gutierrez", - "email": "alan@prettyrobots.com", - "url": "http://www.prettyrobots.com/" - }, - { - "name": "Kir Belevich", - "url": "https://github.com/svg" - }, - { - "name": "elliotcable", - "email": "github@elliottcable.name", - "url": "http://elliottcable.name/" - }, - { - "name": "Slotos", - "email": "slotos@gmail.com", - "url": "http://slotos.net" - }, - { - "name": "mattjmorrison", - "email": "mattjmorrison@mattjmorrison.com", - "url": "http://mattjmorrison.com" - }, - { - "name": "Arpad Borsos", - "email": "arpad.borsos@googlemail.com", - "url": "http://swatinem.de/" - }, - { - "name": "Adam Moss", - "url": "https://github.com/adam-moss" - } + "Gregg Caines (http://caines.ca)", + "Joshua Ma (http://joshma.com)", + "Alan Gutierrez (http://www.prettyrobots.com/)", + "Kir Belevich (https://github.com/svg)", + "elliotcable (http://elliottcable.name/)", + "Slotos (http://slotos.net)", + "mattjmorrison (http://mattjmorrison.com)", + "Arpad Borsos (http://swatinem.de/)", + "Adam Moss (https://github.com/adam-moss)" ], + "bin": { + "coveralls": "./bin/coveralls.js" + }, + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "lint": "xo", + "mocha": "_mocha -b -R spec", + "test-cov": "nyc npm run mocha", + "test-coveralls": "nyc npm run mocha && shx cat ./coverage/lcov.info | node ./bin/coveralls.js --verbose", + "test": "npm run lint && npm run mocha" + }, "dependencies": { "js-yaml": "^3.13.1", "lcov-parse": "^1.0.0", "log-driver": "^1.2.7", "minimist": "^1.2.5", - "request": "^2.88.0" + "request": "^2.88.2" }, - "description": "takes json-cov output into stdin and POSTs to coveralls.io", "devDependencies": { - "jshint": "^2.10.3", - "mocha": "^6.2.2", + "glob-parent": ">=5.1.2", + "mocha": "^6.2.3", "nyc": "^14.1.1", "should": "^9.0.2", "shx": "^0.3.2", - "sinon-restore": "^1.0.1" - }, - "directories": { - "test": "test" + "sinon": "^8.1.1", + "trim-newlines": ">=3.0.1", + "xo": "^0.24.0" }, "engines": { "node": ">=6" }, "files": [ - "{bin,lib}/*.js", + "bin/coveralls.js", + "lib/*.js", "index.js" ], - "homepage": "https://github.com/nickmerwin/node-coveralls#readme", - "keywords": [ - "coverage", - "coveralls" - ], - "license": "BSD-2-Clause", - "main": "index.js", - "maintainers": [ - { - "name": "Nick Merwin", - "email": "nick@coveralls.io", - "url": "https://coveralls.io" - } - ], - "name": "coveralls", "nyc": { "reporter": [ "lcov", "text-summary" ] }, - "repository": { - "type": "git", - "url": "git://github.com/nickmerwin/node-coveralls.git" - }, - "scripts": { - "lint": "jshint ./lib ./test ./index.js", - "mocha": "_mocha -b -R spec", - "test": "npm run lint && npm run mocha", - "test-cov": "nyc npm run mocha", - "test-coveralls": "nyc npm run mocha && shx cat ./coverage/lcov.info | node ./bin/coveralls.js --verbose" - }, - "version": "3.0.13" + "xo": { + "space": true, + "ignores": [ + "test/fixtures/" + ], + "rules": { + "camelcase": "off", + "capitalized-comments": "off", + "handle-callback-err": "error", + "import/order": "off", + "no-negated-condition": "off", + "object-curly-spacing": [ + "error", + "always" + ], + "quote-props": [ + "error", + "consistent" + ], + "space-before-function-paren": [ + "error", + "never" + ], + "spaced-comment": "off", + "unicorn/filename-case": "off" + }, + "overrides": [ + { + "files": "test/*.js", + "envs": [ + "mocha" + ] + } + ] + } } diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md deleted file mode 100644 index ded9620b..00000000 --- a/node_modules/cross-spawn/CHANGELOG.md +++ /dev/null @@ -1,100 +0,0 @@ -# Change Log - -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. - - -## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02) - - -### Bug Fixes - -* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005) - - - - -## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31) - - -### Bug Fixes - -* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90) - - - - -## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) - - - - -## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) - - - - -## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) - - - - -# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23) - - -### Bug Fixes - -* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51) -* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) -* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) -* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) - - -### Features - -* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) -* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) - - -### Chores - -* upgrade tooling -* upgrate project to es6 (node v4) - - -### BREAKING CHANGES - -* remove support for older nodejs versions, only `node >= 4` is supported - - - -## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26) - - -### Bug Fixes - -* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0) - - - -## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04) - - -### Bug Fixes - -* fix `options.shell` support for NodeJS v7 - - - -# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30) - - -## Features - -* add support for `options.shell` -* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module - - -## Chores - -* refactor some code to make it more clear -* update README caveats diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE deleted file mode 100644 index 8407b9a3..00000000 --- a/node_modules/cross-spawn/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Made With MOXY Lda - -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/cross-spawn/README.md b/node_modules/cross-spawn/README.md deleted file mode 100644 index e895cd7a..00000000 --- a/node_modules/cross-spawn/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# cross-spawn - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] - -[npm-url]:https://npmjs.org/package/cross-spawn -[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg -[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg -[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn -[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg -[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn -[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg -[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn -[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg -[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn -[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg -[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev -[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg -[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg -[greenkeeper-url]:https://greenkeeper.io/ - -A cross platform solution to node's spawn and spawnSync. - - -## Installation - -`$ npm install cross-spawn` - - -## Why - -Node has issues when using spawn on Windows: - -- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) -- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix)) -- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367) -- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`) -- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149) -- No `options.shell` support on node `` where `` must not contain any arguments. -If you would like to have the shebang support improved, feel free to contribute via a pull-request. - -Remember to always test your code on Windows! - - -## Tests - -`$ npm test` -`$ npm test -- --watch` during development - -## License - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js deleted file mode 100644 index 5509742c..00000000 --- a/node_modules/cross-spawn/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const cp = require('child_process'); -const parse = require('./lib/parse'); -const enoent = require('./lib/enoent'); - -function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); - - return spawned; -} - -function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - - // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - - return result; -} - -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; - -module.exports._parse = parse; -module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js deleted file mode 100644 index 14df9b62..00000000 --- a/node_modules/cross-spawn/lib/enoent.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -const isWin = process.platform === 'win32'; - -function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: 'ENOENT', - errno: 'ENOENT', - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, - }); -} - -function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - - const originalEmit = cp.emit; - - cp.emit = function (name, arg1) { - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === 'exit') { - const err = verifyENOENT(arg1, parsed, 'spawn'); - - if (err) { - return originalEmit.call(cp, 'error', err); - } - } - - return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params - }; -} - -function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } - - return null; -} - -function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - - return null; -} - -module.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, -}; diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js deleted file mode 100644 index 962827a9..00000000 --- a/node_modules/cross-spawn/lib/parse.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -const path = require('path'); -const niceTry = require('nice-try'); -const resolveCommand = require('./util/resolveCommand'); -const escape = require('./util/escape'); -const readShebang = require('./util/readShebang'); -const semver = require('semver'); - -const isWin = process.platform === 'win32'; -const isExecutableRegExp = /\.(?:com|exe)$/i; -const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - -// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 -const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; - -function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - - const shebang = parsed.file && readShebang(parsed.file); - - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - - return resolveCommand(parsed); - } - - return parsed.file; -} - -function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - - // Detect & add support for shebangs - const commandFile = detectShebang(parsed); - - // We don't need a shell if the command filename is an executable - const needsShell = !isExecutableRegExp.test(commandFile); - - // If a shell is required, use cmd.exe and take care of escaping everything correctly - // Note that `forceShell` is an hidden option used only in tests - if (parsed.options.forceShell || needsShell) { - // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` - // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument - // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, - // we need to double escape them - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - - // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) - // This is necessary otherwise it will always fail with ENOENT in those cases - parsed.command = path.normalize(parsed.command); - - // Escape command & arguments - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } - - return parsed; -} - -function parseShell(parsed) { - // If node supports the shell option, there's no need to mimic its behavior - if (supportsShellOption) { - return parsed; - } - - // Mimic node shell option - // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - if (isWin) { - parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } else { - if (typeof parsed.options.shell === 'string') { - parsed.command = parsed.options.shell; - } else if (process.platform === 'android') { - parsed.command = '/system/bin/sh'; - } else { - parsed.command = '/bin/sh'; - } - - parsed.args = ['-c', shellCommand]; - } - - return parsed; -} - -function parse(command, args, options) { - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = Object.assign({}, options); // Clone object to avoid changing the original - - // Build our parsed object - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; - - // Delegate further parsing to shell or non-shell - return options.shell ? parseShell(parsed) : parseNonShell(parsed); -} - -module.exports = parse; diff --git a/node_modules/cross-spawn/lib/util/escape.js b/node_modules/cross-spawn/lib/util/escape.js deleted file mode 100644 index b0bb84c3..00000000 --- a/node_modules/cross-spawn/lib/util/escape.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -// See http://www.robvanderwoude.com/escapechars.php -const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - -function escapeCommand(arg) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - return arg; -} - -function escapeArgument(arg, doubleEscapeMetaChars) { - // Convert to string - arg = `${arg}`; - - // Algorithm below is based on https://qntm.org/cmd - - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - - // Sequence of backslashes followed by the end of the string - // (which will become a double quote later): - // double up all the backslashes - arg = arg.replace(/(\\*)$/, '$1$1'); - - // All other backslashes occur literally - - // Quote the whole thing: - arg = `"${arg}"`; - - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - // Double escape meta chars if necessary - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, '^$1'); - } - - return arg; -} - -module.exports.command = escapeCommand; -module.exports.argument = escapeArgument; diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js deleted file mode 100644 index bd4f1280..00000000 --- a/node_modules/cross-spawn/lib/util/readShebang.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const shebangCommand = require('shebang-command'); - -function readShebang(command) { - // Read the first 150 bytes from the file - const size = 150; - let buffer; - - if (Buffer.alloc) { - // Node.js v4.5+ / v5.10+ - buffer = Buffer.alloc(size); - } else { - // Old Node.js API - buffer = new Buffer(size); - buffer.fill(0); // zero-fill - } - - let fd; - - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { /* Empty */ } - - // Attempt to extract shebang (null is returned if not a shebang) - return shebangCommand(buffer.toString()); -} - -module.exports = readShebang; diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js deleted file mode 100644 index 2fd5ad27..00000000 --- a/node_modules/cross-spawn/lib/util/resolveCommand.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -const path = require('path'); -const which = require('which'); -const pathKey = require('path-key')(); - -function resolveCommandAttempt(parsed, withoutPathExt) { - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (hasCustomCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } - - let resolved; - - try { - resolved = which.sync(parsed.command, { - path: (parsed.options.env || process.env)[pathKey], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - /* Empty */ - } finally { - process.chdir(cwd); - } - - // If we successfully resolved, ensure that an absolute path is returned - // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); - } - - return resolved; -} - -function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); -} - -module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json deleted file mode 100644 index 49982578..00000000 --- a/node_modules/cross-spawn/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - "cross-spawn@6.0.5", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "cross-spawn@6.0.5", - "_id": "cross-spawn@6.0.5", - "_inBundle": false, - "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "_location": "/cross-spawn", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cross-spawn@6.0.5", - "name": "cross-spawn", - "escapedName": "cross-spawn", - "rawSpec": "6.0.5", - "saveSpec": null, - "fetchSpec": "6.0.5" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "_spec": "6.0.5", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "André Cruz", - "email": "andre@moxy.studio" - }, - "bugs": { - "url": "https://github.com/moxystudio/node-cross-spawn/issues" - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "description": "Cross platform child_process#spawn and child_process#spawnSync", - "devDependencies": { - "@commitlint/cli": "^6.0.0", - "@commitlint/config-conventional": "^6.0.2", - "babel-core": "^6.26.0", - "babel-jest": "^22.1.0", - "babel-preset-moxy": "^2.2.1", - "eslint": "^4.3.0", - "eslint-config-moxy": "^5.0.0", - "husky": "^0.14.3", - "jest": "^22.0.0", - "lint-staged": "^7.0.0", - "mkdirp": "^0.5.1", - "regenerator-runtime": "^0.11.1", - "rimraf": "^2.6.2", - "standard-version": "^4.2.0" - }, - "engines": { - "node": ">=4.8" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/moxystudio/node-cross-spawn", - "keywords": [ - "spawn", - "spawnSync", - "windows", - "cross-platform", - "path-ext", - "shebang", - "cmd", - "execute" - ], - "license": "MIT", - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "main": "index.js", - "name": "cross-spawn", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" - }, - "scripts": { - "commitmsg": "commitlint -e $GIT_PARAMS", - "lint": "eslint .", - "precommit": "lint-staged", - "prerelease": "npm t && npm run lint", - "release": "standard-version", - "test": "jest --env node --coverage" - }, - "standard-version": { - "scripts": { - "posttag": "git push --follow-tags origin master && npm publish" - } - }, - "version": "6.0.5" -} diff --git a/node_modules/debug/CHANGELOG.md b/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e3..00000000 --- a/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/debug/LICENSE b/node_modules/debug/LICENSE index 658c933d..1a9820e2 100644 --- a/node_modules/debug/LICENSE +++ b/node_modules/debug/LICENSE @@ -1,19 +1,20 @@ (The MIT License) -Copyright (c) 2014 TJ Holowaychuk +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon -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, +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 +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 +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/debug/README.md b/node_modules/debug/README.md index 0ee7634d..e9c3e047 100644 --- a/node_modules/debug/README.md +++ b/node_modules/debug/README.md @@ -1,5 +1,5 @@ # debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) @@ -241,6 +241,9 @@ setInterval(function(){ }, 1200); ``` +In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. + + ## Output streams @@ -317,6 +320,24 @@ $ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log( => false ``` +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + ## Checking whether a debug target is enabled After you've created a debug instance, you can determine whether or not it is @@ -333,12 +354,34 @@ if (debug.enabled) { You can also manually toggle this property to force the debug instance to be enabled or disabled. +## Usage in child processes + +Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. +For example: + +```javascript +worker = fork(WORKER_WRAP_PATH, [workerPath], { + stdio: [ + /* stdin: */ 0, + /* stdout: */ 'pipe', + /* stderr: */ 'pipe', + 'ipc', + ], + env: Object.assign({}, process.env, { + DEBUG_COLORS: 1 // without this settings, colors won't be shown + }), +}); + +worker.stderr.pipe(process.stderr, { end: false }); +``` + ## Authors - TJ Holowaychuk - Nathan Rajlich - Andrew Rhyne + - Josh Junon ## Backers @@ -416,6 +459,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s (The MIT License) Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2018-2021 Josh Junon 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/debug/dist/debug.js b/node_modules/debug/dist/debug.js deleted file mode 100644 index f271e01c..00000000 --- a/node_modules/debug/dist/debug.js +++ /dev/null @@ -1,886 +0,0 @@ -"use strict"; - -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) { - return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - } - /** - * 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. - * - * @api public - */ - - - function disable() { - createDebug.enable(''); - } - /** - * 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; - } - /** - * 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/debug/node.js b/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe6..00000000 --- a/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json index 5b2d997e..3bcdc242 100644 --- a/node_modules/debug/package.json +++ b/node_modules/debug/package.json @@ -1,94 +1,59 @@ { - "_args": [ - [ - "debug@3.2.6", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "debug@3.2.6", - "_id": "debug@3.2.6", - "_inBundle": false, - "_integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "_location": "/debug", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "debug@3.2.6", - "name": "debug", - "escapedName": "debug", - "rawSpec": "3.2.6", - "saveSpec": null, - "fetchSpec": "3.2.6" + "name": "debug", + "version": "4.3.4", + "repository": { + "type": "git", + "url": "git://github.com/debug-js/debug.git" }, - "_requiredBy": [ - "/mocha" + "description": "Lightweight debugging utility for Node.js and the browser", + "keywords": [ + "debug", + "log", + "debugger" ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "_spec": "3.2.6", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, + "files": [ + "src", + "LICENSE", + "README.md" + ], + "author": "Josh Junon ", "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } + "TJ Holowaychuk ", + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:node": "istanbul cover _mocha -- test.js", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" }, - "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" }, - "files": [ - "src", - "node.js", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } }, - "unpkg": "./dist/debug.js", - "version": "3.2.6" + "main": "./src/index.js", + "browser": "./src/browser.js", + "engines": { + "node": ">=6.0" + } } diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js index c924b0ac..cd0fc35d 100644 --- a/node_modules/debug/src/browser.js +++ b/node_modules/debug/src/browser.js @@ -1,23 +1,108 @@ -"use strict"; - -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); } - /* 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(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + /** * 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']; +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 @@ -25,123 +110,126 @@ exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066F * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ -// eslint-disable-next-line complexity +// 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+)/); + // 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); + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const 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 + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, 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". + * 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 */ +exports.log = console.debug || console.log || (() => {}); - -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? - } + 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; + let 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. * @@ -153,28 +241,29 @@ function load() { * @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? - } + 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; + +const {formatters} = module.exports; + /** * 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; - } + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } }; - diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js index e0de3fb5..e3291b20 100644 --- a/node_modules/debug/src/common.js +++ b/node_modules/debug/src/common.js @@ -1,249 +1,274 @@ -"use strict"; /** * 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() { - // Disabled? - if (!debug.enabled) { - return; - } - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - 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) { - return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - } - /** - * 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. - * - * @api public - */ - - - function disable() { - createDebug.enable(''); - } - /** - * 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; - } - /** - * 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; + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * 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 debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let 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) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const 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 + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const 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); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const 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.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const 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.slice(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + 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; + } + + let i; + let 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; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; } module.exports = setup; - diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js index 02173159..bf4c57f2 100644 --- a/node_modules/debug/src/index.js +++ b/node_modules/debug/src/index.js @@ -1,12 +1,10 @@ -"use strict"; - /** * Detect Electron renderer / nwjs process, which is node, but we should * treat as a browser. */ + if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); + module.exports = require('./browser.js'); } else { - module.exports = require('./node.js'); + module.exports = require('./node.js'); } - diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js index dbbb5f10..79bc085c 100644 --- a/node_modules/debug/src/node.js +++ b/node_modules/debug/src/node.js @@ -1,22 +1,25 @@ -"use strict"; - /** * Module dependencies. */ -var tty = require('tty'); -var util = require('util'); +const tty = require('tty'); +const util = require('util'); + /** * This is the Node.js implementation of `debug()`. */ - exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + /** * Colors. */ @@ -24,14 +27,93 @@ exports.useColors = useColors; exports.colors = [6, 2, 3, 4, 5, 1]; try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - var supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; - } -} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be. + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} /** * Build up the default `inspectOpts` object from the environment variables. @@ -39,91 +121,95 @@ try { * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // Camel-case - var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) { - return k.toUpperCase(); - }); // Coerce string value into JS value - - var val = process.env[key]; - - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; }, {}); + /** * Is stdout a TTY? Colored output is enabled when `true`. */ function useColors() { - return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); } + /** * Adds ANSI color escape codes if enabled. * * @api public */ - function formatArgs(args) { - var name = this.namespace, - useColors = this.useColors; - - if (useColors) { - var c = this.color; - var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c); - var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m"); - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m"); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } } function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - - return new Date().toISOString() + ' '; + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; } + /** * Invokes `util.format()` with the specified arguments and writes to stderr. */ - -function log() { - return process.stderr.write(util.format.apply(util, arguments) + '\n'); +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); } + /** * Save `namespaces`. * * @param {String} namespaces * @api private */ - - function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } } + /** * Load `namespaces`. * @@ -131,10 +217,10 @@ function save(namespaces) { * @api private */ - function load() { - return process.env.DEBUG; + return process.env.DEBUG; } + /** * Init logic for `debug` instances. * @@ -142,33 +228,36 @@ function load() { * differently for a particular `debug` instance. */ - function init(debug) { - debug.inspectOpts = {}; - var keys = Object.keys(exports.inspectOpts); + debug.inspectOpts = {}; - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } } module.exports = require('./common')(exports); -var formatters = module.exports.formatters; + +const {formatters} = module.exports; + /** * Map %o to `util.inspect()`, all on a single line. */ formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' '); + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); }; + /** * Map %O to `util.inspect()`, allowing multiple lines if needed. */ - formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); }; - diff --git a/node_modules/define-properties/.editorconfig b/node_modules/define-properties/.editorconfig deleted file mode 100644 index eaa21416..00000000 --- a/node_modules/define-properties/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/define-properties/.eslintrc b/node_modules/define-properties/.eslintrc deleted file mode 100644 index db992d7a..00000000 --- a/node_modules/define-properties/.eslintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": [2, { "min": 1, "max": 35 }], - "max-lines-per-function": [2, 100], - "max-params": [2, 4], - "max-statements": [2, 13] - } -} diff --git a/node_modules/define-properties/.jscs.json b/node_modules/define-properties/.jscs.json deleted file mode 100644 index 6f2d7f9f..00000000 --- a/node_modules/define-properties/.jscs.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 3 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/define-properties/.travis.yml b/node_modules/define-properties/.travis.yml deleted file mode 100644 index ec72d5f3..00000000 --- a/node_modules/define-properties/.travis.yml +++ /dev/null @@ -1,233 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "10.8" - - "9.11" - - "8.11" - - "7.10" - - "6.14" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/define-properties/CHANGELOG.md b/node_modules/define-properties/CHANGELOG.md deleted file mode 100644 index 5cad1e26..00000000 --- a/node_modules/define-properties/CHANGELOG.md +++ /dev/null @@ -1,44 +0,0 @@ -1.1.3 / 2018-08-14 -================= - * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes - * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty` - * [Deps] update `object-keys` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep - * [Tests] use pretest/posttest for linting/security - * [Tests] fix npm upgrades on older nodes - -1.1.2 / 2015-10-14 -================= - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Deps] Update `object-keys` - * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp` - * [Tests] up to `io.js` `v3.3`, `node` `v4.2` - -1.1.1 / 2015-07-21 -================= - * [Deps] Update `object-keys` - * [Dev Deps] Update `tape`, `eslint` - * [Tests] Test on `io.js` `v2.4` - -1.1.0 / 2015-07-01 -================= - * [New] Add support for symbol-valued properties. - * [Dev Deps] Update `nsp`, `eslint` - * [Tests] Test up to `io.js` `v2.3` - -1.0.3 / 2015-05-30 -================= - * Using a more reliable check for supported property descriptors. - -1.0.2 / 2015-05-23 -================= - * Test up to `io.js` `v2.0` - * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert` - -1.0.1 / 2015-01-06 -================= - * Update `object-keys` to fix ES3 support - -1.0.0 / 2015-01-04 -================= - * v1.0.0 diff --git a/node_modules/define-properties/LICENSE b/node_modules/define-properties/LICENSE deleted file mode 100644 index 8c271c14..00000000 --- a/node_modules/define-properties/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2015 Jordan Harband - -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/define-properties/README.md b/node_modules/define-properties/README.md deleted file mode 100644 index 33b6111f..00000000 --- a/node_modules/define-properties/README.md +++ /dev/null @@ -1,86 +0,0 @@ -#define-properties [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines. -Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides. - -## Example - -```js -var define = require('define-properties'); -var assert = require('assert'); - -var obj = define({ a: 1, b: 2 }, { - a: 10, - b: 20, - c: 30 -}); -assert(obj.a === 1); -assert(obj.b === 2); -assert(obj.c === 30); -if (define.supportsDescriptors) { - assert.deepEqual(Object.keys(obj), ['a', 'b']); - assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), { - configurable: true, - enumerable: false, - value: 30, - writable: false - }); -} -``` - -Then, with predicates: -```js -var define = require('define-properties'); -var assert = require('assert'); - -var obj = define({ a: 1, b: 2, c: 3 }, { - a: 10, - b: 20, - c: 30 -}, { - a: function () { return false; }, - b: function () { return true; } -}); -assert(obj.a === 1); -assert(obj.b === 20); -assert(obj.c === 3); -if (define.supportsDescriptors) { - assert.deepEqual(Object.keys(obj), ['a', 'c']); - assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), { - configurable: true, - enumerable: false, - value: 20, - writable: false - }); -} -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/define-properties -[npm-version-svg]: http://versionbadg.es/ljharb/define-properties.svg -[travis-svg]: https://travis-ci.org/ljharb/define-properties.svg -[travis-url]: https://travis-ci.org/ljharb/define-properties -[deps-svg]: https://david-dm.org/ljharb/define-properties.svg -[deps-url]: https://david-dm.org/ljharb/define-properties -[dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/define-properties.png -[testling-url]: https://ci.testling.com/ljharb/define-properties -[npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/define-properties.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/define-properties.svg -[downloads-url]: http://npm-stat.com/charts.html?package=define-properties - diff --git a/node_modules/define-properties/index.js b/node_modules/define-properties/index.js deleted file mode 100644 index cb3ae1c7..00000000 --- a/node_modules/define-properties/index.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -var toStr = Object.prototype.toString; -var concat = Array.prototype.concat; -var origDefineProperty = Object.defineProperty; - -var isFunction = function (fn) { - return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; -}; - -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); - -var defineProperty = function (object, name, value, predicate) { - if (name in object && (!isFunction(predicate) || !predicate())) { - return; - } - if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); - } else { - object[name] = value; - } -}; - -var defineProperties = function (object, map) { - var predicates = arguments.length > 2 ? arguments[2] : {}; - var props = keys(map); - if (hasSymbols) { - props = concat.call(props, Object.getOwnPropertySymbols(map)); - } - for (var i = 0; i < props.length; i += 1) { - defineProperty(object, props[i], map[props[i]], predicates[props[i]]); - } -}; - -defineProperties.supportsDescriptors = !!supportsDescriptors; - -module.exports = defineProperties; diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json deleted file mode 100644 index db61283a..00000000 --- a/node_modules/define-properties/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - "define-properties@1.1.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "define-properties@1.1.3", - "_id": "define-properties@1.1.3", - "_inBundle": false, - "_integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "_location": "/define-properties", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "define-properties@1.1.3", - "name": "define-properties", - "escapedName": "define-properties", - "rawSpec": "1.1.3", - "saveSpec": null, - "fetchSpec": "1.1.3" - }, - "_requiredBy": [ - "/object.assign", - "/object.getownpropertydescriptors" - ], - "_resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "_spec": "1.1.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/define-properties/issues" - }, - "dependencies": { - "object-keys": "^1.0.12" - }, - "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", - "devDependencies": { - "@ljharb/eslint-config": "^13.0.0", - "covert": "^1.1.0", - "eslint": "^5.3.0", - "jscs": "^3.0.7", - "nsp": "^3.2.1", - "tape": "^4.9.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/define-properties#readme", - "keywords": [ - "Object.defineProperty", - "Object.defineProperties", - "object", - "property descriptor", - "descriptor", - "define", - "ES5" - ], - "license": "MIT", - "main": "index.js", - "name": "define-properties", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/define-properties.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "eslint": "eslint test/*.js *.js", - "jscs": "jscs test/*.js *.js", - "lint": "npm run --silent jscs && npm run --silent eslint", - "posttest": "npm run --silent security", - "pretest": "npm run --silent lint", - "security": "nsp check", - "test": "npm run --silent tests-only", - "tests-only": "node test/index.js" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.1.3" -} diff --git a/node_modules/define-properties/test/index.js b/node_modules/define-properties/test/index.js deleted file mode 100644 index 3387f6bc..00000000 --- a/node_modules/define-properties/test/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -var define = require('../'); -var test = require('tape'); -var keys = require('object-keys'); - -var arePropertyDescriptorsSupported = function () { - var obj = { a: 1 }; - try { - Object.defineProperty(obj, 'x', { value: obj }); - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var descriptorsSupported = !!Object.defineProperty && arePropertyDescriptorsSupported(); - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -test('defineProperties', function (dt) { - dt.test('with descriptor support', { skip: !descriptorsSupported }, function (t) { - var getDescriptor = function (value) { - return { - configurable: true, - enumerable: false, - value: value, - writable: true - }; - }; - - var obj = { - a: 1, - b: 2, - c: 3 - }; - t.deepEqual(keys(obj), ['a', 'b', 'c'], 'all literal-set keys start enumerable'); - define(obj, { - b: 3, - c: 4, - d: 5 - }); - t.deepEqual(obj, { - a: 1, - b: 2, - c: 3 - }, 'existing properties were not overridden'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'new property "d" was added and is not enumerable'); - t.deepEqual(['a', 'b', 'c'], keys(obj), 'new keys are not enumerable'); - - define(obj, { - a: 2, - b: 3, - c: 4 - }, { - a: function () { return true; }, - b: function () { return false; } - }); - t.deepEqual(obj, { - b: 2, - c: 3 - }, 'properties only overriden when predicate exists and returns true'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'existing property "d" remained and is not enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'a'), getDescriptor(2), 'existing property "a" was overridden and is not enumerable'); - t.deepEqual(['b', 'c'], keys(obj), 'overridden keys are not enumerable'); - - t.end(); - }); - - dt.test('without descriptor support', { skip: descriptorsSupported }, function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - define(obj, { - b: 3, - c: 4, - d: 5 - }); - t.deepEqual(obj, { - a: 1, - b: 2, - c: 3, - d: 5 - }, 'existing properties were not overridden, new properties were added'); - - define(obj, { - a: 2, - b: 3, - c: 4 - }, { - a: function () { return true; }, - b: function () { return false; } - }); - t.deepEqual(obj, { - a: 2, - b: 2, - c: 3, - d: 5 - }, 'properties only overriden when predicate exists and returns true'); - - t.end(); - }); - - dt.end(); -}); - -test('symbols', { skip: !hasSymbols }, function (t) { - var sym = Symbol('foo'); - var obj = {}; - var aValue = {}; - var bValue = {}; - var properties = { a: aValue }; - properties[sym] = bValue; - - define(obj, properties); - - t.deepEqual(Object.keys(obj), [], 'object has no enumerable keys'); - t.deepEqual(Object.getOwnPropertyNames(obj), ['a'], 'object has non-enumerable "a" key'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'object has non-enumerable symbol key'); - t.equal(obj.a, aValue, 'string keyed value is defined'); - t.equal(obj[sym], bValue, 'symbol keyed value is defined'); - - t.end(); -}); diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/end-of-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -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/end-of-stream/README.md b/node_modules/end-of-stream/README.md deleted file mode 100644 index f2560c93..00000000 --- a/node_modules/end-of-stream/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# end-of-stream - -A node module that calls a callback when a readable/writable/duplex stream has completed or failed. - - npm install end-of-stream - -## Usage - -Simply pass a stream and a callback to the `eos`. -Both legacy streams, streams2 and stream3 are supported. - -``` js -var eos = require('end-of-stream'); - -eos(readableStream, function(err) { - // this will be set to the stream instance - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended', this === readableStream); -}); - -eos(writableStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished', this === writableStream); -}); - -eos(duplexStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended and finished', this === duplexStream); -}); - -eos(duplexStream, {readable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished but might still be readable'); -}); - -eos(duplexStream, {writable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended but might still be writable'); -}); - -eos(readableStream, {error:false}, function(err) { - // do not treat emit('error', err) as a end-of-stream -}); -``` - -## License - -MIT - -## Related - -`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js deleted file mode 100644 index be426c22..00000000 --- a/node_modules/end-of-stream/index.js +++ /dev/null @@ -1,87 +0,0 @@ -var once = require('once'); - -var noop = function() {}; - -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onerror = function(err) { - callback.call(stream, err); - }; - - var onclose = function() { - if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - - return function() { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json deleted file mode 100644 index 3734f598..00000000 --- a/node_modules/end-of-stream/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "end-of-stream@1.4.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "end-of-stream@1.4.1", - "_id": "end-of-stream@1.4.1", - "_inBundle": false, - "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "_location": "/end-of-stream", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "end-of-stream@1.4.1", - "name": "end-of-stream", - "escapedName": "end-of-stream", - "rawSpec": "1.4.1", - "saveSpec": null, - "fetchSpec": "1.4.1" - }, - "_requiredBy": [ - "/pump" - ], - "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "_spec": "1.4.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Mathias Buus", - "email": "mathiasbuus@gmail.com" - }, - "bugs": { - "url": "https://github.com/mafintosh/end-of-stream/issues" - }, - "dependencies": { - "once": "^1.4.0" - }, - "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", - "files": [ - "index.js" - ], - "homepage": "https://github.com/mafintosh/end-of-stream", - "keywords": [ - "stream", - "streams", - "callback", - "finish", - "close", - "end", - "wait" - ], - "license": "MIT", - "main": "index.js", - "name": "end-of-stream", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/end-of-stream.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.4.1" -} diff --git a/node_modules/es-abstract/.editorconfig b/node_modules/es-abstract/.editorconfig deleted file mode 100644 index eaa21416..00000000 --- a/node_modules/es-abstract/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/es-abstract/.eslintrc b/node_modules/es-abstract/.eslintrc deleted file mode 100644 index 83cf7a3e..00000000 --- a/node_modules/es-abstract/.eslintrc +++ /dev/null @@ -1,28 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "env": { - "es6": true, - }, - - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "complexity": 0, - "eqeqeq": [2, "allow-null"], - "func-name-matching": 0, - "id-length": [2, { "min": 1, "max": 30 }], - "max-lines": [2, 800], - "max-params": [2, 4], - "max-statements": [2, 24], - "max-statements-per-line": [2, { "max": 2 }], - "multiline-comment-style": 1, - "no-magic-numbers": 0, - "new-cap": 0, - "no-extra-parens": 1, - "operator-linebreak": [2, "before"], - "sort-keys": 0, - } -} diff --git a/node_modules/es-abstract/.nycrc b/node_modules/es-abstract/.nycrc deleted file mode 100644 index 98cf95d6..00000000 --- a/node_modules/es-abstract/.nycrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "all": true, - "check-coverage": true, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86.99, - "statements": 86.86, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "operations", - "test" - ] -} diff --git a/node_modules/es-abstract/.travis.yml b/node_modules/es-abstract/.travis.yml deleted file mode 100644 index 90ad7bef..00000000 --- a/node_modules/es-abstract/.travis.yml +++ /dev/null @@ -1,283 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "11.6" - - "10.15" - - "9.11" - - "8.15" - - "7.10" - - "6.16" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" - - "0.6" -cache: - directories: - - "$HOME/.npm" - - "$(nvm cache dir)" - - "$(nvm_version_path $(nvm_version_remote 0.4))" - - "$(nvm_version_path $(nvm_version_remote 0.6))" - - "$(nvm_version_path $(nvm_version_remote 0.10))" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage && bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "0.8" - env: COVERAGE=true - - node_js: "0.12" - env: COVERAGE=true - - node_js: "4" - env: COVERAGE=true - - node_js: "8" - env: COVERAGE=true - - node_js: "11.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/es-abstract/CHANGELOG.md b/node_modules/es-abstract/CHANGELOG.md deleted file mode 100644 index 2008aa21..00000000 --- a/node_modules/es-abstract/CHANGELOG.md +++ /dev/null @@ -1,190 +0,0 @@ -1.13.0 / 2019-01-02 -================= - * [New] add ES2018 - * [New] add ES2015/ES2016: EnumerableOwnNames; ES2017: EnumerableOwnProperties - * [New] `ES2015+`: add `thisBooleanValue`, `thisNumberValue`, `thisStringValue`, `thisTimeValue` - * [New] `ES2015+`: add `DefinePropertyOrThrow`, `DeletePropertyOrThrow`, `CreateMethodProperty` - * [New] add `assertRecord` helper - * [Deps] update `is-callable`, `has`, `object-keys`, `es-to-primitive` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `semver`, `safe-publish-latest`, `replace` - * [Tests] use `npm audit` instead of `nsp` - * [Tests] remove `jscs` - * [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` - * [Tests] move descriptor factories to `values` helper - * [Tests] add `getOps` to programmatically fetch abstract operation names - -1.12.0 / 2018-05-31 -================= - * [New] add `GetIntrinsic` entry point - * [New] `ES2015`+: add `ObjectCreate` - * [Robustness]: `ES2015+`: ensure `Math.{abs,floor}` and `Function.call` are cached - -1.11.0 / 2018-03-21 -================= - * [New] `ES2015+`: add iterator abstract ops - * [Dev Deps] update `eslint`, `nsp`, `object.assign`, `semver`, `tape` - * [Tests] up to `node` `v9.8`, `v8.10`, `v6.13` - -1.10.0 / 2017-11-24 -================= - * [New] ES2015+: `AdvanceStringIndex` - * [Dev Deps] update `eslint`, `nsp` - * [Tests] require node 0.6 to pass again - * [Tests] up to `node` `v9.2`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS - -1.9.0 / 2017-09-30 -================= - * [New] `es2015+`: add `ArraySpeciesCreate` - * [New] ES2015+: add `CreateDataProperty` and `CreateDataPropertyOrThrow` - * [Tests] consolidate duplicated tests - * [Tests] increase coverage - * [Dev Deps] update `nsp`, `eslint` - -1.8.2 / 2017-09-03 -================= - * [Fix] `es2015`+: `ToNumber`: provide the proper hint for Date objects (#27) - * [Dev Deps] update `eslint` - -1.8.1 / 2017-08-30 -================= - * [Fix] ES2015+: `ToPropertyKey`: should return a symbol for Symbols (#26) - * [Deps] update `function-bind` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config` - * [Docs] github broke markdown parsing - -1.8.0 / 2017-08-04 -================= - * [New] add ES2017 - * [New] move es6+ to es2015+; leave es6/es7 as aliases - * [New] ES5+: add `IsPropertyDescriptor`, `IsAccessorDescriptor`, `IsDataDescriptor`, `IsGenericDescriptor`, `FromPropertyDescriptor`, `ToPropertyDescriptor` - * [New] ES2015+: add `CompletePropertyDescriptor`, `Set`, `HasOwnProperty`, `HasProperty`, `IsConcatSpreadable`, `Invoke`, `CreateIterResultObject`, `RegExpExec` - * [Fix] es7/es2016: do not mutate ES6 - * [Fix] assign helper only supports one source - * [Deps] update `is-regex` - * [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` - * [Tests] add tests for missing and excess operations - * [Tests] add codecov for coverage - * [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v4.8`; newer npm breaks on older node - * [Tests] use same lists of value types across tests; ensure tests are the same when ops are the same - * [Tests] ES2015: add ToNumber symbol tests - * [Tests] switch to `nyc` for code coverage - * [Tests] make IsRegExp tests consistent across editions - -1.7.0 / 2017-01-22 -================= - * [New] ES6: Add `GetMethod` (#16) - * [New] ES6: Add `GetV` (#16) - * [New] ES6: Add `Get` (#17) - * [Tests] up to `node` `v7.4`, `v6.9`, `v4.6`; improve test matrix - * [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` - -1.6.1 / 2016-08-21 -================= - * [Fix] ES6: IsConstructor should return true for `class` constructors. - -1.6.0 / 2016-08-20 -================= - * [New] ES5 / ES6: add `Type` - * [New] ES6: `SpeciesConstructor` - * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`; add `safe-publish-latest` - * [Tests] up to `node` `v6.4`, `v5.12`, `v4.5` - -1.5.1 / 2016-05-30 -================= - * [Fix] `ES.IsRegExp`: actually look up `Symbol.match` on the argument - * [Refactor] create `isNaN` helper - * [Deps] update `is-callable`, `function-bind` - * [Deps] update `es-to-primitive`, fix ES5 tests - * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape`, `nsp` - * [Tests] up to `node` `v6.2`, `v5.11`, `v4.4` - * [Tests] use pretest/posttest for linting/security - -1.5.0 / 2015-12-27 -================= - * [New] adds `Symbol.toPrimitive` support via `es-to-primitive` - * [Deps] update `is-callable`, `es-to-primitive` - * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape` - * [Tests] up to `node` `v5.3` - -1.4.3 / 2015-11-04 -================= - * [Fix] `ES6.ToNumber`: should give `NaN` for explicitly signed hex strings (#4) - * [Refactor] `ES6.ToNumber`: No need to double-trim - * [Refactor] group tests better - * [Tests] should still pass on `node` `v0.8` - -1.4.2 / 2015-11-02 -================= - * [Fix] ensure `ES.ToNumber` trims whitespace, and does not trim non-whitespace (#3) - -1.4.1 / 2015-10-31 -================= - * [Fix] ensure only 0-1 are valid binary and 0-7 are valid octal digits (#2) - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` - * [Tests] on `node` `v5.0` - * [Tests] fix npm upgrades for older node versions - * package.json: use object form of "authors", add "contributors" - -1.4.0 / 2015-09-26 -================= - * [Deps] update `is-callable` - * [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` - * [Tests] on `node` `v4.2` - * [New] Add `SameValueNonNumber` to ES7 - -1.3.2 / 2015-09-26 -================= - * [Fix] Fix `ES6.IsRegExp` to properly handle `Symbol.match`, per spec. - * [Tests] up to `io.js` `v3.3`, `node` `v4.1` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` - -1.3.1 / 2015-08-15 -================= - * [Fix] Ensure that objects that `toString` to a binary or octal literal also convert properly - -1.3.0 / 2015-08-15 -================= - * [New] ES6’s ToNumber now supports binary and octal literals. - * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape` - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Tests] up to `io.js` `v3.0` - -1.2.2 / 2015-07-28 -================= - * [Fix] Both `ES5.CheckObjectCoercible` and `ES6.RequireObjectCoercible` return the value if they don't throw. - * [Tests] Test on latest `io.js` versions. - * [Dev Deps] Update `eslint`, `jscs`, `tape`, `semver`, `covert`, `nsp` - -1.2.1 / 2015-03-20 -================= - * Fix `isFinite` helper. - -1.2.0 / 2015-03-19 -================= - * Use `es-to-primitive` for ToPrimitive methods. - * Test on latest `io.js` versions; allow failures on all but 2 latest `node`/`io.js` versions. - -1.1.2 / 2015-03-20 -================= - * Fix isFinite helper. - -1.1.1 / 2015-03-19 -================= - * Fix isPrimitive check for functions - * Update `eslint`, `editorconfig-tools`, `semver`, `nsp` - -1.1.0 / 2015-02-17 -================= - * Add ES7 export (non-default). - * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. - * Test on `iojs-v1.2`. - -1.0.1 / 2015-01-30 -================= - * Use `is-callable` instead of an internal function. - * Update `tape`, `jscs`, `nsp`, `eslint` - -1.0.0 / 2015-01-10 -================= - * v1.0.0 diff --git a/node_modules/es-abstract/GetIntrinsic.js b/node_modules/es-abstract/GetIntrinsic.js deleted file mode 100644 index 62dbf05d..00000000 --- a/node_modules/es-abstract/GetIntrinsic.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -/* globals - Set, - Map, - WeakSet, - WeakMap, - - Promise, - - Symbol, - Proxy, - - Atomics, - SharedArrayBuffer, - - ArrayBuffer, - DataView, - Uint8Array, - Float32Array, - Float64Array, - Int8Array, - Int16Array, - Int32Array, - Uint8ClampedArray, - Uint16Array, - Uint32Array, -*/ - -var undefined; // eslint-disable-line no-shadow-restricted-names - -var ThrowTypeError = Object.getOwnPropertyDescriptor - ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }()) - : function () { throw new TypeError(); }; - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var generator; // = function * () {}; -var generatorFunction = generator ? getProto(generator) : undefined; -var asyncFn; // async function() {}; -var asyncFunction = asyncFn ? asyncFn.constructor : undefined; -var asyncGen; // async function * () {}; -var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined; -var asyncGenIterator = asyncGen ? asyncGen() : undefined; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '$ %Array%': Array, - '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, - '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '$ %ArrayPrototype%': Array.prototype, - '$ %ArrayProto_entries%': Array.prototype.entries, - '$ %ArrayProto_forEach%': Array.prototype.forEach, - '$ %ArrayProto_keys%': Array.prototype.keys, - '$ %ArrayProto_values%': Array.prototype.values, - '$ %AsyncFromSyncIteratorPrototype%': undefined, - '$ %AsyncFunction%': asyncFunction, - '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, - '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined, - '$ %AsyncGeneratorFunction%': asyncGenFunction, - '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined, - '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined, - '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '$ %Boolean%': Boolean, - '$ %BooleanPrototype%': Boolean.prototype, - '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, - '$ %Date%': Date, - '$ %DatePrototype%': Date.prototype, - '$ %decodeURI%': decodeURI, - '$ %decodeURIComponent%': decodeURIComponent, - '$ %encodeURI%': encodeURI, - '$ %encodeURIComponent%': encodeURIComponent, - '$ %Error%': Error, - '$ %ErrorPrototype%': Error.prototype, - '$ %eval%': eval, // eslint-disable-line no-eval - '$ %EvalError%': EvalError, - '$ %EvalErrorPrototype%': EvalError.prototype, - '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, - '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, - '$ %Function%': Function, - '$ %FunctionPrototype%': Function.prototype, - '$ %Generator%': generator ? getProto(generator()) : undefined, - '$ %GeneratorFunction%': generatorFunction, - '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined, - '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, - '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, - '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, - '$ %isFinite%': isFinite, - '$ %isNaN%': isNaN, - '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '$ %JSON%': JSON, - '$ %JSONParse%': JSON.parse, - '$ %Map%': typeof Map === 'undefined' ? undefined : Map, - '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, - '$ %Math%': Math, - '$ %Number%': Number, - '$ %NumberPrototype%': Number.prototype, - '$ %Object%': Object, - '$ %ObjectPrototype%': Object.prototype, - '$ %ObjProto_toString%': Object.prototype.toString, - '$ %ObjProto_valueOf%': Object.prototype.valueOf, - '$ %parseFloat%': parseFloat, - '$ %parseInt%': parseInt, - '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, - '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, - '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, - '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, - '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, - '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '$ %RangeError%': RangeError, - '$ %RangeErrorPrototype%': RangeError.prototype, - '$ %ReferenceError%': ReferenceError, - '$ %ReferenceErrorPrototype%': ReferenceError.prototype, - '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '$ %RegExp%': RegExp, - '$ %RegExpPrototype%': RegExp.prototype, - '$ %Set%': typeof Set === 'undefined' ? undefined : Set, - '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, - '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, - '$ %String%': String, - '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '$ %StringPrototype%': String.prototype, - '$ %Symbol%': hasSymbols ? Symbol : undefined, - '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, - '$ %SyntaxError%': SyntaxError, - '$ %SyntaxErrorPrototype%': SyntaxError.prototype, - '$ %ThrowTypeError%': ThrowTypeError, - '$ %TypedArray%': TypedArray, - '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, - '$ %TypeError%': TypeError, - '$ %TypeErrorPrototype%': TypeError.prototype, - '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, - '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, - '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, - '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, - '$ %URIError%': URIError, - '$ %URIErrorPrototype%': URIError.prototype, - '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, - '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new TypeError('"allowMissing" argument must be a boolean'); - } - - var key = '$ ' + name; - if (!(key in INTRINSICS)) { - throw new SyntaxError('intrinsic ' + name + ' does not exist!'); - } - - // istanbul ignore if // hopefully this is impossible to test :-) - if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) { - throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - return INTRINSICS[key]; -}; diff --git a/node_modules/es-abstract/LICENSE b/node_modules/es-abstract/LICENSE deleted file mode 100644 index 8c271c14..00000000 --- a/node_modules/es-abstract/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2015 Jordan Harband - -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/es-abstract/Makefile b/node_modules/es-abstract/Makefile deleted file mode 100644 index 959bbd49..00000000 --- a/node_modules/es-abstract/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js */*.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/es-abstract/README.md b/node_modules/es-abstract/README.md deleted file mode 100644 index 314551e7..00000000 --- a/node_modules/es-abstract/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# es-abstract [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -ECMAScript spec abstract operations. -When different versions of the spec conflict, the default export will be the latest version of the abstract operation. -All abstract operations will also be available under an `es5`/`es2015`/`es2016`/`es2017`/`es2018` entry point, and exported property, if you require a specific version. - -## Example - -```js -var ES = require('es-abstract'); -var assert = require('assert'); - -assert(ES.isCallable(function () {})); -assert(!ES.isCallable(/a/g)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/es-abstract -[npm-version-svg]: http://versionbadg.es/ljharb/es-abstract.svg -[travis-svg]: https://travis-ci.org/ljharb/es-abstract.svg -[travis-url]: https://travis-ci.org/ljharb/es-abstract -[deps-svg]: https://david-dm.org/ljharb/es-abstract.svg -[deps-url]: https://david-dm.org/ljharb/es-abstract -[dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/es-abstract.png -[testling-url]: https://ci.testling.com/ljharb/es-abstract -[npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-abstract.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-abstract diff --git a/node_modules/es-abstract/es2015.js b/node_modules/es-abstract/es2015.js deleted file mode 100644 index 4b83657f..00000000 --- a/node_modules/es-abstract/es2015.js +++ /dev/null @@ -1,790 +0,0 @@ -'use strict'; - -var has = require('has'); -var toPrimitive = require('es-to-primitive/es6'); -var keys = require('object-keys'); - -var GetIntrinsic = require('./GetIntrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $Array = GetIntrinsic('%Array%'); -var $String = GetIntrinsic('%String%'); -var $Object = GetIntrinsic('%Object%'); -var $Number = GetIntrinsic('%Number%'); -var $Symbol = GetIntrinsic('%Symbol%', true); -var $RegExp = GetIntrinsic('%RegExp%'); - -var hasSymbols = !!$Symbol; - -var assertRecord = require('./helpers/assertRecord'); -var $isNaN = require('./helpers/isNaN'); -var $isFinite = require('./helpers/isFinite'); -var MAX_SAFE_INTEGER = $Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; - -var assign = require('./helpers/assign'); -var sign = require('./helpers/sign'); -var mod = require('./helpers/mod'); -var isPrimitive = require('./helpers/isPrimitive'); -var parseInteger = parseInt; -var bind = require('function-bind'); -var arraySlice = bind.call(Function.call, $Array.prototype.slice); -var strSlice = bind.call(Function.call, $String.prototype.slice); -var isBinary = bind.call(Function.call, $RegExp.prototype.test, /^0b[01]+$/i); -var isOctal = bind.call(Function.call, $RegExp.prototype.test, /^0o[0-7]+$/i); -var regexExec = bind.call(Function.call, $RegExp.prototype.exec); -var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); -var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); -var hasNonWS = bind.call(Function.call, $RegExp.prototype.test, nonWSregex); -var invalidHexLiteral = /^[-+]0x[0-9a-f]+$/i; -var isInvalidHexLiteral = bind.call(Function.call, $RegExp.prototype.test, invalidHexLiteral); -var $charCodeAt = bind.call(Function.call, $String.prototype.charCodeAt); - -var toStr = bind.call(Function.call, Object.prototype.toString); - -var $NumberValueOf = bind.call(Function.call, GetIntrinsic('%NumberPrototype%').valueOf); -var $BooleanValueOf = bind.call(Function.call, GetIntrinsic('%BooleanPrototype%').valueOf); -var $StringValueOf = bind.call(Function.call, GetIntrinsic('%StringPrototype%').valueOf); -var $DateValueOf = bind.call(Function.call, GetIntrinsic('%DatePrototype%').valueOf); - -var $floor = Math.floor; -var $abs = Math.abs; - -var $ObjectCreate = Object.create; -var $gOPD = $Object.getOwnPropertyDescriptor; - -var $isExtensible = $Object.isExtensible; - -var $defineProperty = $Object.defineProperty; - -// whitespace from: http://es5.github.io/#x15.5.4.20 -// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 -var ws = [ - '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', - '\u2029\uFEFF' -].join(''); -var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); -var replace = bind.call(Function.call, $String.prototype.replace); -var trim = function (value) { - return replace(value, trimRegex, ''); -}; - -var ES5 = require('./es5'); - -var hasRegExpMatcher = require('is-regex'); - -// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-abstract-operations -var ES6 = assign(assign({}, ES5), { - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-call-f-v-args - Call: function Call(F, V) { - var args = arguments.length > 2 ? arguments[2] : []; - if (!this.IsCallable(F)) { - throw new $TypeError(F + ' is not a function'); - } - return F.apply(V, args); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toprimitive - ToPrimitive: toPrimitive, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toboolean - // ToBoolean: ES5.ToBoolean, - - // https://ecma-international.org/ecma-262/6.0/#sec-tonumber - ToNumber: function ToNumber(argument) { - var value = isPrimitive(argument) ? argument : toPrimitive(argument, $Number); - if (typeof value === 'symbol') { - throw new $TypeError('Cannot convert a Symbol value to a number'); - } - if (typeof value === 'string') { - if (isBinary(value)) { - return this.ToNumber(parseInteger(strSlice(value, 2), 2)); - } else if (isOctal(value)) { - return this.ToNumber(parseInteger(strSlice(value, 2), 8)); - } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { - return NaN; - } else { - var trimmed = trim(value); - if (trimmed !== value) { - return this.ToNumber(trimmed); - } - } - } - return $Number(value); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tointeger - // ToInteger: ES5.ToNumber, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint32 - // ToInt32: ES5.ToInt32, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint32 - // ToUint32: ES5.ToUint32, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint16 - ToInt16: function ToInt16(argument) { - var int16bit = this.ToUint16(argument); - return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint16 - // ToUint16: ES5.ToUint16, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint8 - ToInt8: function ToInt8(argument) { - var int8bit = this.ToUint8(argument); - return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8 - ToUint8: function ToUint8(argument) { - var number = this.ToNumber(argument); - if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } - var posInt = sign(number) * $floor($abs(number)); - return mod(posInt, 0x100); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp - ToUint8Clamp: function ToUint8Clamp(argument) { - var number = this.ToNumber(argument); - if ($isNaN(number) || number <= 0) { return 0; } - if (number >= 0xFF) { return 0xFF; } - var f = $floor(argument); - if (f + 0.5 < number) { return f + 1; } - if (number < f + 0.5) { return f; } - if (f % 2 !== 0) { return f + 1; } - return f; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring - ToString: function ToString(argument) { - if (typeof argument === 'symbol') { - throw new $TypeError('Cannot convert a Symbol value to a string'); - } - return $String(argument); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toobject - ToObject: function ToObject(value) { - this.RequireObjectCoercible(value); - return $Object(value); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey - ToPropertyKey: function ToPropertyKey(argument) { - var key = this.ToPrimitive(argument, $String); - return typeof key === 'symbol' ? key : this.ToString(key); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength - ToLength: function ToLength(argument) { - var len = this.ToInteger(argument); - if (len <= 0) { return 0; } // includes converting -0 to +0 - if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } - return len; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring - CanonicalNumericIndexString: function CanonicalNumericIndexString(argument) { - if (toStr(argument) !== '[object String]') { - throw new $TypeError('must be a string'); - } - if (argument === '-0') { return -0; } - var n = this.ToNumber(argument); - if (this.SameValue(this.ToString(n), argument)) { return n; } - return void 0; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-requireobjectcoercible - RequireObjectCoercible: ES5.CheckObjectCoercible, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray - IsArray: $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iscallable - // IsCallable: ES5.IsCallable, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor - IsConstructor: function IsConstructor(argument) { - return typeof argument === 'function' && !!argument.prototype; // unfortunately there's no way to truly check this without try/catch `new argument` - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isextensible-o - IsExtensible: Object.preventExtensions - ? function IsExtensible(obj) { - if (isPrimitive(obj)) { - return false; - } - return $isExtensible(obj); - } - : function isExtensible(obj) { return true; }, // eslint-disable-line no-unused-vars - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isinteger - IsInteger: function IsInteger(argument) { - if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { - return false; - } - var abs = $abs(argument); - return $floor(abs) === abs; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ispropertykey - IsPropertyKey: function IsPropertyKey(argument) { - return typeof argument === 'string' || typeof argument === 'symbol'; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-isregexp - IsRegExp: function IsRegExp(argument) { - if (!argument || typeof argument !== 'object') { - return false; - } - if (hasSymbols) { - var isRegExp = argument[$Symbol.match]; - if (typeof isRegExp !== 'undefined') { - return ES5.ToBoolean(isRegExp); - } - } - return hasRegExpMatcher(argument); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevalue - // SameValue: ES5.SameValue, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero - SameValueZero: function SameValueZero(x, y) { - return (x === y) || ($isNaN(x) && $isNaN(y)); - }, - - /** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ - GetV: function GetV(V, P) { - // 7.3.2.1 - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - // 7.3.2.2-3 - var O = this.ToObject(V); - - // 7.3.2.4 - return O[P]; - }, - - /** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ - GetMethod: function GetMethod(O, P) { - // 7.3.9.1 - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - // 7.3.9.2 - var func = this.GetV(O, P); - - // 7.3.9.4 - if (func == null) { - return void 0; - } - - // 7.3.9.5 - if (!this.IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); - } - - // 7.3.9.6 - return func; - }, - - /** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ - Get: function Get(O, P) { - // 7.3.1.1 - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - // 7.3.1.2 - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - // 7.3.1.3 - return O[P]; - }, - - Type: function Type(x) { - if (typeof x === 'symbol') { - return 'Symbol'; - } - return ES5.Type(x); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor - SpeciesConstructor: function SpeciesConstructor(O, defaultConstructor) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - var C = O.constructor; - if (typeof C === 'undefined') { - return defaultConstructor; - } - if (this.Type(C) !== 'Object') { - throw new $TypeError('O.constructor is not an Object'); - } - var S = hasSymbols && $Symbol.species ? C[$Symbol.species] : void 0; - if (S == null) { - return defaultConstructor; - } - if (this.IsConstructor(S)) { - return S; - } - throw new $TypeError('no constructor found'); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor - CompletePropertyDescriptor: function CompletePropertyDescriptor(Desc) { - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (this.IsGenericDescriptor(Desc) || this.IsDataDescriptor(Desc)) { - if (!has(Desc, '[[Value]]')) { - Desc['[[Value]]'] = void 0; - } - if (!has(Desc, '[[Writable]]')) { - Desc['[[Writable]]'] = false; - } - } else { - if (!has(Desc, '[[Get]]')) { - Desc['[[Get]]'] = void 0; - } - if (!has(Desc, '[[Set]]')) { - Desc['[[Set]]'] = void 0; - } - } - if (!has(Desc, '[[Enumerable]]')) { - Desc['[[Enumerable]]'] = false; - } - if (!has(Desc, '[[Configurable]]')) { - Desc['[[Configurable]]'] = false; - } - return Desc; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw - Set: function Set(O, P, V, Throw) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - if (this.Type(Throw) !== 'Boolean') { - throw new $TypeError('Throw must be a Boolean'); - } - if (Throw) { - O[P] = V; - return true; - } else { - try { - O[P] = V; - } catch (e) { - return false; - } - } - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty - HasOwnProperty: function HasOwnProperty(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - return has(O, P); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-hasproperty - HasProperty: function HasProperty(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - return P in O; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable - IsConcatSpreadable: function IsConcatSpreadable(O) { - if (this.Type(O) !== 'Object') { - return false; - } - if (hasSymbols && typeof $Symbol.isConcatSpreadable === 'symbol') { - var spreadable = this.Get(O, Symbol.isConcatSpreadable); - if (typeof spreadable !== 'undefined') { - return this.ToBoolean(spreadable); - } - } - return this.IsArray(O); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-invoke - Invoke: function Invoke(O, P) { - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - var argumentsList = arraySlice(arguments, 2); - var func = this.GetV(O, P); - return this.Call(func, O, argumentsList); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-getiterator - GetIterator: function GetIterator(obj, method) { - if (!hasSymbols) { - throw new SyntaxError('ES.GetIterator depends on native iterator support.'); - } - - var actualMethod = method; - if (arguments.length < 2) { - actualMethod = this.GetMethod(obj, $Symbol.iterator); - } - var iterator = this.Call(actualMethod, obj); - if (this.Type(iterator) !== 'Object') { - throw new $TypeError('iterator must return an object'); - } - - return iterator; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratornext - IteratorNext: function IteratorNext(iterator, value) { - var result = this.Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); - if (this.Type(result) !== 'Object') { - throw new $TypeError('iterator next must return an object'); - } - return result; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete - IteratorComplete: function IteratorComplete(iterResult) { - if (this.Type(iterResult) !== 'Object') { - throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); - } - return this.ToBoolean(this.Get(iterResult, 'done')); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue - IteratorValue: function IteratorValue(iterResult) { - if (this.Type(iterResult) !== 'Object') { - throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); - } - return this.Get(iterResult, 'value'); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep - IteratorStep: function IteratorStep(iterator) { - var result = this.IteratorNext(iterator); - var done = this.IteratorComplete(result); - return done === true ? false : result; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose - IteratorClose: function IteratorClose(iterator, completion) { - if (this.Type(iterator) !== 'Object') { - throw new $TypeError('Assertion failed: Type(iterator) is not Object'); - } - if (!this.IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); - } - var completionThunk = completion; - - var iteratorReturn = this.GetMethod(iterator, 'return'); - - if (typeof iteratorReturn === 'undefined') { - return completionThunk(); - } - - var completionRecord; - try { - var innerResult = this.Call(iteratorReturn, iterator, []); - } catch (e) { - // if we hit here, then "e" is the innerResult completion that needs re-throwing - - // if the completion is of type "throw", this will throw. - completionRecord = completionThunk(); - completionThunk = null; // ensure it's not called twice. - - // if not, then return the innerResult completion - throw e; - } - completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does - completionThunk = null; // ensure it's not called twice. - - if (this.Type(innerResult) !== 'Object') { - throw new $TypeError('iterator .return must return an object'); - } - - return completionRecord; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject - CreateIterResultObject: function CreateIterResultObject(value, done) { - if (this.Type(done) !== 'Boolean') { - throw new $TypeError('Assertion failed: Type(done) is not Boolean'); - } - return { - value: value, - done: done - }; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-regexpexec - RegExpExec: function RegExpExec(R, S) { - if (this.Type(R) !== 'Object') { - throw new $TypeError('R must be an Object'); - } - if (this.Type(S) !== 'String') { - throw new $TypeError('S must be a String'); - } - var exec = this.Get(R, 'exec'); - if (this.IsCallable(exec)) { - var result = this.Call(exec, R, [S]); - if (result === null || this.Type(result) === 'Object') { - return result; - } - throw new $TypeError('"exec" method must return `null` or an Object'); - } - return regexExec(R, S); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate - ArraySpeciesCreate: function ArraySpeciesCreate(originalArray, length) { - if (!this.IsInteger(length) || length < 0) { - throw new $TypeError('Assertion failed: length must be an integer >= 0'); - } - var len = length === 0 ? 0 : length; - var C; - var isArray = this.IsArray(originalArray); - if (isArray) { - C = this.Get(originalArray, 'constructor'); - // TODO: figure out how to make a cross-realm normal Array, a same-realm Array - // if (this.IsConstructor(C)) { - // if C is another realm's Array, C = undefined - // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? - // } - if (this.Type(C) === 'Object' && hasSymbols && $Symbol.species) { - C = this.Get(C, $Symbol.species); - if (C === null) { - C = void 0; - } - } - } - if (typeof C === 'undefined') { - return $Array(len); - } - if (!this.IsConstructor(C)) { - throw new $TypeError('C must be a constructor'); - } - return new C(len); // this.Construct(C, len); - }, - - CreateDataProperty: function CreateDataProperty(O, P, V) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - var oldDesc = $gOPD(O, P); - var extensible = oldDesc || (typeof $isExtensible !== 'function' || $isExtensible(O)); - var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable); - if (immutable || !extensible) { - return false; - } - var newDesc = { - configurable: true, - enumerable: true, - value: V, - writable: true - }; - $defineProperty(O, P, newDesc); - return true; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow - CreateDataPropertyOrThrow: function CreateDataPropertyOrThrow(O, P, V) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - var success = this.CreateDataProperty(O, P, V); - if (!success) { - throw new $TypeError('unable to create data property'); - } - return success; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate - ObjectCreate: function ObjectCreate(proto, internalSlotsList) { - if (proto !== null && this.Type(proto) !== 'Object') { - throw new $TypeError('Assertion failed: proto must be null or an object'); - } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); - } - - if (proto === null && !$ObjectCreate) { - throw new $SyntaxError('native Object.create support is required to create null objects'); - } - - return $ObjectCreate(proto); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex - AdvanceStringIndex: function AdvanceStringIndex(S, index, unicode) { - if (this.Type(S) !== 'String') { - throw new $TypeError('S must be a String'); - } - if (!this.IsInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { - throw new $TypeError('Assertion failed: length must be an integer >= 0 and <= 2**53'); - } - if (this.Type(unicode) !== 'Boolean') { - throw new $TypeError('Assertion failed: unicode must be a Boolean'); - } - if (!unicode) { - return index + 1; - } - var length = S.length; - if ((index + 1) >= length) { - return index + 1; - } - - var first = $charCodeAt(S, index); - if (first < 0xD800 || first > 0xDBFF) { - return index + 1; - } - - var second = $charCodeAt(S, index + 1); - if (second < 0xDC00 || second > 0xDFFF) { - return index + 1; - } - - return index + 2; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-createmethodproperty - CreateMethodProperty: function CreateMethodProperty(O, P, V) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - var newDesc = { - configurable: true, - enumerable: false, - value: V, - writable: true - }; - return !!$defineProperty(O, P, newDesc); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow - DefinePropertyOrThrow: function DefinePropertyOrThrow(O, P, desc) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - return !!$defineProperty(O, P, desc); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow - DeletePropertyOrThrow: function DeletePropertyOrThrow(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - var success = delete O[P]; - if (!success) { - throw new TypeError('Attempt to delete property failed.'); - } - return success; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-enumerableownnames - EnumerableOwnNames: function EnumerableOwnNames(O) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - return keys(O); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object - thisNumberValue: function thisNumberValue(value) { - if (this.Type(value) === 'Number') { - return value; - } - - return $NumberValueOf(value); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-boolean-prototype-object - thisBooleanValue: function thisBooleanValue(value) { - if (this.Type(value) === 'Boolean') { - return value; - } - - return $BooleanValueOf(value); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object - thisStringValue: function thisStringValue(value) { - if (this.Type(value) === 'String') { - return value; - } - - return $StringValueOf(value); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object - thisTimeValue: function thisTimeValue(value) { - return $DateValueOf(value); - } -}); - -delete ES6.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible - -module.exports = ES6; diff --git a/node_modules/es-abstract/es2016.js b/node_modules/es-abstract/es2016.js deleted file mode 100644 index c9166cea..00000000 --- a/node_modules/es-abstract/es2016.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -var ES2015 = require('./es2015'); -var assign = require('./helpers/assign'); - -var ES2016 = assign(assign({}, ES2015), { - // https://github.com/tc39/ecma262/pull/60 - SameValueNonNumber: function SameValueNonNumber(x, y) { - if (typeof x === 'number' || typeof x !== typeof y) { - throw new TypeError('SameValueNonNumber requires two non-number values of the same type.'); - } - return this.SameValue(x, y); - } -}); - -module.exports = ES2016; diff --git a/node_modules/es-abstract/es2017.js b/node_modules/es-abstract/es2017.js deleted file mode 100644 index cdef99c1..00000000 --- a/node_modules/es-abstract/es2017.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -var ES2016 = require('./es2016'); -var assign = require('./helpers/assign'); -var forEach = require('./helpers/forEach'); - -var GetIntrinsic = require('./GetIntrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $isEnumerable = bind.call(Function.call, GetIntrinsic('%ObjectPrototype%').propertyIsEnumerable); -var $pushApply = bind.call(Function.apply, GetIntrinsic('%ArrayPrototype%').push); - -var ES2017 = assign(assign({}, ES2016), { - ToIndex: function ToIndex(value) { - if (typeof value === 'undefined') { - return 0; - } - var integerIndex = this.ToInteger(value); - if (integerIndex < 0) { - throw new RangeError('index must be >= 0'); - } - var index = this.ToLength(integerIndex); - if (!this.SameValueZero(integerIndex, index)) { - throw new RangeError('index must be >= 0 and < 2 ** 53 - 1'); - } - return index; - }, - - // https://www.ecma-international.org/ecma-262/8.0/#sec-enumerableownproperties - EnumerableOwnProperties: function EnumerableOwnProperties(O, kind) { - var keys = ES2016.EnumerableOwnNames(O); - if (kind === 'key') { - return keys; - } - if (kind === 'value' || kind === 'key+value') { - var results = []; - forEach(keys, function (key) { - if ($isEnumerable(O, key)) { - $pushApply(results, [ - kind === 'value' ? O[key] : [key, O[key]] - ]); - } - }); - return results; - } - throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); - } -}); - -delete ES2017.EnumerableOwnNames; // replaced with EnumerableOwnProperties - -module.exports = ES2017; diff --git a/node_modules/es-abstract/es2018.js b/node_modules/es-abstract/es2018.js deleted file mode 100644 index 065dc836..00000000 --- a/node_modules/es-abstract/es2018.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var keys = require('object-keys'); - -var ES2017 = require('./es2017'); -var assign = require('./helpers/assign'); -var forEach = require('./helpers/forEach'); - -var GetIntrinsic = require('./GetIntrinsic'); - -var $String = GetIntrinsic('%String%'); -var $Object = GetIntrinsic('%Object%'); - -var $SymbolProto = GetIntrinsic('%SymbolPrototype%', true); -var $SymbolValueOf = $SymbolProto ? bind.call(Function.call, $SymbolProto.valueOf) : null; -var $StringProto = GetIntrinsic('%StringPrototype%'); -var $charAt = bind.call(Function.call, $StringProto.charAt); - -var $PromiseResolveOrig = GetIntrinsic('%Promise_resolve%', true); -var $PromiseResolve = $PromiseResolveOrig ? bind.call(Function.call, $PromiseResolveOrig) : null; - -var $isEnumerable = bind.call(Function.call, GetIntrinsic('%ObjectPrototype%').propertyIsEnumerable); -var $pushApply = bind.call(Function.apply, GetIntrinsic('%ArrayPrototype%').push); -var $gOPS = $SymbolValueOf ? $Object.getOwnPropertySymbols : null; - -var OwnPropertyKeys = function OwnPropertyKeys(ES, source) { - var ownKeys = keys(source); - if ($gOPS) { - $pushApply(ownKeys, $gOPS(source)); - } - return ownKeys; -}; - -var ES2018 = assign(assign({}, ES2017), { - EnumerableOwnPropertyNames: ES2017.EnumerableOwnProperties, - - // https://ecma-international.org/ecma-262/9.0/#sec-thissymbolvalue - thisSymbolValue: function thisSymbolValue(value) { - if (!$SymbolValueOf) { - throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); - } - if (this.Type(value) === 'Symbol') { - return value; - } - return $SymbolValueOf(value); - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-isstringprefix - IsStringPrefix: function IsStringPrefix(p, q) { - if (this.Type(p) !== 'String') { - throw new TypeError('Assertion failed: "p" must be a String'); - } - - if (this.Type(q) !== 'String') { - throw new TypeError('Assertion failed: "q" must be a String'); - } - - if (p === q || p === '') { - return true; - } - - var pLength = p.length; - var qLength = q.length; - if (pLength >= qLength) { - return false; - } - - // assert: pLength < qLength - - for (var i = 0; i < pLength; i += 1) { - if ($charAt(p, i) !== $charAt(q, i)) { - return false; - } - } - return true; - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-tostring-applied-to-the-number-type - NumberToString: function NumberToString(m) { - if (this.Type(m) !== 'Number') { - throw new TypeError('Assertion failed: "m" must be a String'); - } - - return $String(m); - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-copydataproperties - CopyDataProperties: function CopyDataProperties(target, source, excludedItems) { - if (this.Type(target) !== 'Object') { - throw new TypeError('Assertion failed: "target" must be an Object'); - } - - if (!this.IsArray(excludedItems)) { - throw new TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); - } - for (var i = 0; i < excludedItems.length; i += 1) { - if (!this.IsPropertyKey(excludedItems[i])) { - throw new TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); - } - } - - if (typeof source === 'undefined' || source === null) { - return target; - } - - var ES = this; - - var fromObj = ES.ToObject(source); - - var sourceKeys = OwnPropertyKeys(ES, fromObj); - forEach(sourceKeys, function (nextKey) { - var excluded = false; - - forEach(excludedItems, function (e) { - if (ES.SameValue(e, nextKey) === true) { - excluded = true; - } - }); - - var enumerable = $isEnumerable(fromObj, nextKey) || ( - // this is to handle string keys being non-enumerable in older engines - typeof source === 'string' - && nextKey >= 0 - && ES.IsInteger(ES.ToNumber(nextKey)) - ); - if (excluded === false && enumerable) { - var propValue = ES.Get(fromObj, nextKey); - ES.CreateDataProperty(target, nextKey, propValue); - } - }); - - return target; - }, - - // https://ecma-international.org/ecma-262/9.0/#sec-promise-resolve - PromiseResolve: function PromiseResolve(C, x) { - if (!$PromiseResolve) { - throw new SyntaxError('This environment does not support Promises.'); - } - return $PromiseResolve(C, x); - } -}); - -delete ES2018.EnumerableOwnProperties; // replaced with EnumerableOwnPropertyNames - -delete ES2018.IsPropertyDescriptor; // not an actual abstract operation - -module.exports = ES2018; diff --git a/node_modules/es-abstract/es5.js b/node_modules/es-abstract/es5.js deleted file mode 100644 index 37c0baf0..00000000 --- a/node_modules/es-abstract/es5.js +++ /dev/null @@ -1,235 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('./GetIntrinsic'); - -var $Object = GetIntrinsic('%Object%'); -var $TypeError = GetIntrinsic('%TypeError%'); -var $String = GetIntrinsic('%String%'); - -var assertRecord = require('./helpers/assertRecord'); -var $isNaN = require('./helpers/isNaN'); -var $isFinite = require('./helpers/isFinite'); - -var sign = require('./helpers/sign'); -var mod = require('./helpers/mod'); - -var IsCallable = require('is-callable'); -var toPrimitive = require('es-to-primitive/es5'); - -var has = require('has'); - -// https://es5.github.io/#x9 -var ES5 = { - ToPrimitive: toPrimitive, - - ToBoolean: function ToBoolean(value) { - return !!value; - }, - ToNumber: function ToNumber(value) { - return +value; // eslint-disable-line no-implicit-coercion - }, - ToInteger: function ToInteger(value) { - var number = this.ToNumber(value); - if ($isNaN(number)) { return 0; } - if (number === 0 || !$isFinite(number)) { return number; } - return sign(number) * Math.floor(Math.abs(number)); - }, - ToInt32: function ToInt32(x) { - return this.ToNumber(x) >> 0; - }, - ToUint32: function ToUint32(x) { - return this.ToNumber(x) >>> 0; - }, - ToUint16: function ToUint16(value) { - var number = this.ToNumber(value); - if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } - var posInt = sign(number) * Math.floor(Math.abs(number)); - return mod(posInt, 0x10000); - }, - ToString: function ToString(value) { - return $String(value); - }, - ToObject: function ToObject(value) { - this.CheckObjectCoercible(value); - return $Object(value); - }, - CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) { - /* jshint eqnull:true */ - if (value == null) { - throw new $TypeError(optMessage || 'Cannot call method on ' + value); - } - return value; - }, - IsCallable: IsCallable, - SameValue: function SameValue(x, y) { - if (x === y) { // 0 === -0, but they are not identical. - if (x === 0) { return 1 / x === 1 / y; } - return true; - } - return $isNaN(x) && $isNaN(y); - }, - - // https://www.ecma-international.org/ecma-262/5.1/#sec-8 - Type: function Type(x) { - if (x === null) { - return 'Null'; - } - if (typeof x === 'undefined') { - return 'Undefined'; - } - if (typeof x === 'function' || typeof x === 'object') { - return 'Object'; - } - if (typeof x === 'number') { - return 'Number'; - } - if (typeof x === 'boolean') { - return 'Boolean'; - } - if (typeof x === 'string') { - return 'String'; - } - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type - IsPropertyDescriptor: function IsPropertyDescriptor(Desc) { - if (this.Type(Desc) !== 'Object') { - return false; - } - var allowed = { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Get]]': true, - '[[Set]]': true, - '[[Value]]': true, - '[[Writable]]': true - }; - - for (var key in Desc) { // eslint-disable-line - if (has(Desc, key) && !allowed[key]) { - return false; - } - } - - var isData = has(Desc, '[[Value]]'); - var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); - if (isData && IsAccessor) { - throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); - } - return true; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1 - IsAccessorDescriptor: function IsAccessorDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { - return false; - } - - return true; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2 - IsDataDescriptor: function IsDataDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { - return false; - } - - return true; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3 - IsGenericDescriptor: function IsGenericDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) { - return true; - } - - return false; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4 - FromPropertyDescriptor: function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (this.IsDataDescriptor(Desc)) { - return { - value: Desc['[[Value]]'], - writable: !!Desc['[[Writable]]'], - enumerable: !!Desc['[[Enumerable]]'], - configurable: !!Desc['[[Configurable]]'] - }; - } else if (this.IsAccessorDescriptor(Desc)) { - return { - get: Desc['[[Get]]'], - set: Desc['[[Set]]'], - enumerable: !!Desc['[[Enumerable]]'], - configurable: !!Desc['[[Configurable]]'] - }; - } else { - throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); - } - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5 - ToPropertyDescriptor: function ToPropertyDescriptor(Obj) { - if (this.Type(Obj) !== 'Object') { - throw new $TypeError('ToPropertyDescriptor requires an object'); - } - - var desc = {}; - if (has(Obj, 'enumerable')) { - desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable); - } - if (has(Obj, 'configurable')) { - desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable); - } - if (has(Obj, 'value')) { - desc['[[Value]]'] = Obj.value; - } - if (has(Obj, 'writable')) { - desc['[[Writable]]'] = this.ToBoolean(Obj.writable); - } - if (has(Obj, 'get')) { - var getter = Obj.get; - if (typeof getter !== 'undefined' && !this.IsCallable(getter)) { - throw new TypeError('getter must be a function'); - } - desc['[[Get]]'] = getter; - } - if (has(Obj, 'set')) { - var setter = Obj.set; - if (typeof setter !== 'undefined' && !this.IsCallable(setter)) { - throw new $TypeError('setter must be a function'); - } - desc['[[Set]]'] = setter; - } - - if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { - throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); - } - return desc; - } -}; - -module.exports = ES5; diff --git a/node_modules/es-abstract/es6.js b/node_modules/es-abstract/es6.js deleted file mode 100644 index 2d1f4dc9..00000000 --- a/node_modules/es-abstract/es6.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./es2015'); diff --git a/node_modules/es-abstract/es7.js b/node_modules/es-abstract/es7.js deleted file mode 100644 index f2f15c0a..00000000 --- a/node_modules/es-abstract/es7.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./es2016'); diff --git a/node_modules/es-abstract/helpers/assertRecord.js b/node_modules/es-abstract/helpers/assertRecord.js deleted file mode 100644 index e8f06176..00000000 --- a/node_modules/es-abstract/helpers/assertRecord.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); - -var has = require('has'); - -var predicates = { - // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type - 'Property Descriptor': function isPropertyDescriptor(ES, Desc) { - if (ES.Type(Desc) !== 'Object') { - return false; - } - var allowed = { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Get]]': true, - '[[Set]]': true, - '[[Value]]': true, - '[[Writable]]': true - }; - - for (var key in Desc) { // eslint-disable-line - if (has(Desc, key) && !allowed[key]) { - return false; - } - } - - var isData = has(Desc, '[[Value]]'); - var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); - if (isData && IsAccessor) { - throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); - } - return true; - } -}; - -module.exports = function assertRecord(ES, recordType, argumentName, value) { - var predicate = predicates[recordType]; - if (typeof predicate !== 'function') { - throw new $SyntaxError('unknown record type: ' + recordType); - } - if (!predicate(ES, value)) { - throw new $TypeError(argumentName + ' must be a ' + recordType); - } - console.log(predicate(ES, value), value); -}; diff --git a/node_modules/es-abstract/helpers/assign.js b/node_modules/es-abstract/helpers/assign.js deleted file mode 100644 index 2533d20a..00000000 --- a/node_modules/es-abstract/helpers/assign.js +++ /dev/null @@ -1,17 +0,0 @@ -var bind = require('function-bind'); -var has = bind.call(Function.call, Object.prototype.hasOwnProperty); - -var $assign = Object.assign; - -module.exports = function assign(target, source) { - if ($assign) { - return $assign(target, source); - } - - for (var key in source) { - if (has(source, key)) { - target[key] = source[key]; - } - } - return target; -}; diff --git a/node_modules/es-abstract/helpers/forEach.js b/node_modules/es-abstract/helpers/forEach.js deleted file mode 100644 index 854e7f2b..00000000 --- a/node_modules/es-abstract/helpers/forEach.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = function forEach(array, callback) { - for (var i = 0; i < array.length; i += 1) { - callback(array[i], i, array); - } -}; diff --git a/node_modules/es-abstract/helpers/isFinite.js b/node_modules/es-abstract/helpers/isFinite.js deleted file mode 100644 index 46585376..00000000 --- a/node_modules/es-abstract/helpers/isFinite.js +++ /dev/null @@ -1,3 +0,0 @@ -var $isNaN = Number.isNaN || function (a) { return a !== a; }; - -module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; diff --git a/node_modules/es-abstract/helpers/isNaN.js b/node_modules/es-abstract/helpers/isNaN.js deleted file mode 100644 index e4d4f95f..00000000 --- a/node_modules/es-abstract/helpers/isNaN.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; diff --git a/node_modules/es-abstract/helpers/isPrimitive.js b/node_modules/es-abstract/helpers/isPrimitive.js deleted file mode 100644 index 36691564..00000000 --- a/node_modules/es-abstract/helpers/isPrimitive.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function isPrimitive(value) { - return value === null || (typeof value !== 'function' && typeof value !== 'object'); -}; diff --git a/node_modules/es-abstract/helpers/mod.js b/node_modules/es-abstract/helpers/mod.js deleted file mode 100644 index 5867fd97..00000000 --- a/node_modules/es-abstract/helpers/mod.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = function mod(number, modulo) { - var remain = number % modulo; - return Math.floor(remain >= 0 ? remain : remain + modulo); -}; diff --git a/node_modules/es-abstract/helpers/sign.js b/node_modules/es-abstract/helpers/sign.js deleted file mode 100644 index 2ac0bf1b..00000000 --- a/node_modules/es-abstract/helpers/sign.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function sign(number) { - return number >= 0 ? 1 : -1; -}; diff --git a/node_modules/es-abstract/index.js b/node_modules/es-abstract/index.js deleted file mode 100644 index 9a10051f..00000000 --- a/node_modules/es-abstract/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var assign = require('./helpers/assign'); - -var ES5 = require('./es5'); -var ES2015 = require('./es2015'); -var ES2016 = require('./es2016'); -var ES2017 = require('./es2017'); -var ES2018 = require('./es2018'); - -var ES = { - ES5: ES5, - ES6: ES2015, - ES2015: ES2015, - ES7: ES2016, - ES2016: ES2016, - ES2017: ES2017, - ES2018: ES2018 -}; -assign(ES, ES5); -delete ES.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible -assign(ES, ES2015); - -module.exports = ES; diff --git a/node_modules/es-abstract/operations/.eslintrc b/node_modules/es-abstract/operations/.eslintrc deleted file mode 100644 index bcd76f76..00000000 --- a/node_modules/es-abstract/operations/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "id-length": 0, - }, -} diff --git a/node_modules/es-abstract/operations/2015.js b/node_modules/es-abstract/operations/2015.js deleted file mode 100644 index 84d12e0f..00000000 --- a/node_modules/es-abstract/operations/2015.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -module.exports = { - IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isgenericdescriptor', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertydescriptor', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor', - ToPrimitive: 'https://ecma-international.org/ecma-262/6.0/#sec-toprimitive', - ToBoolean: 'https://ecma-international.org/ecma-262/6.0/#sec-toboolean', - ToNumber: 'https://ecma-international.org/ecma-262/6.0/#sec-tonumber', - ToInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-tointeger', - ToInt32: 'https://ecma-international.org/ecma-262/6.0/#sec-toint32', - ToUint32: 'https://ecma-international.org/ecma-262/6.0/#sec-touint32', - ToInt16: 'https://ecma-international.org/ecma-262/6.0/#sec-toint16', - ToUint16: 'https://ecma-international.org/ecma-262/6.0/#sec-touint16', - ToInt8: 'https://ecma-international.org/ecma-262/6.0/#sec-toint8', - ToUint8: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8clamp', - ToString: 'https://ecma-international.org/ecma-262/6.0/#sec-tostring', - ToObject: 'https://ecma-international.org/ecma-262/6.0/#sec-toobject', - ToPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertykey', - ToLength: 'https://ecma-international.org/ecma-262/6.0/#sec-tolength', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/6.0/#sec-requireobjectcoercible', - IsArray: 'https://ecma-international.org/ecma-262/6.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/6.0/#sec-iscallable', - IsConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-isconstructor', - IsExtensible: 'https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o', - IsInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-isinteger', - IsPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey', - IsRegExp: 'https://ecma-international.org/ecma-262/6.0/#sec-isregexp', - SameValue: 'https://ecma-international.org/ecma-262/6.0/#sec-samevalue', - SameValueZero: 'https://ecma-international.org/ecma-262/6.0/#sec-samevaluezero', - Get: 'https://ecma-international.org/ecma-262/6.0/#sec-get-o-p', - GetV: 'https://ecma-international.org/ecma-262/6.0/#sec-getv', - Set: 'https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw', - CreateDataProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createmethodproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow', - GetMethod: 'https://ecma-international.org/ecma-262/6.0/#sec-getmethod', - HasProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasproperty', - HasOwnProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty', - Call: 'https://ecma-international.org/ecma-262/6.0/#sec-call', - Construct: 'https://ecma-international.org/ecma-262/6.0/#sec-construct', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-setintegritylevel', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-testintegritylevel', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/6.0/#sec-createarrayfromlist', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistfromarraylike', - Invoke: 'https://ecma-international.org/ecma-262/6.0/#sec-invoke', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasinstance', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor', - EnumerableOwnNames: 'https://ecma-international.org/ecma-262/6.0/#sec-enumerableownnames', - GetIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-getiterator', - IteratorNext: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratornext', - IteratorComplete: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete', - IteratorValue: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue', - IteratorStep: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep', - IteratorClose: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject', - CreateListIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistiterator', - Type: 'https://ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types', - thisBooleanValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-boolean-prototype-object', - thisNumberValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object', - thisTimeValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object', - thisStringValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object', - RegExpExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpexec', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpbuiltinexec', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable', - IsPromise: 'https://ecma-international.org/ecma-262/6.0/#sec-ispromise', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate', - ObjectCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-objectcreate', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex', - NormalCompletion: 'https://ecma-international.org/ecma-262/6.0/#sec-normalcompletion' -}; diff --git a/node_modules/es-abstract/operations/2016.js b/node_modules/es-abstract/operations/2016.js deleted file mode 100644 index 65b5beff..00000000 --- a/node_modules/es-abstract/operations/2016.js +++ /dev/null @@ -1,283 +0,0 @@ -'use strict'; - -module.exports = { - IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - - abs: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/7.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/7.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://ecma-international.org/ecma-262/7.0/#sec-addrestrictedfunctionproperties', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/7.0/#sec-advancestringindex', - AllocateArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-allocatearraybuffer', - AllocateTypedArray: 'https://ecma-international.org/ecma-262/7.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/7.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-arrayspeciescreate', - BlockDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-boundfunctioncreate', - Call: 'https://ecma-international.org/ecma-262/7.0/#sec-call', - Canonicalize: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/7.0/#sec-canonicalnumericindexstring', - CharacterRange: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-completepropertydescriptor', - Completion: 'https://ecma-international.org/ecma-262/7.0/#sec-completion-record-specification-type', - Construct: 'https://ecma-international.org/ecma-262/7.0/#sec-construct', - CopyDataBlockBytes: 'https://ecma-international.org/ecma-262/7.0/#sec-copydatablockbytes', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/7.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createarrayiterator', - CreateBuiltinFunction: 'https://ecma-international.org/ecma-262/7.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://ecma-international.org/ecma-262/7.0/#sec-createbytedatablock', - CreateDataProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://ecma-international.org/ecma-262/7.0/#sec-createdynamicfunction', - CreateHTML: 'https://ecma-international.org/ecma-262/7.0/#sec-createhtml', - CreateIntrinsics: 'https://ecma-international.org/ecma-262/7.0/#sec-createintrinsics', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistiterator', - CreateMapIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-createperiterationenvironment', - CreateRealm: 'https://ecma-international.org/ecma-262/7.0/#sec-createrealm', - CreateResolvingFunctions: 'https://ecma-international.org/ecma-262/7.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createsetiterator', - CreateStringIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-date-number', - Day: 'https://ecma-international.org/ecma-262/7.0/#sec-day-number-and-time-within-day', - DayFromYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - DaysInYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - DayWithinYear: 'https://ecma-international.org/ecma-262/7.0/#sec-month-number', - Decode: 'https://ecma-international.org/ecma-262/7.0/#sec-decode', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-detacharraybuffer', - Encode: 'https://ecma-international.org/ecma-262/7.0/#sec-encode', - EnqueueJob: 'https://ecma-international.org/ecma-262/7.0/#sec-enqueuejob', - EnumerableOwnNames: 'https://ecma-international.org/ecma-262/7.0/#sec-enumerableownnames', - EnumerateObjectProperties: 'https://ecma-international.org/ecma-262/7.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://ecma-international.org/ecma-262/7.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://ecma-international.org/ecma-262/7.0/#sec-evaluatecall', - EvaluateDirectCall: 'https://ecma-international.org/ecma-262/7.0/#sec-evaluatedirectcall', - EvaluateNew: 'https://ecma-international.org/ecma-262/7.0/#sec-evaluatenew', - floor: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - ForBodyEvaluation: 'https://ecma-international.org/ecma-262/7.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-fulfillpromise', - FunctionAllocate: 'https://ecma-international.org/ecma-262/7.0/#sec-functionallocate', - FunctionCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://ecma-international.org/ecma-262/7.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorstart', - GeneratorValidate: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorvalidate', - GeneratorYield: 'https://ecma-international.org/ecma-262/7.0/#sec-generatoryield', - Get: 'https://ecma-international.org/ecma-262/7.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://ecma-international.org/ecma-262/7.0/#sec-getactivescriptormodule', - GetFunctionRealm: 'https://ecma-international.org/ecma-262/7.0/#sec-getfunctionrealm', - GetGlobalObject: 'https://ecma-international.org/ecma-262/7.0/#sec-getglobalobject', - GetIdentifierReference: 'https://ecma-international.org/ecma-262/7.0/#sec-getidentifierreference', - GetIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/7.0/#sec-getmethod', - GetModuleNamespace: 'https://ecma-international.org/ecma-262/7.0/#sec-getmodulenamespace', - GetNewTarget: 'https://ecma-international.org/ecma-262/7.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/7.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-getprototypefromconstructor', - GetSubstitution: 'https://ecma-international.org/ecma-262/7.0/#sec-getsubstitution', - GetSuperConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://ecma-international.org/ecma-262/7.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-getthisenvironment', - GetThisValue: 'https://ecma-international.org/ecma-262/7.0/#sec-getthisvalue', - GetV: 'https://ecma-international.org/ecma-262/7.0/#sec-getv', - GetValue: 'https://ecma-international.org/ecma-262/7.0/#sec-getvalue', - GetValueFromBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://ecma-international.org/ecma-262/7.0/#sec-getviewvalue', - GlobalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-globaldeclarationinstantiation', - HasOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasownproperty', - HasProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasproperty', - HostPromiseRejectionTracker: 'https://ecma-international.org/ecma-262/7.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://ecma-international.org/ecma-262/7.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://ecma-international.org/ecma-262/7.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - HoursPerDay: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - IfAbruptRejectPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://ecma-international.org/ecma-262/7.0/#sec-importedlocalnames', - InitializeBoundName: 'https://ecma-international.org/ecma-262/7.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://ecma-international.org/ecma-262/7.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://ecma-international.org/ecma-262/7.0/#sec-initializereferencedbinding', - InLeapYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - InstanceofOperator: 'https://ecma-international.org/ecma-262/7.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://ecma-international.org/ecma-262/7.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://ecma-international.org/ecma-262/7.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-internalizejsonproperty', - Invoke: 'https://ecma-international.org/ecma-262/7.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://ecma-international.org/ecma-262/7.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://ecma-international.org/ecma-262/7.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/7.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/7.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-isdetachedbuffer', - IsExtensible: 'https://ecma-international.org/ecma-262/7.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://ecma-international.org/ecma-262/7.0/#sec-isintailposition', - IsInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-isinteger', - IsLabelledFunction: 'https://ecma-international.org/ecma-262/7.0/#sec-islabelledfunction', - IsPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-ispropertykey', - IsRegExp: 'https://ecma-international.org/ecma-262/7.0/#sec-isregexp', - IsWordChar: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToArrayLike: 'https://ecma-international.org/ecma-262/7.0/#sec-iterabletoarraylike', - IteratorClose: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorvalue', - LocalTime: 'https://ecma-international.org/ecma-262/7.0/#sec-localtime', - LoopContinues: 'https://ecma-international.org/ecma-262/7.0/#sec-loopcontinues', - MakeArgGetter: 'https://ecma-international.org/ecma-262/7.0/#sec-makearggetter', - MakeArgSetter: 'https://ecma-international.org/ecma-262/7.0/#sec-makeargsetter', - MakeClassConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-makeclassconstructor', - MakeConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-makeconstructor', - MakeDate: 'https://ecma-international.org/ecma-262/7.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/7.0/#sec-makeday', - MakeMethod: 'https://ecma-international.org/ecma-262/7.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://ecma-international.org/ecma-262/7.0/#sec-makesuperpropertyreference', - MakeTime: 'https://ecma-international.org/ecma-262/7.0/#sec-maketime', - max: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - min: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - MinFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - MinutesPerHour: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - ModuleNamespaceCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-modulenamespacecreate', - modulo: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - MonthFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-month-number', - msFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - msPerDay: 'https://ecma-international.org/ecma-262/7.0/#sec-day-number-and-time-within-day', - msPerHour: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - msPerMinute: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - msPerSecond: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - NewDeclarativeEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://ecma-international.org/ecma-262/7.0/#sec-newpromisecapability', - NextJob: 'https://ecma-international.org/ecma-262/7.0/#sec-nextjob-result', - NormalCompletion: 'https://ecma-international.org/ecma-262/7.0/#sec-normalcompletion', - ObjectCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-objectcreate', - ObjectDefineProperties: 'https://ecma-international.org/ecma-262/7.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarydelete', - OrdinaryGet: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarysetprototypeof', - ParseModule: 'https://ecma-international.org/ecma-262/7.0/#sec-parsemodule', - ParseScript: 'https://ecma-international.org/ecma-262/7.0/#sec-parse-script', - PerformEval: 'https://ecma-international.org/ecma-262/7.0/#sec-performeval', - PerformPromiseAll: 'https://ecma-international.org/ecma-262/7.0/#sec-performpromiseall', - PerformPromiseRace: 'https://ecma-international.org/ecma-262/7.0/#sec-performpromiserace', - PerformPromiseThen: 'https://ecma-international.org/ecma-262/7.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://ecma-international.org/ecma-262/7.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://ecma-international.org/ecma-262/7.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://ecma-international.org/ecma-262/7.0/#sec-promisereactionjob', - PromiseResolveThenableJob: 'https://ecma-international.org/ecma-262/7.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-proxycreate', - PutValue: 'https://ecma-international.org/ecma-262/7.0/#sec-putvalue', - QuoteJSONString: 'https://ecma-international.org/ecma-262/7.0/#sec-quotejsonstring', - RegExpAlloc: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpcreate', - RegExpExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpexec', - RegExpInitialize: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpinitialize', - RejectPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-rejectpromise', - RepeatMatcher: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/7.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://ecma-international.org/ecma-262/7.0/#sec-resolvebinding', - ResolveThisBinding: 'https://ecma-international.org/ecma-262/7.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://ecma-international.org/ecma-262/7.0/#sec-returnifabrupt', - SameValue: 'https://ecma-international.org/ecma-262/7.0/#sec-samevalue', - SameValueNonNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluenonnumber', - SameValueZero: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluezero', - ScriptEvaluation: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://ecma-international.org/ecma-262/7.0/#sec-scriptevaluationjob', - SecFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - SecondsPerMinute: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - SerializeJSONArray: 'https://ecma-international.org/ecma-262/7.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://ecma-international.org/ecma-262/7.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-serializejsonproperty', - Set: 'https://ecma-international.org/ecma-262/7.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://ecma-international.org/ecma-262/7.0/#sec-setdefaultglobalbindings', - SetFunctionName: 'https://ecma-international.org/ecma-262/7.0/#sec-setfunctionname', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://ecma-international.org/ecma-262/7.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-setvalueinbuffer', - SetViewValue: 'https://ecma-international.org/ecma-262/7.0/#sec-setviewvalue', - SortCompare: 'https://ecma-international.org/ecma-262/7.0/#sec-sortcompare', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-speciesconstructor', - SplitMatch: 'https://ecma-international.org/ecma-262/7.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/7.0/#sec-strict-equality-comparison', - StringCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-stringcreate', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/7.0/#sec-symboldescriptivestring', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/7.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-number-prototype-object', - thisStringValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-string-prototype-object', - thisTimeValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-date-prototype-object', - TimeClip: 'https://ecma-international.org/ecma-262/7.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - TimeWithinDay: 'https://ecma-international.org/ecma-262/7.0/#sec-day-number-and-time-within-day', - ToBoolean: 'https://ecma-international.org/ecma-262/7.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/7.0/#sec-todatestring', - ToInt16: 'https://ecma-international.org/ecma-262/7.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/7.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/7.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/7.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/7.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://ecma-international.org/ecma-262/7.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://ecma-international.org/ecma-262/7.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/7.0/#sec-tostring', - 'ToString Applied to the Number Type': 'https://ecma-international.org/ecma-262/7.0/#sec-tostring-applied-to-the-number-type', - ToUint16: 'https://ecma-international.org/ecma-262/7.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/7.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://ecma-international.org/ecma-262/7.0/#sec-triggerpromisereactions', - Type: 'https://ecma-international.org/ecma-262/7.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://ecma-international.org/ecma-262/7.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://ecma-international.org/ecma-262/7.0/#typedarray-species-create', - UpdateEmpty: 'https://ecma-international.org/ecma-262/7.0/#sec-updateempty', - UTC: 'https://ecma-international.org/ecma-262/7.0/#sec-utc-t', - UTF16Decode: 'https://ecma-international.org/ecma-262/7.0/#sec-utf16decode', - UTF16Encoding: 'https://ecma-international.org/ecma-262/7.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-validateandapplypropertydescriptor', - ValidateTypedArray: 'https://ecma-international.org/ecma-262/7.0/#sec-validatetypedarray', - WeekDay: 'https://ecma-international.org/ecma-262/7.0/#sec-week-day', - YearFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number' -}; diff --git a/node_modules/es-abstract/operations/2017.js b/node_modules/es-abstract/operations/2017.js deleted file mode 100644 index f75aeb93..00000000 --- a/node_modules/es-abstract/operations/2017.js +++ /dev/null @@ -1,331 +0,0 @@ -'use strict'; - -module.exports = { - IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - - abs: 'https://ecma-international.org/ecma-262/8.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/8.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/8.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://ecma-international.org/ecma-262/8.0/#sec-addwaiter', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-advancestringindex', - 'agent-order': 'https://ecma-international.org/ecma-262/8.0/#sec-agent-order', - AgentCanSuspend: 'https://ecma-international.org/ecma-262/8.0/#sec-agentcansuspend', - AgentSignifier: 'https://ecma-international.org/ecma-262/8.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/8.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-arrayspeciescreate', - AsyncFunctionAwait: 'https://ecma-international.org/ecma-262/8.0/#sec-async-functions-abstract-operations-async-function-await', - AsyncFunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://ecma-international.org/ecma-262/8.0/#sec-async-functions-abstract-operations-async-function-start', - AtomicLoad: 'https://ecma-international.org/ecma-262/8.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://ecma-international.org/ecma-262/8.0/#sec-atomicreadmodifywrite', - BlockDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-boundfunctioncreate', - Call: 'https://ecma-international.org/ecma-262/8.0/#sec-call', - Canonicalize: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/8.0/#sec-canonicalnumericindexstring', - CharacterRange: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-completepropertydescriptor', - Completion: 'https://ecma-international.org/ecma-262/8.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://ecma-international.org/ecma-262/8.0/#sec-composewriteeventbytes', - Construct: 'https://ecma-international.org/ecma-262/8.0/#sec-construct', - CopyDataBlockBytes: 'https://ecma-international.org/ecma-262/8.0/#sec-copydatablockbytes', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/8.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createarrayiterator', - CreateBuiltinFunction: 'https://ecma-international.org/ecma-262/8.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://ecma-international.org/ecma-262/8.0/#sec-createbytedatablock', - CreateDataProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://ecma-international.org/ecma-262/8.0/#sec-createdynamicfunction', - CreateHTML: 'https://ecma-international.org/ecma-262/8.0/#sec-createhtml', - CreateIntrinsics: 'https://ecma-international.org/ecma-262/8.0/#sec-createintrinsics', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistiterator', - CreateMapIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-createperiterationenvironment', - CreateRealm: 'https://ecma-international.org/ecma-262/8.0/#sec-createrealm', - CreateResolvingFunctions: 'https://ecma-international.org/ecma-262/8.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://ecma-international.org/ecma-262/8.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://ecma-international.org/ecma-262/8.0/#sec-date-number', - Day: 'https://ecma-international.org/ecma-262/8.0/#eqn-Day', - DayFromYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-DaysFromYear', - DaysInYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-DaysInYear', - DayWithinYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-DayWithinYear', - Decode: 'https://ecma-international.org/ecma-262/8.0/#sec-decode', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-detacharraybuffer', - Encode: 'https://ecma-international.org/ecma-262/8.0/#sec-encode', - EnqueueJob: 'https://ecma-international.org/ecma-262/8.0/#sec-enqueuejob', - EnterCriticalSection: 'https://ecma-international.org/ecma-262/8.0/#sec-entercriticalsection', - EnumerableOwnProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-enumerableownproperties', - EnumerateObjectProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://ecma-international.org/ecma-262/8.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://ecma-international.org/ecma-262/8.0/#sec-evaluatecall', - EvaluateDirectCall: 'https://ecma-international.org/ecma-262/8.0/#sec-evaluatedirectcall', - EvaluateNew: 'https://ecma-international.org/ecma-262/8.0/#sec-evaluatenew', - EventSet: 'https://ecma-international.org/ecma-262/8.0/#sec-event-set', - floor: 'https://ecma-international.org/ecma-262/8.0/#eqn-floor', - ForBodyEvaluation: 'https://ecma-international.org/ecma-262/8.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-fulfillpromise', - FunctionAllocate: 'https://ecma-international.org/ecma-262/8.0/#sec-functionallocate', - FunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://ecma-international.org/ecma-262/8.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorstart', - GeneratorValidate: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorvalidate', - GeneratorYield: 'https://ecma-international.org/ecma-262/8.0/#sec-generatoryield', - Get: 'https://ecma-international.org/ecma-262/8.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://ecma-international.org/ecma-262/8.0/#sec-getactivescriptormodule', - GetBase: 'https://ecma-international.org/ecma-262/8.0/#ao-getbase', - GetFunctionRealm: 'https://ecma-international.org/ecma-262/8.0/#sec-getfunctionrealm', - GetGlobalObject: 'https://ecma-international.org/ecma-262/8.0/#sec-getglobalobject', - GetIdentifierReference: 'https://ecma-international.org/ecma-262/8.0/#sec-getidentifierreference', - GetIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/8.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://ecma-international.org/ecma-262/8.0/#sec-getmodulenamespace', - GetNewTarget: 'https://ecma-international.org/ecma-262/8.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/8.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://ecma-international.org/ecma-262/8.0/#ao-getreferencedname', - GetSubstitution: 'https://ecma-international.org/ecma-262/8.0/#sec-getsubstitution', - GetSuperConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://ecma-international.org/ecma-262/8.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-getthisenvironment', - GetThisValue: 'https://ecma-international.org/ecma-262/8.0/#sec-getthisvalue', - GetV: 'https://ecma-international.org/ecma-262/8.0/#sec-getv', - GetValue: 'https://ecma-international.org/ecma-262/8.0/#sec-getvalue', - GetValueFromBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://ecma-international.org/ecma-262/8.0/#sec-getviewvalue', - GetWaiterList: 'https://ecma-international.org/ecma-262/8.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://ecma-international.org/ecma-262/8.0/#sec-happens-before', - HasOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://ecma-international.org/ecma-262/8.0/#ao-hasprimitivebase', - HasProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://ecma-international.org/ecma-262/8.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://ecma-international.org/ecma-262/8.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://ecma-international.org/ecma-262/8.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://ecma-international.org/ecma-262/8.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://ecma-international.org/ecma-262/8.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://ecma-international.org/ecma-262/8.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-HourFromTime', - HoursPerDay: 'https://ecma-international.org/ecma-262/8.0/#eqn-HoursPerDay', - IfAbruptRejectPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://ecma-international.org/ecma-262/8.0/#sec-importedlocalnames', - InitializeBoundName: 'https://ecma-international.org/ecma-262/8.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://ecma-international.org/ecma-262/8.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://ecma-international.org/ecma-262/8.0/#sec-initializereferencedbinding', - InLeapYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-InLeapYear', - InstanceofOperator: 'https://ecma-international.org/ecma-262/8.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://ecma-international.org/ecma-262/8.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://ecma-international.org/ecma-262/8.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-internalizejsonproperty', - Invoke: 'https://ecma-international.org/ecma-262/8.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://ecma-international.org/ecma-262/8.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://ecma-international.org/ecma-262/8.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/8.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/8.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-isdetachedbuffer', - IsExtensible: 'https://ecma-international.org/ecma-262/8.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://ecma-international.org/ecma-262/8.0/#sec-isintailposition', - IsInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-isinteger', - IsLabelledFunction: 'https://ecma-international.org/ecma-262/8.0/#sec-islabelledfunction', - IsPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-ispropertykey', - IsPropertyReference: 'https://ecma-international.org/ecma-262/8.0/#ao-ispropertyreference', - IsRegExp: 'https://ecma-international.org/ecma-262/8.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://ecma-international.org/ecma-262/8.0/#ao-isstrictreference', - IsSuperReference: 'https://ecma-international.org/ecma-262/8.0/#ao-issuperreference', - IsUnresolvableReference: 'https://ecma-international.org/ecma-262/8.0/#ao-isunresolvablereference', - IsWordChar: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://ecma-international.org/ecma-262/8.0/#sec-iterabletolist', - IteratorClose: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://ecma-international.org/ecma-262/8.0/#sec-leavecriticalsection', - LocalTime: 'https://ecma-international.org/ecma-262/8.0/#sec-localtime', - LoopContinues: 'https://ecma-international.org/ecma-262/8.0/#sec-loopcontinues', - MakeArgGetter: 'https://ecma-international.org/ecma-262/8.0/#sec-makearggetter', - MakeArgSetter: 'https://ecma-international.org/ecma-262/8.0/#sec-makeargsetter', - MakeClassConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-makeclassconstructor', - MakeConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-makeconstructor', - MakeDate: 'https://ecma-international.org/ecma-262/8.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/8.0/#sec-makeday', - MakeMethod: 'https://ecma-international.org/ecma-262/8.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://ecma-international.org/ecma-262/8.0/#sec-makesuperpropertyreference', - MakeTime: 'https://ecma-international.org/ecma-262/8.0/#sec-maketime', - max: 'https://ecma-international.org/ecma-262/8.0/#eqn-max', - 'memory-order': 'https://ecma-international.org/ecma-262/8.0/#sec-memory-order', - min: 'https://ecma-international.org/ecma-262/8.0/#eqn-min', - MinFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-MinFromTime', - MinutesPerHour: 'https://ecma-international.org/ecma-262/8.0/#eqn-MinutesPerHour', - ModuleNamespaceCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-modulenamespacecreate', - modulo: 'https://ecma-international.org/ecma-262/8.0/#eqn-modulo', - MonthFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-MonthFromTime', - msFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-msFromTime', - msPerDay: 'https://ecma-international.org/ecma-262/8.0/#eqn-msPerDay', - msPerHour: 'https://ecma-international.org/ecma-262/8.0/#eqn-msPerHour', - msPerMinute: 'https://ecma-international.org/ecma-262/8.0/#eqn-msPerMinute', - msPerSecond: 'https://ecma-international.org/ecma-262/8.0/#eqn-msPerSecond', - NewDeclarativeEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://ecma-international.org/ecma-262/8.0/#sec-newpromisecapability', - NormalCompletion: 'https://ecma-international.org/ecma-262/8.0/#sec-normalcompletion', - NumberToRawBytes: 'https://ecma-international.org/ecma-262/8.0/#sec-numbertorawbytes', - ObjectCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-objectcreate', - ObjectDefineProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarydelete', - OrdinaryGet: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarysetprototypeof', - OrdinaryToPrimitive: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarytoprimitive', - ParseModule: 'https://ecma-international.org/ecma-262/8.0/#sec-parsemodule', - ParseScript: 'https://ecma-international.org/ecma-262/8.0/#sec-parse-script', - PerformEval: 'https://ecma-international.org/ecma-262/8.0/#sec-performeval', - PerformPromiseAll: 'https://ecma-international.org/ecma-262/8.0/#sec-performpromiseall', - PerformPromiseRace: 'https://ecma-international.org/ecma-262/8.0/#sec-performpromiserace', - PerformPromiseThen: 'https://ecma-international.org/ecma-262/8.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://ecma-international.org/ecma-262/8.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://ecma-international.org/ecma-262/8.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://ecma-international.org/ecma-262/8.0/#sec-promisereactionjob', - PromiseResolveThenableJob: 'https://ecma-international.org/ecma-262/8.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-proxycreate', - PutValue: 'https://ecma-international.org/ecma-262/8.0/#sec-putvalue', - QuoteJSONString: 'https://ecma-international.org/ecma-262/8.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://ecma-international.org/ecma-262/8.0/#sec-reads-bytes-from', - 'reads-from': 'https://ecma-international.org/ecma-262/8.0/#sec-reads-from', - RegExpAlloc: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpcreate', - RegExpExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpexec', - RegExpInitialize: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpinitialize', - RejectPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-rejectpromise', - RemoveWaiter: 'https://ecma-international.org/ecma-262/8.0/#sec-removewaiter', - RemoveWaiters: 'https://ecma-international.org/ecma-262/8.0/#sec-removewaiters', - RepeatMatcher: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/8.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://ecma-international.org/ecma-262/8.0/#sec-resolvebinding', - ResolveThisBinding: 'https://ecma-international.org/ecma-262/8.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://ecma-international.org/ecma-262/8.0/#sec-returnifabrupt', - RunJobs: 'https://ecma-international.org/ecma-262/8.0/#sec-runjobs', - SameValue: 'https://ecma-international.org/ecma-262/8.0/#sec-samevalue', - SameValueNonNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluenonnumber', - SameValueZero: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluezero', - ScriptEvaluation: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://ecma-international.org/ecma-262/8.0/#sec-scriptevaluationjob', - SecFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-SecFromTime', - SecondsPerMinute: 'https://ecma-international.org/ecma-262/8.0/#eqn-SecondsPerMinute', - SerializeJSONArray: 'https://ecma-international.org/ecma-262/8.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://ecma-international.org/ecma-262/8.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-serializejsonproperty', - Set: 'https://ecma-international.org/ecma-262/8.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://ecma-international.org/ecma-262/8.0/#sec-setdefaultglobalbindings', - SetFunctionName: 'https://ecma-international.org/ecma-262/8.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://ecma-international.org/ecma-262/8.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://ecma-international.org/ecma-262/8.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-setvalueinbuffer', - SetViewValue: 'https://ecma-international.org/ecma-262/8.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://ecma-international.org/ecma-262/8.0/#sec-sharedatablockeventset', - SortCompare: 'https://ecma-international.org/ecma-262/8.0/#sec-sortcompare', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-speciesconstructor', - SplitMatch: 'https://ecma-international.org/ecma-262/8.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/8.0/#sec-strict-equality-comparison', - StringCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-stringcreate', - StringGetOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-stringgetownproperty', - Suspend: 'https://ecma-international.org/ecma-262/8.0/#sec-suspend', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/8.0/#sec-symboldescriptivestring', - 'synchronizes-with': 'https://ecma-international.org/ecma-262/8.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thisnumbervalue', - thisStringValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thisstringvalue', - thisTimeValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thistimevalue', - TimeClip: 'https://ecma-international.org/ecma-262/8.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-TimeFromYear', - TimeWithinDay: 'https://ecma-international.org/ecma-262/8.0/#eqn-TimeWithinDay', - ToBoolean: 'https://ecma-international.org/ecma-262/8.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/8.0/#sec-todatestring', - ToIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-toindex', - ToInt16: 'https://ecma-international.org/ecma-262/8.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/8.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/8.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/8.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/8.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://ecma-international.org/ecma-262/8.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://ecma-international.org/ecma-262/8.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/8.0/#sec-tostring', - 'ToString Applied to the Number Type': 'https://ecma-international.org/ecma-262/8.0/#sec-tostring-applied-to-the-number-type', - ToUint16: 'https://ecma-international.org/ecma-262/8.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/8.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://ecma-international.org/ecma-262/8.0/#sec-triggerpromisereactions', - Type: 'https://ecma-international.org/ecma-262/8.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://ecma-international.org/ecma-262/8.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://ecma-international.org/ecma-262/8.0/#typedarray-species-create', - UpdateEmpty: 'https://ecma-international.org/ecma-262/8.0/#sec-updateempty', - UTC: 'https://ecma-international.org/ecma-262/8.0/#sec-utc-t', - UTF16Decode: 'https://ecma-international.org/ecma-262/8.0/#sec-utf16decode', - UTF16Encoding: 'https://ecma-international.org/ecma-262/8.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://ecma-international.org/ecma-262/8.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://ecma-international.org/ecma-262/8.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://ecma-international.org/ecma-262/8.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://ecma-international.org/ecma-262/8.0/#sec-valueofreadevent', - WakeWaiter: 'https://ecma-international.org/ecma-262/8.0/#sec-wakewaiter', - WeekDay: 'https://ecma-international.org/ecma-262/8.0/#sec-week-day', - WordCharacters: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-YearFromTime' -}; diff --git a/node_modules/es-abstract/operations/2018.js b/node_modules/es-abstract/operations/2018.js deleted file mode 100644 index 7d4b388b..00000000 --- a/node_modules/es-abstract/operations/2018.js +++ /dev/null @@ -1,357 +0,0 @@ -'use strict'; - -module.exports = { - abs: 'https://ecma-international.org/ecma-262/9.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/9.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/9.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://ecma-international.org/ecma-262/9.0/#sec-addwaiter', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/9.0/#sec-advancestringindex', - 'agent-order': 'https://ecma-international.org/ecma-262/9.0/#sec-agent-order', - AgentCanSuspend: 'https://ecma-international.org/ecma-262/9.0/#sec-agentcansuspend', - AgentSignifier: 'https://ecma-international.org/ecma-262/9.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/9.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-arrayspeciescreate', - AsyncFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://ecma-international.org/ecma-262/9.0/#sec-async-functions-abstract-operations-async-function-start', - AsyncGeneratorEnqueue: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorenqueue', - AsyncGeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorfunctioncreate', - AsyncGeneratorReject: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorreject', - AsyncGeneratorResolve: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorresolve', - AsyncGeneratorResumeNext: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorresumenext', - AsyncGeneratorStart: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorstart', - AsyncGeneratorYield: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratoryield', - AsyncIteratorClose: 'https://ecma-international.org/ecma-262/9.0/#sec-asynciteratorclose', - AtomicLoad: 'https://ecma-international.org/ecma-262/9.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://ecma-international.org/ecma-262/9.0/#sec-atomicreadmodifywrite', - Await: 'https://ecma-international.org/ecma-262/9.0/#await', - BackreferenceMatcher: 'https://ecma-international.org/ecma-262/9.0/#sec-backreference-matcher', - BlockDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-boundfunctioncreate', - Call: 'https://ecma-international.org/ecma-262/9.0/#sec-call', - Canonicalize: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/9.0/#sec-canonicalnumericindexstring', - CaseClauseIsSelected: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-caseclauseisselected', - CharacterRange: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-completepropertydescriptor', - Completion: 'https://ecma-international.org/ecma-262/9.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://ecma-international.org/ecma-262/9.0/#sec-composewriteeventbytes', - Construct: 'https://ecma-international.org/ecma-262/9.0/#sec-construct', - CopyDataBlockBytes: 'https://ecma-international.org/ecma-262/9.0/#sec-copydatablockbytes', - CopyDataProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-copydataproperties', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/9.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createarrayiterator', - CreateAsyncFromSyncIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createasyncfromsynciterator', - CreateBuiltinFunction: 'https://ecma-international.org/ecma-262/9.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://ecma-international.org/ecma-262/9.0/#sec-createbytedatablock', - CreateDataProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/9.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://ecma-international.org/ecma-262/9.0/#sec-createdynamicfunction', - CreateHTML: 'https://ecma-international.org/ecma-262/9.0/#sec-createhtml', - CreateIntrinsics: 'https://ecma-international.org/ecma-262/9.0/#sec-createintrinsics', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/9.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/9.0/#sec-createlistfromarraylike', - CreateListIteratorRecord: 'https://ecma-international.org/ecma-262/9.0/#sec-createlistiteratorRecord', - CreateMapIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://ecma-international.org/ecma-262/9.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-createperiterationenvironment', - CreateRealm: 'https://ecma-international.org/ecma-262/9.0/#sec-createrealm', - CreateResolvingFunctions: 'https://ecma-international.org/ecma-262/9.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://ecma-international.org/ecma-262/9.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://ecma-international.org/ecma-262/9.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://ecma-international.org/ecma-262/9.0/#sec-date-number', - DateString: 'https://ecma-international.org/ecma-262/9.0/#sec-datestring', - Day: 'https://ecma-international.org/ecma-262/9.0/#eqn-Day', - DayFromYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-DaysFromYear', - DaysInYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-DaysInYear', - DayWithinYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-DayWithinYear', - Decode: 'https://ecma-international.org/ecma-262/9.0/#sec-decode', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/9.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/9.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-detacharraybuffer', - Encode: 'https://ecma-international.org/ecma-262/9.0/#sec-encode', - EnqueueJob: 'https://ecma-international.org/ecma-262/9.0/#sec-enqueuejob', - EnterCriticalSection: 'https://ecma-international.org/ecma-262/9.0/#sec-entercriticalsection', - EnumerableOwnPropertyNames: 'https://ecma-international.org/ecma-262/9.0/#sec-enumerableownpropertynames', - EnumerateObjectProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://ecma-international.org/ecma-262/9.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://ecma-international.org/ecma-262/9.0/#sec-evaluatecall', - EvaluateNew: 'https://ecma-international.org/ecma-262/9.0/#sec-evaluatenew', - EventSet: 'https://ecma-international.org/ecma-262/9.0/#sec-event-set', - floor: 'https://ecma-international.org/ecma-262/9.0/#eqn-floor', - ForBodyEvaluation: 'https://ecma-international.org/ecma-262/9.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-fulfillpromise', - FunctionAllocate: 'https://ecma-international.org/ecma-262/9.0/#sec-functionallocate', - FunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://ecma-international.org/ecma-262/9.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorstart', - GeneratorValidate: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorvalidate', - GeneratorYield: 'https://ecma-international.org/ecma-262/9.0/#sec-generatoryield', - Get: 'https://ecma-international.org/ecma-262/9.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://ecma-international.org/ecma-262/9.0/#sec-getactivescriptormodule', - GetBase: 'https://ecma-international.org/ecma-262/9.0/#sec-getbase', - GetFunctionRealm: 'https://ecma-international.org/ecma-262/9.0/#sec-getfunctionrealm', - GetGeneratorKind: 'https://ecma-international.org/ecma-262/9.0/#sec-getgeneratorkind', - GetGlobalObject: 'https://ecma-international.org/ecma-262/9.0/#sec-getglobalobject', - GetIdentifierReference: 'https://ecma-international.org/ecma-262/9.0/#sec-getidentifierreference', - GetIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/9.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://ecma-international.org/ecma-262/9.0/#sec-getmodulenamespace', - GetNewTarget: 'https://ecma-international.org/ecma-262/9.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/9.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://ecma-international.org/ecma-262/9.0/#sec-getreferencedname', - GetSubstitution: 'https://ecma-international.org/ecma-262/9.0/#sec-getsubstitution', - GetSuperConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://ecma-international.org/ecma-262/9.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-getthisenvironment', - GetThisValue: 'https://ecma-international.org/ecma-262/9.0/#sec-getthisvalue', - GetV: 'https://ecma-international.org/ecma-262/9.0/#sec-getv', - GetValue: 'https://ecma-international.org/ecma-262/9.0/#sec-getvalue', - GetValueFromBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://ecma-international.org/ecma-262/9.0/#sec-getviewvalue', - GetWaiterList: 'https://ecma-international.org/ecma-262/9.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://ecma-international.org/ecma-262/9.0/#sec-happens-before', - HasOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://ecma-international.org/ecma-262/9.0/#sec-hasprimitivebase', - HasProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://ecma-international.org/ecma-262/9.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://ecma-international.org/ecma-262/9.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://ecma-international.org/ecma-262/9.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://ecma-international.org/ecma-262/9.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://ecma-international.org/ecma-262/9.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://ecma-international.org/ecma-262/9.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-HourFromTime', - HoursPerDay: 'https://ecma-international.org/ecma-262/9.0/#eqn-HoursPerDay', - IfAbruptRejectPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://ecma-international.org/ecma-262/9.0/#sec-importedlocalnames', - InitializeBoundName: 'https://ecma-international.org/ecma-262/9.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://ecma-international.org/ecma-262/9.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://ecma-international.org/ecma-262/9.0/#sec-initializereferencedbinding', - InLeapYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-InLeapYear', - InnerModuleEvaluation: 'https://ecma-international.org/ecma-262/9.0/#sec-innermoduleevaluation', - InnerModuleInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-innermoduleinstantiation', - InstanceofOperator: 'https://ecma-international.org/ecma-262/9.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://ecma-international.org/ecma-262/9.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://ecma-international.org/ecma-262/9.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-internalizejsonproperty', - Invoke: 'https://ecma-international.org/ecma-262/9.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://ecma-international.org/ecma-262/9.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://ecma-international.org/ecma-262/9.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/9.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/9.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-isdetachedbuffer', - IsExtensible: 'https://ecma-international.org/ecma-262/9.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://ecma-international.org/ecma-262/9.0/#sec-isintailposition', - IsInteger: 'https://ecma-international.org/ecma-262/9.0/#sec-isinteger', - IsLabelledFunction: 'https://ecma-international.org/ecma-262/9.0/#sec-islabelledfunction', - IsPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/9.0/#sec-ispropertykey', - IsPropertyReference: 'https://ecma-international.org/ecma-262/9.0/#sec-ispropertyreference', - IsRegExp: 'https://ecma-international.org/ecma-262/9.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://ecma-international.org/ecma-262/9.0/#sec-isstrictreference', - IsStringPrefix: 'https://ecma-international.org/ecma-262/9.0/#sec-isstringprefix', - IsSuperReference: 'https://ecma-international.org/ecma-262/9.0/#sec-issuperreference', - IsUnresolvableReference: 'https://ecma-international.org/ecma-262/9.0/#sec-isunresolvablereference', - IsWordChar: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://ecma-international.org/ecma-262/9.0/#sec-iterabletolist', - IteratorClose: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://ecma-international.org/ecma-262/9.0/#sec-leavecriticalsection', - LocalTime: 'https://ecma-international.org/ecma-262/9.0/#sec-localtime', - LoopContinues: 'https://ecma-international.org/ecma-262/9.0/#sec-loopcontinues', - MakeArgGetter: 'https://ecma-international.org/ecma-262/9.0/#sec-makearggetter', - MakeArgSetter: 'https://ecma-international.org/ecma-262/9.0/#sec-makeargsetter', - MakeClassConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-makeclassconstructor', - MakeConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-makeconstructor', - MakeDate: 'https://ecma-international.org/ecma-262/9.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/9.0/#sec-makeday', - MakeMethod: 'https://ecma-international.org/ecma-262/9.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://ecma-international.org/ecma-262/9.0/#sec-makesuperpropertyreference', - MakeTime: 'https://ecma-international.org/ecma-262/9.0/#sec-maketime', - max: 'https://ecma-international.org/ecma-262/9.0/#eqn-max', - 'memory-order': 'https://ecma-international.org/ecma-262/9.0/#sec-memory-order', - min: 'https://ecma-international.org/ecma-262/9.0/#eqn-min', - MinFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-MinFromTime', - MinutesPerHour: 'https://ecma-international.org/ecma-262/9.0/#eqn-MinutesPerHour', - ModuleDeclarationEnvironmentSetup: 'https://ecma-international.org/ecma-262/9.0/#sec-moduledeclarationenvironmentsetup', - ModuleExecution: 'https://ecma-international.org/ecma-262/9.0/#sec-moduleexecution', - ModuleNamespaceCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-modulenamespacecreate', - modulo: 'https://ecma-international.org/ecma-262/9.0/#eqn-modulo', - MonthFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-MonthFromTime', - msFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-msFromTime', - msPerDay: 'https://ecma-international.org/ecma-262/9.0/#eqn-msPerDay', - msPerHour: 'https://ecma-international.org/ecma-262/9.0/#eqn-msPerHour', - msPerMinute: 'https://ecma-international.org/ecma-262/9.0/#eqn-msPerMinute', - msPerSecond: 'https://ecma-international.org/ecma-262/9.0/#eqn-msPerSecond', - NewDeclarativeEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://ecma-international.org/ecma-262/9.0/#sec-newpromisecapability', - NormalCompletion: 'https://ecma-international.org/ecma-262/9.0/#sec-normalcompletion', - NumberToRawBytes: 'https://ecma-international.org/ecma-262/9.0/#sec-numbertorawbytes', - NumberToString: 'https://ecma-international.org/ecma-262/9.0/#sec-tostring-applied-to-the-number-type', - ObjectCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-objectcreate', - ObjectDefineProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarydelete', - OrdinaryGet: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarysetprototypeof', - OrdinarySetWithOwnDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarysetwithowndescriptor', - OrdinaryToPrimitive: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarytoprimitive', - ParseModule: 'https://ecma-international.org/ecma-262/9.0/#sec-parsemodule', - ParseScript: 'https://ecma-international.org/ecma-262/9.0/#sec-parse-script', - PerformEval: 'https://ecma-international.org/ecma-262/9.0/#sec-performeval', - PerformPromiseAll: 'https://ecma-international.org/ecma-262/9.0/#sec-performpromiseall', - PerformPromiseRace: 'https://ecma-international.org/ecma-262/9.0/#sec-performpromiserace', - PerformPromiseThen: 'https://ecma-international.org/ecma-262/9.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://ecma-international.org/ecma-262/9.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://ecma-international.org/ecma-262/9.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://ecma-international.org/ecma-262/9.0/#sec-promisereactionjob', - PromiseResolve: 'https://ecma-international.org/ecma-262/9.0/#sec-promise-resolve', - PromiseResolveThenableJob: 'https://ecma-international.org/ecma-262/9.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-proxycreate', - PutValue: 'https://ecma-international.org/ecma-262/9.0/#sec-putvalue', - QuoteJSONString: 'https://ecma-international.org/ecma-262/9.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://ecma-international.org/ecma-262/9.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://ecma-international.org/ecma-262/9.0/#sec-reads-bytes-from', - 'reads-from': 'https://ecma-international.org/ecma-262/9.0/#sec-reads-from', - RegExpAlloc: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpcreate', - RegExpExec: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpexec', - RegExpInitialize: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpinitialize', - RejectPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-rejectpromise', - RemoveWaiter: 'https://ecma-international.org/ecma-262/9.0/#sec-removewaiter', - RemoveWaiters: 'https://ecma-international.org/ecma-262/9.0/#sec-removewaiters', - RepeatMatcher: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/9.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://ecma-international.org/ecma-262/9.0/#sec-resolvebinding', - ResolveThisBinding: 'https://ecma-international.org/ecma-262/9.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://ecma-international.org/ecma-262/9.0/#sec-returnifabrupt', - RunJobs: 'https://ecma-international.org/ecma-262/9.0/#sec-runjobs', - SameValue: 'https://ecma-international.org/ecma-262/9.0/#sec-samevalue', - SameValueNonNumber: 'https://ecma-international.org/ecma-262/9.0/#sec-samevaluenonnumber', - SameValueZero: 'https://ecma-international.org/ecma-262/9.0/#sec-samevaluezero', - ScriptEvaluation: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://ecma-international.org/ecma-262/9.0/#sec-scriptevaluationjob', - SecFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-SecFromTime', - SecondsPerMinute: 'https://ecma-international.org/ecma-262/9.0/#eqn-SecondsPerMinute', - SerializeJSONArray: 'https://ecma-international.org/ecma-262/9.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://ecma-international.org/ecma-262/9.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-serializejsonproperty', - Set: 'https://ecma-international.org/ecma-262/9.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://ecma-international.org/ecma-262/9.0/#sec-setdefaultglobalbindings', - SetFunctionLength: 'https://ecma-international.org/ecma-262/9.0/#sec-setfunctionlength', - SetFunctionName: 'https://ecma-international.org/ecma-262/9.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://ecma-international.org/ecma-262/9.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/9.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://ecma-international.org/ecma-262/9.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-setvalueinbuffer', - SetViewValue: 'https://ecma-international.org/ecma-262/9.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://ecma-international.org/ecma-262/9.0/#sec-sharedatablockeventset', - SortCompare: 'https://ecma-international.org/ecma-262/9.0/#sec-sortcompare', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-speciesconstructor', - SplitMatch: 'https://ecma-international.org/ecma-262/9.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/9.0/#sec-strict-equality-comparison', - StringCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-stringcreate', - StringGetOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-stringgetownproperty', - Suspend: 'https://ecma-international.org/ecma-262/9.0/#sec-suspend', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/9.0/#sec-symboldescriptivestring', - 'synchronizes-with': 'https://ecma-international.org/ecma-262/9.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/9.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thisnumbervalue', - thisStringValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thisstringvalue', - thisSymbolValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thissymbolvalue', - thisTimeValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thistimevalue', - ThrowCompletion: 'https://ecma-international.org/ecma-262/9.0/#sec-throwcompletion', - TimeClip: 'https://ecma-international.org/ecma-262/9.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-TimeFromYear', - TimeString: 'https://ecma-international.org/ecma-262/9.0/#sec-timestring', - TimeWithinDay: 'https://ecma-international.org/ecma-262/9.0/#eqn-TimeWithinDay', - TimeZoneString: 'https://ecma-international.org/ecma-262/9.0/#sec-timezoneestring', - ToBoolean: 'https://ecma-international.org/ecma-262/9.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/9.0/#sec-todatestring', - ToIndex: 'https://ecma-international.org/ecma-262/9.0/#sec-toindex', - ToInt16: 'https://ecma-international.org/ecma-262/9.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/9.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/9.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/9.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/9.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/9.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/9.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://ecma-international.org/ecma-262/9.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://ecma-international.org/ecma-262/9.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/9.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/9.0/#sec-tostring', - ToUint16: 'https://ecma-international.org/ecma-262/9.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/9.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/9.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/9.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://ecma-international.org/ecma-262/9.0/#sec-triggerpromisereactions', - Type: 'https://ecma-international.org/ecma-262/9.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://ecma-international.org/ecma-262/9.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://ecma-international.org/ecma-262/9.0/#typedarray-species-create', - UnicodeEscape: 'https://ecma-international.org/ecma-262/9.0/#sec-unicodeescape', - UnicodeMatchProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-unicodematchproperty-p', - UnicodeMatchPropertyValue: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v', - UpdateEmpty: 'https://ecma-international.org/ecma-262/9.0/#sec-updateempty', - UTC: 'https://ecma-international.org/ecma-262/9.0/#sec-utc-t', - UTF16Decode: 'https://ecma-international.org/ecma-262/9.0/#sec-utf16decode', - UTF16Encoding: 'https://ecma-international.org/ecma-262/9.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://ecma-international.org/ecma-262/9.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://ecma-international.org/ecma-262/9.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://ecma-international.org/ecma-262/9.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://ecma-international.org/ecma-262/9.0/#sec-valueofreadevent', - WakeWaiter: 'https://ecma-international.org/ecma-262/9.0/#sec-wakewaiter', - WeekDay: 'https://ecma-international.org/ecma-262/9.0/#sec-week-day', - WordCharacters: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-YearFromTime' -}; diff --git a/node_modules/es-abstract/operations/es5.js b/node_modules/es-abstract/operations/es5.js deleted file mode 100644 index 6048df42..00000000 --- a/node_modules/es-abstract/operations/es5.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = { - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.1', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.2', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.3', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.4', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.5' -}; diff --git a/node_modules/es-abstract/operations/getOps.js b/node_modules/es-abstract/operations/getOps.js deleted file mode 100755 index 315e3055..00000000 --- a/node_modules/es-abstract/operations/getOps.js +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'); -var path = require('path'); -var execSync = require('child_process').execSync; - -var $ = require('cheerio'); -var fromEntries = require('object.fromentries'); - -if (process.argv.length !== 3) { - throw new RangeError('please provide a year'); -} -var year = parseInt(process.argv[2]); -if (year < 2016) { - throw new RangeError('ES2016+ only'); -} -var edition = year - 2009; - -var specHTMLurl = new URL('https://raw.githubusercontent.com/tc39/ecma262/es' + year + '/spec.html'); - -var specHTML = String(execSync('curl --silent ' + specHTMLurl)); - -var root = $(specHTML); - -var aOps = root.filter('[aoid]').add(root.find('[aoid]')); - -var missings = []; - -var entries = aOps.toArray().map(function (x) { - var op = $(x); - var aoid = op.attr('aoid'); - var id = op.attr('id'); - - if (!id) { - id = op.closest('[id]').attr('id'); - } - - if (!id) { - missings.push(aoid); - } - - return [ - aoid, - 'https://ecma-international.org/ecma-262/' + edition + '.0/#' + id - ]; -}); - -if (missings.length > 0) { - console.error('Missing URLs:', missings); - process.exit(1); -} - -entries.sort(function (a, b) { return a[0].localeCompare(b[0]); }); - -var obj = fromEntries(entries); - -var outputPath = path.join('operations', year + '.js'); -fs.writeFileSync(outputPath, '\'use strict\';\n\nmodule.exports = ' + JSON.stringify(obj, null, '\t')+ ';\n'); - -console.log('npx eslint --quiet --fix ' + outputPath); -execSync('npx eslint --quiet --fix ' + outputPath); diff --git a/node_modules/es-abstract/package.json b/node_modules/es-abstract/package.json deleted file mode 100644 index 1225cfaa..00000000 --- a/node_modules/es-abstract/package.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "_args": [ - [ - "es-abstract@1.13.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "es-abstract@1.13.0", - "_id": "es-abstract@1.13.0", - "_inBundle": false, - "_integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "_location": "/es-abstract", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "es-abstract@1.13.0", - "name": "es-abstract", - "escapedName": "es-abstract", - "rawSpec": "1.13.0", - "saveSpec": null, - "fetchSpec": "1.13.0" - }, - "_requiredBy": [ - "/object.getownpropertydescriptors" - ], - "_resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "_spec": "1.13.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "bugs": { - "url": "https://github.com/ljharb/es-abstract/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - }, - "description": "ECMAScript spec abstract operations.", - "devDependencies": { - "@ljharb/eslint-config": "^13.1.1", - "cheerio": "^1.0.0-rc.2", - "editorconfig-tools": "^0.1.1", - "eslint": "^5.11.1", - "foreach": "^2.0.5", - "nyc": "^10.3.2", - "object-inspect": "^1.6.0", - "object-is": "^1.0.1", - "object.assign": "^4.1.0", - "object.fromentries": "^2.0.0", - "replace": "^1.0.1", - "safe-publish-latest": "^1.1.2", - "semver": "^5.6.0", - "tape": "^4.9.2" - }, - "engines": { - "node": ">= 0.4" - }, - "greenkeeper": { - "//": "nyc is ignored because it requires node 4+, and we support older than that", - "ignore": [ - "nyc" - ] - }, - "homepage": "https://github.com/ljharb/es-abstract#readme", - "keywords": [ - "ECMAScript", - "ES", - "abstract", - "operation", - "abstract operation", - "JavaScript", - "ES5", - "ES6", - "ES7" - ], - "license": "MIT", - "main": "index.js", - "name": "es-abstract", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/es-abstract.git" - }, - "scripts": { - "audit": "npm audit", - "coverage": "nyc npm run --silent tests-only >/dev/null", - "eccheck": "editorconfig-tools check *.js **/*.js > /dev/null", - "lint": "eslint test/*.js *.js", - "postaudit": "rm package-lock.json", - "postcoverage": "nyc report", - "posttest": "npm run audit", - "preaudit": "npm install --package-lock --package-lock-only", - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "tests-only": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.13.0" -} diff --git a/node_modules/es-abstract/test/.eslintrc b/node_modules/es-abstract/test/.eslintrc deleted file mode 100644 index f33c7476..00000000 --- a/node_modules/es-abstract/test/.eslintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "rules": { - "id-length": 0, - "max-lines": 0, - "max-lines-per-function": 0, - "max-statements-per-line": [2, { "max": 3 }], - "max-nested-callbacks": [2, 4], - "max-statements": 0, - "no-implicit-coercion": 1, - "no-invalid-this": 1, - "object-curly-newline": 0, - } -} diff --git a/node_modules/es-abstract/test/GetIntrinsic.js b/node_modules/es-abstract/test/GetIntrinsic.js deleted file mode 100644 index ed8e7ecc..00000000 --- a/node_modules/es-abstract/test/GetIntrinsic.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var test = require('tape'); -var forEach = require('foreach'); -var debug = require('object-inspect'); - -var v = require('./helpers/values'); - -test('export', function (t) { - t.equal(typeof GetIntrinsic, 'function', 'it is a function'); - t.equal(GetIntrinsic.length, 2, 'function has length of 2'); - - t.end(); -}); - -test('throws', function (t) { - t['throws']( - function () { GetIntrinsic('not an intrinsic'); }, - SyntaxError, - 'nonexistent intrinsic throws a syntax error' - ); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { GetIntrinsic('%', nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/diffOps.js b/node_modules/es-abstract/test/diffOps.js deleted file mode 100644 index 0fb2fc40..00000000 --- a/node_modules/es-abstract/test/diffOps.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); -var forEach = require('foreach'); - -module.exports = function diffOperations(actual, expected, expectedMissing) { - var actualKeys = keys(actual); - var expectedKeys = keys(expected); - - var extra = []; - var missing = []; - forEach(actualKeys, function (op) { - if (!(op in expected)) { - extra.push(op); - } else if (expectedMissing.indexOf(op) !== -1) { - extra.push(op); - } - }); - forEach(expectedKeys, function (op) { - if (typeof actual[op] !== 'function' && expectedMissing.indexOf(op) === -1) { - missing.push(op); - } - }); - - return { missing: missing, extra: extra }; -}; diff --git a/node_modules/es-abstract/test/es2015.js b/node_modules/es-abstract/test/es2015.js deleted file mode 100644 index 3aa299c0..00000000 --- a/node_modules/es-abstract/test/es2015.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2015; - -var ops = require('../operations/2015'); - -var expectedMissing = ['Construct', 'SetIntegrityLevel', 'TestIntegrityLevel', 'CreateArrayFromList', 'CreateListFromArrayLike', 'OrdinaryHasInstance', 'CreateListIterator', 'RegExpBuiltinExec', 'IsPromise', 'NormalCompletion']; - -require('./tests').es2015(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es2016.js b/node_modules/es-abstract/test/es2016.js deleted file mode 100644 index d2b3f9d2..00000000 --- a/node_modules/es-abstract/test/es2016.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2016; - -var ops = require('../operations/2016'); - -var expectedMissing = ['Abstract Equality Comparison', 'Abstract Relational Comparison', 'AddRestrictedFunctionProperties', 'AllocateArrayBuffer', 'AllocateTypedArray', 'AllocateTypedArrayBuffer', 'ArrayCreate', 'ArraySetLength', 'BlockDeclarationInstantiation', 'BoundFunctionCreate', 'Canonicalize', 'CharacterRange', 'CharacterRangeOrUnion', 'CharacterSetMatcher', 'CloneArrayBuffer', 'Completion', 'Construct', 'CopyDataBlockBytes', 'CreateArrayFromList', 'CreateArrayIterator', 'CreateBuiltinFunction', 'CreateByteDataBlock', 'CreateDynamicFunction', 'CreateHTML', 'CreateIntrinsics', 'CreateListFromArrayLike', 'CreateListIterator', 'CreateMapIterator', 'CreateMappedArgumentsObject', 'CreatePerIterationEnvironment', 'CreateRealm', 'CreateResolvingFunctions', 'CreateSetIterator', 'CreateStringIterator', 'CreateUnmappedArgumentsObject', 'DateFromTime', 'Day', 'DayFromYear', 'DayWithinYear', 'DaysInYear', 'Decode', 'DetachArrayBuffer', 'Encode', 'EnqueueJob', 'EnumerateObjectProperties', 'EscapeRegExpPattern', 'EvalDeclarationInstantiation', 'EvaluateCall', 'EvaluateDirectCall', 'EvaluateNew', 'ForBodyEvaluation', 'ForIn/OfBodyEvaluation', 'ForIn/OfHeadEvaluation', 'FulfillPromise', 'FunctionAllocate', 'FunctionCreate', 'FunctionDeclarationInstantiation', 'FunctionInitialize', 'GeneratorFunctionCreate', 'GeneratorResume', 'GeneratorResumeAbrupt', 'GeneratorStart', 'GeneratorValidate', 'GeneratorYield', 'GetActiveScriptOrModule', 'GetFunctionRealm', 'GetGlobalObject', 'GetIdentifierReference', 'GetModuleNamespace', 'GetNewTarget', 'GetOwnPropertyKeys', 'GetPrototypeFromConstructor', 'GetSubstitution', 'GetSuperConstructor', 'GetTemplateObject', 'GetThisEnvironment', 'GetThisValue', 'GetValue', 'GetValueFromBuffer', 'GetViewValue', 'GlobalDeclarationInstantiation', 'HostPromiseRejectionTracker', 'HostReportErrors', 'HostResolveImportedModule', 'HourFromTime', 'HoursPerDay', 'IfAbruptRejectPromise', 'ImportedLocalNames', 'InLeapYear', 'InitializeBoundName', 'InitializeHostDefinedRealm', 'InitializeReferencedBinding', 'InstanceofOperator', 'IntegerIndexedElementGet', 'IntegerIndexedElementSet', 'IntegerIndexedObjectCreate', 'InternalizeJSONProperty', 'IsAnonymousFunctionDefinition', 'IsCompatiblePropertyDescriptor', 'IsDetachedBuffer', 'IsInTailPosition', 'IsLabelledFunction', 'IsPromise', 'IsWordChar', 'IterableToArrayLike', 'LocalTime', 'LoopContinues', 'MakeArgGetter', 'MakeArgSetter', 'MakeClassConstructor', 'MakeConstructor', 'MakeDate', 'MakeDay', 'MakeMethod', 'MakeSuperPropertyReference', 'MakeTime', 'MinFromTime', 'MinutesPerHour', 'ModuleNamespaceCreate', 'MonthFromTime', 'NewDeclarativeEnvironment', 'NewFunctionEnvironment', 'NewGlobalEnvironment', 'NewModuleEnvironment', 'NewObjectEnvironment', 'NewPromiseCapability', 'NextJob', 'NormalCompletion', 'ObjectDefineProperties', 'OrdinaryCallBindThis', 'OrdinaryCallEvaluateBody', 'OrdinaryCreateFromConstructor', 'OrdinaryDefineOwnProperty', 'OrdinaryDelete', 'OrdinaryGet', 'OrdinaryGetOwnProperty', 'OrdinaryGetPrototypeOf', 'OrdinaryHasInstance', 'OrdinaryHasProperty', 'OrdinaryIsExtensible', 'OrdinaryOwnPropertyKeys', 'OrdinaryPreventExtensions', 'OrdinarySet', 'OrdinarySetPrototypeOf', 'ParseModule', 'ParseScript', 'PerformEval', 'PerformPromiseAll', 'PerformPromiseRace', 'PerformPromiseThen', 'PrepareForOrdinaryCall', 'PrepareForTailCall', 'PromiseReactionJob', 'PromiseResolveThenableJob', 'ProxyCreate', 'PutValue', 'QuoteJSONString', 'RegExpAlloc', 'RegExpBuiltinExec', 'RegExpCreate', 'RegExpInitialize', 'RejectPromise', 'RepeatMatcher', 'ResolveBinding', 'ResolveThisBinding', 'ReturnIfAbrupt', 'ScriptEvaluation', 'ScriptEvaluationJob', 'SecFromTime', 'SecondsPerMinute', 'SerializeJSONArray', 'SerializeJSONObject', 'SerializeJSONProperty', 'SetDefaultGlobalBindings', 'SetFunctionName', 'SetIntegrityLevel', 'SetRealmGlobalObject', 'SetValueInBuffer', 'SetViewValue', 'SortCompare', 'SplitMatch', 'Strict Equality Comparison', 'StringCreate', 'SymbolDescriptiveString', 'TestIntegrityLevel', 'TimeClip', 'TimeFromYear', 'TimeWithinDay', 'ToDateString', 'ToString Applied to the Number Type', 'TopLevelModuleEvaluationJob', 'TriggerPromiseReactions', 'TypedArrayCreate', 'TypedArraySpeciesCreate', 'UTC', 'UTF16Decode', 'UTF16Encoding', 'UpdateEmpty', 'ValidateAndApplyPropertyDescriptor', 'ValidateTypedArray', 'WeekDay', 'YearFromTime', 'abs', 'floor', 'max', 'min', 'modulo', 'msFromTime', 'msPerDay', 'msPerHour', 'msPerMinute', 'msPerSecond']; - -require('./tests').es2016(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es2017.js b/node_modules/es-abstract/test/es2017.js deleted file mode 100644 index b5dfae72..00000000 --- a/node_modules/es-abstract/test/es2017.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2017; - -var ops = require('../operations/2017'); - -var expectedMissing = ['Abstract Equality Comparison', 'Abstract Relational Comparison', 'AddRestrictedFunctionProperties', 'AddWaiter', 'AgentCanSuspend', 'AgentSignifier', 'AllocateArrayBuffer', 'AllocateSharedArrayBuffer', 'AllocateTypedArray', 'AllocateTypedArrayBuffer', 'ArrayCreate', 'ArraySetLength', 'AsyncFunctionAwait', 'AsyncFunctionCreate', 'AsyncFunctionStart', 'AtomicLoad', 'AtomicReadModifyWrite', 'BlockDeclarationInstantiation', 'BoundFunctionCreate', 'Canonicalize', 'CharacterRange', 'CharacterRangeOrUnion', 'CharacterSetMatcher', 'CloneArrayBuffer', 'Completion', 'ComposeWriteEventBytes', 'Construct', 'CopyDataBlockBytes', 'CreateArrayFromList', 'CreateArrayIterator', 'CreateBuiltinFunction', 'CreateByteDataBlock', 'CreateDynamicFunction', 'CreateHTML', 'CreateIntrinsics', 'CreateListFromArrayLike', 'CreateListIterator', 'CreateMapIterator', 'CreateMappedArgumentsObject', 'CreatePerIterationEnvironment', 'CreateRealm', 'CreateResolvingFunctions', 'CreateSetIterator', 'CreateSharedByteDataBlock', 'CreateStringIterator', 'CreateUnmappedArgumentsObject', 'DateFromTime', 'Day', 'DayFromYear', 'DayWithinYear', 'DaysInYear', 'Decode', 'DetachArrayBuffer', 'Encode', 'EnqueueJob', 'EnterCriticalSection', 'EnumerateObjectProperties', 'EscapeRegExpPattern', 'EvalDeclarationInstantiation', 'EvaluateCall', 'EvaluateDirectCall', 'EvaluateNew', 'EventSet', 'ForBodyEvaluation', 'ForIn/OfBodyEvaluation', 'ForIn/OfHeadEvaluation', 'FulfillPromise', 'FunctionAllocate', 'FunctionCreate', 'FunctionDeclarationInstantiation', 'FunctionInitialize', 'GeneratorFunctionCreate', 'GeneratorResume', 'GeneratorResumeAbrupt', 'GeneratorStart', 'GeneratorValidate', 'GeneratorYield', 'GetActiveScriptOrModule', 'GetBase', 'GetFunctionRealm', 'GetGlobalObject', 'GetIdentifierReference', 'GetModifySetValueInBuffer', 'GetModuleNamespace', 'GetNewTarget', 'GetOwnPropertyKeys', 'GetPrototypeFromConstructor', 'GetReferencedName', 'GetSubstitution', 'GetSuperConstructor', 'GetTemplateObject', 'GetThisEnvironment', 'GetThisValue', 'GetValue', 'GetValueFromBuffer', 'GetViewValue', 'GetWaiterList', 'GlobalDeclarationInstantiation', 'HasPrimitiveBase', 'HostEnsureCanCompileStrings', 'HostEventSet', 'HostPromiseRejectionTracker', 'HostReportErrors', 'HostResolveImportedModule', 'HourFromTime', 'HoursPerDay', 'IfAbruptRejectPromise', 'ImportedLocalNames', 'InLeapYear', 'InitializeBoundName', 'InitializeHostDefinedRealm', 'InitializeReferencedBinding', 'InstanceofOperator', 'IntegerIndexedElementGet', 'IntegerIndexedElementSet', 'IntegerIndexedObjectCreate', 'InternalizeJSONProperty', 'IsAnonymousFunctionDefinition', 'IsCompatiblePropertyDescriptor', 'IsDetachedBuffer', 'IsInTailPosition', 'IsLabelledFunction', 'IsPromise', 'IsPropertyReference', 'IsSharedArrayBuffer', 'IsStrictReference', 'IsSuperReference', 'IsUnresolvableReference', 'IsWordChar', 'IterableToList', 'LeaveCriticalSection', 'LocalTime', 'LoopContinues', 'MakeArgGetter', 'MakeArgSetter', 'MakeClassConstructor', 'MakeConstructor', 'MakeDate', 'MakeDay', 'MakeMethod', 'MakeSuperPropertyReference', 'MakeTime', 'MinFromTime', 'MinutesPerHour', 'ModuleNamespaceCreate', 'MonthFromTime', 'NewDeclarativeEnvironment', 'NewFunctionEnvironment', 'NewGlobalEnvironment', 'NewModuleEnvironment', 'NewObjectEnvironment', 'NewPromiseCapability', 'NormalCompletion', 'NumberToRawBytes', 'ObjectDefineProperties', 'OrdinaryCallBindThis', 'OrdinaryCallEvaluateBody', 'OrdinaryCreateFromConstructor', 'OrdinaryDefineOwnProperty', 'OrdinaryDelete', 'OrdinaryGet', 'OrdinaryGetOwnProperty', 'OrdinaryGetPrototypeOf', 'OrdinaryHasInstance', 'OrdinaryHasProperty', 'OrdinaryIsExtensible', 'OrdinaryOwnPropertyKeys', 'OrdinaryPreventExtensions', 'OrdinarySet', 'OrdinarySetPrototypeOf', 'OrdinaryToPrimitive', 'ParseModule', 'ParseScript', 'PerformEval', 'PerformPromiseAll', 'PerformPromiseRace', 'PerformPromiseThen', 'PrepareForOrdinaryCall', 'PrepareForTailCall', 'PromiseReactionJob', 'PromiseResolveThenableJob', 'ProxyCreate', 'PutValue', 'QuoteJSONString', 'RawBytesToNumber', 'RegExpAlloc', 'RegExpBuiltinExec', 'RegExpCreate', 'RegExpInitialize', 'RejectPromise', 'RemoveWaiter', 'RemoveWaiters', 'RepeatMatcher', 'ResolveBinding', 'ResolveThisBinding', 'ReturnIfAbrupt', 'RunJobs', 'ScriptEvaluation', 'ScriptEvaluationJob', 'SecFromTime', 'SecondsPerMinute', 'SerializeJSONArray', 'SerializeJSONObject', 'SerializeJSONProperty', 'SetDefaultGlobalBindings', 'SetFunctionName', 'SetImmutablePrototype', 'SetIntegrityLevel', 'SetRealmGlobalObject', 'SetValueInBuffer', 'SetViewValue', 'SharedDataBlockEventSet', 'SortCompare', 'SplitMatch', 'Strict Equality Comparison', 'StringCreate', 'StringGetOwnProperty', 'Suspend', 'SymbolDescriptiveString', 'TestIntegrityLevel', 'TimeClip', 'TimeFromYear', 'TimeWithinDay', 'ToDateString', 'ToString Applied to the Number Type', 'TopLevelModuleEvaluationJob', 'TriggerPromiseReactions', 'TypedArrayCreate', 'TypedArraySpeciesCreate', 'UTC', 'UTF16Decode', 'UTF16Encoding', 'UpdateEmpty', 'ValidateAndApplyPropertyDescriptor', 'ValidateAtomicAccess', 'ValidateSharedIntegerTypedArray', 'ValidateTypedArray', 'ValueOfReadEvent', 'WakeWaiter', 'WeekDay', 'WordCharacters', 'YearFromTime', 'abs', 'agent-order', 'floor', 'happens-before', 'host-synchronizes-with', 'max', 'memory-order', 'min', 'modulo', 'msFromTime', 'msPerDay', 'msPerHour', 'msPerMinute', 'msPerSecond', 'reads-bytes-from', 'reads-from', 'synchronizes-with']; - -require('./tests').es2017(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es2018.js b/node_modules/es-abstract/test/es2018.js deleted file mode 100644 index 5147be8b..00000000 --- a/node_modules/es-abstract/test/es2018.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2018; - -var ops = require('../operations/2018'); - -var expectedMissing = ['abs', 'Abstract Equality Comparison', 'Abstract Relational Comparison', 'AddRestrictedFunctionProperties', 'AddWaiter', 'agent-order', 'AgentCanSuspend', 'AgentSignifier', 'AllocateArrayBuffer', 'AllocateSharedArrayBuffer', 'AllocateTypedArray', 'AllocateTypedArrayBuffer', 'ArrayCreate', 'ArraySetLength', 'AsyncFunctionStart', 'AsyncGeneratorEnqueue', 'AsyncGeneratorReject', 'AsyncGeneratorResolve', 'AsyncGeneratorResumeNext', 'AsyncGeneratorStart', 'AsyncGeneratorYield', 'AtomicLoad', 'AtomicReadModifyWrite', 'Await', 'BlockDeclarationInstantiation', 'BoundFunctionCreate', 'Canonicalize', 'CaseClauseIsSelected', 'CharacterRange', 'CharacterRangeOrUnion', 'CharacterSetMatcher', 'CloneArrayBuffer', 'Completion', 'ComposeWriteEventBytes', 'CopyDataBlockBytes', 'CreateArrayIterator', 'CreateAsyncFromSyncIterator', 'CreateBuiltinFunction', 'CreateByteDataBlock', 'CreateDynamicFunction', 'CreateHTML', 'CreateIntrinsics', 'CreateMapIterator', 'CreateMappedArgumentsObject', 'CreatePerIterationEnvironment', 'CreateRealm', 'CreateResolvingFunctions', 'CreateSetIterator', 'CreateSharedByteDataBlock', 'CreateStringIterator', 'CreateUnmappedArgumentsObject', 'DateFromTime', 'Day', 'DayFromYear', 'DaysInYear', 'DayWithinYear', 'Decode', 'DetachArrayBuffer', 'Encode', 'EnqueueJob', 'EnterCriticalSection', 'EnumerateObjectProperties', 'EscapeRegExpPattern', 'EvalDeclarationInstantiation', 'EvaluateCall', 'EvaluateNew', 'EventSet', 'floor', 'ForBodyEvaluation', 'ForIn/OfBodyEvaluation', 'ForIn/OfHeadEvaluation', 'FulfillPromise', 'FunctionAllocate', 'FunctionCreate', 'FunctionDeclarationInstantiation', 'FunctionInitialize', 'GeneratorFunctionCreate', 'GeneratorResume', 'GeneratorResumeAbrupt', 'GeneratorStart', 'GeneratorValidate', 'GeneratorYield', 'GetActiveScriptOrModule', 'GetBase', 'GetFunctionRealm', 'GetGeneratorKind', 'GetGlobalObject', 'GetIdentifierReference', 'GetModifySetValueInBuffer', 'GetModuleNamespace', 'GetNewTarget', 'GetOwnPropertyKeys', 'GetPrototypeFromConstructor', 'GetReferencedName', 'GetSubstitution', 'GetSuperConstructor', 'GetTemplateObject', 'GetThisEnvironment', 'GetThisValue', 'GetValue', 'GetValueFromBuffer', 'GetViewValue', 'GetWaiterList', 'GlobalDeclarationInstantiation', 'happens-before', 'HasPrimitiveBase', 'host-synchronizes-with', 'HostEnsureCanCompileStrings', 'HostEventSet', 'HostPromiseRejectionTracker', 'HostReportErrors', 'HostResolveImportedModule', 'HourFromTime', 'HoursPerDay', 'IfAbruptRejectPromise', 'ImportedLocalNames', 'InitializeBoundName', 'InitializeHostDefinedRealm', 'InitializeReferencedBinding', 'InLeapYear', 'InnerModuleEvaluation', 'InnerModuleInstantiation', 'InstanceofOperator', 'IntegerIndexedElementGet', 'IntegerIndexedElementSet', 'IntegerIndexedObjectCreate', 'InternalizeJSONProperty', 'IsAnonymousFunctionDefinition', 'IsCompatiblePropertyDescriptor', 'IsDetachedBuffer', 'IsInTailPosition', 'IsLabelledFunction', 'IsPropertyReference', 'IsSharedArrayBuffer', 'IsStrictReference', 'IsSuperReference', 'IsUnresolvableReference', 'IsWordChar', 'IterableToList', 'LeaveCriticalSection', 'LocalTime', 'LoopContinues', 'MakeArgGetter', 'MakeArgSetter', 'MakeClassConstructor', 'MakeConstructor', 'MakeDate', 'MakeDay', 'MakeMethod', 'MakeSuperPropertyReference', 'MakeTime', 'max', 'memory-order', 'min', 'MinFromTime', 'MinutesPerHour', 'ModuleDeclarationEnvironmentSetup', 'ModuleExecution', 'ModuleNamespaceCreate', 'modulo', 'MonthFromTime', 'msFromTime', 'msPerDay', 'msPerHour', 'msPerMinute', 'msPerSecond', 'NewDeclarativeEnvironment', 'NewFunctionEnvironment', 'NewGlobalEnvironment', 'NewModuleEnvironment', 'NewObjectEnvironment', 'NewPromiseCapability', 'NumberToRawBytes', 'ObjectDefineProperties', 'OrdinaryCallBindThis', 'OrdinaryCallEvaluateBody', 'OrdinaryCreateFromConstructor', 'OrdinaryDefineOwnProperty', 'OrdinaryDelete', 'OrdinaryGet', 'OrdinaryGetOwnProperty', 'OrdinaryGetPrototypeOf', 'OrdinaryHasProperty', 'OrdinaryIsExtensible', 'OrdinaryOwnPropertyKeys', 'OrdinaryPreventExtensions', 'OrdinarySetPrototypeOf', 'OrdinaryToPrimitive', 'ParseModule', 'ParseScript', 'PerformEval', 'PerformPromiseAll', 'PerformPromiseRace', 'PerformPromiseThen', 'PrepareForOrdinaryCall', 'PrepareForTailCall', 'PromiseReactionJob', 'PromiseResolveThenableJob', 'ProxyCreate', 'PutValue', 'QuoteJSONString', 'RawBytesToNumber', 'reads-bytes-from', 'reads-from', 'RegExpAlloc', 'RegExpCreate', 'RegExpInitialize', 'RejectPromise', 'RemoveWaiter', 'RemoveWaiters', 'RepeatMatcher', 'ResolveBinding', 'ResolveThisBinding', 'ReturnIfAbrupt', 'RunJobs', 'ScriptEvaluation', 'ScriptEvaluationJob', 'SecFromTime', 'SecondsPerMinute', 'SerializeJSONArray', 'SerializeJSONObject', 'SerializeJSONProperty', 'SetDefaultGlobalBindings', 'SetFunctionName', 'SetImmutablePrototype', 'SetRealmGlobalObject', 'SetValueInBuffer', 'SetViewValue', 'SharedDataBlockEventSet', 'SortCompare', 'SplitMatch', 'Strict Equality Comparison', 'StringCreate', 'StringGetOwnProperty', 'Suspend', 'SymbolDescriptiveString', 'synchronizes-with', 'TimeClip', 'TimeFromYear', 'TimeWithinDay', 'TimeZoneString', 'TopLevelModuleEvaluationJob', 'TriggerPromiseReactions', 'TypedArrayCreate', 'TypedArraySpeciesCreate', 'UnicodeEscape', 'UpdateEmpty', 'UTC', 'UTF16Decode', 'UTF16Encoding', 'ValidateAndApplyPropertyDescriptor', 'ValidateAtomicAccess', 'ValidateSharedIntegerTypedArray', 'ValidateTypedArray', 'ValueOfReadEvent', 'WakeWaiter', 'WeekDay', 'WordCharacters', 'YearFromTime', 'AsyncFunctionCreate', 'AsyncGeneratorFunctionCreate', 'AsyncIteratorClose', 'BackreferenceMatcher', 'Construct', 'CreateArrayFromList', 'CreateListFromArrayLike', 'CreateListIteratorRecord', 'DateString', 'IsPromise', 'NormalCompletion', 'OrdinaryHasInstance', 'OrdinarySet', 'OrdinarySetWithOwnDescriptor', 'RegExpBuiltinExec', 'SetFunctionLength', 'SetIntegrityLevel', 'TestIntegrityLevel', 'ThrowCompletion', 'TimeString', 'ToDateString', 'UnicodeMatchProperty', 'UnicodeMatchPropertyValue']; - -require('./tests').es2018(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es5.js b/node_modules/es-abstract/test/es5.js deleted file mode 100644 index cca30304..00000000 --- a/node_modules/es-abstract/test/es5.js +++ /dev/null @@ -1,415 +0,0 @@ -'use strict'; - -var ES = require('../').ES5; -var test = require('tape'); - -var forEach = require('foreach'); -var is = require('object-is'); - -var coercibleObject = { valueOf: function () { return '3'; }, toString: function () { return 42; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; -var objects = [{}, coercibleObject, toStringOnlyObject, valueOfOnlyObject]; -var numbers = [0, -0, Infinity, -Infinity, 42]; -var nonNullPrimitives = [true, false, 'foo', ''].concat(numbers); -var primitives = [undefined, null].concat(nonNullPrimitives); - -test('ToPrimitive', function (t) { - t.test('primitives', function (st) { - var testPrimitive = function (primitive) { - st.ok(is(ES.ToPrimitive(primitive), primitive), primitive + ' is returned correctly'); - }; - forEach(primitives, testPrimitive); - st.end(); - }); - - t.test('objects', function (st) { - st.equal(ES.ToPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject coerces to valueOf'); - st.equal(ES.ToPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - st.equal(ES.ToPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); - st.equal(ES.ToPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); - st.equal(ES.ToPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); - st.equal(ES.ToPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - st.equal(ES.ToPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); - st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - st.equal(ES.ToPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); - st['throws'](function () { return ES.ToPrimitive(uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](function () { return ES.ToPrimitive(uncoercibleFnObject); }, TypeError, 'uncoercibleFnObject throws a TypeError'); - st.end(); - }); - - t.end(); -}); - -test('ToBoolean', function (t) { - t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); - t.equal(false, ES.ToBoolean(null), 'null coerces to false'); - t.equal(false, ES.ToBoolean(false), 'false returns false'); - t.equal(true, ES.ToBoolean(true), 'true returns true'); - forEach([0, -0, NaN], function (falsyNumber) { - t.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); - }); - forEach([Infinity, 42, 1, -Infinity], function (truthyNumber) { - t.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); - }); - t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); - t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); - forEach(objects, function (obj) { - t.equal(true, ES.ToBoolean(obj), 'object coerces to true'); - }); - t.equal(true, ES.ToBoolean(uncoercibleObject), 'uncoercibleObject coerces to true'); - t.end(); -}); - -test('ToNumber', function (t) { - t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); - t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); - t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); - t.equal(1, ES.ToNumber(true), 'true coerces to 1'); - t.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); - forEach([0, -0, 42, Infinity, -Infinity], function (num) { - t.equal(num, ES.ToNumber(num), num + ' returns itself'); - }); - forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { - t.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); - }); - forEach(objects, function (object) { - t.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); - }); - t['throws'](function () { return ES.ToNumber(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); -}); - -test('ToInteger', function (t) { - t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity, 42], function (num) { - t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); - t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); - }); - t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); - t['throws'](function () { return ES.ToInteger(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); -}); - -test('ToInt32', function (t) { - t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt32(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); - t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); - }); - t.end(); -}); - -test('ToUint32', function (t) { - t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint32(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); - t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); - t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); - }); - t.end(); -}); - -test('ToUint16', function (t) { - t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint16(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); - t.end(); -}); - -test('ToString', function (t) { - t['throws'](function () { return ES.ToString(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); -}); - -test('ToObject', function (t) { - t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); - forEach(numbers, function (number) { - var obj = ES.ToObject(number); - t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); - t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); - t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); - }); - t.end(); -}); - -test('CheckObjectCoercible', function (t) { - t['throws'](function () { return ES.CheckObjectCoercible(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.CheckObjectCoercible(null); }, TypeError, 'null throws'); - var checkCoercible = function (value) { - t.doesNotThrow(function () { return ES.CheckObjectCoercible(value); }, '"' + value + '" does not throw'); - }; - forEach(objects.concat(nonNullPrimitives), checkCoercible); - t.end(); -}); - -test('IsCallable', function (t) { - t.equal(true, ES.IsCallable(function () {}), 'function is callable'); - var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(primitives); - forEach(nonCallables, function (nonCallable) { - t.equal(false, ES.IsCallable(nonCallable), nonCallable + ' is not callable'); - }); - t.end(); -}); - -test('SameValue', function (t) { - t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); - t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); - forEach(objects.concat(primitives), function (val) { - t.equal(val === val, ES.SameValue(val, val), '"' + val + '" is SameValue to itself'); - }); - t.end(); -}); - -test('Type', function (t) { - t.equal(ES.Type(), 'Undefined', 'Type() is Undefined'); - t.equal(ES.Type(undefined), 'Undefined', 'Type(undefined) is Undefined'); - t.equal(ES.Type(null), 'Null', 'Type(null) is Null'); - t.equal(ES.Type(true), 'Boolean', 'Type(true) is Boolean'); - t.equal(ES.Type(false), 'Boolean', 'Type(false) is Boolean'); - t.equal(ES.Type(0), 'Number', 'Type(0) is Number'); - t.equal(ES.Type(NaN), 'Number', 'Type(NaN) is Number'); - t.equal(ES.Type('abc'), 'String', 'Type("abc") is String'); - t.equal(ES.Type(function () {}), 'Object', 'Type(function () {}) is Object'); - t.equal(ES.Type({}), 'Object', 'Type({}) is Object'); - t.end(); -}); - -var bothDescriptor = function () { - return { '[[Get]]': function () {}, '[[Value]]': true }; -}; -var accessorDescriptor = function () { - return { - '[[Get]]': function () {}, - '[[Enumerable]]': true, - '[[Configurable]]': true - }; -}; -var mutatorDescriptor = function () { - return { - '[[Set]]': function () {}, - '[[Enumerable]]': true, - '[[Configurable]]': true - }; -}; -var dataDescriptor = function () { - return { - '[[Value]]': 42, - '[[Writable]]': false, - '[[Configurable]]': false - }; -}; -var genericDescriptor = function () { - return { - '[[Configurable]]': true, - '[[Enumerable]]': false - }; -}; - -test('IsPropertyDescriptor', function (t) { - forEach(primitives, function (primitive) { - t.equal(ES.IsPropertyDescriptor(primitive), false, primitive + ' is not a Property Descriptor'); - }); - - t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor(accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(dataDescriptor()), true, 'data descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); - - t['throws'](function () { - ES.IsPropertyDescriptor(bothDescriptor()); - }, TypeError, 'a Property Descriptor can not be both a Data and an Accessor Descriptor'); - - t.end(); -}); - -test('IsAccessorDescriptor', function (t) { - forEach(nonNullPrimitives.concat(null), function (primitive) { - t['throws'](function () { ES.IsAccessorDescriptor(primitive); }, TypeError, primitive + ' is not a Property Descriptor'); - }); - - t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); - - t.equal(ES.IsAccessorDescriptor(accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); - - t.end(); -}); - -test('IsDataDescriptor', function (t) { - forEach(nonNullPrimitives.concat(null), function (primitive) { - t['throws'](function () { ES.IsDataDescriptor(primitive); }, TypeError, primitive + ' is not a Property Descriptor'); - }); - - t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsDataDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(dataDescriptor()), true, 'data descriptor is a Data Descriptor'); - t.equal(ES.IsDataDescriptor(genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); - - t.end(); -}); - -test('IsGenericDescriptor', function (t) { - forEach(nonNullPrimitives.concat(null), function (primitive) { - t['throws']( - function () { ES.IsGenericDescriptor(primitive); }, - TypeError, - primitive + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsGenericDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); - - t.equal(ES.IsGenericDescriptor(genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); - - t.end(); -}); - -test('FromPropertyDescriptor', function (t) { - t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); - t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); - - forEach(nonNullPrimitives.concat(null), function (primitive) { - t['throws']( - function () { ES.FromPropertyDescriptor(primitive); }, - TypeError, - primitive + ' is not a Property Descriptor' - ); - }); - - var accessor = accessorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(accessor), { - get: accessor['[[Get]]'], - set: accessor['[[Set]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }); - - var mutator = mutatorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(mutator), { - get: mutator['[[Get]]'], - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }); - var data = dataDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(data), { - value: data['[[Value]]'], - writable: data['[[Writable]]'], - enumerable: !!data['[[Enumerable]]'], - configurable: !!data['[[Configurable]]'] - }); - - t['throws']( - function () { ES.FromPropertyDescriptor(genericDescriptor()); }, - TypeError, - 'a complete Property Descriptor is required' - ); - - t.end(); -}); - -test('ToPropertyDescriptor', function (t) { - forEach(nonNullPrimitives.concat(null), function (primitive) { - t['throws']( - function () { ES.ToPropertyDescriptor(primitive); }, - TypeError, - primitive + ' is not an Object' - ); - }); - - var accessor = accessorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - get: accessor['[[Get]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }), accessor); - - var mutator = mutatorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }), mutator); - - var data = dataDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - value: data['[[Value]]'], - writable: data['[[Writable]]'], - configurable: !!data['[[Configurable]]'] - }), data); - - var both = bothDescriptor(); - t['throws']( - function () { - ES.ToPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); - }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t['throws']( - function () { ES.ToPropertyDescriptor({ get: 'not callable' }); }, - TypeError, - '"get" must be undefined or callable' - ); - - t['throws']( - function () { ES.ToPropertyDescriptor({ set: 'not callable' }); }, - TypeError, - '"set" must be undefined or callable' - ); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/es6.js b/node_modules/es-abstract/test/es6.js deleted file mode 100644 index e7c9d98a..00000000 --- a/node_modules/es-abstract/test/es6.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var ES = require('../'); -var ES6 = ES.ES6; -var ES2015 = ES.ES2015; -var ES6entry = require('../es6'); - -test('legacy es6 export', function (t) { - t.equal(ES6, ES2015, 'main ES6 === main ES2015'); - t.end(); -}); - -test('legacy es6 entry point', function (t) { - t.equal(ES6, ES6entry, 'main ES6 === ES6 entry point'); - t.end(); -}); diff --git a/node_modules/es-abstract/test/es7.js b/node_modules/es-abstract/test/es7.js deleted file mode 100644 index ee57e153..00000000 --- a/node_modules/es-abstract/test/es7.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var ES = require('../'); -var ES7 = ES.ES7; -var ES2016 = ES.ES2016; -var ES7entry = require('../es7'); - -test('legacy es7 export', function (t) { - t.equal(ES7, ES2016, 'main ES7 === main ES2016'); - t.end(); -}); - -test('legacy es7 entry point', function (t) { - t.equal(ES7, ES7entry, 'main ES7 === ES7 entry point'); - t.end(); -}); diff --git a/node_modules/es-abstract/test/helpers/assertRecord.js b/node_modules/es-abstract/test/helpers/assertRecord.js deleted file mode 100644 index 2af98946..00000000 --- a/node_modules/es-abstract/test/helpers/assertRecord.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var forEach = require('foreach'); -var debug = require('object-inspect'); - -var assertRecord = require('../../helpers/assertRecord'); -var v = require('./values'); - -module.exports = function assertRecordTests(ES, test) { - test('Property Descriptor', function (t) { - var record = 'Property Descriptor'; - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { assertRecord(ES, record, 'arg', primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t['throws']( - function () { assertRecord(ES, record, 'arg', { invalid: true }); }, - TypeError, - 'invalid keys not allowed on a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', {}); }, - 'empty object is an incomplete Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.accessorDescriptor()); }, - 'accessor descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.mutatorDescriptor()); }, - 'mutator descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.dataDescriptor()); }, - 'data descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.genericDescriptor()); }, - 'generic descriptor is a Property Descriptor' - ); - - t['throws']( - function () { assertRecord(ES, record, 'arg', v.bothDescriptor()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t.end(); - }); -}; diff --git a/node_modules/es-abstract/test/helpers/values.js b/node_modules/es-abstract/test/helpers/values.js deleted file mode 100644 index b05507cb..00000000 --- a/node_modules/es-abstract/test/helpers/values.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var objects = [{}, coercibleObject, toStringOnlyObject, valueOfOnlyObject]; -var nullPrimitives = [undefined, null]; -var nonIntegerNumbers = [-1.3, 0.2, 1.8, 1 / 3]; -var numbers = [0, -0, Infinity, -Infinity, 42].concat(nonIntegerNumbers); -var strings = ['', 'foo', 'a\uD83D\uDCA9c']; -var booleans = [true, false]; -var symbols = hasSymbols ? [Symbol.iterator, Symbol('foo')] : []; -var nonSymbolPrimitives = [].concat(nullPrimitives, booleans, strings, numbers); -var nonNumberPrimitives = [].concat(nullPrimitives, booleans, strings, symbols); -var nonNullPrimitives = [].concat(booleans, strings, numbers, symbols); -var nonUndefinedPrimitives = [].concat(null, nonNullPrimitives); -var nonStrings = [].concat(nullPrimitives, booleans, numbers, symbols, objects); -var primitives = [].concat(nullPrimitives, nonNullPrimitives); -var nonPropertyKeys = [].concat(nullPrimitives, booleans, numbers, objects); -var propertyKeys = [].concat(strings, symbols); -var nonBooleans = [].concat(nullPrimitives, strings, symbols, numbers, objects); -var falsies = [].concat(nullPrimitives, false, '', 0, -0, NaN); -var truthies = [].concat(true, 'foo', 42, symbols, objects); -var timestamps = [].concat(0, 946713600000, 1546329600000); - -module.exports = { - coercibleObject: coercibleObject, - valueOfOnlyObject: valueOfOnlyObject, - toStringOnlyObject: toStringOnlyObject, - uncoercibleObject: uncoercibleObject, - objects: objects, - nullPrimitives: nullPrimitives, - numbers: numbers, - strings: strings, - booleans: booleans, - symbols: symbols, - hasSymbols: hasSymbols, - nonSymbolPrimitives: nonSymbolPrimitives, - nonNumberPrimitives: nonNumberPrimitives, - nonNullPrimitives: nonNullPrimitives, - nonUndefinedPrimitives: nonUndefinedPrimitives, - nonStrings: nonStrings, - nonNumbers: nonNumberPrimitives.concat(objects), - nonIntegerNumbers: nonIntegerNumbers, - primitives: primitives, - nonPropertyKeys: nonPropertyKeys, - propertyKeys: propertyKeys, - nonBooleans: nonBooleans, - falsies: falsies, - truthies: truthies, - timestamps: timestamps, - bothDescriptor: function () { - return { '[[Get]]': function () {}, '[[Value]]': true }; - }, - accessorDescriptor: function () { - return { - '[[Get]]': function () {}, - '[[Enumerable]]': true, - '[[Configurable]]': true - }; - }, - mutatorDescriptor: function () { - return { - '[[Set]]': function () {}, - '[[Enumerable]]': true, - '[[Configurable]]': true - }; - }, - dataDescriptor: function () { - return { - '[[Value]]': 42, - '[[Writable]]': false - }; - }, - genericDescriptor: function () { - return { - '[[Configurable]]': true, - '[[Enumerable]]': false - }; - } -}; diff --git a/node_modules/es-abstract/test/index.js b/node_modules/es-abstract/test/index.js deleted file mode 100644 index 15c49162..00000000 --- a/node_modules/es-abstract/test/index.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var ES = require('../'); -var test = require('tape'); - -var ESkeys = Object.keys(ES).sort(); -var ES6keys = Object.keys(ES.ES6).sort(); - -test('exposed properties', function (t) { - t.deepEqual(ESkeys, ES6keys.concat(['ES2018', 'ES2017', 'ES7', 'ES2016', 'ES6', 'ES2015', 'ES5']).sort(), 'main ES object keys match ES6 keys'); - t.end(); -}); - -test('methods match', function (t) { - ES6keys.forEach(function (key) { - t.equal(ES.ES6[key], ES[key], 'method ' + key + ' on main ES object is ES6 method'); - }); - t.end(); -}); - -require('./GetIntrinsic'); - -require('./es5'); -require('./es6'); -require('./es2015'); -require('./es7'); -require('./es2016'); -require('./es2017'); -require('./es2018'); diff --git a/node_modules/es-abstract/test/tests.js b/node_modules/es-abstract/test/tests.js deleted file mode 100644 index b9b6ee7d..00000000 --- a/node_modules/es-abstract/test/tests.js +++ /dev/null @@ -1,2136 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var forEach = require('foreach'); -var is = require('object-is'); -var debug = require('object-inspect'); -var assign = require('object.assign'); -var keys = require('object-keys'); -var has = require('has'); - -var assertRecordTests = require('./helpers/assertRecord'); -var v = require('./helpers/values'); -var diffOps = require('./diffOps'); - -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; - -var getArraySubclassWithSpeciesConstructor = function getArraySubclass(speciesConstructor) { - var Bar = function Bar() { - var inst = []; - Object.setPrototypeOf(inst, Bar.prototype); - Object.defineProperty(inst, 'constructor', { value: Bar }); - return inst; - }; - Bar.prototype = Object.create(Array.prototype); - Object.setPrototypeOf(Bar, Array); - Object.defineProperty(Bar, Symbol.species, { value: speciesConstructor }); - - return Bar; -}; - -var hasSpecies = v.hasSymbols && Symbol.species; - -var hasGroups = 'groups' in (/a/).exec('a'); -var groups = function groups(matchObject) { - return hasGroups ? assign(matchObject, { groups: matchObject.groups }) : matchObject; -}; - -var testEnumerableOwnNames = function (t, enumerableOwnNames) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { enumerableOwnNames(nonObject); }, - debug(nonObject) + ' is not an Object' - ); - }); - - var Child = function Child() { - this.own = {}; - }; - Child.prototype = { - inherited: {} - }; - - var obj = new Child(); - - t.equal('own' in obj, true, 'has "own"'); - t.equal(has(obj, 'own'), true, 'has own "own"'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, 'own'), true, 'has enumerable "own"'); - - t.equal('inherited' in obj, true, 'has "inherited"'); - t.equal(has(obj, 'inherited'), false, 'has non-own "inherited"'); - t.equal(has(Child.prototype, 'inherited'), true, 'Child.prototype has own "inherited"'); - t.equal(Child.prototype.inherited, obj.inherited, 'Child.prototype.inherited === obj.inherited'); - t.equal(Object.prototype.propertyIsEnumerable.call(Child.prototype, 'inherited'), true, 'has enumerable "inherited"'); - - t.equal('toString' in obj, true, 'has "toString"'); - t.equal(has(obj, 'toString'), false, 'has non-own "toString"'); - t.equal(has(Object.prototype, 'toString'), true, 'Object.prototype has own "toString"'); - t.equal(Object.prototype.toString, obj.toString, 'Object.prototype.toString === obj.toString'); - // eslint-disable-next-line no-useless-call - t.equal(Object.prototype.propertyIsEnumerable.call(Object.prototype, 'toString'), false, 'has non-enumerable "toString"'); - - return obj; -}; - -var es2015 = function ES2015(ES, ops, expectedMissing, skips) { - test('has expected operations', function (t) { - var diff = diffOps(ES, ops, expectedMissing); - - t.deepEqual(diff.extra, [], 'no extra ops'); - - t.deepEqual(diff.missing, [], 'no unexpected missing ops'); - - t.end(); - }); - - test('ToPrimitive', function (t) { - t.test('primitives', function (st) { - var testPrimitive = function (primitive) { - st.ok(is(ES.ToPrimitive(primitive), primitive), debug(primitive) + ' is returned correctly'); - }; - forEach(v.primitives, testPrimitive); - st.end(); - }); - - t.test('objects', function (st) { - st.equal(ES.ToPrimitive(v.coercibleObject), 3, 'coercibleObject with no hint coerces to valueOf'); - st.ok(is(ES.ToPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); - st.equal(ES.ToPrimitive(v.coercibleObject, Number), 3, 'coercibleObject with hint Number coerces to valueOf'); - st.ok(is(ES.ToPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to NaN'); - st.equal(ES.ToPrimitive(v.coercibleObject, String), 42, 'coercibleObject with hint String coerces to nonstringified toString'); - st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - st.equal(ES.ToPrimitive(v.toStringOnlyObject), 7, 'toStringOnlyObject returns non-stringified toString'); - st.equal(ES.ToPrimitive(v.valueOfOnlyObject), 4, 'valueOfOnlyObject returns valueOf'); - st['throws'](function () { return ES.ToPrimitive(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - st.end(); - }); - - t.test('dates', function (st) { - var invalid = new Date(NaN); - st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString'); - var now = new Date(); - st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString'); - st.end(); - }); - - t.end(); - }); - - test('ToBoolean', function (t) { - t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); - t.equal(false, ES.ToBoolean(null), 'null coerces to false'); - t.equal(false, ES.ToBoolean(false), 'false returns false'); - t.equal(true, ES.ToBoolean(true), 'true returns true'); - - t.test('numbers', function (st) { - forEach([0, -0, NaN], function (falsyNumber) { - st.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); - }); - forEach([Infinity, 42, 1, -Infinity], function (truthyNumber) { - st.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); - }); - - st.end(); - }); - - t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); - t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); - - t.test('objects', function (st) { - forEach(v.objects, function (obj) { - st.equal(true, ES.ToBoolean(obj), 'object coerces to true'); - }); - st.equal(true, ES.ToBoolean(v.uncoercibleObject), 'uncoercibleObject coerces to true'); - - st.end(); - }); - - t.end(); - }); - - test('ToNumber', function (t) { - t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); - t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); - t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); - t.equal(1, ES.ToNumber(true), 'true coerces to 1'); - - t.test('numbers', function (st) { - st.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); - forEach([0, -0, 42, Infinity, -Infinity], function (num) { - st.equal(num, ES.ToNumber(num), num + ' returns itself'); - }); - forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { - st.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); - }); - st.end(); - }); - - t.test('objects', function (st) { - forEach(v.objects, function (object) { - st.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); - }); - st['throws'](function () { return ES.ToNumber(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - st.end(); - }); - - t.test('binary literals', function (st) { - st.equal(ES.ToNumber('0b10'), 2, '0b10 is 2'); - st.equal(ES.ToNumber({ toString: function () { return '0b11'; } }), 3, 'Object that toStrings to 0b11 is 3'); - - st.equal(true, is(ES.ToNumber('0b12'), NaN), '0b12 is NaN'); - st.equal(true, is(ES.ToNumber({ toString: function () { return '0b112'; } }), NaN), 'Object that toStrings to 0b112 is NaN'); - st.end(); - }); - - t.test('octal literals', function (st) { - st.equal(ES.ToNumber('0o10'), 8, '0o10 is 8'); - st.equal(ES.ToNumber({ toString: function () { return '0o11'; } }), 9, 'Object that toStrings to 0o11 is 9'); - - st.equal(true, is(ES.ToNumber('0o18'), NaN), '0o18 is NaN'); - st.equal(true, is(ES.ToNumber({ toString: function () { return '0o118'; } }), NaN), 'Object that toStrings to 0o118 is NaN'); - st.end(); - }); - - t.test('signed hex numbers', function (st) { - st.equal(true, is(ES.ToNumber('-0xF'), NaN), '-0xF is NaN'); - st.equal(true, is(ES.ToNumber(' -0xF '), NaN), 'space-padded -0xF is NaN'); - st.equal(true, is(ES.ToNumber('+0xF'), NaN), '+0xF is NaN'); - st.equal(true, is(ES.ToNumber(' +0xF '), NaN), 'space-padded +0xF is NaN'); - - st.end(); - }); - - t.test('trimming of whitespace and non-whitespace characters', function (st) { - var whitespace = ' \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'; - st.equal(0, ES.ToNumber(whitespace + 0 + whitespace), 'whitespace is trimmed'); - - // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. - var nonWhitespaces = { - '\\u0085': '\u0085', - '\\u200b': '\u200b', - '\\ufffe': '\ufffe' - }; - - forEach(nonWhitespaces, function (desc, nonWS) { - st.equal(true, is(ES.ToNumber(nonWS + 0 + nonWS), NaN), 'non-whitespace ' + desc + ' not trimmed'); - }); - - st.end(); - }); - - forEach(v.symbols, function (symbol) { - t['throws']( - function () { ES.ToNumber(symbol); }, - TypeError, - 'Symbols can’t be converted to a Number: ' + debug(symbol) - ); - }); - - t.test('dates', function (st) { - var invalid = new Date(NaN); - st.ok(is(ES.ToNumber(invalid), NaN), 'invalid Date coerces to NaN'); - var now = Date.now(); - st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp'); - st.end(); - }); - - t.end(); - }); - - test('ToInteger', function (t) { - t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity, 42], function (num) { - t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); - t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); - }); - t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); - t['throws'](function () { return ES.ToInteger(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); - }); - - test('ToInt32', function (t) { - t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); - t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); - }); - t.end(); - }); - - test('ToUint32', function (t) { - t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); - t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); - t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); - }); - t.end(); - }); - - test('ToInt16', function (t) { - t.ok(is(0, ES.ToInt16(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt16(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt16(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt16(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt16(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt16(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToInt16(0x80000000 - 1), -1), '2^31 - 1 returns -1'); - t.ok(is(ES.ToInt16(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToInt16(0x10000 - 1), -1), '2^16 - 1 returns -1'); - t.end(); - }); - - test('ToUint16', function (t) { - t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); - t.end(); - }); - - test('ToInt8', function (t) { - t.ok(is(0, ES.ToInt8(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt8(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt8(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt8(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt8(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToInt8(0x80000000 - 1), -1), '2^31 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToInt8(0x10000 - 1), -1), '2^16 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x100), 0), '2^8 returns +0'); - t.ok(is(ES.ToInt8(0x100 - 1), -1), '2^8 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x10), 0x10), '2^4 returns 2^4'); - t.end(); - }); - - test('ToUint8', function (t) { - t.ok(is(0, ES.ToUint8(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint8(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint8(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint8(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint8(0x100000000 - 1), 0x100 - 1), '2^32 - 1 returns 2^8 - 1'); - t.ok(is(ES.ToUint8(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToUint8(0x80000000 - 1), 0x100 - 1), '2^31 - 1 returns 2^8 - 1'); - t.ok(is(ES.ToUint8(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToUint8(0x10000 - 1), 0x100 - 1), '2^16 - 1 returns 2^8 - 1'); - t.ok(is(ES.ToUint8(0x100), 0), '2^8 returns +0'); - t.ok(is(ES.ToUint8(0x100 - 1), 0x100 - 1), '2^8 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint8(0x10), 0x10), '2^4 returns 2^4'); - t.ok(is(ES.ToUint8(0x10 - 1), 0x10 - 1), '2^4 - 1 returns 2^4 - 1'); - t.end(); - }); - - test('ToUint8Clamp', function (t) { - t.ok(is(0, ES.ToUint8Clamp(NaN)), 'NaN coerces to +0'); - t.ok(is(0, ES.ToUint8Clamp(0)), '+0 returns +0'); - t.ok(is(0, ES.ToUint8Clamp(-0)), '-0 returns +0'); - t.ok(is(0, ES.ToUint8Clamp(-Infinity)), '-Infinity returns +0'); - t['throws'](function () { return ES.ToUint8Clamp(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - forEach([255, 256, 0x100000, Infinity], function (number) { - t.ok(is(255, ES.ToUint8Clamp(number)), number + ' coerces to 255'); - }); - t.equal(1, ES.ToUint8Clamp(1.49), '1.49 coerces to 1'); - t.equal(2, ES.ToUint8Clamp(1.5), '1.5 coerces to 2, because 2 is even'); - t.equal(2, ES.ToUint8Clamp(1.51), '1.51 coerces to 2'); - - t.equal(2, ES.ToUint8Clamp(2.49), '2.49 coerces to 2'); - t.equal(2, ES.ToUint8Clamp(2.5), '2.5 coerces to 2, because 2 is even'); - t.equal(3, ES.ToUint8Clamp(2.51), '2.51 coerces to 3'); - t.end(); - }); - - test('ToString', function (t) { - forEach(v.objects.concat(v.nonSymbolPrimitives), function (item) { - t.equal(ES.ToString(item), String(item), 'ES.ToString(' + debug(item) + ') ToStrings to String(' + debug(item) + ')'); - }); - - t['throws'](function () { return ES.ToString(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - - forEach(v.symbols, function (symbol) { - t['throws'](function () { return ES.ToString(symbol); }, TypeError, debug(symbol) + ' throws'); - }); - t.end(); - }); - - test('ToObject', function (t) { - t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); - forEach(v.numbers, function (number) { - var obj = ES.ToObject(number); - t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); - t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); - t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); - }); - t.end(); - }); - - test('RequireObjectCoercible', function (t) { - t.equal(false, 'CheckObjectCoercible' in ES, 'CheckObjectCoercible -> RequireObjectCoercible in ES6'); - t['throws'](function () { return ES.RequireObjectCoercible(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.RequireObjectCoercible(null); }, TypeError, 'null throws'); - var isCoercible = function (value) { - t.doesNotThrow(function () { return ES.RequireObjectCoercible(value); }, debug(value) + ' does not throw'); - }; - forEach(v.objects.concat(v.nonNullPrimitives), isCoercible); - t.end(); - }); - - test('IsCallable', function (t) { - t.equal(true, ES.IsCallable(function () {}), 'function is callable'); - var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(v.primitives); - forEach(nonCallables, function (nonCallable) { - t.equal(false, ES.IsCallable(nonCallable), debug(nonCallable) + ' is not callable'); - }); - t.end(); - }); - - test('SameValue', function (t) { - t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); - t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); - forEach(v.objects.concat(v.primitives), function (val) { - t.equal(val === val, ES.SameValue(val, val), debug(val) + ' is SameValue to itself'); - }); - t.end(); - }); - - test('SameValueZero', function (t) { - t.equal(true, ES.SameValueZero(NaN, NaN), 'NaN is SameValueZero as NaN'); - t.equal(true, ES.SameValueZero(0, -0), '+0 is SameValueZero as -0'); - forEach(v.objects.concat(v.primitives), function (val) { - t.equal(val === val, ES.SameValueZero(val, val), debug(val) + ' is SameValueZero to itself'); - }); - t.end(); - }); - - test('ToPropertyKey', function (t) { - forEach(v.objects.concat(v.nonSymbolPrimitives), function (value) { - t.equal(ES.ToPropertyKey(value), String(value), 'ToPropertyKey(value) === String(value) for non-Symbols'); - }); - - forEach(v.symbols, function (symbol) { - t.equal( - ES.ToPropertyKey(symbol), - symbol, - 'ToPropertyKey(' + debug(symbol) + ') === ' + debug(symbol) - ); - t.equal( - ES.ToPropertyKey(Object(symbol)), - symbol, - 'ToPropertyKey(' + debug(Object(symbol)) + ') === ' + debug(symbol) - ); - }); - - t.end(); - }); - - test('ToLength', function (t) { - t['throws'](function () { return ES.ToLength(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - t.equal(3, ES.ToLength(v.coercibleObject), 'coercibleObject coerces to 3'); - t.equal(42, ES.ToLength('42.5'), '"42.5" coerces to 42'); - t.equal(7, ES.ToLength(7.3), '7.3 coerces to 7'); - forEach([-0, -1, -42, -Infinity], function (negative) { - t.ok(is(0, ES.ToLength(negative)), negative + ' coerces to +0'); - }); - t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 1), '2^53 coerces to 2^53 - 1'); - t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 3), '2^53 + 2 coerces to 2^53 - 1'); - t.end(); - }); - - test('IsArray', function (t) { - t.equal(true, ES.IsArray([]), '[] is array'); - t.equal(false, ES.IsArray({}), '{} is not array'); - t.equal(false, ES.IsArray({ length: 1, 0: true }), 'arraylike object is not array'); - forEach(v.objects.concat(v.primitives), function (value) { - t.equal(false, ES.IsArray(value), debug(value) + ' is not array'); - }); - t.end(); - }); - - test('IsRegExp', function (t) { - forEach([/a/g, new RegExp('a', 'g')], function (regex) { - t.equal(true, ES.IsRegExp(regex), regex + ' is regex'); - }); - - forEach(v.objects.concat(v.primitives), function (nonRegex) { - t.equal(false, ES.IsRegExp(nonRegex), debug(nonRegex) + ' is not regex'); - }); - - t.test('Symbol.match', { skip: !v.hasSymbols || !Symbol.match }, function (st) { - var obj = {}; - obj[Symbol.match] = true; - st.equal(true, ES.IsRegExp(obj), 'object with truthy Symbol.match is regex'); - - var regex = /a/; - regex[Symbol.match] = false; - st.equal(false, ES.IsRegExp(regex), 'regex with falsy Symbol.match is not regex'); - - st.end(); - }); - - t.end(); - }); - - test('IsPropertyKey', function (t) { - forEach(v.numbers.concat(v.objects), function (notKey) { - t.equal(false, ES.IsPropertyKey(notKey), debug(notKey) + ' is not property key'); - }); - - t.equal(true, ES.IsPropertyKey('foo'), 'string is property key'); - - forEach(v.symbols, function (symbol) { - t.equal(true, ES.IsPropertyKey(symbol), debug(symbol) + ' is property key'); - }); - t.end(); - }); - - test('IsInteger', function (t) { - for (var i = -100; i < 100; i += 10) { - t.equal(true, ES.IsInteger(i), i + ' is integer'); - t.equal(false, ES.IsInteger(i + 0.2), (i + 0.2) + ' is not integer'); - } - t.equal(true, ES.IsInteger(-0), '-0 is integer'); - var notInts = v.nonNumbers.concat(v.nonIntegerNumbers, [Infinity, -Infinity, NaN, [], new Date()]); - forEach(notInts, function (notInt) { - t.equal(false, ES.IsInteger(notInt), debug(notInt) + ' is not integer'); - }); - t.equal(false, ES.IsInteger(v.uncoercibleObject), 'uncoercibleObject is not integer'); - t.end(); - }); - - test('IsExtensible', function (t) { - forEach(v.objects, function (object) { - t.equal(true, ES.IsExtensible(object), debug(object) + ' object is extensible'); - }); - forEach(v.primitives, function (primitive) { - t.equal(false, ES.IsExtensible(primitive), debug(primitive) + ' is not extensible'); - }); - if (Object.preventExtensions) { - t.equal(false, ES.IsExtensible(Object.preventExtensions({})), 'object with extensions prevented is not extensible'); - } - t.end(); - }); - - test('CanonicalNumericIndexString', function (t) { - var throwsOnNonString = function (notString) { - t['throws']( - function () { return ES.CanonicalNumericIndexString(notString); }, - TypeError, - debug(notString) + ' is not a string' - ); - }; - forEach(v.objects.concat(v.numbers), throwsOnNonString); - t.ok(is(-0, ES.CanonicalNumericIndexString('-0')), '"-0" returns -0'); - for (var i = -50; i < 50; i += 10) { - t.equal(i, ES.CanonicalNumericIndexString(String(i)), '"' + i + '" returns ' + i); - t.equal(undefined, ES.CanonicalNumericIndexString(String(i) + 'a'), '"' + i + 'a" returns undefined'); - } - t.end(); - }); - - test('IsConstructor', function (t) { - t.equal(true, ES.IsConstructor(function () {}), 'function is constructor'); - t.equal(false, ES.IsConstructor(/a/g), 'regex is not constructor'); - forEach(v.objects, function (object) { - t.equal(false, ES.IsConstructor(object), object + ' object is not constructor'); - }); - - try { - var foo = Function('return class Foo {}')(); // eslint-disable-line no-new-func - t.equal(ES.IsConstructor(foo), true, 'class is constructor'); - } catch (e) { - t.comment('SKIP: class syntax not supported.'); - } - t.end(); - }); - - test('Call', function (t) { - var receiver = {}; - var notFuncs = v.objects.concat(v.primitives).concat([/a/g, new RegExp('a', 'g')]); - t.plan(notFuncs.length + 4); - var throwsIfNotCallable = function (notFunc) { - t['throws']( - function () { return ES.Call(notFunc, receiver); }, - TypeError, - debug(notFunc) + ' (' + typeof notFunc + ') is not callable' - ); - }; - forEach(notFuncs, throwsIfNotCallable); - ES.Call(function (a, b) { - t.equal(this, receiver, 'context matches expected'); - t.deepEqual([a, b], [1, 2], 'named args are correct'); - t.equal(arguments.length, 3, 'extra argument was passed'); - t.equal(arguments[2], 3, 'extra argument was correct'); - }, receiver, [1, 2, 3]); - t.end(); - }); - - test('GetV', function (t) { - t['throws'](function () { return ES.GetV({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - var obj = { a: function () {} }; - t.equal(ES.GetV(obj, 'a'), obj.a, 'returns property if it exists'); - t.equal(ES.GetV(obj, 'b'), undefined, 'returns undefiend if property does not exist'); - t.end(); - }); - - test('GetMethod', function (t) { - t['throws'](function () { return ES.GetMethod({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - t.equal(ES.GetMethod({}, 'a'), undefined, 'returns undefined in property is undefined'); - t.equal(ES.GetMethod({ a: null }, 'a'), undefined, 'returns undefined if property is null'); - t.equal(ES.GetMethod({ a: undefined }, 'a'), undefined, 'returns undefined if property is undefined'); - var obj = { a: function () {} }; - t['throws'](function () { ES.GetMethod({ a: 'b' }, 'a'); }, TypeError, 'throws TypeError if property exists and is not callable'); - t.equal(ES.GetMethod(obj, 'a'), obj.a, 'returns property if it is callable'); - t.end(); - }); - - test('Get', function (t) { - t['throws'](function () { return ES.Get('a', 'a'); }, TypeError, 'Throws a TypeError if `O` is not an Object'); - t['throws'](function () { return ES.Get({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - - var value = {}; - t.test('Symbols', { skip: !v.hasSymbols }, function (st) { - var sym = Symbol('sym'); - var obj = {}; - obj[sym] = value; - st.equal(ES.Get(obj, sym), value, 'returns property `P` if it exists on object `O`'); - st.end(); - }); - t.equal(ES.Get({ a: value }, 'a'), value, 'returns property `P` if it exists on object `O`'); - t.end(); - }); - - test('Type', { skip: !v.hasSymbols }, function (t) { - t.equal(ES.Type(Symbol.iterator), 'Symbol', 'Type(Symbol.iterator) is Symbol'); - t.end(); - }); - - test('SpeciesConstructor', function (t) { - t['throws'](function () { ES.SpeciesConstructor(null); }, TypeError); - t['throws'](function () { ES.SpeciesConstructor(undefined); }, TypeError); - - var defaultConstructor = function Foo() {}; - - t.equal( - ES.SpeciesConstructor({ constructor: undefined }, defaultConstructor), - defaultConstructor, - 'undefined constructor returns defaultConstructor' - ); - - t['throws']( - function () { return ES.SpeciesConstructor({ constructor: null }, defaultConstructor); }, - TypeError, - 'non-undefined non-object constructor throws' - ); - - t.test('with Symbol.species', { skip: !hasSpecies }, function (st) { - var Bar = function Bar() {}; - Bar[Symbol.species] = null; - - st.equal( - ES.SpeciesConstructor(new Bar(), defaultConstructor), - defaultConstructor, - 'undefined/null Symbol.species returns default constructor' - ); - - var Baz = function Baz() {}; - Baz[Symbol.species] = Bar; - st.equal( - ES.SpeciesConstructor(new Baz(), defaultConstructor), - Bar, - 'returns Symbol.species constructor value' - ); - - Baz[Symbol.species] = {}; - st['throws']( - function () { ES.SpeciesConstructor(new Baz(), defaultConstructor); }, - TypeError, - 'throws when non-constructor non-null non-undefined species value found' - ); - - st.end(); - }); - - t.end(); - }); - - test('IsPropertyDescriptor', { skip: skips && skips.IsPropertyDescriptor }, function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t.equal( - ES.IsPropertyDescriptor(primitive), - false, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.dataDescriptor()), true, 'data descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); - - t['throws'](function () { - ES.IsPropertyDescriptor(v.bothDescriptor()); - }, TypeError, 'a Property Descriptor can not be both a Data and an Accessor Descriptor'); - - t.end(); - }); - - assertRecordTests(ES, test); - - test('IsAccessorDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsAccessorDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); - - t.equal(ES.IsAccessorDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); - - t.end(); - }); - - test('IsDataDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsDataDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsDataDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.dataDescriptor()), true, 'data descriptor is a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); - - t.end(); - }); - - test('IsGenericDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsGenericDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); - - t.end(); - }); - - test('FromPropertyDescriptor', function (t) { - t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); - t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.FromPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(accessor), { - get: accessor['[[Get]]'], - set: accessor['[[Set]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(mutator), { - get: mutator['[[Get]]'], - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }); - var data = v.dataDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(data), { - value: data['[[Value]]'], - writable: data['[[Writable]]'], - enumerable: !!data['[[Enumerable]]'], - configurable: !!data['[[Configurable]]'] - }); - - t['throws']( - function () { ES.FromPropertyDescriptor(v.genericDescriptor()); }, - TypeError, - 'a complete Property Descriptor is required' - ); - - t.end(); - }); - - test('ToPropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.ToPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - get: accessor['[[Get]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }), accessor); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }), mutator); - - var data = v.dataDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - value: data['[[Value]]'], - writable: data['[[Writable]]'], - configurable: !!data['[[Configurable]]'] - }), assign(data, { '[[Configurable]]': false })); - - var both = v.bothDescriptor(); - t['throws']( - function () { - ES.FromPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); - }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t.end(); - }); - - test('CompletePropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.CompletePropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var generic = v.genericDescriptor(); - t.deepEqual(ES.CompletePropertyDescriptor(generic), { - '[[Configurable]]': !!generic['[[Configurable]]'], - '[[Enumerable]]': !!generic['[[Enumerable]]'], - '[[Value]]': undefined, - '[[Writable]]': false - }, 'completes a Generic Descriptor'); - - var data = v.dataDescriptor(); - t.deepEqual(ES.CompletePropertyDescriptor(data), { - '[[Configurable]]': !!data['[[Configurable]]'], - '[[Enumerable]]': false, - '[[Value]]': data['[[Value]]'], - '[[Writable]]': !!data['[[Writable]]'] - }, 'completes a Data Descriptor'); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.CompletePropertyDescriptor(accessor), { - '[[Get]]': accessor['[[Get]]'], - '[[Enumerable]]': !!accessor['[[Enumerable]]'], - '[[Configurable]]': !!accessor['[[Configurable]]'], - '[[Set]]': undefined - }, 'completes an Accessor Descriptor'); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.CompletePropertyDescriptor(mutator), { - '[[Set]]': mutator['[[Set]]'], - '[[Enumerable]]': !!mutator['[[Enumerable]]'], - '[[Configurable]]': !!mutator['[[Configurable]]'], - '[[Get]]': undefined - }, 'completes a mutator Descriptor'); - - t['throws']( - function () { ES.CompletePropertyDescriptor(v.bothDescriptor()); }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t.end(); - }); - - test('Set', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.Set(primitive, '', null, false); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.Set({}, nonKey, null, false); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.Set({}, '', null, nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - var o = {}; - var value = {}; - ES.Set(o, 'key', value, true); - t.deepEqual(o, { key: value }, 'key is set'); - - t.test('nonwritable', { skip: !Object.defineProperty }, function (st) { - var obj = { a: value }; - Object.defineProperty(obj, 'a', { writable: false }); - - st['throws']( - function () { ES.Set(obj, 'a', value, true); }, - TypeError, - 'can not Set nonwritable property' - ); - - st.doesNotThrow( - function () { ES.Set(obj, 'a', value, false); }, - 'setting Throw to false prevents an exception' - ); - - st.end(); - }); - - t.test('nonconfigurable', { skip: !Object.defineProperty }, function (st) { - var obj = { a: value }; - Object.defineProperty(obj, 'a', { configurable: false }); - - ES.Set(obj, 'a', value, true); - st.deepEqual(obj, { a: value }, 'key is set'); - - st.end(); - }); - - t.end(); - }); - - test('HasOwnProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.HasOwnProperty(primitive, 'key'); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.HasOwnProperty({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.HasOwnProperty({}, 'toString'), false, 'inherited properties are not own'); - t.equal( - ES.HasOwnProperty({ toString: 1 }, 'toString'), - true, - 'shadowed inherited own properties are own' - ); - t.equal(ES.HasOwnProperty({ a: 1 }, 'a'), true, 'own properties are own'); - - t.end(); - }); - - test('HasProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.HasProperty(primitive, 'key'); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.HasProperty({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.HasProperty({}, 'nope'), false, 'object does not have nonexistent properties'); - t.equal(ES.HasProperty({}, 'toString'), true, 'object has inherited properties'); - t.equal( - ES.HasProperty({ toString: 1 }, 'toString'), - true, - 'object has shadowed inherited own properties' - ); - t.equal(ES.HasProperty({ a: 1 }, 'a'), true, 'object has own properties'); - - t.end(); - }); - - test('IsConcatSpreadable', function (t) { - forEach(v.primitives, function (primitive) { - t.equal(ES.IsConcatSpreadable(primitive), false, debug(primitive) + ' is not an Object'); - }); - - var hasSymbolConcatSpreadable = v.hasSymbols && Symbol.isConcatSpreadable; - t.test('Symbol.isConcatSpreadable', { skip: !hasSymbolConcatSpreadable }, function (st) { - forEach(v.falsies, function (falsy) { - var obj = {}; - obj[Symbol.isConcatSpreadable] = falsy; - st.equal( - ES.IsConcatSpreadable(obj), - false, - 'an object with ' + debug(falsy) + ' as Symbol.isConcatSpreadable is not concat spreadable' - ); - }); - - forEach(v.truthies, function (truthy) { - var obj = {}; - obj[Symbol.isConcatSpreadable] = truthy; - st.equal( - ES.IsConcatSpreadable(obj), - true, - 'an object with ' + debug(truthy) + ' as Symbol.isConcatSpreadable is concat spreadable' - ); - }); - - st.end(); - }); - - forEach(v.objects, function (object) { - t.equal( - ES.IsConcatSpreadable(object), - false, - 'non-array without Symbol.isConcatSpreadable is not concat spreadable' - ); - }); - - t.equal(ES.IsConcatSpreadable([]), true, 'arrays are concat spreadable'); - - t.end(); - }); - - test('Invoke', function (t) { - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.Invoke({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t['throws'](function () { ES.Invoke({ o: false }, 'o'); }, TypeError, 'fails on a non-function'); - - t.test('invoked callback', function (st) { - var aValue = {}; - var bValue = {}; - var obj = { - f: function (a) { - st.equal(arguments.length, 2, '2 args passed'); - st.equal(a, aValue, 'first arg is correct'); - st.equal(arguments[1], bValue, 'second arg is correct'); - } - }; - st.plan(3); - ES.Invoke(obj, 'f', aValue, bValue); - }); - - t.end(); - }); - - test('GetIterator', { skip: true }); - - test('IteratorNext', { skip: true }); - - test('IteratorComplete', { skip: true }); - - test('IteratorValue', { skip: true }); - - test('IteratorStep', { skip: true }); - - test('IteratorClose', { skip: true }); - - test('CreateIterResultObject', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.CreateIterResultObject({}, nonBoolean); }, - TypeError, - '"done" argument must be a boolean; ' + debug(nonBoolean) + ' is not' - ); - }); - - var value = {}; - t.deepEqual(ES.CreateIterResultObject(value, true), { - value: value, - done: true - }, 'creates a "done" iteration result'); - t.deepEqual(ES.CreateIterResultObject(value, false), { - value: value, - done: false - }, 'creates a "not done" iteration result'); - - t.end(); - }); - - test('RegExpExec', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.RegExpExec(primitive); }, - TypeError, - '"R" argument must be an object; ' + debug(primitive) + ' is not' - ); - }); - - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.RegExpExec({}, nonString); }, - TypeError, - '"S" argument must be a String; ' + debug(nonString) + ' is not' - ); - }); - - t.test('gets and calls a callable "exec"', function (st) { - var str = '123'; - var o = { - exec: function (S) { - st.equal(this, o, '"exec" receiver is R'); - st.equal(S, str, '"exec" argument is S'); - - return null; - } - }; - st.plan(2); - ES.RegExpExec(o, str); - st.end(); - }); - - t.test('throws if a callable "exec" returns a non-null non-object', function (st) { - var str = '123'; - st.plan(v.nonNullPrimitives.length); - forEach(v.nonNullPrimitives, function (nonNullPrimitive) { - st['throws']( - function () { ES.RegExpExec({ exec: function () { return nonNullPrimitive; } }, str); }, - TypeError, - '"exec" method must return `null` or an Object; ' + debug(nonNullPrimitive) + ' is not' - ); - }); - st.end(); - }); - - t.test('actual regex that should match against a string', function (st) { - var S = 'aabc'; - var R = /a/g; - var match1 = ES.RegExpExec(R, S); - var match2 = ES.RegExpExec(R, S); - var match3 = ES.RegExpExec(R, S); - st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); - st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); - st.equal(match3, null, 'match 3 is null as expected'); - st.end(); - }); - - t.test('actual regex that should match against a string, with shadowed "exec"', function (st) { - var S = 'aabc'; - var R = /a/g; - R.exec = undefined; - var match1 = ES.RegExpExec(R, S); - var match2 = ES.RegExpExec(R, S); - var match3 = ES.RegExpExec(R, S); - st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); - st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); - st.equal(match3, null, 'match 3 is null as expected'); - st.end(); - }); - t.end(); - }); - - test('ArraySpeciesCreate', function (t) { - t.test('errors', function (st) { - var testNonNumber = function (nonNumber) { - st['throws']( - function () { ES.ArraySpeciesCreate([], nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a number' - ); - }; - forEach(v.nonNumbers, testNonNumber); - - st['throws']( - function () { ES.ArraySpeciesCreate([], -1); }, - TypeError, - '-1 is not >= 0' - ); - st['throws']( - function () { ES.ArraySpeciesCreate([], -Infinity); }, - TypeError, - '-Infinity is not >= 0' - ); - - var testNonIntegers = function (nonInteger) { - st['throws']( - function () { ES.ArraySpeciesCreate([], nonInteger); }, - TypeError, - debug(nonInteger) + ' is not an integer' - ); - }; - forEach(v.nonIntegerNumbers, testNonIntegers); - - st.end(); - }); - - t.test('works with a non-array', function (st) { - forEach(v.objects.concat(v.primitives), function (nonArray) { - var arr = ES.ArraySpeciesCreate(nonArray, 0); - st.ok(ES.IsArray(arr), 'is an array'); - st.equal(arr.length, 0, 'length is correct'); - st.equal(arr.constructor, Array, 'constructor is correct'); - }); - - st.end(); - }); - - t.test('works with a normal array', function (st) { - var len = 2; - var orig = [1, 2, 3]; - var arr = ES.ArraySpeciesCreate(orig, len); - - st.ok(ES.IsArray(arr), 'is an array'); - st.equal(arr.length, len, 'length is correct'); - st.equal(arr.constructor, orig.constructor, 'constructor is correct'); - - st.end(); - }); - - t.test('-0 length produces +0 length', function (st) { - var len = -0; - st.ok(is(len, -0), '-0 is negative zero'); - st.notOk(is(len, 0), '-0 is not positive zero'); - - var orig = [1, 2, 3]; - var arr = ES.ArraySpeciesCreate(orig, len); - - st.equal(ES.IsArray(arr), true); - st.ok(is(arr.length, 0)); - st.equal(arr.constructor, orig.constructor); - - st.end(); - }); - - t.test('works with species construtor', { skip: !hasSpecies }, function (st) { - var sentinel = {}; - var Foo = function Foo(len) { - this.length = len; - this.sentinel = sentinel; - }; - var Bar = getArraySubclassWithSpeciesConstructor(Foo); - var bar = new Bar(); - - t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Foo, 'result used species constructor'); - st.equal(arr.length, 3, 'length property is correct'); - st.equal(arr.sentinel, sentinel, 'Foo constructor was exercised'); - - st.end(); - }); - - t.test('works with null species constructor', { skip: !hasSpecies }, function (st) { - var Bar = getArraySubclassWithSpeciesConstructor(null); - var bar = new Bar(); - - t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Array, 'result used default constructor'); - st.equal(arr.length, 3, 'length property is correct'); - - st.end(); - }); - - t.test('works with undefined species constructor', { skip: !hasSpecies }, function (st) { - var Bar = getArraySubclassWithSpeciesConstructor(); - var bar = new Bar(); - - t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Array, 'result used default constructor'); - st.equal(arr.length, 3, 'length property is correct'); - - st.end(); - }); - - t.test('throws with object non-construtor species constructor', { skip: !hasSpecies }, function (st) { - forEach(v.objects, function (obj) { - var Bar = getArraySubclassWithSpeciesConstructor(obj); - var bar = new Bar(); - - st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - st['throws']( - function () { ES.ArraySpeciesCreate(bar, 3); }, - TypeError, - debug(obj) + ' is not a constructor' - ); - }); - - st.end(); - }); - - t.end(); - }); - - test('CreateDataProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateDataProperty(primitive); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateDataProperty({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a property key' - ); - }); - - var sentinel = {}; - forEach(v.propertyKeys, function (propertyKey) { - var obj = {}; - var status = ES.CreateDataProperty(obj, propertyKey, sentinel); - t.equal(status, true, 'status is true'); - t.equal( - obj[propertyKey], - sentinel, - debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' - ); - - if (typeof Object.defineProperty === 'function') { - var nonWritable = Object.defineProperty({}, propertyKey, { configurable: true, writable: false }); - - var nonWritableStatus = ES.CreateDataProperty(nonWritable, propertyKey, sentinel); - t.equal(nonWritableStatus, false, 'create data property failed'); - t.notEqual( - nonWritable[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonwritable' - ); - - var nonConfigurable = Object.defineProperty({}, propertyKey, { configurable: false, writable: true }); - - var nonConfigurableStatus = ES.CreateDataProperty(nonConfigurable, propertyKey, sentinel); - t.equal(nonConfigurableStatus, false, 'create data property failed'); - t.notEqual( - nonConfigurable[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonconfigurable' - ); - } - }); - - t.end(); - }); - - test('CreateDataPropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateDataPropertyOrThrow(primitive); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateDataPropertyOrThrow({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a property key' - ); - }); - - var sentinel = {}; - forEach(v.propertyKeys, function (propertyKey) { - var obj = {}; - var status = ES.CreateDataPropertyOrThrow(obj, propertyKey, sentinel); - t.equal(status, true, 'status is true'); - t.equal( - obj[propertyKey], - sentinel, - debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' - ); - - if (typeof Object.preventExtensions === 'function') { - var notExtensible = {}; - Object.preventExtensions(notExtensible); - - t['throws']( - function () { ES.CreateDataPropertyOrThrow(notExtensible, propertyKey, sentinel); }, - TypeError, - 'can not install ' + debug(propertyKey) + ' on non-extensible object' - ); - t.notEqual( - notExtensible[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object' - ); - } - }); - - t.end(); - }); - - test('ObjectCreate', function (t) { - forEach(v.nonNullPrimitives, function (value) { - t['throws']( - function () { ES.ObjectCreate(value); }, - TypeError, - debug(value) + ' is not null, or an object' - ); - }); - - t.test('proto arg', function (st) { - var Parent = function Parent() {}; - Parent.prototype.foo = {}; - var child = ES.ObjectCreate(Parent.prototype); - st.equal(child instanceof Parent, true, 'child is instanceof Parent'); - st.equal(child.foo, Parent.prototype.foo, 'child inherits properties from Parent.prototype'); - - st.end(); - }); - - t.test('internal slots arg', function (st) { - st.doesNotThrow(function () { ES.ObjectCreate(null, []); }, 'an empty slot list is valid'); - - st['throws']( - function () { ES.ObjectCreate(null, ['a']); }, - SyntaxError, - 'internal slots are not supported' - ); - - st.end(); - }); - - t.test('null proto', { skip: !Object.create }, function (st) { - st.equal('toString' in ({}), true, 'normal objects have toString'); - st.equal('toString' in ES.ObjectCreate(null), false, 'makes a null object'); - - st.end(); - }); - - t.test('null proto when no native Object.create', { skip: Object.create }, function (st) { - st['throws']( - function () { ES.ObjectCreate(null); }, - SyntaxError, - 'without a native Object.create, can not create null objects' - ); - - st.end(); - }); - - t.end(); - }); - - test('AdvanceStringIndex', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.AdvanceStringIndex(nonString); }, - TypeError, - '"S" argument must be a String; ' + debug(nonString) + ' is not' - ); - }); - - var notInts = v.nonNumbers.concat( - v.nonIntegerNumbers, - [Infinity, -Infinity, NaN, [], new Date(), Math.pow(2, 53), -1] - ); - forEach(notInts, function (nonInt) { - t['throws']( - function () { ES.AdvanceStringIndex('abc', nonInt); }, - TypeError, - '"index" argument must be an integer, ' + debug(nonInt) + ' is not.' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.AdvanceStringIndex('abc', 0, nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - var str = 'a\uD83D\uDCA9c'; - - t.test('non-unicode mode', function (st) { - for (var i = 0; i < str.length + 2; i += 1) { - st.equal(ES.AdvanceStringIndex(str, i, false), i + 1, i + ' advances to ' + (i + 1)); - } - - st.end(); - }); - - t.test('unicode mode', function (st) { - st.equal(ES.AdvanceStringIndex(str, 0, true), 1, '0 advances to 1'); - st.equal(ES.AdvanceStringIndex(str, 1, true), 3, '1 advances to 3'); - st.equal(ES.AdvanceStringIndex(str, 2, true), 3, '2 advances to 3'); - st.equal(ES.AdvanceStringIndex(str, 3, true), 4, '3 advances to 4'); - st.equal(ES.AdvanceStringIndex(str, 4, true), 5, '4 advances to 5'); - - st.end(); - }); - - t.test('lone surrogates', function (st) { - var halfPoo = 'a\uD83Dc'; - - st.equal(ES.AdvanceStringIndex(halfPoo, 0, true), 1, '0 advances to 1'); - st.equal(ES.AdvanceStringIndex(halfPoo, 1, true), 2, '1 advances to 2'); - st.equal(ES.AdvanceStringIndex(halfPoo, 2, true), 3, '2 advances to 3'); - st.equal(ES.AdvanceStringIndex(halfPoo, 3, true), 4, '3 advances to 4'); - - st.end(); - }); - - t.test('surrogate pairs', function (st) { - var lowestPair = String.fromCharCode('0xD800') + String.fromCharCode('0xDC00'); - var highestPair = String.fromCharCode('0xDBFF') + String.fromCharCode('0xDFFF'); - var poop = String.fromCharCode('0xD83D') + String.fromCharCode('0xDCA9'); - - st.equal(ES.AdvanceStringIndex(lowestPair, 0, true), 2, 'lowest surrogate pair, 0 -> 2'); - st.equal(ES.AdvanceStringIndex(highestPair, 0, true), 2, 'highest surrogate pair, 0 -> 2'); - st.equal(ES.AdvanceStringIndex(poop, 0, true), 2, 'poop, 0 -> 2'); - - st.end(); - }); - - t.end(); - }); - - test('CreateMethodProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateMethodProperty(primitive, 'key'); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateMethodProperty({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = {}; - var key = 'the key'; - var value = { foo: 'bar' }; - - st.equal(ES.CreateMethodProperty(obj, key, value), true, 'defines property successfully'); - st.test('property descriptor', { skip: !Object.getOwnPropertyDescriptor }, function (s2t) { - s2t.deepEqual( - Object.getOwnPropertyDescriptor(obj, key), - { - configurable: true, - enumerable: false, - value: value, - writable: true - }, - 'sets the correct property descriptor' - ); - - s2t.end(); - }); - st.equal(obj[key], value, 'sets the correct value'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { ES.CreateMethodProperty(obj, 'foo', { value: 'baz' }); }, - TypeError, - 'nonconfigurable key can not be defined' - ); - - st.end(); - }); - - var hasNonConfigurableFunctionName = !Object.getOwnPropertyDescriptor - || !Object.getOwnPropertyDescriptor(function () {}, 'name').configurable; - t.test('fails as expected on a function with a nonconfigurable name', { skip: !hasNonConfigurableFunctionName }, function (st) { - st['throws']( - function () { ES.CreateMethodProperty(function () {}, 'name', { value: 'baz' }); }, - TypeError, - 'nonconfigurable function name can not be defined' - ); - st.end(); - }); - - t.end(); - }); - - test('DefinePropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.DefinePropertyOrThrow(primitive, 'key', {}); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.DefinePropertyOrThrow({}, nonPropertyKey, {}); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = {}; - var key = 'the key'; - var descriptor = { - configurable: true, - enumerable: false, - value: { foo: 'bar' }, - writable: true - }; - - st.equal(ES.DefinePropertyOrThrow(obj, key, descriptor), true, 'defines property successfully'); - st.test('property descriptor', { skip: !Object.getOwnPropertyDescriptor }, function (s2t) { - s2t.deepEqual( - Object.getOwnPropertyDescriptor(obj, key), - descriptor, - 'sets the correct property descriptor' - ); - - s2t.end(); - }); - st.deepEqual(obj[key], descriptor.value, 'sets the correct value'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { - ES.DefinePropertyOrThrow(obj, 'foo', { configurable: true, value: 'baz' }); - }, - TypeError, - 'nonconfigurable key can not be defined' - ); - - st.end(); - }); - - var hasNonConfigurableFunctionName = !Object.getOwnPropertyDescriptor - || !Object.getOwnPropertyDescriptor(function () {}, 'name').configurable; - t.test('fails as expected on a function with a nonconfigurable name', { skip: !hasNonConfigurableFunctionName }, function (st) { - st['throws']( - function () { - ES.DefinePropertyOrThrow(function () {}, 'name', { configurable: true, value: 'baz' }); - }, - TypeError, - 'nonconfigurable function name can not be defined' - ); - st.end(); - }); - - t.end(); - }); - - test('DeletePropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.DeletePropertyOrThrow(primitive, 'key', {}); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.DeletePropertyOrThrow({}, nonPropertyKey, {}); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = { 'the key': 42 }; - var key = 'the key'; - - st.equal(ES.DeletePropertyOrThrow(obj, key), true, 'deletes property successfully'); - st.equal(key in obj, false, 'key is no longer in the object'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { ES.DeletePropertyOrThrow(obj, 'foo'); }, - TypeError, - 'nonconfigurable key can not be deleted' - ); - - st.end(); - }); - - var hasNonConfigurableFunctionName = !Object.getOwnPropertyDescriptor - || !Object.getOwnPropertyDescriptor(function () {}, 'name').configurable; - t.test('fails as expected on a function with a nonconfigurable name', { skip: !hasNonConfigurableFunctionName }, function (st) { - st['throws']( - function () { ES.DeletePropertyOrThrow(function () {}, 'name'); }, - TypeError, - 'nonconfigurable function name can not be deleted' - ); - st.end(); - }); - - t.end(); - }); - - test('EnumerableOwnNames', { skip: skips && skips.EnumerableOwnNames }, function (t) { - var obj = testEnumerableOwnNames(t, function (O) { return ES.EnumerableOwnNames(O); }); - - t.deepEqual( - ES.EnumerableOwnNames(obj), - ['own'], - 'returns enumerable own names' - ); - - t.end(); - }); - - test('thisNumberValue', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.thisNumberValue(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.numbers, function (number) { - t.equal(ES.thisNumberValue(number), number, debug(number) + ' is its own thisNumberValue'); - var obj = Object(number); - t.equal(ES.thisNumberValue(obj), number, debug(obj) + ' is the boxed thisNumberValue'); - }); - - t.end(); - }); - - test('thisBooleanValue', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.thisBooleanValue(nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach(v.booleans, function (boolean) { - t.equal(ES.thisBooleanValue(boolean), boolean, debug(boolean) + ' is its own thisBooleanValue'); - var obj = Object(boolean); - t.equal(ES.thisBooleanValue(obj), boolean, debug(obj) + ' is the boxed thisBooleanValue'); - }); - - t.end(); - }); - - test('thisStringValue', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.thisStringValue(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - forEach(v.strings, function (string) { - t.equal(ES.thisStringValue(string), string, debug(string) + ' is its own thisStringValue'); - var obj = Object(string); - t.equal(ES.thisStringValue(obj), string, debug(obj) + ' is the boxed thisStringValue'); - }); - - t.end(); - }); - - test('thisTimeValue', function (t) { - forEach(v.primitives.concat(v.objects), function (nonDate) { - t['throws']( - function () { ES.thisTimeValue(nonDate); }, - TypeError, - debug(nonDate) + ' is not a Date' - ); - }); - - forEach(v.timestamps, function (timestamp) { - var date = new Date(timestamp); - - t.equal(ES.thisTimeValue(date), timestamp, debug(date) + ' is its own thisTimeValue'); - }); - - t.end(); - }); -}; - -var es2016 = function ES2016(ES, ops, expectedMissing, skips) { - es2015(ES, ops, expectedMissing, skips); - - test('SameValueNonNumber', function (t) { - var willThrow = [ - [3, 4], - [NaN, 4], - [4, ''], - ['abc', true], - [{}, false] - ]; - forEach(willThrow, function (nums) { - t['throws'](function () { return ES.SameValueNonNumber.apply(ES, nums); }, TypeError, 'value must be same type and non-number'); - }); - - forEach(v.objects.concat(v.nonNumberPrimitives), function (val) { - t.equal(val === val, ES.SameValueNonNumber(val, val), debug(val) + ' is SameValueNonNumber to itself'); - }); - - t.end(); - }); -}; - -var es2017 = function ES2017(ES, ops, expectedMissing, skips) { - es2016(ES, ops, expectedMissing, assign({}, skips, { - EnumerableOwnNames: true - })); - - test('ToIndex', function (t) { - t.ok(is(ES.ToIndex(), 0), 'no value gives 0'); - t.ok(is(ES.ToIndex(undefined), 0), 'undefined value gives 0'); - - t['throws'](function () { ES.ToIndex(-1); }, RangeError, 'negative numbers throw'); - - t['throws'](function () { ES.ToIndex(MAX_SAFE_INTEGER + 1); }, RangeError, 'too large numbers throw'); - - t.equal(ES.ToIndex(3), 3, 'numbers work'); - t.equal(ES.ToIndex(v.valueOfOnlyObject), 4, 'coercible objects are coerced'); - - t.end(); - }); - - test('EnumerableOwnProperties', { skip: skips && skips.EnumerableOwnProperties }, function (t) { - var obj = testEnumerableOwnNames(t, function (O) { - return ES.EnumerableOwnProperties(O, 'key'); - }); - - t.deepEqual( - ES.EnumerableOwnProperties(obj, 'value'), - [obj.own], - 'returns enumerable own values' - ); - - t.deepEqual( - ES.EnumerableOwnProperties(obj, 'key+value'), - [['own', obj.own]], - 'returns enumerable own entries' - ); - - t.end(); - }); -}; - -var es2018 = function ES2018(ES, ops, expectedMissing, skips) { - es2017(ES, ops, expectedMissing, assign({}, skips, { - EnumerableOwnProperties: true, - IsPropertyDescriptor: true - })); - - test('thisSymbolValue', function (t) { - forEach(v.nonSymbolPrimitives.concat(v.objects), function (nonSymbol) { - t['throws']( - function () { ES.thisSymbolValue(nonSymbol); }, - v.hasSymbols ? TypeError : SyntaxError, - debug(nonSymbol) + ' is not a Symbol' - ); - }); - - t.test('no native Symbols', { skip: v.hasSymbols }, function (st) { - forEach(v.objects.concat(v.primitives), function (value) { - st['throws']( - function () { ES.thisSymbolValue(value); }, - SyntaxError, - 'Symbols are not supported' - ); - }); - st.end(); - }); - - t.test('symbol values', { skip: !v.hasSymbols }, function (st) { - forEach(v.symbols, function (symbol) { - st.equal(ES.thisSymbolValue(symbol), symbol, 'Symbol value of ' + debug(symbol) + ' is same symbol'); - - st.equal( - ES.thisSymbolValue(Object(symbol)), - symbol, - 'Symbol value of ' + debug(Object(symbol)) + ' is ' + debug(symbol) - ); - }); - - st.end(); - }); - - t.end(); - }); - - test('IsStringPrefix', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.IsStringPrefix(nonString, 'a'); }, - TypeError, - 'first arg: ' + debug(nonString) + ' is not a string' - ); - t['throws']( - function () { ES.IsStringPrefix('a', nonString); }, - TypeError, - 'second arg: ' + debug(nonString) + ' is not a string' - ); - }); - - forEach(v.strings, function (string) { - t.equal(ES.IsStringPrefix(string, string), true, debug(string) + ' is a prefix of itself'); - - t.equal(ES.IsStringPrefix('', string), true, 'the empty string is a prefix of everything'); - }); - - t.equal(ES.IsStringPrefix('abc', 'abcd'), true, '"abc" is a prefix of "abcd"'); - t.equal(ES.IsStringPrefix('abcd', 'abc'), false, '"abcd" is not a prefix of "abc"'); - - t.equal(ES.IsStringPrefix('a', 'bc'), false, '"a" is not a prefix of "bc"'); - - t.end(); - }); - - test('NumberToString', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.NumberToString(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.numbers, function (number) { - t.equal(ES.NumberToString(number), String(number), debug(number) + ' stringifies to ' + number); - }); - - t.end(); - }); - - test('CopyDataProperties', function (t) { - t.test('first argument: target', function (st) { - forEach(v.primitives, function (primitive) { - st['throws']( - function () { ES.CopyDataProperties(primitive, {}, []); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - st.end(); - }); - - t.test('second argument: source', function (st) { - var frozenTarget = Object.freeze ? Object.freeze({}) : {}; - forEach(v.nullPrimitives, function (nullish) { - st.equal( - ES.CopyDataProperties(frozenTarget, nullish, []), - frozenTarget, - debug(nullish) + ' "source" yields identical, unmodified target' - ); - }); - - forEach(v.nonNullPrimitives, function (objectCoercible) { - var target = {}; - var result = ES.CopyDataProperties(target, objectCoercible, []); - st.equal(result, target, 'result === target'); - st.deepEqual(keys(result), keys(Object(objectCoercible)), 'target ends up with keys of ' + debug(objectCoercible)); - }); - - st.end(); - }); - - t.test('third argument: excludedItems', function (st) { - forEach(v.objects.concat(v.primitives), function (nonArray) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, nonArray); }, - TypeError, - debug(nonArray) + ' is not an Array' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, [nonPropertyKey]); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - var result = ES.CopyDataProperties({}, { a: 1, b: 2, c: 3 }, ['b']); - st.deepEqual(keys(result), ['a', 'c'], 'excluded string keys are excluded'); - - st.test('excluding symbols', { skip: !v.hasSymbols }, function (s2t) { - var source = {}; - forEach(v.symbols, function (symbol) { - source[symbol] = true; - }); - - var includedSymbols = v.symbols.slice(1); - var excludedSymbols = v.symbols.slice(0, 1); - var target = ES.CopyDataProperties({}, source, excludedSymbols); - - forEach(includedSymbols, function (symbol) { - s2t.equal(has(target, symbol), true, debug(symbol) + ' is included'); - }); - - forEach(excludedSymbols, function (symbol) { - s2t.equal(has(target, symbol), false, debug(symbol) + ' is excluded'); - }); - - s2t.end(); - }); - - st.end(); - }); - - t.end(); - }); - - test('PromiseResolve', function (t) { - t.test('Promises unsupported', { skip: typeof Promise === 'function' }, function (st) { - st['throws']( - function () { ES.PromiseResolve(); }, - SyntaxError, - 'Promises are not supported' - ); - st.end(); - }); - - t.test('Promises supported', { skip: typeof Promise !== 'function' }, function (st) { - st.plan(2); - - var a = {}; - var b = {}; - var fulfilled = Promise.resolve(a); - var rejected = Promise.reject(b); - - ES.PromiseResolve(Promise, fulfilled).then(function (x) { - st.equal(x, a, 'fulfilled promise resolves to fulfilled'); - }); - - ES.PromiseResolve(Promise, rejected)['catch'](function (e) { - st.equal(e, b, 'rejected promise resolves to rejected'); - }); - }); - - t.end(); - }); - - test('EnumerableOwnPropertyNames', { skip: skips && skips.EnumerableOwnPropertyNames }, function (t) { - var obj = testEnumerableOwnNames(t, function (O) { - return ES.EnumerableOwnPropertyNames(O, 'key'); - }); - - t.deepEqual( - ES.EnumerableOwnPropertyNames(obj, 'value'), - [obj.own], - 'returns enumerable own values' - ); - - t.deepEqual( - ES.EnumerableOwnPropertyNames(obj, 'key+value'), - [['own', obj.own]], - 'returns enumerable own entries' - ); - - t.end(); - }); -}; - -module.exports = { - es2015: es2015, - es2016: es2016, - es2017: es2017, - es2018: es2018 -}; diff --git a/node_modules/es-to-primitive/.editorconfig b/node_modules/es-to-primitive/.editorconfig deleted file mode 100644 index bc228f82..00000000 --- a/node_modules/es-to-primitive/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/es-to-primitive/.eslintrc b/node_modules/es-to-primitive/.eslintrc deleted file mode 100644 index 09e0c6c2..00000000 --- a/node_modules/es-to-primitive/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 14], - "func-name-matching": 0, - "id-length": [2, { "min": 1, "max": 24, "properties": "never" }], - "max-lines-per-function": [2, { "max": 68 }], - "max-statements": [2, 20], - "new-cap": [2, { "capIsNewExceptions": ["GetMethod"] }] - } -} diff --git a/node_modules/es-to-primitive/.jscs.json b/node_modules/es-to-primitive/.jscs.json deleted file mode 100644 index 8666c750..00000000 --- a/node_modules/es-to-primitive/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 12 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": false, - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array", "GetMethod"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/es-to-primitive/.travis.yml b/node_modules/es-to-primitive/.travis.yml deleted file mode 100644 index c9ee1ece..00000000 --- a/node_modules/es-to-primitive/.travis.yml +++ /dev/null @@ -1,243 +0,0 @@ -language: node_js -cache: - directories: - - "$(nvm cache dir)" -os: - - linux -node_js: - - "10.11" - - "9.11" - - "8.12" - - "7.10" - - "6.14" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.11" - - "0.10" - - "0.8" - - "0.6" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true - - node_js: "0.6" diff --git a/node_modules/es-to-primitive/CHANGELOG.md b/node_modules/es-to-primitive/CHANGELOG.md deleted file mode 100644 index 96298696..00000000 --- a/node_modules/es-to-primitive/CHANGELOG.md +++ /dev/null @@ -1,38 +0,0 @@ -1.2.0 / 2018-09-27 -================= - * [New] create ES2015 entry point/property, to replace ES6 - * [Fix] Ensure optional arguments are not part of the length (#29) - * [Deps] update `is-callable` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `object-inspect`, `replace` - * [Tests] avoid util.inspect bug with `new Date(NaN)` on node v6.0 and v6.1. - * [Tests] up to `node` `v10.11`, `v9.11`, `v8.12`, `v6.14`, `v4.9` - -1.1.1 / 2016-01-03 -================= - * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) - -1.1.0 / 2015-12-27 -================= - * [New] add `Symbol.toPrimitive` support - * [Deps] update `is-callable`, `is-date-object` - * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` - * [Dev Deps] remove unused deps - * [Tests] up to `node` `v5.3` - * [Tests] fix npm upgrades on older node versions - * [Tests] fix testling - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - -1.0.1 / 2016-01-03 -================= - * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) - * [Deps] update `is-callable`, `is-date-object` - * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` - * [Dev Deps] remove unused deps - * [Tests] up to `node` `v5.3` - * [Tests] fix npm upgrades on older node versions - * [Tests] fix testling - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - -1.0.0 / 2015-03-19 -================= - * Initial release. diff --git a/node_modules/es-to-primitive/LICENSE b/node_modules/es-to-primitive/LICENSE deleted file mode 100644 index b43df444..00000000 --- a/node_modules/es-to-primitive/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -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/es-to-primitive/Makefile b/node_modules/es-to-primitive/Makefile deleted file mode 100644 index b9e4fe1a..00000000 --- a/node_modules/es-to-primitive/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/es-to-primitive/README.md b/node_modules/es-to-primitive/README.md deleted file mode 100644 index 1831ecf3..00000000 --- a/node_modules/es-to-primitive/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# es-to-primitive [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions. -When different versions of the spec conflict, the default export will be the latest version of the abstract operation. -Alternative versions will also be available under an `es5`/`es2015` exported property if you require a specific version. - -## Example - -```js -var toPrimitive = require('es-to-primitive'); -var assert = require('assert'); - -assert(toPrimitive(function () {}) === String(function () {})); - -var date = new Date(); -assert(toPrimitive(date) === String(date)); - -assert(toPrimitive({ valueOf: function () { return 3; } }) === 3); - -assert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3])); - -var sym = Symbol(); -assert(toPrimitive(Object(sym)) === sym); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/es-to-primitive -[npm-version-svg]: http://versionbadg.es/ljharb/es-to-primitive.svg -[travis-svg]: https://travis-ci.org/ljharb/es-to-primitive.svg -[travis-url]: https://travis-ci.org/ljharb/es-to-primitive -[deps-svg]: https://david-dm.org/ljharb/es-to-primitive.svg -[deps-url]: https://david-dm.org/ljharb/es-to-primitive -[dev-deps-svg]: https://david-dm.org/ljharb/es-to-primitive/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-to-primitive#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/es-to-primitive.png -[testling-url]: https://ci.testling.com/ljharb/es-to-primitive -[npm-badge-png]: https://nodei.co/npm/es-to-primitive.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/es-to-primitive.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/es-to-primitive.svg -[downloads-url]: http://npm-stat.com/charts.html?package=es-to-primitive diff --git a/node_modules/es-to-primitive/es2015.js b/node_modules/es-to-primitive/es2015.js deleted file mode 100644 index 4a11a346..00000000 --- a/node_modules/es-to-primitive/es2015.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; - -var isPrimitive = require('./helpers/isPrimitive'); -var isCallable = require('is-callable'); -var isDate = require('is-date-object'); -var isSymbol = require('is-symbol'); - -var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { - if (typeof O === 'undefined' || O === null) { - throw new TypeError('Cannot call method on ' + O); - } - if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { - throw new TypeError('hint must be "string" or "number"'); - } - var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; - var method, result, i; - for (i = 0; i < methodNames.length; ++i) { - method = O[methodNames[i]]; - if (isCallable(method)) { - result = method.call(O); - if (isPrimitive(result)) { - return result; - } - } - } - throw new TypeError('No default value'); -}; - -var GetMethod = function GetMethod(O, P) { - var func = O[P]; - if (func !== null && typeof func !== 'undefined') { - if (!isCallable(func)) { - throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); - } - return func; - } - return void 0; -}; - -// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive -module.exports = function ToPrimitive(input) { - if (isPrimitive(input)) { - return input; - } - var hint = 'default'; - if (arguments.length > 1) { - if (arguments[1] === String) { - hint = 'string'; - } else if (arguments[1] === Number) { - hint = 'number'; - } - } - - var exoticToPrim; - if (hasSymbols) { - if (Symbol.toPrimitive) { - exoticToPrim = GetMethod(input, Symbol.toPrimitive); - } else if (isSymbol(input)) { - exoticToPrim = Symbol.prototype.valueOf; - } - } - if (typeof exoticToPrim !== 'undefined') { - var result = exoticToPrim.call(input, hint); - if (isPrimitive(result)) { - return result; - } - throw new TypeError('unable to convert exotic object to primitive'); - } - if (hint === 'default' && (isDate(input) || isSymbol(input))) { - hint = 'string'; - } - return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); -}; diff --git a/node_modules/es-to-primitive/es5.js b/node_modules/es-to-primitive/es5.js deleted file mode 100644 index 602aa362..00000000 --- a/node_modules/es-to-primitive/es5.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -var toStr = Object.prototype.toString; - -var isPrimitive = require('./helpers/isPrimitive'); - -var isCallable = require('is-callable'); - -// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8 -var ES5internalSlots = { - '[[DefaultValue]]': function (O) { - var actualHint; - if (arguments.length > 1) { - actualHint = arguments[1]; - } else { - actualHint = toStr.call(O) === '[object Date]' ? String : Number; - } - - if (actualHint === String || actualHint === Number) { - var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString']; - var value, i; - for (i = 0; i < methods.length; ++i) { - if (isCallable(O[methods[i]])) { - value = O[methods[i]](); - if (isPrimitive(value)) { - return value; - } - } - } - throw new TypeError('No default value'); - } - throw new TypeError('invalid [[DefaultValue]] hint supplied'); - } -}; - -// http://ecma-international.org/ecma-262/5.1/#sec-9.1 -module.exports = function ToPrimitive(input) { - if (isPrimitive(input)) { - return input; - } - if (arguments.length > 1) { - return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]); - } - return ES5internalSlots['[[DefaultValue]]'](input); -}; diff --git a/node_modules/es-to-primitive/es6.js b/node_modules/es-to-primitive/es6.js deleted file mode 100644 index 2d1f4dc9..00000000 --- a/node_modules/es-to-primitive/es6.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./es2015'); diff --git a/node_modules/es-to-primitive/helpers/isPrimitive.js b/node_modules/es-to-primitive/helpers/isPrimitive.js deleted file mode 100644 index 36691564..00000000 --- a/node_modules/es-to-primitive/helpers/isPrimitive.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function isPrimitive(value) { - return value === null || (typeof value !== 'function' && typeof value !== 'object'); -}; diff --git a/node_modules/es-to-primitive/index.js b/node_modules/es-to-primitive/index.js deleted file mode 100644 index e60d912e..00000000 --- a/node_modules/es-to-primitive/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var ES5 = require('./es5'); -var ES6 = require('./es6'); -var ES2015 = require('./es2015'); - -if (Object.defineProperty) { - Object.defineProperty(ES2015, 'ES5', { enumerable: false, value: ES5 }); - Object.defineProperty(ES2015, 'ES6', { enumerable: false, value: ES6 }); - Object.defineProperty(ES2015, 'ES2015', { enumerable: false, value: ES2015 }); -} else { - ES6.ES5 = ES5; - ES6.ES6 = ES6; - ES6.ES2015 = ES2015; -} - -module.exports = ES2015; diff --git a/node_modules/es-to-primitive/package.json b/node_modules/es-to-primitive/package.json deleted file mode 100644 index a5aea41d..00000000 --- a/node_modules/es-to-primitive/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_args": [ - [ - "es-to-primitive@1.2.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "es-to-primitive@1.2.0", - "_id": "es-to-primitive@1.2.0", - "_inBundle": false, - "_integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "_location": "/es-to-primitive", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "es-to-primitive@1.2.0", - "name": "es-to-primitive", - "escapedName": "es-to-primitive", - "rawSpec": "1.2.0", - "saveSpec": null, - "fetchSpec": "1.2.0" - }, - "_requiredBy": [ - "/es-abstract" - ], - "_resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "_spec": "1.2.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/es-to-primitive/issues" - }, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.", - "devDependencies": { - "@ljharb/eslint-config": "^13.0.0", - "covert": "^1.1.0", - "eslint": "^5.6.0", - "foreach": "^2.0.5", - "function.prototype.name": "^1.1.0", - "jscs": "^3.0.7", - "nsp": "^3.2.1", - "object-inspect": "^1.6.0", - "object-is": "^1.0.1", - "replace": "^1.0.0", - "semver": "^5.5.1", - "tape": "^4.9.1" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/es-to-primitive#readme", - "keywords": [ - "primitive", - "abstract", - "ecmascript", - "es5", - "es6", - "es2015", - "toPrimitive", - "coerce", - "type", - "object", - "string", - "number", - "boolean", - "symbol", - "null", - "undefined" - ], - "license": "MIT", - "main": "index.js", - "name": "es-to-primitive", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/es-to-primitive.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "eslint": "eslint test/*.js *.js", - "jscs": "jscs test/*.js *.js", - "lint": "npm run --silent jscs && npm run --silent eslint", - "posttest": "npm run --silent security", - "pretest": "npm run --silent lint", - "security": "nsp check", - "test": "npm run --silent tests-only", - "tests-only": "node --es-staging test" - }, - "testling": { - "files": "test", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.2.0" -} diff --git a/node_modules/es-to-primitive/test/.eslintrc b/node_modules/es-to-primitive/test/.eslintrc deleted file mode 100644 index 9beb88c7..00000000 --- a/node_modules/es-to-primitive/test/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "max-statements-per-line": [2, { "max": 3 }], - "no-magic-numbers": [0], - "sort-keys": [0] - } -} diff --git a/node_modules/es-to-primitive/test/es2015.js b/node_modules/es-to-primitive/test/es2015.js deleted file mode 100644 index 80f4083d..00000000 --- a/node_modules/es-to-primitive/test/es2015.js +++ /dev/null @@ -1,151 +0,0 @@ -'use strict'; - -var test = require('tape'); -var toPrimitive = require('../es2015'); -var is = require('object-is'); -var forEach = require('foreach'); -var functionName = require('function.prototype.name'); -var debug = require('object-inspect'); - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; -var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; - -test('function properties', function (t) { - t.equal(toPrimitive.length, 1, 'length is 1'); - t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); - - t.end(); -}); - -var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; - -test('primitives', function (t) { - forEach(primitives, function (i) { - t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); - t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); - t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); - }); - t.end(); -}); - -test('Symbols', { skip: !hasSymbols }, function (t) { - var symbols = [ - Symbol('foo'), - Symbol.iterator, - Symbol['for']('foo') // eslint-disable-line no-restricted-properties - ]; - forEach(symbols, function (sym) { - t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); - t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); - t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); - }); - - var primitiveSym = Symbol('primitiveSym'); - var objectSym = Object(primitiveSym); - t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); - t.end(); -}); - -test('Arrays', function (t) { - var arrays = [[], ['a', 'b'], [1, 2]]; - forEach(arrays, function (arr) { - t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - }); - t.end(); -}); - -test('Dates', function (t) { - var dates = [new Date(), new Date(0), new Date(NaN)]; - forEach(dates, function (date) { - t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); - }); - t.end(); -}); - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; - -test('Objects', function (t) { - t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); - t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); - t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - - t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); - - t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); - - t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { - var overriddenObject = { toString: st.fail, valueOf: st.fail }; - overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; - - st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); - st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); - st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); - - var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; - nullToPrimitive[Symbol.toPrimitive] = null; - st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); - - st.test('exceptions', function (sst) { - var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - nonFunctionToPrimitive[Symbol.toPrimitive] = {}; - sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); - - var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { - return { toString: function () { return hint; } }; - }; - sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); - - var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; - sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); - - sst.end(); - }); - - st.end(); - }); - - t.test('exceptions', function (st) { - st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); - - st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); - st.end(); - }); - t.end(); -}); diff --git a/node_modules/es-to-primitive/test/es5.js b/node_modules/es-to-primitive/test/es5.js deleted file mode 100644 index 8b80ff5b..00000000 --- a/node_modules/es-to-primitive/test/es5.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict'; - -var test = require('tape'); -var toPrimitive = require('../es5'); -var is = require('object-is'); -var forEach = require('foreach'); -var functionName = require('function.prototype.name'); -var debug = require('object-inspect'); - -test('function properties', function (t) { - t.equal(toPrimitive.length, 1, 'length is 1'); - t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); - - t.end(); -}); - -var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; - -test('primitives', function (t) { - forEach(primitives, function (i) { - t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); - t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); - t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); - }); - t.end(); -}); - -test('Arrays', function (t) { - var arrays = [[], ['a', 'b'], [1, 2]]; - forEach(arrays, function (arr) { - t.ok(is(toPrimitive(arr), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); - t.equal(toPrimitive(arr, String), arr.toString(), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); - t.ok(is(toPrimitive(arr, Number), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); - }); - t.end(); -}); - -test('Dates', function (t) { - var dates = [new Date(), new Date(0), new Date(NaN)]; - forEach(dates, function (date) { - t.equal(toPrimitive(date), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); - t.equal(toPrimitive(date, String), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); - t.ok(is(toPrimitive(date, Number), date.valueOf()), 'toPrimitive(' + debug(date) + ') returns valueOf of the date'); - }); - t.end(); -}); - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; - -test('Objects', function (t) { - t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); - t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - - t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); - t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to toString'); - t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to toString'); - - t.ok(is(toPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); - t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - t.ok(is(toPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to Object#toString'); - - t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); - t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns toString'); - t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns toString'); - - t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); - - t.test('exceptions', function (st) { - st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); - - st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/es-to-primitive/test/es6.js b/node_modules/es-to-primitive/test/es6.js deleted file mode 100644 index c6df63fb..00000000 --- a/node_modules/es-to-primitive/test/es6.js +++ /dev/null @@ -1,151 +0,0 @@ -'use strict'; - -var test = require('tape'); -var toPrimitive = require('../es6'); -var is = require('object-is'); -var forEach = require('foreach'); -var functionName = require('function.prototype.name'); -var debug = require('object-inspect'); - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; -var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; - -test('function properties', function (t) { - t.equal(toPrimitive.length, 1, 'length is 1'); - t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); - - t.end(); -}); - -var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; - -test('primitives', function (t) { - forEach(primitives, function (i) { - t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); - t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); - t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); - }); - t.end(); -}); - -test('Symbols', { skip: !hasSymbols }, function (t) { - var symbols = [ - Symbol('foo'), - Symbol.iterator, - Symbol['for']('foo') // eslint-disable-line no-restricted-properties - ]; - forEach(symbols, function (sym) { - t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); - t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); - t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); - }); - - var primitiveSym = Symbol('primitiveSym'); - var objectSym = Object(primitiveSym); - t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); - t.end(); -}); - -test('Arrays', function (t) { - var arrays = [[], ['a', 'b'], [1, 2]]; - forEach(arrays, function (arr) { - t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - }); - t.end(); -}); - -test('Dates', function (t) { - var dates = [new Date(), new Date(0), new Date(NaN)]; - forEach(dates, function (date) { - t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); - }); - t.end(); -}); - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; - -test('Objects', function (t) { - t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); - t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); - t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - - t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); - - t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); - - t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { - var overriddenObject = { toString: st.fail, valueOf: st.fail }; - overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; - - st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); - st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); - st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); - - var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; - nullToPrimitive[Symbol.toPrimitive] = null; - st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); - - st.test('exceptions', function (sst) { - var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - nonFunctionToPrimitive[Symbol.toPrimitive] = {}; - sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); - - var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { - return { toString: function () { return hint; } }; - }; - sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); - - var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; - sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); - - sst.end(); - }); - - st.end(); - }); - - t.test('exceptions', function (st) { - st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); - - st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); - st.end(); - }); - t.end(); -}); diff --git a/node_modules/es-to-primitive/test/index.js b/node_modules/es-to-primitive/test/index.js deleted file mode 100644 index ad71f39e..00000000 --- a/node_modules/es-to-primitive/test/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var toPrimitive = require('../'); -var ES5 = require('../es5'); -var ES6 = require('../es6'); -var ES2015 = require('../es2015'); - -var test = require('tape'); - -test('default export', function (t) { - t.equal(toPrimitive, ES2015, 'default export is ES2015'); - t.equal(toPrimitive.ES5, ES5, 'ES5 property has ES5 method'); - t.equal(toPrimitive.ES6, ES6, 'ES6 property has ES6 method'); - t.equal(toPrimitive.ES2015, ES2015, 'ES2015 property has ES2015 method'); - t.end(); -}); - -require('./es5'); -require('./es6'); -require('./es2015'); diff --git a/node_modules/execa/index.js b/node_modules/execa/index.js deleted file mode 100644 index aad9ac88..00000000 --- a/node_modules/execa/index.js +++ /dev/null @@ -1,361 +0,0 @@ -'use strict'; -const path = require('path'); -const childProcess = require('child_process'); -const crossSpawn = require('cross-spawn'); -const stripEof = require('strip-eof'); -const npmRunPath = require('npm-run-path'); -const isStream = require('is-stream'); -const _getStream = require('get-stream'); -const pFinally = require('p-finally'); -const onExit = require('signal-exit'); -const errname = require('./lib/errname'); -const stdio = require('./lib/stdio'); - -const TEN_MEGABYTES = 1000 * 1000 * 10; - -function handleArgs(cmd, args, opts) { - let parsed; - - opts = Object.assign({ - extendEnv: true, - env: {} - }, opts); - - if (opts.extendEnv) { - opts.env = Object.assign({}, process.env, opts.env); - } - - if (opts.__winShell === true) { - delete opts.__winShell; - parsed = { - command: cmd, - args, - options: opts, - file: cmd, - original: { - cmd, - args - } - }; - } else { - parsed = crossSpawn._parse(cmd, args, opts); - } - - opts = Object.assign({ - maxBuffer: TEN_MEGABYTES, - buffer: true, - stripEof: true, - preferLocal: true, - localDir: parsed.options.cwd || process.cwd(), - encoding: 'utf8', - reject: true, - cleanup: true - }, parsed.options); - - opts.stdio = stdio(opts); - - if (opts.preferLocal) { - opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); - } - - if (opts.detached) { - // #115 - opts.cleanup = false; - } - - if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { - // #116 - parsed.args.unshift('/q'); - } - - return { - cmd: parsed.command, - args: parsed.args, - opts, - parsed - }; -} - -function handleInput(spawned, input) { - if (input === null || input === undefined) { - return; - } - - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -} - -function handleOutput(opts, val) { - if (val && opts.stripEof) { - val = stripEof(val); - } - - return val; -} - -function handleShell(fn, cmd, opts) { - let file = '/bin/sh'; - let args = ['-c', cmd]; - - opts = Object.assign({}, opts); - - if (process.platform === 'win32') { - opts.__winShell = true; - file = process.env.comspec || 'cmd.exe'; - args = ['/s', '/c', `"${cmd}"`]; - opts.windowsVerbatimArguments = true; - } - - if (opts.shell) { - file = opts.shell; - delete opts.shell; - } - - return fn(file, args, opts); -} - -function getStream(process, stream, {encoding, buffer, maxBuffer}) { - if (!process[stream]) { - return null; - } - - let ret; - - if (!buffer) { - // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 - ret = new Promise((resolve, reject) => { - process[stream] - .once('end', resolve) - .once('error', reject); - }); - } else if (encoding) { - ret = _getStream(process[stream], { - encoding, - maxBuffer - }); - } else { - ret = _getStream.buffer(process[stream], {maxBuffer}); - } - - return ret.catch(err => { - err.stream = stream; - err.message = `${stream} ${err.message}`; - throw err; - }); -} - -function makeError(result, options) { - const {stdout, stderr} = result; - - let err = result.error; - const {code, signal} = result; - - const {parsed, joinedCmd} = options; - const timedOut = options.timedOut || false; - - if (!err) { - let output = ''; - - if (Array.isArray(parsed.opts.stdio)) { - if (parsed.opts.stdio[2] !== 'inherit') { - output += output.length > 0 ? stderr : `\n${stderr}`; - } - - if (parsed.opts.stdio[1] !== 'inherit') { - output += `\n${stdout}`; - } - } else if (parsed.opts.stdio !== 'inherit') { - output = `\n${stderr}${stdout}`; - } - - err = new Error(`Command failed: ${joinedCmd}${output}`); - err.code = code < 0 ? errname(code) : code; - } - - err.stdout = stdout; - err.stderr = stderr; - err.failed = true; - err.signal = signal || null; - err.cmd = joinedCmd; - err.timedOut = timedOut; - - return err; -} - -function joinCmd(cmd, args) { - let joinedCmd = cmd; - - if (Array.isArray(args) && args.length > 0) { - joinedCmd += ' ' + args.join(' '); - } - - return joinedCmd; -} - -module.exports = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const {encoding, buffer, maxBuffer} = parsed.opts; - const joinedCmd = joinCmd(cmd, args); - - let spawned; - try { - spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); - } catch (err) { - return Promise.reject(err); - } - - let removeExitHandler; - if (parsed.opts.cleanup) { - removeExitHandler = onExit(() => { - spawned.kill(); - }); - } - - let timeoutId = null; - let timedOut = false; - - const cleanup = () => { - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = null; - } - - if (removeExitHandler) { - removeExitHandler(); - } - }; - - if (parsed.opts.timeout > 0) { - timeoutId = setTimeout(() => { - timeoutId = null; - timedOut = true; - spawned.kill(parsed.opts.killSignal); - }, parsed.opts.timeout); - } - - const processDone = new Promise(resolve => { - spawned.on('exit', (code, signal) => { - cleanup(); - resolve({code, signal}); - }); - - spawned.on('error', err => { - cleanup(); - resolve({error: err}); - }); - - if (spawned.stdin) { - spawned.stdin.on('error', err => { - cleanup(); - resolve({error: err}); - }); - } - }); - - function destroy() { - if (spawned.stdout) { - spawned.stdout.destroy(); - } - - if (spawned.stderr) { - spawned.stderr.destroy(); - } - } - - const handlePromise = () => pFinally(Promise.all([ - processDone, - getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), - getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) - ]).then(arr => { - const result = arr[0]; - result.stdout = arr[1]; - result.stderr = arr[2]; - - if (result.error || result.code !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed, - timedOut - }); - - // TODO: missing some timeout logic for killed - // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 - // err.killed = spawned.killed || killed; - err.killed = err.killed || spawned.killed; - - if (!parsed.opts.reject) { - return err; - } - - throw err; - } - - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - killed: false, - signal: null, - cmd: joinedCmd, - timedOut: false - }; - }), destroy); - - crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); - - handleInput(spawned, parsed.opts.input); - - spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); - spawned.catch = onrejected => handlePromise().catch(onrejected); - - return spawned; -}; - -// TODO: set `stderr: 'ignore'` when that option is implemented -module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); - -// TODO: set `stdout: 'ignore'` when that option is implemented -module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); - -module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); - -module.exports.sync = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const joinedCmd = joinCmd(cmd, args); - - if (isStream(parsed.opts.input)) { - throw new TypeError('The `input` option cannot be a stream in sync mode'); - } - - const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); - result.code = result.status; - - if (result.error || result.status !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed - }); - - if (!parsed.opts.reject) { - return err; - } - - throw err; - } - - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - signal: null, - cmd: joinedCmd, - timedOut: false - }; -}; - -module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); diff --git a/node_modules/execa/lib/errname.js b/node_modules/execa/lib/errname.js deleted file mode 100644 index e367837b..00000000 --- a/node_modules/execa/lib/errname.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -// Older verions of Node.js might not have `util.getSystemErrorName()`. -// In that case, fall back to a deprecated internal. -const util = require('util'); - -let uv; - -if (typeof util.getSystemErrorName === 'function') { - module.exports = util.getSystemErrorName; -} else { - try { - uv = process.binding('uv'); - - if (typeof uv.errname !== 'function') { - throw new TypeError('uv.errname is not a function'); - } - } catch (err) { - console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); - uv = null; - } - - module.exports = code => errname(uv, code); -} - -// Used for testing the fallback behavior -module.exports.__test__ = errname; - -function errname(uv, code) { - if (uv) { - return uv.errname(code); - } - - if (!(code < 0)) { - throw new Error('err >= 0'); - } - - return `Unknown system error ${code}`; -} - diff --git a/node_modules/execa/lib/stdio.js b/node_modules/execa/lib/stdio.js deleted file mode 100644 index a82d4683..00000000 --- a/node_modules/execa/lib/stdio.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; -const alias = ['stdin', 'stdout', 'stderr']; - -const hasAlias = opts => alias.some(x => Boolean(opts[x])); - -module.exports = opts => { - if (!opts) { - return null; - } - - if (opts.stdio && hasAlias(opts)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); - } - - if (typeof opts.stdio === 'string') { - return opts.stdio; - } - - const stdio = opts.stdio || []; - - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - - const result = []; - const len = Math.max(stdio.length, alias.length); - - for (let i = 0; i < len; i++) { - let value = null; - - if (stdio[i] !== undefined) { - value = stdio[i]; - } else if (opts[alias[i]] !== undefined) { - value = opts[alias[i]]; - } - - result[i] = value; - } - - return result; -}; diff --git a/node_modules/execa/license b/node_modules/execa/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/execa/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/execa/package.json b/node_modules/execa/package.json deleted file mode 100644 index 635b3427..00000000 --- a/node_modules/execa/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - "execa@1.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "execa@1.0.0", - "_id": "execa@1.0.0", - "_inBundle": false, - "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "_location": "/execa", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "execa@1.0.0", - "name": "execa", - "escapedName": "execa", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/os-locale" - ], - "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/execa/issues" - }, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "description": "A better `child_process`", - "devDependencies": { - "ava": "*", - "cat-names": "^1.0.2", - "coveralls": "^3.0.1", - "delay": "^3.0.0", - "is-running": "^2.0.0", - "nyc": "^13.0.1", - "tempfile": "^2.0.0", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "lib" - ], - "homepage": "https://github.com/sindresorhus/execa#readme", - "keywords": [ - "exec", - "child", - "process", - "execute", - "fork", - "execfile", - "spawn", - "file", - "shell", - "bin", - "binary", - "binaries", - "npm", - "path", - "local" - ], - "license": "MIT", - "name": "execa", - "nyc": { - "reporter": [ - "text", - "lcov" - ], - "exclude": [ - "**/fixtures/**", - "**/test.js", - "**/test/**" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/execa.git" - }, - "scripts": { - "test": "xo && nyc ava" - }, - "version": "1.0.0" -} diff --git a/node_modules/execa/readme.md b/node_modules/execa/readme.md deleted file mode 100644 index f3f533d9..00000000 --- a/node_modules/execa/readme.md +++ /dev/null @@ -1,327 +0,0 @@ -# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) - -> A better [`child_process`](https://nodejs.org/api/child_process.html) - - -## Why - -- Promise interface. -- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. -- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. -- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) -- Higher max buffer. 10 MB instead of 200 KB. -- [Executes locally installed binaries by name.](#preferlocal) -- [Cleans up spawned processes when the parent process dies.](#cleanup) - - -## Install - -``` -$ npm install execa -``` - - - - - - -## Usage - -```js -const execa = require('execa'); - -(async () => { - const {stdout} = await execa('echo', ['unicorns']); - console.log(stdout); - //=> 'unicorns' -})(); -``` - -Additional examples: - -```js -const execa = require('execa'); - -(async () => { - // Pipe the child process stdout to the current stdout - execa('echo', ['unicorns']).stdout.pipe(process.stdout); - - - // Run a shell command - const {stdout} = await execa.shell('echo unicorns'); - //=> 'unicorns' - - - // Catching an error - try { - await execa.shell('exit 3'); - } catch (error) { - console.log(error); - /* - { - message: 'Command failed: /bin/sh -c exit 3' - killed: false, - code: 3, - signal: null, - cmd: '/bin/sh -c exit 3', - stdout: '', - stderr: '', - timedOut: false - } - */ - } -})(); - -// Catching an error with a sync method -try { - execa.shellSync('exit 3'); -} catch (error) { - console.log(error); - /* - { - message: 'Command failed: /bin/sh -c exit 3' - code: 3, - signal: null, - cmd: '/bin/sh -c exit 3', - stdout: '', - stderr: '', - timedOut: false - } - */ -} -``` - - -## API - -### execa(file, [arguments], [options]) - -Execute a file. - -Think of this as a mix of `child_process.execFile` and `child_process.spawn`. - -Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. - -### execa.stdout(file, [arguments], [options]) - -Same as `execa()`, but returns only `stdout`. - -### execa.stderr(file, [arguments], [options]) - -Same as `execa()`, but returns only `stderr`. - -### execa.shell(command, [options]) - -Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. - -Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). - -The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. - -### execa.sync(file, [arguments], [options]) - -Execute a file synchronously. - -Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). - -This method throws an `Error` if the command fails. - -### execa.shellSync(file, [options]) - -Execute a command synchronously through the system shell. - -Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). - -### options - -Type: `Object` - -#### cwd - -Type: `string`
-Default: `process.cwd()` - -Current working directory of the child process. - -#### env - -Type: `Object`
-Default: `process.env` - -Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. - -#### extendEnv - -Type: `boolean`
-Default: `true` - -Set to `false` if you don't want to extend the environment variables when providing the `env` property. - -#### argv0 - -Type: `string` - -Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. - -#### stdio - -Type: `string[]` `string`
-Default: `pipe` - -Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. - -#### detached - -Type: `boolean` - -Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). - -#### uid - -Type: `number` - -Sets the user identity of the process. - -#### gid - -Type: `number` - -Sets the group identity of the process. - -#### shell - -Type: `boolean` `string`
-Default: `false` - -If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. - -#### stripEof - -Type: `boolean`
-Default: `true` - -[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. - -#### preferLocal - -Type: `boolean`
-Default: `true` - -Prefer locally installed binaries when looking for a binary to execute.
-If you `$ npm install foo`, you can then `execa('foo')`. - -#### localDir - -Type: `string`
-Default: `process.cwd()` - -Preferred path to find locally installed binaries in (use with `preferLocal`). - -#### input - -Type: `string` `Buffer` `stream.Readable` - -Write some input to the `stdin` of your binary.
-Streams are not allowed when using the synchronous methods. - -#### reject - -Type: `boolean`
-Default: `true` - -Setting this to `false` resolves the promise with the error instead of rejecting it. - -#### cleanup - -Type: `boolean`
-Default: `true` - -Keep track of the spawned process and `kill` it when the parent process exits. - -#### encoding - -Type: `string`
-Default: `utf8` - -Specify the character encoding used to decode the `stdout` and `stderr` output. - -#### timeout - -Type: `number`
-Default: `0` - -If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. - -#### buffer - -Type: `boolean`
-Default: `true` - -Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed. - -#### maxBuffer - -Type: `number`
-Default: `10000000` (10MB) - -Largest amount of data in bytes allowed on `stdout` or `stderr`. - -#### killSignal - -Type: `string` `number`
-Default: `SIGTERM` - -Signal value to be used when the spawned process will be killed. - -#### stdin - -Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe` - -Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). - -#### stdout - -Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe` - -Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). - -#### stderr - -Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe` - -Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). - -#### windowsVerbatimArguments - -Type: `boolean`
-Default: `false` - -If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`. - - -## Tips - -### Save and pipe output from a child process - -Let's say you want to show the output of a child process in real-time while also saving it to a variable. - -```js -const execa = require('execa'); -const getStream = require('get-stream'); - -const stream = execa('echo', ['foo']).stdout; - -stream.pipe(process.stdout); - -getStream(stream).then(value => { - console.log('child output:', value); -}); -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/fast-deep-equal/README.md b/node_modules/fast-deep-equal/README.md index 326bb2a5..d3f4ffcc 100644 --- a/node_modules/fast-deep-equal/README.md +++ b/node_modules/fast-deep-equal/README.md @@ -1,8 +1,8 @@ # fast-deep-equal -The fastest deep equal +The fastest deep equal with ES6 Map, Set and Typed arrays support. [![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal) -[![npm version](https://badge.fury.io/js/fast-deep-equal.svg)](http://badge.fury.io/js/fast-deep-equal) +[![npm](https://img.shields.io/npm/v/fast-deep-equal.svg)](https://www.npmjs.com/package/fast-deep-equal) [![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master) @@ -16,9 +16,14 @@ npm install fast-deep-equal ## Features - ES5 compatible -- works in node.js (0.10+) and browsers (IE9+) +- works in node.js (8+) and browsers (IE9+) - checks equality of Date and RegExp objects by value. +ES6 equal (`require('fast-deep-equal/es6')`) also supports: +- Maps +- Sets +- Typed arrays + ## Usage @@ -27,31 +32,64 @@ var equal = require('fast-deep-equal'); console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true ``` +To support ES6 Maps, Sets and Typed arrays equality use: + +```javascript +var equal = require('fast-deep-equal/es6'); +console.log(equal(Int16Array([1, 2]), Int16Array([1, 2]))); // true +``` + +To use with React (avoiding the traversal of React elements' _owner +property that contains circular references and is not needed when +comparing the elements - borrowed from [react-fast-compare](https://github.com/FormidableLabs/react-fast-compare)): + +```javascript +var equal = require('fast-deep-equal/react'); +var equal = require('fast-deep-equal/es6/react'); +``` + ## Performance benchmark -Node.js v9.11.1: +Node.js v12.6.0: ``` -fast-deep-equal x 226,960 ops/sec ±1.55% (86 runs sampled) -nano-equal x 218,210 ops/sec ±0.79% (89 runs sampled) -shallow-equal-fuzzy x 206,762 ops/sec ±0.84% (88 runs sampled) -underscore.isEqual x 128,668 ops/sec ±0.75% (91 runs sampled) -lodash.isEqual x 44,895 ops/sec ±0.67% (85 runs sampled) -deep-equal x 51,616 ops/sec ±0.96% (90 runs sampled) -deep-eql x 28,218 ops/sec ±0.42% (85 runs sampled) -assert.deepStrictEqual x 1,777 ops/sec ±1.05% (86 runs sampled) -ramda.equals x 13,466 ops/sec ±0.82% (86 runs sampled) +fast-deep-equal x 261,950 ops/sec ±0.52% (89 runs sampled) +fast-deep-equal/es6 x 212,991 ops/sec ±0.34% (92 runs sampled) +fast-equals x 230,957 ops/sec ±0.83% (85 runs sampled) +nano-equal x 187,995 ops/sec ±0.53% (88 runs sampled) +shallow-equal-fuzzy x 138,302 ops/sec ±0.49% (90 runs sampled) +underscore.isEqual x 74,423 ops/sec ±0.38% (89 runs sampled) +lodash.isEqual x 36,637 ops/sec ±0.72% (90 runs sampled) +deep-equal x 2,310 ops/sec ±0.37% (90 runs sampled) +deep-eql x 35,312 ops/sec ±0.67% (91 runs sampled) +ramda.equals x 12,054 ops/sec ±0.40% (91 runs sampled) +util.isDeepStrictEqual x 46,440 ops/sec ±0.43% (90 runs sampled) +assert.deepStrictEqual x 456 ops/sec ±0.71% (88 runs sampled) + The fastest is fast-deep-equal ``` To run benchmark (requires node.js 6+): ```bash -npm install -node benchmark +npm run benchmark ``` +__Please note__: this benchmark runs against the available test cases. To choose the most performant library for your application, it is recommended to benchmark against your data and to NOT expect this benchmark to reflect the performance difference in your application. + + +## Enterprise support + +fast-deep-equal package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-deep-equal?utm_source=npm-fast-deep-equal&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers. + + +## Security contact + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues. + ## License diff --git a/node_modules/fast-deep-equal/index.js b/node_modules/fast-deep-equal/index.js index 27264f5b..30dd1ba7 100644 --- a/node_modules/fast-deep-equal/index.js +++ b/node_modules/fast-deep-equal/index.js @@ -1,20 +1,17 @@ 'use strict'; -var isArray = Array.isArray; -var keyList = Object.keys; -var hasProp = Object.prototype.hasOwnProperty; +// do not edit .js files directly - edit src/index.jst + + module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { - var arrA = isArray(a) - , arrB = isArray(b) - , i - , length - , key; + if (a.constructor !== b.constructor) return false; - if (arrA && arrB) { + var length, i, keys; + if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) @@ -22,34 +19,28 @@ module.exports = function equal(a, b) { return true; } - if (arrA != arrB) return false; - var dateA = a instanceof Date - , dateB = b instanceof Date; - if (dateA != dateB) return false; - if (dateA && dateB) return a.getTime() == b.getTime(); - var regexpA = a instanceof RegExp - , regexpB = b instanceof RegExp; - if (regexpA != regexpB) return false; - if (regexpA && regexpB) return a.toString() == b.toString(); + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); - var keys = keyList(a); + keys = Object.keys(a); length = keys.length; - - if (length !== keyList(b).length) - return false; + if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) - if (!hasProp.call(b, keys[i])) return false; + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { - key = keys[i]; + var key = keys[i]; + if (!equal(a[key], b[key])) return false; } return true; } + // true if both NaN, false otherwise return a!==a && b!==b; }; diff --git a/node_modules/fast-deep-equal/package.json b/node_modules/fast-deep-equal/package.json index ab116281..3cfe66c6 100644 --- a/node_modules/fast-deep-equal/package.json +++ b/node_modules/fast-deep-equal/package.json @@ -1,68 +1,45 @@ { - "_args": [ - [ - "fast-deep-equal@2.0.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "fast-deep-equal@2.0.1", - "_id": "fast-deep-equal@2.0.1", - "_inBundle": false, - "_integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "_location": "/fast-deep-equal", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "fast-deep-equal@2.0.1", - "name": "fast-deep-equal", - "escapedName": "fast-deep-equal", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/ajv" - ], - "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Evgeny Poberezkin" - }, - "bugs": { - "url": "https://github.com/epoberezkin/fast-deep-equal/issues" - }, + "name": "fast-deep-equal", + "version": "3.1.3", "description": "Fast deep equal", - "devDependencies": { - "benchmark": "^2.1.4", - "coveralls": "^2.13.1", - "deep-eql": "latest", - "deep-equal": "latest", - "eslint": "^4.0.0", - "lodash": "latest", - "mocha": "^3.4.2", - "nano-equal": "latest", - "nyc": "^11.0.2", - "pre-commit": "^1.2.2", - "ramda": "latest", - "shallow-equal-fuzzy": "latest", - "typescript": "^2.6.1", - "underscore": "latest" + "main": "index.js", + "scripts": { + "eslint": "eslint *.js benchmark/*.js spec/*.js", + "build": "node build", + "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./", + "test-spec": "mocha spec/*.spec.js -R spec", + "test-cov": "nyc npm run test-spec", + "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts", + "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov", + "prepublish": "npm run build" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", "keywords": [ "fast", "equal", "deep-equal" ], + "author": "Evgeny Poberezkin", "license": "MIT", - "main": "index.js", - "name": "fast-deep-equal", + "bugs": { + "url": "https://github.com/epoberezkin/fast-deep-equal/issues" + }, + "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", + "devDependencies": { + "coveralls": "^3.1.0", + "dot": "^1.1.2", + "eslint": "^7.2.0", + "mocha": "^7.2.0", + "nyc": "^15.1.0", + "pre-commit": "^1.2.2", + "react": "^16.12.0", + "react-test-renderer": "^16.12.0", + "sinon": "^9.0.2", + "typescript": "^3.9.5" + }, "nyc": { "exclude": [ "**/spec/**", @@ -73,17 +50,12 @@ "text-summary" ] }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" - }, - "scripts": { - "eslint": "eslint *.js benchmark spec", - "test": "npm run eslint && npm run test-ts && npm run test-cov", - "test-cov": "nyc npm run test-spec", - "test-spec": "mocha spec/*.spec.js -R spec", - "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts" - }, - "types": "index.d.ts", - "version": "2.0.1" + "files": [ + "index.js", + "index.d.ts", + "react.js", + "react.d.ts", + "es6/" + ], + "types": "index.d.ts" } diff --git a/node_modules/flat/.travis.yml b/node_modules/flat/.travis.yml index 7bd4bcd9..f35768a9 100644 --- a/node_modules/flat/.travis.yml +++ b/node_modules/flat/.travis.yml @@ -3,3 +3,6 @@ node_js: - "6" - "7" - "8" + - "10" + - "12" + - "14" diff --git a/node_modules/flat/README.md b/node_modules/flat/README.md index 3295f753..a036a9f2 100644 --- a/node_modules/flat/README.md +++ b/node_modules/flat/README.md @@ -122,7 +122,7 @@ When enabled, existing keys in the unflattened object may be overwritten if they ```javascript unflatten({ 'TRAVIS': 'true', - 'TRAVIS_DIR': '/home/travis/build/kvz/environmental' + 'TRAVIS.DIR': '/home/travis/build/kvz/environmental' }, { overwrite: true }) // TRAVIS: { @@ -159,6 +159,55 @@ flatten({ // } ``` +### transformKey + +Transform each part of a flat key before and after flattening. + +```javascript +var flatten = require('flat') +var unflatten = require('flat').unflatten + +flatten({ + key1: { + keyA: 'valueI' + }, + key2: { + keyB: 'valueII' + }, + key3: { a: { b: { c: 2 } } } +}, { + transformKey: function(key){ + return '__' + key + '__'; + } +}) + +// { +// '__key1__.__keyA__': 'valueI', +// '__key2__.__keyB__': 'valueII', +// '__key3__.__a__.__b__.__c__': 2 +// } + +unflatten({ + '__key1__.__keyA__': 'valueI', + '__key2__.__keyB__': 'valueII', + '__key3__.__a__.__b__.__c__': 2 +}, { + transformKey: function(key){ + return key.substring(2, key.length - 2) + } +}) + +// { +// key1: { +// keyA: 'valueI' +// }, +// key2: { +// keyB: 'valueII' +// }, +// key3: { a: { b: { c: 2 } } } +// } +``` + ## Command Line Usage `flat` is also available as a command line tool. You can run it with @@ -184,4 +233,4 @@ Also accepts JSON on stdin: ```sh cat foo.json | flat -``` \ No newline at end of file +``` diff --git a/node_modules/flat/cli.js b/node_modules/flat/cli.js index dc42f526..e4f96b37 100755 --- a/node_modules/flat/cli.js +++ b/node_modules/flat/cli.js @@ -1,16 +1,19 @@ #!/usr/bin/env node -const flat = require('.') const fs = require('fs') const path = require('path') const readline = require('readline') -if (process.stdin.isTTY) { +const flat = require('./index') + +const filepath = process.argv.slice(2)[0] +if (filepath) { // Read from file - const file = path.resolve(process.cwd(), process.argv.slice(2)[0]) - if (!file) usage() - if (!fs.existsSync(file)) usage() + const file = path.resolve(process.cwd(), filepath) + fs.accessSync(file, fs.constants.R_OK) // allow to throw if not readable out(require(file)) +} else if (process.stdin.isTTY) { + usage(0) } else { // Read from newline-delimited STDIN const lines = [] @@ -27,7 +30,7 @@ function out (data) { process.stdout.write(JSON.stringify(flat(data), null, 2)) } -function usage () { +function usage (code) { console.log(` Usage: @@ -35,5 +38,5 @@ flat foo.json cat foo.json | flat `) - process.exit() + process.exit(code || 0) } diff --git a/node_modules/flat/index.js b/node_modules/flat/index.js index ca8904ae..2a5d7ca0 100644 --- a/node_modules/flat/index.js +++ b/node_modules/flat/index.js @@ -1,31 +1,41 @@ -var isBuffer = require('is-buffer') - module.exports = flatten flatten.flatten = flatten flatten.unflatten = unflatten +function isBuffer (obj) { + return obj && + obj.constructor && + (typeof obj.constructor.isBuffer === 'function') && + obj.constructor.isBuffer(obj) +} + +function keyIdentity (key) { + return key +} + function flatten (target, opts) { opts = opts || {} - var delimiter = opts.delimiter || '.' - var maxDepth = opts.maxDepth - var output = {} + const delimiter = opts.delimiter || '.' + const maxDepth = opts.maxDepth + const transformKey = opts.transformKey || keyIdentity + const output = {} function step (object, prev, currentDepth) { currentDepth = currentDepth || 1 Object.keys(object).forEach(function (key) { - var value = object[key] - var isarray = opts.safe && Array.isArray(value) - var type = Object.prototype.toString.call(value) - var isbuffer = isBuffer(value) - var isobject = ( + const value = object[key] + const isarray = opts.safe && Array.isArray(value) + const type = Object.prototype.toString.call(value) + const isbuffer = isBuffer(value) + const isobject = ( type === '[object Object]' || type === '[object Array]' ) - var newKey = prev - ? prev + delimiter + key - : key + const newKey = prev + ? prev + delimiter + transformKey(key) + : transformKey(key) if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) { @@ -44,11 +54,12 @@ function flatten (target, opts) { function unflatten (target, opts) { opts = opts || {} - var delimiter = opts.delimiter || '.' - var overwrite = opts.overwrite || false - var result = {} + const delimiter = opts.delimiter || '.' + const overwrite = opts.overwrite || false + const transformKey = opts.transformKey || keyIdentity + const result = {} - var isbuffer = isBuffer(target) + const isbuffer = isBuffer(target) if (isbuffer || Object.prototype.toString.call(target) !== '[object Object]') { return target } @@ -56,7 +67,7 @@ function unflatten (target, opts) { // safely ensure that the key is // an integer. function getkey (key) { - var parsedKey = Number(key) + const parsedKey = Number(key) return ( isNaN(parsedKey) || @@ -66,19 +77,56 @@ function unflatten (target, opts) { : parsedKey } - var sortedKeys = Object.keys(target).sort(function (keyA, keyB) { - return keyA.length - keyB.length - }) + function addKeys (keyPrefix, recipient, target) { + return Object.keys(target).reduce(function (result, key) { + result[keyPrefix + delimiter + key] = target[key] - sortedKeys.forEach(function (key) { - var split = key.split(delimiter) - var key1 = getkey(split.shift()) - var key2 = getkey(split[0]) - var recipient = result + return result + }, recipient) + } + + function isEmpty (val) { + const type = Object.prototype.toString.call(val) + const isArray = type === '[object Array]' + const isObject = type === '[object Object]' + + if (!val) { + return true + } else if (isArray) { + return !val.length + } else if (isObject) { + return !Object.keys(val).length + } + } + + target = Object.keys(target).reduce(function (result, key) { + const type = Object.prototype.toString.call(target[key]) + const isObject = (type === '[object Object]' || type === '[object Array]') + if (!isObject || isEmpty(target[key])) { + result[key] = target[key] + return result + } else { + return addKeys( + key, + result, + flatten(target[key], opts) + ) + } + }, {}) + + Object.keys(target).forEach(function (key) { + const split = key.split(delimiter).map(transformKey) + let key1 = getkey(split.shift()) + let key2 = getkey(split[0]) + let recipient = result while (key2 !== undefined) { - var type = Object.prototype.toString.call(recipient[key1]) - var isobject = ( + if (key1 === '__proto__') { + return + } + + const type = Object.prototype.toString.call(recipient[key1]) + const isobject = ( type === '[object Object]' || type === '[object Array]' ) diff --git a/node_modules/flat/package.json b/node_modules/flat/package.json index a862ec8d..c2fbc963 100644 --- a/node_modules/flat/package.json +++ b/node_modules/flat/package.json @@ -1,56 +1,25 @@ { - "_args": [ - [ - "flat@4.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "flat@4.1.0", - "_id": "flat@4.1.0", - "_inBundle": false, - "_integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "_location": "/flat", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "flat@4.1.0", - "name": "flat", - "escapedName": "flat", - "rawSpec": "4.1.0", - "saveSpec": null, - "fetchSpec": "4.1.0" - }, - "_requiredBy": [ - "/yargs-unparser" - ], - "_resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "_spec": "4.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughskennedy.com" - }, - "bin": { - "flat": "cli.js" - }, - "bugs": { - "url": "https://github.com/hughsk/flat/issues" - }, - "dependencies": { - "is-buffer": "~2.0.3" + "name": "flat", + "version": "5.0.2", + "main": "index.js", + "bin": "cli.js", + "scripts": { + "test": "mocha -u tdd --reporter spec && standard cli.js index.js test/index.js" }, + "license": "BSD-3-Clause", "description": "Take a nested Javascript object and flatten it, or unflatten an object with delimited keys", "devDependencies": { - "mocha": "~5.2.0", - "standard": "^11.0.1" + "mocha": "~8.1.1", + "standard": "^14.3.4" }, "directories": { "test": "test" }, - "homepage": "https://github.com/hughsk/flat", + "dependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/hughsk/flat.git" + }, "keywords": [ "flat", "json", @@ -60,15 +29,9 @@ "object", "nested" ], - "license": "BSD-3-Clause", - "main": "index.js", - "name": "flat", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/flat.git" - }, - "scripts": { - "test": "mocha -u tdd --reporter spec && standard index.js test/index.js" + "author": "Hugh Kennedy (http://hughskennedy.com)", + "bugs": { + "url": "https://github.com/hughsk/flat/issues" }, - "version": "4.1.0" + "homepage": "https://github.com/hughsk/flat" } diff --git a/node_modules/flat/test/test.js b/node_modules/flat/test/test.js index 541c9d77..7f4ee3df 100644 --- a/node_modules/flat/test/test.js +++ b/node_modules/flat/test/test.js @@ -1,11 +1,15 @@ /* globals suite test */ -var assert = require('assert') -var flat = require('../index') -var flatten = flat.flatten -var unflatten = flat.unflatten +const assert = require('assert') +const path = require('path') +const { exec } = require('child_process') +const pkg = require('../package.json') +const flat = require('../index') -var primitives = { +const flatten = flat.flatten +const unflatten = flat.unflatten + +const primitives = { String: 'good morning', Number: 1234.99, Boolean: true, @@ -16,10 +20,10 @@ var primitives = { suite('Flatten Primitives', function () { Object.keys(primitives).forEach(function (key) { - var value = primitives[key] + const value = primitives[key] test(key, function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { world: value } @@ -32,10 +36,10 @@ suite('Flatten Primitives', function () { suite('Unflatten Primitives', function () { Object.keys(primitives).forEach(function (key) { - var value = primitives[key] + const value = primitives[key] test(key, function () { - assert.deepEqual(unflatten({ + assert.deepStrictEqual(unflatten({ 'hello.world': value }), { hello: { @@ -48,7 +52,7 @@ suite('Unflatten Primitives', function () { suite('Flatten', function () { test('Nested once', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { world: 'good morning' } @@ -58,7 +62,7 @@ suite('Flatten', function () { }) test('Nested twice', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { world: { again: 'good morning' @@ -70,7 +74,7 @@ suite('Flatten', function () { }) test('Multiple Keys', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { lorem: { ipsum: 'again', @@ -92,7 +96,7 @@ suite('Flatten', function () { }) test('Custom Delimiter', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { world: { again: 'good morning' @@ -106,20 +110,20 @@ suite('Flatten', function () { }) test('Empty Objects', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { empty: { - nested: { } + nested: {} } } }), { - 'hello.empty.nested': { } + 'hello.empty.nested': {} }) }) if (typeof Buffer !== 'undefined') { test('Buffer', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { empty: { nested: Buffer.from('test') @@ -133,7 +137,7 @@ suite('Flatten', function () { if (typeof Uint8Array !== 'undefined') { test('typed arrays', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { empty: { nested: new Uint8Array([1, 2, 3, 4]) @@ -146,7 +150,7 @@ suite('Flatten', function () { } test('Custom Depth', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { world: { again: 'good morning' @@ -169,8 +173,30 @@ suite('Flatten', function () { }) }) + test('Transformed Keys', function () { + assert.deepStrictEqual(flatten({ + hello: { + world: { + again: 'good morning' + } + }, + lorem: { + ipsum: { + dolor: 'good evening' + } + } + }, { + transformKey: function (key) { + return '__' + key + '__' + } + }), { + '__hello__.__world__.__again__': 'good morning', + '__lorem__.__ipsum__.__dolor__': 'good evening' + }) + }) + test('Should keep number in the left when object', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: { '0200': 'world', '0500': 'darkness my old friend' @@ -184,7 +210,7 @@ suite('Flatten', function () { suite('Unflatten', function () { test('Nested once', function () { - assert.deepEqual({ + assert.deepStrictEqual({ hello: { world: 'good morning' } @@ -194,7 +220,7 @@ suite('Unflatten', function () { }) test('Nested twice', function () { - assert.deepEqual({ + assert.deepStrictEqual({ hello: { world: { again: 'good morning' @@ -206,7 +232,7 @@ suite('Unflatten', function () { }) test('Multiple Keys', function () { - assert.deepEqual({ + assert.deepStrictEqual({ hello: { lorem: { ipsum: 'again', @@ -225,15 +251,15 @@ suite('Unflatten', function () { 'hello.lorem.dolor': 'sit', 'world.lorem.ipsum': 'again', 'world.lorem.dolor': 'sit', - 'world': {greet: 'hello'} + world: { greet: 'hello' } })) }) test('nested objects do not clobber each other when a.b inserted before a', function () { - var x = {} - x['foo.bar'] = {t: 123} - x['foo'] = {p: 333} - assert.deepEqual(unflatten(x), { + const x = {} + x['foo.bar'] = { t: 123 } + x.foo = { p: 333 } + assert.deepStrictEqual(unflatten(x), { foo: { bar: { t: 123 @@ -244,7 +270,7 @@ suite('Unflatten', function () { }) test('Custom Delimiter', function () { - assert.deepEqual({ + assert.deepStrictEqual({ hello: { world: { again: 'good morning' @@ -258,7 +284,7 @@ suite('Unflatten', function () { }) test('Overwrite', function () { - assert.deepEqual({ + assert.deepStrictEqual({ travis: { build: { dir: '/home/travis/build/kvz/environmental' @@ -273,20 +299,48 @@ suite('Unflatten', function () { })) }) + test('Transformed Keys', function () { + assert.deepStrictEqual(unflatten({ + '__hello__.__world__.__again__': 'good morning', + '__lorem__.__ipsum__.__dolor__': 'good evening' + }, { + transformKey: function (key) { + return key.substring(2, key.length - 2) + } + }), { + hello: { + world: { + again: 'good morning' + } + }, + lorem: { + ipsum: { + dolor: 'good evening' + } + } + }) + }) + test('Messy', function () { - assert.deepEqual({ + assert.deepStrictEqual({ hello: { world: 'again' }, lorem: { ipsum: 'another' }, good: { morning: { hash: { - key: { nested: { - deep: { and: { even: { - deeper: { still: 'hello' } - } } } - } } + key: { + nested: { + deep: { + and: { + even: { + deeper: { still: 'hello' } + } + } + } + } + } }, - again: { testing: { 'this': 'out' } } + again: { testing: { this: 'out' } } } } }, unflatten({ @@ -307,31 +361,31 @@ suite('Unflatten', function () { suite('Overwrite + non-object values in key positions', function () { test('non-object keys + overwrite should be overwritten', function () { - assert.deepEqual(flat.unflatten({ a: null, 'a.b': 'c' }, {overwrite: true}), { a: { b: 'c' } }) - assert.deepEqual(flat.unflatten({ a: 0, 'a.b': 'c' }, {overwrite: true}), { a: { b: 'c' } }) - assert.deepEqual(flat.unflatten({ a: 1, 'a.b': 'c' }, {overwrite: true}), { a: { b: 'c' } }) - assert.deepEqual(flat.unflatten({ a: '', 'a.b': 'c' }, {overwrite: true}), { a: { b: 'c' } }) + assert.deepStrictEqual(flat.unflatten({ a: null, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) + assert.deepStrictEqual(flat.unflatten({ a: 0, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) + assert.deepStrictEqual(flat.unflatten({ a: 1, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) + assert.deepStrictEqual(flat.unflatten({ a: '', 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) }) test('overwrite value should not affect undefined keys', function () { - assert.deepEqual(flat.unflatten({ a: undefined, 'a.b': 'c' }, {overwrite: true}), { a: { b: 'c' } }) - assert.deepEqual(flat.unflatten({ a: undefined, 'a.b': 'c' }, {overwrite: false}), { a: { b: 'c' } }) + assert.deepStrictEqual(flat.unflatten({ a: undefined, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) + assert.deepStrictEqual(flat.unflatten({ a: undefined, 'a.b': 'c' }, { overwrite: false }), { a: { b: 'c' } }) }) test('if no overwrite, should ignore nested values under non-object key', function () { - assert.deepEqual(flat.unflatten({ a: null, 'a.b': 'c' }), { a: null }) - assert.deepEqual(flat.unflatten({ a: 0, 'a.b': 'c' }), { a: 0 }) - assert.deepEqual(flat.unflatten({ a: 1, 'a.b': 'c' }), { a: 1 }) - assert.deepEqual(flat.unflatten({ a: '', 'a.b': 'c' }), { a: '' }) + assert.deepStrictEqual(flat.unflatten({ a: null, 'a.b': 'c' }), { a: null }) + assert.deepStrictEqual(flat.unflatten({ a: 0, 'a.b': 'c' }), { a: 0 }) + assert.deepStrictEqual(flat.unflatten({ a: 1, 'a.b': 'c' }), { a: 1 }) + assert.deepStrictEqual(flat.unflatten({ a: '', 'a.b': 'c' }), { a: '' }) }) }) suite('.safe', function () { test('Should protect arrays when true', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: [ - { world: { again: 'foo' } }, - { lorem: 'ipsum' } + { world: { again: 'foo' } }, + { lorem: 'ipsum' } ], another: { nested: [{ array: { too: 'deep' } }] @@ -343,8 +397,8 @@ suite('Unflatten', function () { safe: true }), { hello: [ - { world: { again: 'foo' } }, - { lorem: 'ipsum' } + { world: { again: 'foo' } }, + { lorem: 'ipsum' } ], 'lorem.ipsum': 'whoop', 'another.nested': [{ array: { too: 'deep' } }] @@ -352,10 +406,10 @@ suite('Unflatten', function () { }) test('Should not protect arrays when false', function () { - assert.deepEqual(flatten({ + assert.deepStrictEqual(flatten({ hello: [ - { world: { again: 'foo' } }, - { lorem: 'ipsum' } + { world: { again: 'foo' } }, + { lorem: 'ipsum' } ] }, { safe: false @@ -364,18 +418,25 @@ suite('Unflatten', function () { 'hello.1.lorem': 'ipsum' }) }) + + test('Empty objects should not be removed', function () { + assert.deepStrictEqual(unflatten({ + foo: [], + bar: {} + }), { foo: [], bar: {} }) + }) }) suite('.object', function () { test('Should create object instead of array when true', function () { - var unflattened = unflatten({ + const unflattened = unflatten({ 'hello.you.0': 'ipsum', 'hello.you.1': 'lorem', 'hello.other.world': 'foo' }, { object: true }) - assert.deepEqual({ + assert.deepStrictEqual({ hello: { you: { 0: 'ipsum', @@ -388,8 +449,8 @@ suite('Unflatten', function () { }) test('Should create object instead of array when nested', function () { - var unflattened = unflatten({ - 'hello': { + const unflattened = unflatten({ + hello: { 'you.0': 'ipsum', 'you.1': 'lorem', 'other.world': 'foo' @@ -397,7 +458,7 @@ suite('Unflatten', function () { }, { object: true }) - assert.deepEqual({ + assert.deepStrictEqual({ hello: { you: { 0: 'ipsum', @@ -410,14 +471,14 @@ suite('Unflatten', function () { }) test('Should keep the zero in the left when object is true', function () { - var unflattened = unflatten({ + const unflattened = unflatten({ 'hello.0200': 'world', 'hello.0500': 'darkness my old friend' }, { object: true }) - assert.deepEqual({ + assert.deepStrictEqual({ hello: { '0200': 'world', '0500': 'darkness my old friend' @@ -426,14 +487,14 @@ suite('Unflatten', function () { }) test('Should not create object when false', function () { - var unflattened = unflatten({ + const unflattened = unflatten({ 'hello.you.0': 'ipsum', 'hello.you.1': 'lorem', 'hello.other.world': 'foo' }, { object: false }) - assert.deepEqual({ + assert.deepStrictEqual({ hello: { you: ['ipsum', 'lorem'], other: { world: 'foo' } @@ -445,7 +506,7 @@ suite('Unflatten', function () { if (typeof Buffer !== 'undefined') { test('Buffer', function () { - assert.deepEqual(unflatten({ + assert.deepStrictEqual(unflatten({ 'hello.empty.nested': Buffer.from('test') }), { hello: { @@ -459,7 +520,7 @@ suite('Unflatten', function () { if (typeof Uint8Array !== 'undefined') { test('typed arrays', function () { - assert.deepEqual(unflatten({ + assert.deepStrictEqual(unflatten({ 'hello.empty.nested': new Uint8Array([1, 2, 3, 4]) }), { hello: { @@ -470,11 +531,25 @@ suite('Unflatten', function () { }) }) } + + test('should not pollute prototype', function () { + unflatten({ + '__proto__.polluted': true + }) + unflatten({ + 'prefix.__proto__.polluted': true + }) + unflatten({ + 'prefix.0.__proto__.polluted': true + }) + + assert.notStrictEqual({}.polluted, true) + }) }) suite('Arrays', function () { test('Should be able to flatten arrays properly', function () { - assert.deepEqual({ + assert.deepStrictEqual({ 'a.0': 'foo', 'a.1': 'bar' }, flatten({ @@ -483,7 +558,7 @@ suite('Arrays', function () { }) test('Should be able to revert and reverse array serialization via unflatten', function () { - assert.deepEqual({ + assert.deepStrictEqual({ a: ['foo', 'bar'] }, unflatten({ 'a.0': 'foo', @@ -492,8 +567,8 @@ suite('Arrays', function () { }) test('Array typed objects should be restored by unflatten', function () { - assert.equal( - Object.prototype.toString.call(['foo', 'bar']) + assert.strictEqual( + Object.prototype.toString.call(['foo', 'bar']) , Object.prototype.toString.call(unflatten({ 'a.0': 'foo', 'a.1': 'bar' @@ -502,7 +577,7 @@ suite('Arrays', function () { }) test('Do not include keys with numbers inside them', function () { - assert.deepEqual(unflatten({ + assert.deepStrictEqual(unflatten({ '1key.2_key': 'ok' }), { '1key': { @@ -511,3 +586,58 @@ suite('Arrays', function () { }) }) }) + +suite('Order of Keys', function () { + test('Order of keys should not be changed after round trip flatten/unflatten', function () { + const obj = { + b: 1, + abc: { + c: [{ + d: 1, + bca: 1, + a: 1 + }] + }, + a: 1 + } + const result = unflatten( + flatten(obj) + ) + + assert.deepStrictEqual(Object.keys(obj), Object.keys(result)) + assert.deepStrictEqual(Object.keys(obj.abc), Object.keys(result.abc)) + assert.deepStrictEqual(Object.keys(obj.abc.c[0]), Object.keys(result.abc.c[0])) + }) +}) + +suite('CLI', function () { + test('can take filename', function (done) { + const cli = path.resolve(__dirname, '..', pkg.bin) + const pkgJSON = path.resolve(__dirname, '..', 'package.json') + exec(`${cli} ${pkgJSON}`, (err, stdout, stderr) => { + assert.ifError(err) + assert.strictEqual(stdout.trim(), JSON.stringify(flatten(pkg), null, 2)) + done() + }) + }) + + test('exits with usage if no file', function (done) { + const cli = path.resolve(__dirname, '..', pkg.bin) + const pkgJSON = path.resolve(__dirname, '..', 'package.json') + exec(`${cli} ${pkgJSON}`, (err, stdout, stderr) => { + assert.ifError(err) + assert.strictEqual(stdout.trim(), JSON.stringify(flatten(pkg), null, 2)) + done() + }) + }) + + test('can take piped file', function (done) { + const cli = path.resolve(__dirname, '..', pkg.bin) + const pkgJSON = path.resolve(__dirname, '..', 'package.json') + exec(`cat ${pkgJSON} | ${cli}`, (err, stdout, stderr) => { + assert.ifError(err) + assert.strictEqual(stdout.trim(), JSON.stringify(flatten(pkg), null, 2)) + done() + }) + }) +}) diff --git a/node_modules/function-bind/.editorconfig b/node_modules/function-bind/.editorconfig deleted file mode 100644 index ac29adef..00000000 --- a/node_modules/function-bind/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 120 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc deleted file mode 100644 index 9b33d8ed..00000000 --- a/node_modules/function-bind/.eslintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "indent": [2, 4], - "max-nested-callbacks": [2, 3], - "max-params": [2, 3], - "max-statements": [2, 20], - "no-new-func": [1], - "strict": [0] - } -} diff --git a/node_modules/function-bind/.jscs.json b/node_modules/function-bind/.jscs.json deleted file mode 100644 index 8c447948..00000000 --- a/node_modules/function-bind/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 8 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/function-bind/.npmignore b/node_modules/function-bind/.npmignore deleted file mode 100644 index dbb555fd..00000000 --- a/node_modules/function-bind/.npmignore +++ /dev/null @@ -1,22 +0,0 @@ -# gitignore -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript -coverage -node_modules - -# Only apps should have lockfiles -npm-shrinkwrap.json -package-lock.json -yarn.lock diff --git a/node_modules/function-bind/.travis.yml b/node_modules/function-bind/.travis.yml deleted file mode 100644 index 85f70d24..00000000 --- a/node_modules/function-bind/.travis.yml +++ /dev/null @@ -1,168 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "8.4" - - "7.10" - - "6.11" - - "5.12" - - "4.8" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "node" - env: PRETEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d237..00000000 --- a/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -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/function-bind/README.md b/node_modules/function-bind/README.md deleted file mode 100644 index 81862a02..00000000 --- a/node_modules/function-bind/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# function-bind - - - - - -Implementation of function.prototype.bind - -## Example - -I mainly do this for unit tests I run on phantomjs. -PhantomJS does not have Function.prototype.bind :( - -```js -Function.prototype.bind = require("function-bind") -``` - -## Installation - -`npm install function-bind` - -## Contributors - - - Raynos - -## MIT Licenced - - [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg - [travis-url]: https://travis-ci.org/Raynos/function-bind - [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg - [npm-url]: https://npmjs.org/package/function-bind - [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png - [6]: https://coveralls.io/r/Raynos/function-bind - [7]: https://gemnasium.com/Raynos/function-bind.png - [8]: https://gemnasium.com/Raynos/function-bind - [deps-svg]: https://david-dm.org/Raynos/function-bind.svg - [deps-url]: https://david-dm.org/Raynos/function-bind - [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg - [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies - [11]: https://ci.testling.com/Raynos/function-bind.png - [12]: https://ci.testling.com/Raynos/function-bind diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js deleted file mode 100644 index cc4daec1..00000000 --- a/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js deleted file mode 100644 index 3bb6b960..00000000 --- a/node_modules/function-bind/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json deleted file mode 100644 index 01df3512..00000000 --- a/node_modules/function-bind/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - "function-bind@1.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "function-bind@1.1.1", - "_id": "function-bind@1.1.1", - "_inBundle": false, - "_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "_location": "/function-bind", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "function-bind@1.1.1", - "name": "function-bind", - "escapedName": "function-bind", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/es-abstract", - "/has", - "/object.assign" - ], - "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "_spec": "1.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "dependencies": {}, - "description": "Implementation of Function.prototype.bind", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "eslint": "^4.5.0", - "jscs": "^3.0.7", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/Raynos/function-bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "license": "MIT", - "main": "index", - "name": "function-bind", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/function-bind.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "eslint": "eslint *.js */*.js", - "jscs": "jscs *.js */*.js", - "lint": "npm run jscs && npm run eslint", - "posttest": "npm run coverage -- --quiet", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.1" -} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc deleted file mode 100644 index 8a56d5b7..00000000 --- a/node_modules/function-bind/test/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "max-statements-per-line": [2, { "max": 2 }], - "no-invalid-this": 0, - "no-magic-numbers": 0, - } -} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js deleted file mode 100644 index 2edecce2..00000000 --- a/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,252 +0,0 @@ -// jscs:disable requireUseStrict - -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js deleted file mode 100644 index 4121c8e5..00000000 --- a/node_modules/get-stream/buffer-stream.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const {PassThrough} = require('stream'); - -module.exports = options => { - options = Object.assign({}, options); - - const {array} = options; - let {encoding} = options; - const buffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || buffer); - } else { - encoding = encoding || 'utf8'; - } - - if (buffer) { - encoding = null; - } - - let len = 0; - const ret = []; - const stream = new PassThrough({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - stream.on('data', chunk => { - ret.push(chunk); - - if (objectMode) { - len = ret.length; - } else { - len += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return ret; - } - - return buffer ? Buffer.concat(ret, len) : ret.join(''); - }; - - stream.getBufferedLength = () => len; - - return stream; -}; diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js deleted file mode 100644 index 7e5584a6..00000000 --- a/node_modules/get-stream/index.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; -const pump = require('pump'); -const bufferStream = require('./buffer-stream'); - -class MaxBufferError extends Error { - constructor() { - super('maxBuffer exceeded'); - this.name = 'MaxBufferError'; - } -} - -function getStream(inputStream, options) { - if (!inputStream) { - return Promise.reject(new Error('Expected a stream')); - } - - options = Object.assign({maxBuffer: Infinity}, options); - - const {maxBuffer} = options; - - let stream; - return new Promise((resolve, reject) => { - const rejectPromise = error => { - if (error) { // A null check - error.bufferedData = stream.getBufferedValue(); - } - reject(error); - }; - - stream = pump(inputStream, bufferStream(options), error => { - if (error) { - rejectPromise(error); - return; - } - - resolve(); - }); - - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }).then(() => stream.getBufferedValue()); -} - -module.exports = getStream; -module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); -module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); -module.exports.MaxBufferError = MaxBufferError; diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/get-stream/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/get-stream/package.json b/node_modules/get-stream/package.json deleted file mode 100644 index 23808bf3..00000000 --- a/node_modules/get-stream/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - "get-stream@4.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "get-stream@4.1.0", - "_id": "get-stream@4.1.0", - "_inBundle": false, - "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "_location": "/get-stream", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "get-stream@4.1.0", - "name": "get-stream", - "escapedName": "get-stream", - "rawSpec": "4.1.0", - "saveSpec": null, - "fetchSpec": "4.1.0" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "_spec": "4.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/get-stream/issues" - }, - "dependencies": { - "pump": "^3.0.0" - }, - "description": "Get a stream as a string, buffer, or array", - "devDependencies": { - "ava": "*", - "into-stream": "^3.0.0", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "buffer-stream.js" - ], - "homepage": "https://github.com/sindresorhus/get-stream#readme", - "keywords": [ - "get", - "stream", - "promise", - "concat", - "string", - "text", - "buffer", - "read", - "data", - "consume", - "readable", - "readablestream", - "array", - "object" - ], - "license": "MIT", - "name": "get-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/get-stream.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "4.1.0" -} diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md deleted file mode 100644 index b87a4d37..00000000 --- a/node_modules/get-stream/readme.md +++ /dev/null @@ -1,123 +0,0 @@ -# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) - -> Get a stream as a string, buffer, or array - - -## Install - -``` -$ npm install get-stream -``` - - -## Usage - -```js -const fs = require('fs'); -const getStream = require('get-stream'); - -(async () => { - const stream = fs.createReadStream('unicorn.txt'); - - console.log(await getStream(stream)); - /* - ,,))))))));, - __)))))))))))))), - \|/ -\(((((''''((((((((. - -*-==//////(('' . `)))))), - /|\ ))| o ;-. '((((( ,(, - ( `| / ) ;))))' ,_))^;(~ - | | | ,))((((_ _____------~~~-. %,;(;(>';'~ - o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ - ; ''''```` `: `:::|\,__,%% );`'; ~ - | _ ) / `:|`----' `-' - ______/\/~ | / / - /~;;.____/;;' / ___--,-( `;;;/ - / // _;______;'------~~~~~ /;;/\ / - // | | / ; \;;,\ - (<_ | ; /',/-----' _> - \_| ||_ //~;~~~~~~~~~ - `\_| (,~~ - \~\ - ~~ - */ -})(); -``` - - -## API - -The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. - -### getStream(stream, [options]) - -Get the `stream` as a string. - -#### options - -Type: `Object` - -##### encoding - -Type: `string`
-Default: `utf8` - -[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. - -##### maxBuffer - -Type: `number`
-Default: `Infinity` - -Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error. - -### getStream.buffer(stream, [options]) - -Get the `stream` as a buffer. - -It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. - -### getStream.array(stream, [options]) - -Get the `stream` as an array of values. - -It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: - -- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). - -- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. - -- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. - - -## Errors - -If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. - -```js -(async () => { - try { - await getStream(streamThatErrorsAtTheEnd('unicorn')); - } catch (error) { - console.log(error.bufferedData); - //=> 'unicorn' - } -})() -``` - - -## FAQ - -### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? - -This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. - - -## Related - -- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/glob/LICENSE b/node_modules/glob/LICENSE index 19129e31..42ca266d 100644 --- a/node_modules/glob/LICENSE +++ b/node_modules/glob/LICENSE @@ -13,3 +13,9 @@ 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. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md index baa1d1ba..83f0c83a 100644 --- a/node_modules/glob/README.md +++ b/node_modules/glob/README.md @@ -7,7 +7,7 @@ Match files using the patterns the shell uses, like stars and stuff. This is a glob implementation in JavaScript. It uses the `minimatch` library to do its matching. -![](oh-my-glob.gif) +![a fun cartoon logo made of glob characters](logo/glob.png) ## Usage @@ -276,6 +276,9 @@ the filesystem. * `absolute` Set to true to always receive absolute paths for matched files. Unlike `realpath`, this also affects the values returned in the `match` event. +* `fs` File-system object with Node's `fs` API. By default, the built-in + `fs` module will be used. Set to a volume provided by a library like + `memfs` to avoid using the "real" file-system. ## Comparisons to other fnmatch/glob implementations @@ -347,6 +350,11 @@ Users are thus advised not to use a glob result as a guarantee of filesystem state in the face of rapid changes. For the vast majority of operations, this is never a problem. +## Glob Logo +Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). + +The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). + ## Contributing Any change to behavior (including bugfixes) must come with a test. @@ -366,3 +374,5 @@ npm run bench # to profile javascript npm run prof ``` + +![](oh-my-glob.gif) diff --git a/node_modules/glob/changelog.md b/node_modules/glob/changelog.md deleted file mode 100644 index 41636771..00000000 --- a/node_modules/glob/changelog.md +++ /dev/null @@ -1,67 +0,0 @@ -## 7.0 - -- Raise error if `options.cwd` is specified, and not a directory - -## 6.0 - -- Remove comment and negation pattern support -- Ignore patterns are always in `dot:true` mode - -## 5.0 - -- Deprecate comment and negation patterns -- Fix regression in `mark` and `nodir` options from making all cache - keys absolute path. -- Abort if `fs.readdir` returns an error that's unexpected -- Don't emit `match` events for ignored items -- Treat ENOTSUP like ENOTDIR in readdir - -## 4.5 - -- Add `options.follow` to always follow directory symlinks in globstar -- Add `options.realpath` to call `fs.realpath` on all results -- Always cache based on absolute path - -## 4.4 - -- Add `options.ignore` -- Fix handling of broken symlinks - -## 4.3 - -- Bump minimatch to 2.x -- Pass all tests on Windows - -## 4.2 - -- Add `glob.hasMagic` function -- Add `options.nodir` flag - -## 4.1 - -- Refactor sync and async implementations for performance -- Throw if callback provided to sync glob function -- Treat symbolic links in globstar results the same as Bash 4.3 - -## 4.0 - -- Use `^` for dependency versions (bumped major because this breaks - older npm versions) -- Ensure callbacks are only ever called once -- switch to ISC license - -## 3.x - -- Rewrite in JavaScript -- Add support for setting root, cwd, and windows support -- Cache many fs calls -- Add globstar support -- emit match events - -## 2.x - -- Use `glob.h` and `fnmatch.h` from NetBSD - -## 1.x - -- `glob.h` static binding. diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js index 66651bb3..8e363b6c 100644 --- a/node_modules/glob/common.js +++ b/node_modules/glob/common.js @@ -1,5 +1,3 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti exports.setopts = setopts exports.ownProp = ownProp exports.makeAbs = makeAbs @@ -12,17 +10,14 @@ function ownProp (obj, field) { return Object.prototype.hasOwnProperty.call(obj, field) } +var fs = require("fs") var path = require("path") var minimatch = require("minimatch") var isAbsolute = require("path-is-absolute") var Minimatch = minimatch.Minimatch -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - function alphasort (a, b) { - return a.localeCompare(b) + return a.localeCompare(b, 'en') } function setupIgnores (self, options) { @@ -81,6 +76,7 @@ function setopts (self, pattern, options) { self.stat = !!options.stat self.noprocess = !!options.noprocess self.absolute = !!options.absolute + self.fs = options.fs || fs self.maxLength = options.maxLength || Infinity self.cache = options.cache || Object.create(null) @@ -150,7 +146,7 @@ function finish (self) { all = Object.keys(all) if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) + all = all.sort(alphasort) // at *some* point we statted all of these if (self.mark) { diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js index 58dec0f6..afcf8275 100644 --- a/node_modules/glob/glob.js +++ b/node_modules/glob/glob.js @@ -40,7 +40,6 @@ module.exports = glob -var fs = require('fs') var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch @@ -51,8 +50,6 @@ var assert = require('assert') var isAbsolute = require('path-is-absolute') var globSync = require('./sync.js') var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp var inflight = require('inflight') @@ -503,7 +500,7 @@ Glob.prototype._readdirInGlobStar = function (abs, cb) { var lstatcb = inflight(lstatkey, lstatcb_) if (lstatcb) - fs.lstat(abs, lstatcb) + self.fs.lstat(abs, lstatcb) function lstatcb_ (er, lstat) { if (er && er.code === 'ENOENT') @@ -544,7 +541,7 @@ Glob.prototype._readdir = function (abs, inGlobStar, cb) { } var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) + self.fs.readdir(abs, readdirCb(this, abs, cb)) } function readdirCb (self, abs, cb) { @@ -748,13 +745,13 @@ Glob.prototype._stat = function (f, cb) { var self = this var statcb = inflight('stat\0' + abs, lstatcb_) if (statcb) - fs.lstat(abs, statcb) + self.fs.lstat(abs, statcb) function lstatcb_ (er, lstat) { if (lstat && lstat.isSymbolicLink()) { // If it's a symlink, then treat it as the target, unless // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { + return self.fs.stat(abs, function (er, stat) { if (er) self._stat2(f, abs, null, lstat, cb) else diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json index 3c217cce..cc1a57a8 100644 --- a/node_modules/glob/package.json +++ b/node_modules/glob/package.json @@ -1,43 +1,20 @@ { - "_args": [ - [ - "glob@7.1.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "glob@7.1.3", - "_id": "glob@7.1.3", - "_inBundle": false, - "_integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "_location": "/glob", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "glob@7.1.3", - "name": "glob", - "escapedName": "glob", - "rawSpec": "7.1.3", - "saveSpec": null, - "fetchSpec": "7.1.3" + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "glob", + "description": "a little globber", + "version": "7.2.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" }, - "_requiredBy": [ - "/mocha", - "/nyc", - "/rimraf", - "/test-exclude" + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "_spec": "7.1.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" + "engines": { + "node": "*" }, "dependencies": { "fs.realpath": "^1.0.0", @@ -47,37 +24,29 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, - "description": "a little globber", "devDependencies": { + "memfs": "^3.2.0", "mkdirp": "0", "rimraf": "^2.2.8", - "tap": "^12.0.1", + "tap": "^15.0.6", "tick": "0.0.6" }, - "engines": { - "node": "*" - }, - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "name": "glob", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" + "tap": { + "before": "test/00-setup.js", + "after": "test/zz-cleanup.js", + "jobs": 1 }, "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" + "test": "tap", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" }, - "version": "7.1.3" + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } } diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js index c952134b..4f46f905 100644 --- a/node_modules/glob/sync.js +++ b/node_modules/glob/sync.js @@ -1,7 +1,6 @@ module.exports = globSync globSync.GlobSync = GlobSync -var fs = require('fs') var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch @@ -11,8 +10,6 @@ var path = require('path') var assert = require('assert') var isAbsolute = require('path-is-absolute') var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp var childrenIgnored = common.childrenIgnored @@ -248,7 +245,7 @@ GlobSync.prototype._readdirInGlobStar = function (abs) { var lstat var stat try { - lstat = fs.lstatSync(abs) + lstat = this.fs.lstatSync(abs) } catch (er) { if (er.code === 'ENOENT') { // lstat failed, doesn't exist @@ -285,7 +282,7 @@ GlobSync.prototype._readdir = function (abs, inGlobStar) { } try { - return this._readdirEntries(abs, fs.readdirSync(abs)) + return this._readdirEntries(abs, this.fs.readdirSync(abs)) } catch (er) { this._readdirError(abs, er) return null @@ -444,7 +441,7 @@ GlobSync.prototype._stat = function (f) { if (!stat) { var lstat try { - lstat = fs.lstatSync(abs) + lstat = this.fs.lstatSync(abs) } catch (er) { if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { this.statCache[abs] = false @@ -454,7 +451,7 @@ GlobSync.prototype._stat = function (f) { if (lstat && lstat.isSymbolicLink()) { try { - stat = fs.statSync(abs) + stat = this.fs.statSync(abs) } catch (er) { stat = lstat } diff --git a/node_modules/growl/.eslintrc.json b/node_modules/growl/.eslintrc.json deleted file mode 100644 index f067e891..00000000 --- a/node_modules/growl/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": ["airbnb-base", "eslint:recommended", "plugin:node/recommended"], - "plugins": [ - "import", - "node" - ], - "rules": { - "no-console": ["error", { "allow": ["warn", "error"] }] - }, - "env": { - "node": true, - "es6": true - } -} diff --git a/node_modules/growl/.tags b/node_modules/growl/.tags deleted file mode 100644 index ce68994f..00000000 --- a/node_modules/growl/.tags +++ /dev/null @@ -1,195 +0,0 @@ -name /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "name": "growl",$/;" function line:2 -version /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "version": "1.10.1",$/;" function line:3 -description /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "description": "Growl unobtrusive notifications",$/;" function line:4 -author /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "author": "TJ Holowaychuk ",$/;" function line:5 -maintainers /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "maintainers": [$/;" function line:6 -repository /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "repository": {$/;" function line:10 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "type": "git",$/;" function line:11 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "url": "git:\/\/github.com\/tj\/node-growl.git"$/;" function line:12 -main /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "main": ".\/lib\/growl.js",$/;" function line:14 -license /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "license": "MIT",$/;" function line:15 -devDependencies /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "devDependencies": {$/;" function line:16 -eslint /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "eslint": "^4.2.0",$/;" function line:17 -eslint-config-airbnb-base /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "eslint-config-airbnb-base": "^11.2.0",$/;" function line:18 -eslint-plugin-import /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "eslint-plugin-import": "^2.7.0"$/;" function line:19 -scripts /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "scripts": {$/;" function line:21 -test /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "test": "node test.js",$/;" function line:22 -lint /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "lint": "eslint --ext js lib "$/;" function line:23 -engines /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "engines": {$/;" function line:25 -node /Users/timosand/Dropbox/Documents/Projects/node-growl/package.json /^ "node": ">=4.x"$/;" function line:26 -extends /Users/timosand/Dropbox/Documents/Projects/node-growl/.eslintrc.json /^ "extends": ["airbnb-base", "eslint:recommended", "plugin:node\/recommended"],$/;" function line:2 -plugins /Users/timosand/Dropbox/Documents/Projects/node-growl/.eslintrc.json /^ "plugins": [$/;" function line:3 -rules /Users/timosand/Dropbox/Documents/Projects/node-growl/.eslintrc.json /^ "rules": {$/;" function line:7 -no-console /Users/timosand/Dropbox/Documents/Projects/node-growl/.eslintrc.json /^ "no-console": ["error", { "allow": ["warn", "error"] }]$/;" function line:8 -env /Users/timosand/Dropbox/Documents/Projects/node-growl/.eslintrc.json /^ "env": {$/;" function line:10 -node /Users/timosand/Dropbox/Documents/Projects/node-growl/.eslintrc.json /^ "node": true,$/;" function line:11 -es6 /Users/timosand/Dropbox/Documents/Projects/node-growl/.eslintrc.json /^ "es6": true$/;" function line:12 -language /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^language: node_js$/;" function line:1 -dist /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^dist: trusty$/;" function line:2 -os /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^os:$/;" function line:3 -node_js /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^node_js:$/;" function line:6 -before_install /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^before_install:$/;" function line:12 -jobs /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^jobs:$/;" function line:14 -include /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^ include:$/;" function line:15 -script /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^ script: npm run lint$/;" function line:17 -script /Users/timosand/Dropbox/Documents/Projects/node-growl/.travis.yml /^ script: npm test$/;" function line:19 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^let cmd;$/;" variable line:15 -which /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function which(name) {$/;" function line:17 -loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let loc;$/;" variable line:19 -len /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ for (let i = 0, len = paths.length; i < len; i += 1) {$/;" variable line:21 -loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ loc = path.join(paths[i], name);$/;" variable line:22 -setupCmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function setupCmd() {$/;" function line:28 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:32 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:32 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" string line:33 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" variable line:33 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" string line:34 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" variable line:34 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" string line:35 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" variable line:35 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:36 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:36 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:37 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:37 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" string line:38 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" variable line:38 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" string line:39 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" variable line:39 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" string line:40 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" variable line:40 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:41 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:41 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" string line:42 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" variable line:42 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:43 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:43 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:47 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:47 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" string line:48 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" variable line:48 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:49 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:49 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:50 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:50 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" string line:51 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" variable line:51 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" string line:52 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" variable line:52 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:53 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:53 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" string line:54 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" variable line:54 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:55 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:55 -0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:58 -1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:59 -2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:60 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:70 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:73 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:73 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" string line:74 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" variable line:74 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" string line:75 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" variable line:75 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:76 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:76 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:77 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:77 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:78 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:78 -host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" object line:79 -host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" variable line:79 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" string line:80 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" variable line:80 -hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" string line:81 -hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" variable line:81 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:85 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:85 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" string line:86 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" variable line:86 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" string line:87 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" variable line:87 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:88 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:88 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" string line:89 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" variable line:89 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" string line:90 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" variable line:90 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:91 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:91 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" string line:92 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" variable line:92 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:93 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:93 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:101 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:103 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:103 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" string line:104 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" variable line:104 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:105 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:105 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:106 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:106 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" string line:107 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" variable line:107 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" string line:108 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" variable line:108 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" string line:109 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" variable line:109 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" string line:110 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" variable line:110 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:111 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:111 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" string line:112 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" variable line:112 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:113 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:113 -0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:116 -1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:117 -2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:118 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:122 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:124 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" string line:151 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" variable line:151 -opts /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" variable line:162 -growl /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" function line:162 -image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let image;$/;" variable line:163 -noop /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ const fn = callback || function noop() {};$/;" function line:165 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:170 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:170 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" string line:171 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" variable line:171 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: options.exec,$/;" variable line:172 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:173 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:173 -return /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ return;$/;" variable line:180 -image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ image = options.image;$/;" variable line:186 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let flag;$/;" variable line:189 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = ext === 'icns' && 'iconpath';$/;" variable line:191 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^[A-Z]\/.test(image) && 'appIcon');$/;" variable line:192 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^png|gif|jpe?g$\/.test(ext) && 'image');$/;" variable line:193 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (ext && (image = ext) && 'icon');$/;" variable line:194 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || 'icon';$/;" variable line:195 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:197 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:201 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:206 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:209 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:211 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:246 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:264 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:273 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:282 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:287 -command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let command = customCmd.replace(\/(^|[^%])%s\/g, `$1${message}`);$/;" variable line:293 -command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ command = splitCmd.shift();$/;" variable line:296 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:303 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:306 -stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" string line:311 -stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" variable line:311 -stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" string line:312 -stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" variable line:312 -error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let error;$/;" variable line:313 -error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = err;$/;" variable line:317 -error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = error || code === 0 ? null : code;$/;" variable line:329 -stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ fn(error, stdout, stderr);$/;" variable line:331 -exports /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^module.exports = growl;$/;" variable line:341 diff --git a/node_modules/growl/.tags1 b/node_modules/growl/.tags1 deleted file mode 100644 index b68beb30..00000000 --- a/node_modules/growl/.tags1 +++ /dev/null @@ -1,166 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.8 // -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^let cmd;$/;" variable line:15 -which /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function which(name) {$/;" function line:17 -loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let loc;$/;" variable line:19 -len /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ for (let i = 0, len = paths.length; i < len; i += 1) {$/;" variable line:21 -loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ loc = path.join(paths[i], name);$/;" variable line:22 -setupCmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function setupCmd() {$/;" function line:28 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:32 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:32 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" string line:33 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" variable line:33 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" string line:34 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" variable line:34 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" string line:35 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" variable line:35 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:36 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:36 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:37 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:37 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" string line:38 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" variable line:38 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" string line:39 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" variable line:39 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" string line:40 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" variable line:40 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:41 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:41 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" string line:42 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" variable line:42 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:43 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:43 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:47 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:47 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" string line:48 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" variable line:48 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:49 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:49 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:50 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:50 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" string line:51 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" variable line:51 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" string line:52 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" variable line:52 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:53 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:53 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" string line:54 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" variable line:54 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:55 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:55 -0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:58 -1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:59 -2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:60 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:70 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:73 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:73 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" string line:74 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" variable line:74 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" string line:75 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" variable line:75 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:76 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:76 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:77 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:77 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:78 -subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:78 -host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" object line:79 -host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" variable line:79 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" string line:80 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" variable line:80 -hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" string line:81 -hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" variable line:81 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:85 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:85 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" string line:86 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" variable line:86 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" string line:87 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" variable line:87 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:88 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:88 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" string line:89 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" variable line:89 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" string line:90 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" variable line:90 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:91 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:91 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" string line:92 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" variable line:92 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:93 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:93 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:101 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:103 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:103 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" string line:104 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" variable line:104 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:105 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:105 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:106 -msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:106 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" string line:107 -sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" variable line:107 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" string line:108 -title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" variable line:108 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" string line:109 -icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" variable line:109 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" string line:110 -url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" variable line:110 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:111 -priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:111 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" string line:112 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" variable line:112 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:113 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:113 -0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:116 -1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:117 -2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:118 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:122 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:124 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" string line:151 -sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" variable line:151 -opts /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" variable line:162 -growl /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" function line:162 -image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let image;$/;" variable line:163 -noop /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ const fn = callback || function noop() {};$/;" function line:165 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:170 -cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:170 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" string line:171 -type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" variable line:171 -pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: options.exec,$/;" variable line:172 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:173 -range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:173 -return /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ return;$/;" variable line:180 -image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ image = options.image;$/;" variable line:186 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let flag;$/;" variable line:189 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = ext === 'icns' && 'iconpath';$/;" variable line:191 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^[A-Z]\/.test(image) && 'appIcon');$/;" variable line:192 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^png|gif|jpe?g$\/.test(ext) && 'image');$/;" variable line:193 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (ext && (image = ext) && 'icon');$/;" variable line:194 -flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || 'icon';$/;" variable line:195 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:197 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:201 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:206 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:209 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:211 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:246 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:264 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:273 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:282 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:287 -command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let command = customCmd.replace(\/(^|[^%])%s\/g, `$1${message}`);$/;" variable line:293 -command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ command = splitCmd.shift();$/;" variable line:296 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:303 -break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:306 -stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" string line:311 -stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" variable line:311 -stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" string line:312 -stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" variable line:312 -error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let error;$/;" variable line:313 -error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = err;$/;" variable line:317 -error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = error || code === 0 ? null : code;$/;" variable line:329 -stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ fn(error, stdout, stderr);$/;" variable line:331 -exports /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^module.exports = growl;$/;" variable line:341 diff --git a/node_modules/growl/.travis.yml b/node_modules/growl/.travis.yml deleted file mode 100644 index 072adfc0..00000000 --- a/node_modules/growl/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: node_js -dist: trusty -os: - - linux - - osx -node_js: -- '4' -- '5' -- '6' -- '7' -- 'node' -before_install: - - npm i -g npm@latest - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libnotify-bin; fi -jobs: - include: - - stage: lint - script: npm run lint - - stage: test - script: npm test diff --git a/node_modules/growl/History.md b/node_modules/growl/History.md deleted file mode 100644 index dfbc2e4b..00000000 --- a/node_modules/growl/History.md +++ /dev/null @@ -1,77 +0,0 @@ -1.10.5 / 2018-04-04 -================== - -* Fix callbacks not receiving errors (#72) [chadrickman] - -1.10.4 / 2018-01-29 -================== - -* Fix notifications on linux when using notify-send (#70) [hmshwt] - -1.9.3 / 2016-09-05 -================== - - * fixed command injection vulnerability - -1.7.0 / 2012-12-30 -================== - - * support transient notifications in Gnome - -1.6.1 / 2012-09-25 -================== - - * restore compatibility with node < 0.8 [fgnass] - -1.6.0 / 2012-09-06 -================== - - * add notification center support [drudge] - -1.5.1 / 2012-04-08 -================== - - * Merge pull request #16 from KyleAMathews/patch-1 - * Fixes #15 - -1.5.0 / 2012-02-08 -================== - - * Added windows support [perfusorius] - -1.4.1 / 2011-12-28 -================== - - * Fixed: dont exit(). Closes #9 - -1.4.0 / 2011-12-17 -================== - - * Changed API: `growl.notify()` -> `growl()` - -1.3.0 / 2011-12-17 -================== - - * Added support for Ubuntu/Debian/Linux users [niftylettuce] - * Fixed: send notifications even if title not specified [alessioalex] - -1.2.0 / 2011-10-06 -================== - - * Add support for priority. - -1.1.0 / 2011-03-15 -================== - - * Added optional callbacks - * Added parsing of version - -1.0.1 / 2010-03-26 -================== - - * Fixed; sys.exec -> child_process.exec to support latest node - -1.0.0 / 2010-03-19 -================== - - * Initial release diff --git a/node_modules/growl/Readme.md b/node_modules/growl/Readme.md deleted file mode 100644 index 54128b43..00000000 --- a/node_modules/growl/Readme.md +++ /dev/null @@ -1,109 +0,0 @@ -# Growl for nodejs -[![Build Status](https://travis-ci.org/tj/node-growl.svg?branch=master)](https://travis-ci.org/tj/node-growl) - -Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce). - -## Installation - -### Install - -### Mac OS X (Darwin): - - Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install: - - $ sudo gem install terminal-notifier - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -### Ubuntu (Linux): - - Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package: - - $ sudo apt-get install libnotify-bin - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -### Windows: - - Download and install [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx) - - Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path! - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -## Examples - -Callback functions are optional - -```javascript -var growl = require('growl') -growl('You have mail!') -growl('5 new messages', { sticky: true }) -growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) -growl('Message with title', { title: 'Title'}) -growl('Set priority', { priority: 2 }) -growl('Show Safari icon', { image: 'Safari' }) -growl('Show icon', { image: 'path/to/icon.icns' }) -growl('Show image', { image: 'path/to/my.image.png' }) -growl('Show png filesystem icon', { image: 'png' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){ - // ... notified -}) -``` - -## Options - - - title - - notification title - - name - - application name - - priority - - priority for the notification (default is 0) - - sticky - - weither or not the notification should remainin until closed - - image - - Auto-detects the context: - - path to an icon sets --iconpath - - path to an image sets --image - - capitalized word sets --appIcon - - filename uses extname as --icon - - otherwise treated as --icon - - exec - - manually specify a shell command instead - - appends message to end of shell command - - or, replaces `%s` with message - - optionally prepends title (example: `title: message`) - - examples: `{exec: 'tmux display-message'}`, `{exec: 'echo "%s" > messages.log}` - -## License - -(The MIT License) - -Copyright (c) 2009 TJ Holowaychuk -Copyright (c) 2016 Joshua Boy Nicolai Appelman - -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/growl/lib/growl.js b/node_modules/growl/lib/growl.js deleted file mode 100644 index eb4efa8c..00000000 --- a/node_modules/growl/lib/growl.js +++ /dev/null @@ -1,340 +0,0 @@ -'use strict'; - -// Growl - Copyright TJ Holowaychuk (MIT Licensed) - -/** - * Module dependencies. - */ - -const spawn = require('child_process').spawn; -const fs = require('fs'); -const path = require('path'); -const os = require('os'); - -const exists = fs.existsSync || path.existsSync; -let cmd; - -function which(name) { - const paths = process.env.PATH.split(':'); - let loc; - - for (let i = 0, len = paths.length; i < len; i += 1) { - loc = path.join(paths[i], name); - if (exists(loc)) return loc; - } - return false; -} - -function setupCmd() { - switch (os.type()) { - case 'Darwin': - if (which('terminal-notifier')) { - cmd = { - type: 'Darwin-NotificationCenter', - pkg: 'terminal-notifier', - msg: '-message', - title: '-title', - subtitle: '-subtitle', - icon: '-appIcon', - sound: '-sound', - url: '-open', - priority: { - cmd: '-execute', - range: [], - }, - }; - } else { - cmd = { - type: 'Darwin-Growl', - pkg: 'growlnotify', - msg: '-m', - sticky: '--sticky', - url: '--url', - priority: { - cmd: '--priority', - range: [ - -2, - -1, - 0, - 1, - 2, - 'Very Low', - 'Moderate', - 'Normal', - 'High', - 'Emergency', - ], - }, - }; - } - break; - case 'Linux': - if (which('growl')) { - cmd = { - type: 'Linux-Growl', - pkg: 'growl', - msg: '-m', - title: '-title', - subtitle: '-subtitle', - host: { - cmd: '-H', - hostname: '192.168.33.1', - }, - }; - } else { - cmd = { - type: 'Linux', - pkg: 'notify-send', - msg: '', - sticky: '-t', - icon: '-i', - priority: { - cmd: '-u', - range: [ - 'low', - 'normal', - 'critical', - ], - }, - }; - } - break; - case 'Windows_NT': - cmd = { - type: 'Windows', - pkg: 'growlnotify', - msg: '', - sticky: '/s:true', - title: '/t:', - icon: '/i:', - url: '/cu:', - priority: { - cmd: '/p:', - range: [ - -2, - -1, - 0, - 1, - 2, - ], - }, - }; - break; - default: - break; - } -} - - -/** - * Send growl notification _msg_ with _options_. - * - * Options: - * - * - title Notification title - * - sticky Make the notification stick (defaults to false) - * - priority Specify an int or named key (default is 0) - * - name Application name (defaults to growlnotify) - * - sound Sound efect ( in OSx defined in preferences -> sound -> effects) - * works only in OSX > 10.8x - * - image - * - path to an icon sets --iconpath - * - path to an image sets --image - * - capitalized word sets --appIcon - * - filename uses extname as --icon - * - otherwise treated as --icon - * - * Examples: - * - * growl('New email') - * growl('5 new emails', { title: 'Thunderbird' }) - * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' }) - * growl('Email sent', function(){ - * // ... notification sent - * }) - * - * @param {string} msg - * @param {object} opts - * @param {function} callback - * @api public - */ - -function growl(msg, opts, callback) { - let image; - const options = opts || {}; - const fn = callback || function noop() {}; - - setupCmd(); - - if (options.exec) { - cmd = { - type: 'Custom', - pkg: options.exec, - range: [], - }; - } - - // noop - if (!cmd) { - fn(new Error('growl not supported on this platform')); - return; - } - const args = [cmd.pkg]; - - // image - if (image || options.image) { - image = options.image; - switch (cmd.type) { - case 'Darwin-Growl': { - let flag; - const ext = path.extname(image).substr(1); - flag = ext === 'icns' && 'iconpath'; - flag = flag || (/^[A-Z]/.test(image) && 'appIcon'); - flag = flag || (/^png|gif|jpe?g$/.test(ext) && 'image'); - flag = flag || (ext && (image = ext) && 'icon'); - flag = flag || 'icon'; - args.push(`--${flag}`, image); - break; - } - case 'Darwin-NotificationCenter': - args.push(cmd.icon, image); - break; - case 'Linux': - args.push(cmd.icon, image); - // libnotify defaults to sticky, set a hint for transient notifications - if (!options.sticky) args.push('--hint=int:transient:1'); - break; - case 'Windows': - args.push(cmd.icon + image); - break; - default: - break; - } - } - - // sticky - if (options.sticky) args.push(cmd.sticky); - if (options.sticky && cmd.type === 'Linux') args.push('0'); - - // priority - if (options.priority) { - const priority = `${options.priority}`; - const checkindexOf = cmd.priority.range.indexOf(priority); - if (checkindexOf > -1) { - args.push(cmd.priority, options.priority); - } - } - - // sound - if (options.sound && cmd.type === 'Darwin-NotificationCenter') { - args.push(cmd.sound, options.sound); - } - - // name - if (options.name && cmd.type === 'Darwin-Growl') { - args.push('--name', options.name); - } - - switch (cmd.type) { - case 'Darwin-Growl': - args.push(cmd.msg); - args.push(msg.replace(/\\n/g, '\n')); - if (options.title) args.push(options.title); - if (options.url) { - args.push(cmd.url); - args.push(options.url); - } - break; - case 'Darwin-NotificationCenter': { - args.push(cmd.msg); - const stringifiedMsg = msg; - const escapedMsg = stringifiedMsg.replace(/\\n/g, '\n'); - args.push(escapedMsg); - if (options.title) { - args.push(cmd.title); - args.push(options.title); - } - if (options.subtitle) { - args.push(cmd.subtitle); - args.push(options.subtitle); - } - if (options.url) { - args.push(cmd.url); - args.push(options.url); - } - break; - } - case 'Linux-Growl': - args.push(cmd.msg); - args.push(msg.replace(/\\n/g, '\n')); - if (options.title) args.push(options.title); - if (cmd.host) { - args.push(cmd.host.cmd, cmd.host.hostname); - } - break; - case 'Linux': - if (options.title) args.push(options.title); - args.push(msg.replace(/\\n/g, '\n')); - break; - case 'Windows': - args.push(msg.replace(/\\n/g, '\n')); - if (options.title) args.push(cmd.title + options.title); - if (options.url) args.push(cmd.url + options.url); - break; - case 'Custom': { - const customCmd = args[0]; - const message = options.title - ? `${options.title}: ${msg}` - : msg; - let command = customCmd.replace(/(^|[^%])%s/g, `$1${message}`); - const splitCmd = command.split(' '); - if (splitCmd.length > 1) { - command = splitCmd.shift(); - Array.prototype.push.apply(args, splitCmd); - } - if (customCmd.indexOf('%s') < 0) { - args.push(message); - } - args[0] = command; - break; - } - default: - break; - } - const cmdToExec = args.shift(); - - const child = spawn(cmdToExec, args); - let stdout = ''; - let stderr = ''; - let error; - - const now = new Date(); - const timestamp = `${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}.${now.getMilliseconds()}` - - stderr += `[${timestamp}][node-growl] : Executed command '${cmdToExec}' with arguments '${args}'\n[stderr] : `; - - child.on('error', (err) => { - console.error('An error occured.', err); - error = err; - }); - - child.stdout.on('data', (data) => { - stdout += data; - }); - - child.stderr.on('data', (data) => { - stderr += data; - }); - - child.on('close', () => { - if (typeof fn === 'function') { - fn(error, stdout, stderr); - } - }); -} - -/** - * Expose `growl`. - */ - -module.exports = growl; diff --git a/node_modules/growl/package.json b/node_modules/growl/package.json deleted file mode 100644 index 1624d56a..00000000 --- a/node_modules/growl/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_args": [ - [ - "growl@1.10.5", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "growl@1.10.5", - "_id": "growl@1.10.5", - "_inBundle": false, - "_integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "_location": "/growl", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "growl@1.10.5", - "name": "growl", - "escapedName": "growl", - "rawSpec": "1.10.5", - "saveSpec": null, - "fetchSpec": "1.10.5" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "_spec": "1.10.5", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "bugs": { - "url": "https://github.com/tj/node-growl/issues" - }, - "description": "Growl unobtrusive notifications", - "devDependencies": { - "eslint": "^4.8.0", - "eslint-config-airbnb-base": "^12.0.1", - "eslint-plugin-import": "^2.7.0", - "eslint-plugin-node": "^5.2.0" - }, - "engines": { - "node": ">=4.x" - }, - "homepage": "https://github.com/tj/node-growl#readme", - "license": "MIT", - "main": "./lib/growl.js", - "maintainers": [ - { - "name": "Joshua Boy Nicolai Appelman", - "email": "joshua@jbnicolai.nl" - }, - { - "name": "Timo Sand", - "email": "timo.sand@iki.fi" - } - ], - "name": "growl", - "repository": { - "type": "git", - "url": "git://github.com/tj/node-growl.git" - }, - "scripts": { - "lint": "eslint --ext js lib ", - "test": "node test.js" - }, - "version": "1.10.5" -} diff --git a/node_modules/growl/test.js b/node_modules/growl/test.js deleted file mode 100644 index 3b1d2296..00000000 --- a/node_modules/growl/test.js +++ /dev/null @@ -1,31 +0,0 @@ - -var growl = require('./lib/growl') - -growl('Support sound notifications', {title: 'Make a sound', sound: 'purr'}); -growl('You have mail!') -growl('5 new messages', { sticky: true }) -growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) -growl('Message with title', { title: 'Title'}) -growl('Set priority', { priority: 2 }) -growl('Show Safari icon', { image: 'Safari' }) -growl('Show icon', { image: 'path/to/icon.icns' }) -growl('Show image', { image: 'path/to/my.image.png' }) -growl('Show png filesystem icon', { image: 'png' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){ - console.log('callback'); -}) -growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' }) -growl('here \' are \n some \\ characters that " need escaping', {}, function(error, stdout, stderr) { - if (error) throw new Error('escaping failed:\n' + stdout + stderr); -}) -growl('Allow custom notifiers', { exec: 'echo XXX %s' }, function(error, stdout, stderr) { - console.log(stdout); -}) -growl('Allow custom notifiers', { title: 'test', exec: 'echo YYY' }, function(error, stdout, stderr) { - console.log(stdout); -}) -growl('Allow custom notifiers', { title: 'test', exec: 'echo ZZZ %s' }, function(error, stdout, stderr) { - console.log(stdout); -}) -growl('Open a URL', { url: 'https://npmjs.org/package/growl' }); diff --git a/node_modules/handlebars/dist/amd/handlebars/base.js b/node_modules/handlebars/dist/amd/handlebars/base.js index e7fa11ac..a606a69c 100644 --- a/node_modules/handlebars/dist/amd/handlebars/base.js +++ b/node_modules/handlebars/dist/amd/handlebars/base.js @@ -11,7 +11,7 @@ define(['exports', './utils', './exception', './helpers', './decorators', './log var _logger2 = _interopRequireDefault(_logger); - var VERSION = '4.7.6'; + var VERSION = '4.7.7'; exports.VERSION = VERSION; var COMPILER_REVISION = 8; exports.COMPILER_REVISION = COMPILER_REVISION; @@ -103,4 +103,4 @@ define(['exports', './utils', './exception', './helpers', './decorators', './log exports.createFrame = _utils.createFrame; exports.logger = _logger2['default']; }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU9PLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQzs7QUFDeEIsTUFBTSxpQkFBaUIsR0FBRyxDQUFDLENBQUM7O0FBQzVCLE1BQU0saUNBQWlDLEdBQUcsQ0FBQyxDQUFDOzs7QUFFNUMsTUFBTSxnQkFBZ0IsR0FBRztBQUM5QixLQUFDLEVBQUUsYUFBYTtBQUNoQixLQUFDLEVBQUUsZUFBZTtBQUNsQixLQUFDLEVBQUUsZUFBZTtBQUNsQixLQUFDLEVBQUUsVUFBVTtBQUNiLEtBQUMsRUFBRSxrQkFBa0I7QUFDckIsS0FBQyxFQUFFLGlCQUFpQjtBQUNwQixLQUFDLEVBQUUsaUJBQWlCO0FBQ3BCLEtBQUMsRUFBRSx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uO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js b/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js index 4f02fa16..6e48e7ee 100644 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +++ b/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js @@ -22,7 +22,7 @@ define(['exports', 'module', '../base', '../exception', '../utils', './code-gen' return this.internalNameLookup(parent, name); }, depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; }, compilerInfo: function compilerInfo() { @@ -1148,4 +1148,4 @@ define(['exports', 'module', '../base', '../exception', '../utils', './code-gen' module.exports = JavaScriptCompiler; }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbX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sIFtcbiAgICAgICAgICAnZm4nLFxuICAgICAgICAgICdwcm9wcycsXG4gICAgICAgICAgJ2NvbnRhaW5lcicsXG4gICAgICAgICAgJ2RlcHRoMCcsXG4gICAgICAgICAgJ2RhdGEnLFxuICAgICAgICAgICdibG9ja1BhcmFtcycsXG4gICAgICAgICAgJ2RlcHRocycsXG4gICAgICAgICAgdGhpcy5kZWNvcmF0b3JzLm1lcmdlKClcbiAgICAgICAgXSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLmRlY29yYXRvcnMucHJlcGVuZChcbiAgICAgICAgICAnZnVuY3Rpb24oZm4sIHByb3BzLCBjb250YWluZXIsIGRlcHRoMCwgZGF0YSwgYmxvY2tQYXJhbXMsIGRlcHRocykge1xcbidcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5kZWNvcmF0b3JzLnB1c2goJ31cXG4nKTtcbiAgICAgICAgdGhpcy5kZWNvcmF0b3JzID0gdGhpcy5kZWNvcmF0b3JzLm1lcmdlKCk7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuZGVjb3JhdG9ycyA9IHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICBsZXQgZm4gPSB0aGlzLmNyZWF0ZUZ1bmN0aW9uQ29udGV4dChhc09iamVjdCk7XG4gICAgaWYgKCF0aGlzLmlzQ2hpbGQpIHtcbiAgICAgIGxldCByZXQgPSB7XG4gICAgICAgIGNvbXBpbGVyOiB0aGlzLmNvbXBpbGVySW5mbygpLFxuICAgICAgICBtYWluOiBmblxuICAgICAgfTtcblxuICAgICAgaWYgKHRoaXMuZGVjb3JhdG9ycykge1xuICAgICAgICByZXQubWFpbl9kID0gdGhpcy5kZWNvcmF0b3JzOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIGNhbWVsY2FzZVxuICAgICAgICByZXQudXNlRGVjb3JhdG9ycyA9IHRydWU7XG4gICAgICB9XG5cbiAgICAgIGxldCB7IHByb2dyYW1zLCBkZWNvcmF0b3JzIH0gPSB0aGlzLmNvbnRleHQ7XG4gICAgICBmb3IgKGkgPSAwLCBsID0gcHJvZ3JhbXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgIGlmIChwcm9ncmFtc1tpXSkge1xuICAgICAgICAgIHJldFtpXSA9IHByb2dyYW1zW2ldO1xuICAgICAgICAgIGlmIChkZWNvcmF0b3JzW2ldKSB7XG4gICAgICAgICAgICByZXRbaSArICdfZCddID0gZGVjb3JhdG9yc1tpXTtcbiAgICAgICAgICAgIHJldC51c2VEZWNvcmF0b3JzID0gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHRoaXMuZW52aXJvbm1lbnQudXNlUGFydGlhbCkge1xuICAgICAgICByZXQudXNlUGFydGlhbCA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmRhdGEpIHtcbiAgICAgICAgcmV0LnVzZURhdGEgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMudXNlRGVwdGhzKSB7XG4gICAgICAgIHJldC51c2VEZXB0aHMgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMudXNlQmxvY2tQYXJhbXMpIHtcbiAgICAgICAgcmV0LnVzZUJsb2NrUGFyYW1zID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLm9wdGlvbnMuY29tcGF0KSB7XG4gICAgICAgIHJldC5jb21wYXQgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICBpZiAoIWFzT2JqZWN0KSB7XG4gICAgICAgIHJldC5jb21waWxlciA9IEpTT04uc3RyaW5naWZ5KHJldC5jb21waWxlcik7XG5cbiAgICAgICAgdGhpcy5zb3VyY2UuY3VycmVudExvY2F0aW9uID0geyBzdGFydDogeyBsaW5lOiAxLCBjb2x1bW46IDAgfSB9O1xuICAgICAgICByZXQgPSB0aGlzLm9iamVjdExpdGVyY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G4gICAgbGV0IG5vbkhlbHBlciA9IHRoaXMucG9wU3RhY2soKTtcblxuICAgIHRoaXMuZW1wdHlIYXNoKCk7XG4gICAgbGV0IGhlbHBlciA9IHRoaXMuc2V0dXBIZWxwZXIoMCwgbmFtZSwgaGVscGVyQ2FsbCk7XG5cbiAgICBsZXQgaGVscGVyTmFtZSA9ICh0aGlzLmxhc3RIZWxwZXIgPSB0aGlzLm5hbWVMb29rdXAoXG4gICAgICAnaGVscGVycycsXG4gICAgICBuYW1lLFxuICAgICAgJ2hlbHBlcidcbiAgICApKTtcblxuICAgIGxldCBsb29rdXAgPSBbJygnLCAnKGhlbHBlciA9ICcsIGhlbHBlck5hbWUsICcgfHwgJywgbm9uSGVscGVyLCAnKSddO1xuICAgIGlmICghdGhpcy5vcHRpb25zLnN0cmljdCkge1xuICAgICAgbG9va3VwWzBdID0gJyhoZWxwZXIgPSAnO1xuICAgICAgbG9va3VwLnB1c2goXG4gICAgICAgICcgIT0gbnVsbCA/IGhlbHBlciA6ICcsXG4gICAgICAgIHRoaXMuYWxpYXNhYmxlKCdjb250YWluZXIuaG9va3MuaGVscGVyTWlzc2luZycpXG4gICAgICApO1xuICAgIH1cblxuICAgIHRoaXMucHVzaChbXG4gICAgICAnKCcsXG4gICAgICBsb29rdXAsXG4gICAgICBoZWxwZXIucGFyYW1zSW5pdCA/IFsnKSwoJywgaGVscGVyLnBhcmFtc0luaXRdIDogW10sXG4gICAgICAnKSwnLFxuICAgICAgJyh0eXBlb2YgaGVscGVyID09PSAnLFxuICAgICAgdGhpcy5hbGlhc2FibGUoJ1wiZnVuY3Rpb25cIicpLFxuICAgICAgJyA/ICcsXG4gICAgICB0aGlzLnNvdXJjZS5mdW5jdGlvbkNhbGwoJ2hlbHBlcicsICdjYWxsJywgaGVscGVyLmNhbGxQYXJhbXMpLFxuICAgICAgJyA6IGhlbHBlcikpJ1xuICAgIF0pO1xuICB9LFxuXG4gIC8vIFtpbnZva2VQYXJ0aWFsXVxuICAvL1xu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NlRGVjb3JhdG9ycyA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLmVudmlyb25tZW50LnVzZVBhcnRpYWwpIHtcbiAgICAgICAgcmV0LnVzZVBhcnRpYWwgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMub3B0aW9ucy5kYXRhKSB7XG4gICAgICAgIHJldC51c2VEYXRhID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZURlcHRocykge1xuICAgICAgICByZXQudXNlRGVwdGhzID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZUJsb2NrUGFyYW1zKSB7XG4gICAgICAgIHJldC51c2VCbG9ja1BhcmFtcyA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmNvbXBhdCkge1xuICAgICAgICByZXQuY29tcGF0ID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKCFhc09iamVjdCkge1xuICAgICAgICByZXQuY29tcGlsZXIgPSBKU09OLnN0cmluZ2lmeShyZXQuY29tcGlsZXIpO1xuXG4gICAgICAgIHRoaXMuc291cmNlLmN1cnJlbnRMb2NhdGlvbiA9IHsgc3RhcnQ6IHsgbGluZTogMSwgY29sdW1uOiAwIH0gfTtcbiAgICAgICAgcmV0ID0gdGhpcy5vYmplY3RMaXRlcmFsKHJldCk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuc3JjTmFtZSkge1xuICAgICAgICAgIHJldCA9IHJldC50b1N0cmluZ1dpdGhTb3VyY2VNYXAoeyBmaWxlOiBvcHRpb25zLmRlc3ROYW1lIH0pO1xuICAgICAgICAgIHJldC5tYXAgPSByZXQubWFwICYmIHJldC5tYXAudG9TdHJpbmcoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXQgPSByZXQudG9TdHJpbmcoKTtcbiAgICAgICAgfVxuICAgICA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ICAgICBzdGFjayxcbiAgICAgICcsICcsXG4gICAgICBjb21waWxlci5xdW90ZWRTdHJpbmcocGFydHNbaV0pLFxuICAgICAgJywgJyxcbiAgICAgIEpTT04uc3RyaW5naWZ5KGNvbXBpbGVyLnNvdXJjZS5jdXJyZW50TG9jYXRpb24pLFxuICAgICAgJyApJ1xuICAgIF07XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/runtime.js b/node_modules/handlebars/dist/amd/handlebars/runtime.js index 26890751..b9feb7ef 100644 --- a/node_modules/handlebars/dist/amd/handlebars/runtime.js +++ b/node_modules/handlebars/dist/amd/handlebars/runtime.js @@ -96,7 +96,7 @@ define(['exports', './utils', './exception', './base', './helpers', './internal/ loc: loc }); } - return obj[name]; + return container.lookupProperty(obj, name); }, lookupProperty: function lookupProperty(parent, propertyName) { var result = parent[propertyName]; @@ -353,4 +353,4 @@ define(['exports', './utils', './exception', './base', './helpers', './internal/ }); } }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQWVPLFdBQVMsYUFBYSxDQUFDLFlBQVksRUFBRTtBQUMxQyxRQUFNLGdCQUFnQixHQUFHLEFBQUMsWUFBWSxJQUFJLFlBQVksQ0FBQyxDQUFDLENBQUMsSUFBSyxDQUFDO1FBQzdELGVBQWUsU0FkakIsaUJBQWlCLEFBY29CLENBQUM7O0FBRXRDLFFBQ0UsZ0JBQWdCLFVBZmxCLGlDQUFpQyxBQWVzQixJQUNyRCxnQkFBZ0IsVUFsQmxCLGlCQUFpQixBQWtCc0IsRUFDckM7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dyBuZXcgRXhjZXB0aW9uKFxuICAgICAgICAnVGhlIHBhcnRpYWwgJyArXG4gICAgICAgICAgb3B0aW9ucy5uYW1lICtcbiAgICAgICAgICAnIGNvdWxkIG5vdCBiZSBjb21waWxlZCB3aGVuIHJ1bm5pbmcgaW4gcnVudGltZS1vbmx5IG1vZGUnXG4gICAgICApO1xuICAgIH1cbiAgfVxuXG4gIC8vIEp1c3QgYWRkIHdhdGVyXG4gIGxldCBjb250YWluZXIgPSB7XG4gICAgc3RyaWN0OiBmdW5jdGlvbihvYmosIG5hbWUsIGxvYykge1xuICAgICAgaWYgKCFvYmogfHwgIShuYW1lIGluIG9iaikpIHtcbiAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignXCInICsgbmFtZSArICdcIiBub3QgZGVmaW5lZCBpbiAnICsgb2JqLCB7XG4gICAgICAgICAgbG9jOiBsb2NcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gb2JqW25hbWVdO1xuICAgIH0sXG4gICAgbG9va3VwUHJvcGVydHk6IGZ1bmN0aW9uKHBhcmVudCwgcHJvcGVydHlOYW1lKSB7XG4gICAgICBsZXQgcmVzdWx0ID0gcGFyZW50W3Byb3BlcnR5TmFtZV07XG4gICAgICBpZiAocmVzdWx0ID09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIH1cbiAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocGFyZW50LCBwcm9wZXJ0eU5hbWUpKSB7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG5cbiAgICAgIGlmIChyZXN1bHRJc0FsbG93ZWQocmVzdWx0LCBjb250YWluZXIucHJvdG9BY2Nlc3NDb250cm9sLCBwcm9wZXJ0eU5hbWUpKSB7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH0sXG4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bCh7fSksXG5cbiAgICBub29wOiBlbnYuVk0ubm9vcCxcbiAgICBjb21waWxlckluZm86IHRlbXBsYXRlU3BlYy5jb21waWxlclxuICB9O1xuXG4gIGZ1bmN0aW9uIHJldChjb250ZXh0LCBvcHRpb25zID0ge30pIHtcbiAgICBsZXQgZGF0YSA9IG9wdGlvbnMuZGF0YTtcblxuICAgIHJldC5fc2V0dXAob3B0aW9ucyk7XG4gICAgaWYgKCFvcHRpb25zLnBhcnRpYWwgJiYgdGVtcGxhdGVTcGVjLnVzZURhdGEpIHtcbiAgICAgIGRhdGEgPSBpbml0RGF0YShjb250ZXh0LCBkYXRhKTtcbiAgICB9XG4gICAgbGV0IGRlcHRocyxcbiAgICAgIGJsb2NrUGFyYW1zID0gdGVtcGxhdGVTcGVjLnVzZUJsb2NrUGFyYW1zID8gW10gOiB1bmRlZmluZWQ7XG4gICAgaWYgKHRlbXBsYXRlU3BlYy51c2VEZXB0aHMpIHtcbiAgICAgIGlmIChvcHRpb25zLmRlcHRocykge1xuICAgICAgICBkZXB0aHMgPVxuICAgICAgICAgIGNvbnRleHQgIT0gb3B0aW9ucy5kZXB0aHNbMF1cbiAgICAgICAgICAgID8gW2NvbnRleHRdLmNvbmNhdChvcHRpb25zLmRlcHRocylcbiAgICAgICAgICAgIDogb3B0aW9ucy5kZXB0aHM7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBkZXB0aHMgPSBbY29udGV4dF07XG4gICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gbWFpbihjb250ZXh0IC8qLCBvcHRpb25zKi8pIHtcbiAgICAgIHJldHVybiAoXG4gICAgICAgICcnICtcbiAgICAgICAgdGVtcGxhdGVTcGVjLm1haW4oXG4gICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAgY29udGFpbmVyLmhlbHBlcnMsXG4gICAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzLFxuICAgICAgICAgIGRhdGEsXG4gIC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gICAgfVxuICAgIGxldCBkZXB0aHMsXG4gICAgICBibG9ja1BhcmFtcyA9IHRlbXBsYXRlU3BlYy51c2VCbG9ja1BhcmFtcyA/IFtdIDogdW5kZWZpbmVkO1xuICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlRGVwdGhzKSB7XG4gICAgICBpZiAob3B0aW9ucy5kZXB0aHMpIHtcbiAgICAgICAgZGVwdGhzID1cbiAgICAgICAgICBjb250ZXh0ICE9IG9wdGlvbnMuZGVwdGhzWzBdXG4gICAgICAgICAgICA/IFtjb250ZXh0XS5jb25jYXQob3B0aW9ucy5kZXB0aHMpXG4gICAgICAgICAgICA6IG9wdGlvbnMuZGVwdGhzO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVwdGhzID0gW2NvbnRleHRdO1xuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIG1haW4oY29udGV4dCAvKiwgb3B0aW9ucyovKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICAnJyArXG4gICAgICAgIHRlbXBsYXRlU3BlYy5tYWluKFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgIGNvbnRhaW5lci5oZWxwZXJzLFxuICAgICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyxcbiAgICAgICAgICBkYXRhLFxuICAgICAgICAgIGJsb2NrUGFyYW1zLFxuICAgICAgICAgIGRlcHRoc1xuICAgICAgICApXG4gICAgICApO1xuICAgIH1cblxuICAgIG1haW4gPSBleGVjdXRlRGVjb3JhdG9ycyhcbiAgICAgIHRlbXBsYXRlU3BlYy5tYWluLFxuICAgICAgbWFpbixcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIG9wdGlvbnMuZGVwdGhzIHx8IFtdLFxuICAgICAgZGF0YSxcbiAgICAgIGJsb2NrUGFyYW1zXG4gICAgKTtcbiAgICByZXR1cm4gbWFpbihjb250ZXh0LCBvcHRpb25zKTtcbiAgfVxuXG4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1xuICBpZiAoZm4uZGVjb3JhdG9yKSB7XG4gICAgbGV0IHByb3BzID0ge307XG4gICAgcHJvZyA9IGZuLmRlY29yYXRvcihcbiAgICAgIHByb2csXG4gICAgICBwcm9wcyxcbiAgICAgIGNvbnRhaW5lcixcbiAgICAgIGRlcHRocyAmJiBkZXB0aHNbMF0sXG4gICAgICBkYXRhLFxuICAgICAgYmxvY2tQYXJhbXMsXG4gICAgICBkZXB0aHNcbiAgICApO1xuICAgIFV0aWxzLmV4dGVuZChwcm9nLCBwcm9wcyk7XG4gIH1cbiAgcmV0dXJuIHByb2c7XG59XG5cbmZ1bmN0aW9uIHdyYXBIZWxwZXJzVG9QYXNzTG9va3VwUHJvcGVydHkobWVyZ2VkSGVscGVycywgY29udGFpbmVyKSB7XG4gIE9iamVjdC5rZXlzKG1lcmdlZEhlbHBlcnMpLmZvckVhY2goaGVscGVyTmFtZSA9PiB7XG4gICAgbGV0IGhlbHBlciA9IG1lcmdlZEhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgbWVyZ2VkSGVscGVyc1toZWxwZXJOYW1lXSA9IHBhc3NMb29rdXBQcm9wZXJ0eU9wdGlvbihoZWxwZXIsIGNvbnRhaW5lcik7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBwYXNzTG9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpIHtcbiAgY29uc3QgbG9va3VwUHJvcGVydHkgPSBjb250YWluZXIubG9va3VwUHJvcGVydHk7XG4gIHJldHVybiB3cmFwSGVscGVyKGhlbHBlciwgb3B0aW9ucyA9PiB7XG4gICAgcmV0dXJuIFV0aWxzLmV4dGVuZCh7IGxvb2t1cFByb3BlcnR5IH0sIG9wdGlvbnMpO1xuICB9KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/base.js b/node_modules/handlebars/dist/cjs/handlebars/base.js index 297e94f6..98b6ca42 100644 --- a/node_modules/handlebars/dist/cjs/handlebars/base.js +++ b/node_modules/handlebars/dist/cjs/handlebars/base.js @@ -22,7 +22,7 @@ var _logger2 = _interopRequireDefault(_logger); var _internalProtoAccess = require('./internal/proto-access'); -var VERSION = '4.7.6'; +var VERSION = '4.7.7'; exports.VERSION = VERSION; var COMPILER_REVISION = 8; exports.COMPILER_REVISION = COMPILER_REVISION; @@ -113,4 +113,4 @@ var log = _logger2['default'].log; exports.log = log; exports.createFrame = _utils.createFrame; exports.logger = _logger2['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7cUJBQThDLFNBQVM7O3lCQUNqQyxhQUFhOzs7O3VCQUNJLFdBQVc7OzBCQUNSLGNBQWM7O3NCQUNyQyxVQUFVOzs7O21DQUNTLHlCQUF5Qjs7QUFFeEQsSUFBTSxPQUFPLEdBQUcsT0FBTyxDQUFDOztBQUN4QixJQUFNLGlCQUFpQixHQUFHLENBQUMsQ0FBQzs7QUFDNUIsSUFBTSxpQ0FBaUMsR0FBRyxDQUFDLENBQUM7OztBQUU1QyxJQUFNLGdCQUFnQixHQUFHO0FBQzlCLEdBQUMsRUFBRSxhQUFhO0FBQ2hCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxVQUFVO0FBQ2IsR0FBQyxFQUFFLGtCQUFrQjtBQUNyQixHQUFDLEVBQUUsaUJBQWlCO0FBQ3BCLEdBQUMsRUFBRSxpQkFBaUI7QUFDcEIsR0FBQyxFQUFFLFVBQVU7Q0FDZCxDQUFDOzs7QUFFRixJQUFNLFVBQVUsR0FBRyxpQkFBaUIsQ0FBQzs7QUFFOUIsU0FBUyxxQkFBcUIsQ0FBQyxPQUFPLEVBQUUsUUFBUSxFQUFFLFVBQVUsRUFBRTtBQUNuRS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gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js index fe522695..efcf3ad2 100644 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +++ b/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js @@ -30,7 +30,7 @@ JavaScriptCompiler.prototype = { return this.internalNameLookup(parent, name); }, depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; }, compilerInfo: function compilerInfo() { @@ -1156,4 +1156,4 @@ function strictLookup(requireTerminal, compiler, parts, type) { exports['default'] = JavaScriptCompiler; module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2phdmFzY3JpcHQtY29tcGlsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztvQkFBb0QsU0FBUzs7eUJBQ3ZDLGNBQWM7Ozs7cUJBQ1osVUFBVTs7dUJBQ2QsWUFBWTs7OztBQUVoQyxTQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDdEIsTUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7Q0FDcEI7O0FBRUQsU0FBUyxrQkFBa0IsR0FBRyxFQUFFOztBQUVoQyxrQkFBa0IsQ0FBQyxTQUFTLEdBQUc7OztBQUc3QixZQUFVLEVBQUUsb0JBQVMsTUFBTSxFQUFFLElBQUksZUFBZTt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IH1cbiAgICAgIH1cblxuICAgICAgaWYgKHRoaXMuZW52aXJvbm1lbnQudXNlUGFydGlhbCkge1xuICAgICAgICByZXQudXNlUGFydGlhbCA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmRhdGEpIHtcbiAgICAgICAgcmV0LnVzZURhdGEgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMudXNlRGVwdGhzKSB7XG4gICAgICAgIHJldC51c2VEZXB0aHMgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMudXNlQmxvY2tQYXJhbXMpIHtcbiAgICAgICAgcmV0LnVzZUJsb2NrUGFyYW1zID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLm9wdGlvbnMuY29tcGF0KSB7XG4gICAgICAgIHJldC5jb21wYXQgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICBpZiAoIWFzT2JqZWN0KSB7XG4gICAgICAgIHJldC5jb21waWxlciA9IEpTT04uc3RyaW5naWZ5KHJldC5jb21waWxlcik7XG5cbiAgICAgICAgdGhpcy5zb3VyY2UuY3VycmVudExvY2F0aW9uID0geyBzdGFydDogeyBsaW5lOiAxLCBjb2x1bW46IDAgfSB9O1xuICAgICAgICByZXQgPSB0aGlzLm9iamVjdExpdGVyYWwocmV0KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5zcmNOYW1lKSB7XG4gICAgICAgICAgcmV0ID0gcmV0LnRvU3RyaW5nV2l0aFNvdXJjZU1hcCh7IGZpbGU6IG9wdGlvbnMuZGVzdE5hbWUgfSk7XG4gICAgICAgICAgcmV0Lm1hcCA9IHJldC5tYXAgJiYgcmV0Lm1hcC50b1N0cmluZygpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldCA9IHJldC50b1N0cmluZygpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXQuY29tcGlsZXJPcHRpb25zID0gdGhpcy5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RlZCBjaGlsZHJlblxuICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmNvbnRleHQucHJvZ3JhbXMubGVuZ3RoO1xuICAgICAgICBjaGlsZC5pbmRleCA9IGluZGV4O1xuICAgICAgICBjaGlsZC5uYW1lID0gJ3Byb2dyYW0nICsgaW5kZXg7XG4gICAgICAgIHRoaXMuY29udGV4dC5wcm9ncmFtc1tpbmRleF0gPSBjb21waWxlci5jb21waWxlKFxuICAgICAgICAgIGNoaWxkLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgdGhpcy5jb250ZXh0LFxuICAgICAgICAgICF0aGlzLnByZWNvbXBpbGVcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5jb250ZXh0LmRlY29yYXRvcnNbaW5kZXhdID0gY29tcGlsZXIuZGVjb3JhdG9ycztcbiAgICAgICAgdGhpcy5jb250ZXh0LmVudmlyb25tZW50c1tpbmRleF0gPSBjaGlsZDtcblxuICAgICAgICB0aGlzLnVzZURlcHRocyA9IHRoaXMudXNlRGVwdGhzIHx8IGNvbXBpbGVyLnVzZURlcHRocztcbiAgICAgICAgdGhpcy51c2VCbG9ja1BhcmFtcyA9IHRoaXMudXNlQmxvY2tQYXJhbXMgfHwgY29tcGlsZXIudXNlQmxvY2tQYXJhbXM7XG4gICAgICAgIGNoaWxkLnVzZURlcHRocyA9IHRoaXMudXNlRGVwdGhzO1xuICAgICAgICBjaGlsZC51c2VCbG9ja1BhcmFtcyA9IHRoaXMudXNlQmxvY2tQYXJhbXM7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjaGlsZC5pbmRleCA9IGV4aXN0aW5nLmluZGV4O1xuICAgICAgICBjaGlsZC5uYW1lID0gJ3Byb2dyYW0nICsgZXhpc3RpbmcuaW5kZXg7XG5cbiAgICAgICAgdGhpcy51c2VEZXB0aHMgPSB0aGlzLnVzZURlcHRocyB8fCBleGlzdGluZy51c2VEZXB0aHM7XG4gICAgICAgIHRoaXMudXNlQmxvY2tQYX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nRleHQoYXNPYmplY3QpO1xuICAgIGlmICghdGhpcy5pc0NoaWxkKSB7XG4gICAgICBsZXQgcmV0ID0ge1xuICAgICAgICBjb21waWxlcjogdGhpcy5jb21waWxlckluZm8oKSxcbiAgICAgICAgbWFpbjogZm5cbiAgICAgIH07XG5cbiAgICAgIGlmICh0aGlzLmRlY29yYXRvcnMpIHtcbiAgICAgICAgcmV0Lm1haW5fZCA9IHRoaXMuZGVjb3JhdG9yczsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBjYW1lbGNhc2VcbiAgICAgICAgcmV0LnVzZURlY29yYXRvcnMgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICBsZXQgeyBwcm9ncmFtcywgZGVjb3JhdG9ycyB9ID0gdGhpcy5jb250ZXh0O1xuICAgICAgZm9yIChpID0gMCwgbCA9IHByb2dyYW1zLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICBpZiAocHJvZ3JhbXNbaV0pIHtcbiAgICAgICAgICByZXRbaV0gPSBwcm9ncmFtc1tpXTtcbiAgICAgICAgICBpZiAoZGVjb3JhdG9yc1tpXSkge1xuICAgICAgICAgICAgcmV0W2kgKyAnX2QnXSA9IGRlY29yYXRvcnNbaV07XG4gICAgICAgICAgICByZXQudXNlRGVjb3JhdG9ycyA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLmVudmlyb25tZW50LnVzZVBhcnRpYWwpIHtcbiAgICAgICAgcmV0LnVzZVBhcnRpYWwgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMub3B0aW9ucy5kYXRhKSB7XG4gICAgICAgIHJldC51c2VEYXRhID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZURlcHRocykge1xuICAgICAgICByZXQudXNlRGVwdGhzID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZUJsb2NrUGFyYW1zKS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cmlhYmxlTmFtZSA9IGZ1bmN0aW9uKG5hbWUpIHtcbiAgcmV0dXJuIChcbiAgICAhSmF2YVNjcmlwdENvbXBpbGVyLlJFU0VSVkVEX1dPUkRTW25hbWVdICYmXG4gICAgL15bYS16QS1aXyRdWzAtOWEtekEtWl8kXSokLy50ZXN0KG5hbWUpXG4gICk7XG59O1xuXG5mdW5jdGlvbiBzdHJpY3RMb29rdXAocmVxdWlyZVRlcm1pbmFsLCBjb21waWxlciwgcGFydHMsIHR5cGUpIHtcbiAgbGV0IHN0YWNrID0gY29tcGlsZXIucG9wU3RhY2soKSxcbiAgICBpID0gMCxcbiAgICBsZW4gPSBwYXJ0cy5sZW5ndGg7XG4gIGlmIChyZXF1aXJlVGVybWluYWwpIHtcbiAgICBsZW4tLTtcbiAgfVxuXG4gIGZvciAoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzdGFjayA9IGNvbXBpbGVyLm5hbWVMb29rdXAoc3RhY2ssIHBhcnRzW2ldLCB0eXBlKTtcbiAgfVxuXG4gIGlmIChyZXF1aXJlVGVybWluYWwpIHtcbiAgICByZXR1cm4gW1xuICAgICAgY29tcGlsZXIuYWxpYXNhYmxlKCdjb250YWluZXIuc3RyaWN0JyksXG4gICAgICAnKCcsXG4gICAgICBzdGFjayxcbiAgICAgICcsICcsXG4gICAgICBjb21waWxlci5xdW90ZWRTdHJpbmcocGFydHNbaV0pLFxuICAgICAgJywgJyxcbiAgICAgIEpTT04uc3RyaW5naWZ5KGNvbXBpbGVyLnNvdXJjZS5jdXJyZW50TG9jYXRpb24pLFxuICAgICAgJyApJ1xuICAgIF07XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/runtime.js b/node_modules/handlebars/dist/cjs/handlebars/runtime.js index 7503ded5..5b976262 100644 --- a/node_modules/handlebars/dist/cjs/handlebars/runtime.js +++ b/node_modules/handlebars/dist/cjs/handlebars/runtime.js @@ -113,7 +113,7 @@ function template(templateSpec, env) { loc: loc }); } - return obj[name]; + return container.lookupProperty(obj, name); }, lookupProperty: function lookupProperty(parent, propertyName) { var result = parent[propertyName]; @@ -369,4 +369,4 @@ function passLookupPropertyOption(helper, container) { return Utils.extend({ lookupProperty: lookupProperty }, options); }); } -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7cUJBQXVCLFNBQVM7O0lBQXBCLEtBQUs7O3lCQUNLLGFBQWE7Ozs7b0JBTTVCLFFBQVE7O3VCQUNtQixXQUFXOztrQ0FDbEIsdUJBQXVCOzttQ0FJM0MseUJBQXlCOztBQUV6QixTQUFTLGFBQWEsQ0FBQyxZQUFZLEVBQUU7QUFDMUMsTUFBTSxnQkFBZ0IsR0FBRyxBQUFDLFlBQVksSUFBSSxZQUFZLENBQUMsQ0FBQyxDQUFDLElBQUssQ0FBQztNQUM3RCxlQUFlLDBCQUFvQixDQUFDOztBQUV0QyxNQUNFLGdCQUFnQiwyQ0FBcUMsSUFDckQsZ0JBQWdCLDJCQUFxQixFQUNyQztBQUNBLFdBQU87R0FDUjs7QUFFRCxNQUFJLGdCQUFnQiwwQ0FBb0MsRUFBRTtBQUN4RCxRQUFNLGVBQWUsR0FBRyx1QkFBaUIsZUFBZSxDQUFDO1FBQ3ZELGdCQUFnQixHQUFHLHVCQUFpQixnQkFBZ0IsQ0FBQyxDQUFDO0FBQ3hELFVBQU0sMkJBQ0oseUZBQXlGLEdBQ3ZGLHFEQUFxRCxHQUNyRCxlQUFlLEdBQ2YsbURBQW1ELEdBQ25ELGdCQUFnQixHQUNoQixJQUFJLENBQ1AsQ0F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kZW50ICsgbGluZXNbaV07XG4gICAgICAgIH1cbiAgICAgICAgcmVzdWx0ID0gbGluZXMuam9pbignXFxuJyk7XG4gICAgICB9XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH0gZWxzZSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKFxuICAgICAgICAnVGhlIHBhcnRpYWwgJyArXG4gICAgICAgICAgb3B0aW9ucy5uYW1lICtcbiAgICAgICAgICAnIGNvdWxkIG5vdCBiZSBjb21waWxlZCB3aGVuIHJ1bm5pbmcgaW4gcnVudGltZS1vbmx5IG1vZGUnXG4gICAgICApO1xuICAgIH1cbiAgfVxuXG4gIC8vIEp1c3QgYWRkIHdhdGVyXG4gIGxldCBjb250YWluZXIgPSB7XG4gICAgc3RyaWN0OiBmdW5jdGlvbihvYmosIG5hbWUsIGxvYykge1xuICAgICAgaWYgKCFvYmogfHwgIShuYW1lIGluIG9iaikpIHtcbiAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignXCInICsgbmFtZSArICdcIiBub3QgZGVmaW5lZCBpbiAnICsgb2JqLCB7XG4gICAgICAgICAgbG9jOiBsb2NcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gY29udGFpbmVyLmxvb2t1cFByb3BlcnR5KG9iaiwgbmFtZSk7XG4gICAgfSxcbiAgICBsb29rdXBQcm9wZXJ0eTogZnVuY3Rpb24ocGFyZW50LCBwcm9wZXJ0eU5hbWUpIHtcbiAgICAgIGxldCByZXN1bHQgPSBwYXJlbnRbcHJvcGVydHlOYW1lXTtcbiAgICAgIGlmIChyZXN1bHQgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChwYXJlbnQsIHByb3BlcnR5TmFtZSkpIHtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIH1cblxuIC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AgcmV0dXJuIChcbiAgICAgICAgJycgK1xuICAgICAgICB0ZW1wbGF0ZVNwZWMubWFpbihcbiAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICBjb250YWluZXIuaGVscGVycyxcbiAgICAgICAgICBjb250YWluZXIucGFydGlhbHMsXG4gICAgICAgICAgZGF0YSxcbiAgICAgICAgICBibG9ja1BhcmFtcyxcbiAgICAgICAgICBkZXB0aHNcbiAgICAgICAgKVxuICAgICAgKTtcbiAgICB9XG5cbiAgICBtYWluID0gZXhlY3V0ZURlY29yYXRvcnMoXG4gICAgICB0ZW1wbGF0ZVNwZWMubWFpbixcbiAgICAgIG1haW4sXG4gICAgICBjb250YWluZXIsXG4gICAgICBvcHRpb25zLmRlcHRocyB8fCBbXSxcbiAgICAgIGRhdGEsXG4gICAgICBibG9ja1BhcmFtc1xuICAgICk7XG4gICAgcmV0dXJuIG1haW4oY29udGV4dCwgb3B0aW9ucyk7XG4gIH1cblxuICByZXQuaXNUb3AgPSB0cnVlO1xuXG4gIHJldC5fc2V0dXAgPSBmdW5jdGlvbihvcHRpb25zKSB7XG4gICAgaWYgKCFvcHRpb25zLnBhcnRpYWwpIHtcbiAgICAgIGxldCBtZXJnZWRIZWxwZXJzID0gVXRpbHMuZXh0ZW5kKHt9LCBlbnYuaGVscGVycywgb3B0aW9ucy5oZWxwZXJzKTtcbiAgICAgIHdyYXBIZWxwZXJzVG9QYXNzTG9va3VwUHJvcGVydHkobWVyZ2VkSGVscGVycywgY29udGFpbmVyKTtcbiAgICAgIGNvbnRhaW5lci5oZWxwZXJzID0gbWVyZ2VkSGVscGVycztcblxuICAgICAgaWYgKHRlbXBsYXRlU3BlYy51c2VQYXJ0aWFsKSB7XG4gICAgICAgIC8vIFVzZSBtZXJnZUlmTmVlZGVkIGhlcmUgdG8gcHJldmVudCBjb21waWxpbmcgZ2xvYmFsIHBhcnRpYWxzIG11bHRpcGxlIHRpbWVzXG4gICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyA9IGNvbnRhaW5lci5tZXJnZUlmTmVlZGVkKFxuICAgICAgICAgIG9wdGlvbnMucGFydGlhbHMsXG4gICAgICAgICAgZW52LnBhcnRpYWxzXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBpZiAodGVtcGxhdGVTcGVjLnVzZVBhcnRpYWwgfHwgdGVtcGxhdGVTcGVjLnVzZURlY29yYXRvcnMpIHtcbiAgICAgICAgY29udGFpbmVyLmRlY29yYXRvcnMgPSBVdGlscy5leHRlbmQoXG4gICAgICAgICAge30sXG4gICAgICAgICAgZW52LmRlY29yYXRvcnMsXG4gICAgICAgICAgb3B0aW9ucy5kZWNvcmF0b3JzXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnRhaW5lci5ob29rcyA9IHt9O1xuICAgICAgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCA9IGNyZWF0ZVByb3RvQWNjZXNzQ29udHJvbChvcHRpb25zKTtcblxuICAgICAgbGV0IGtlZXBIZWxwZXJJbkhlbHBlcnMgPVxuICAgICAgICBvcHRpb25zLmFsbG93Q2FsbHNUb0hlbHBlck1pc3NpbmcgfHxcbiAgICAgICAgdGVtcGxhdGVXYXNQcmVjb21waWxlZFdpdGhDb21waWxlclY3O1xuICAgICAgbW92ZUhlbHBlclRvSG9va3MoY29udGFpbmVyLCAnaGVscGVyTWlzc2luZycsIGtlZXBIZWxwZXJJbkhlbHBlcnMpO1xuICAgICAgbW92ZUhlbHBlclRvSG9va3MoY29udGFpbmVyLCAnYmxvY2tIZWxwZXJNaXNzaW5nJywga2VlcEhlbHBlckluSGVscGVycyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGNvbnRhaW5lci5wcm90b0FjY2Vzc0NvbnRyb2wgPSBvcHRpb25zLnByb3RvQWNjZXNzQ29udHJvbDsgLy8gaW50ZXJuYWwgb3B0aW9uXG4gICAgICBjb250YWluZXIuaGVscGVycyA9IG9wdGlvbnMuaG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XIgPSBtZXJnZWRIZWxwZXJzW2hlbHBlck5hbWVdO1xuICAgIG1lcmdlZEhlbHBlcnNbaGVscGVyTmFtZV0gPSBwYXNzTG9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpO1xuICB9KTtcbn1cblxuZnVuY3Rpb24gcGFzc0xvb2t1cFByb3BlcnR5T3B0aW9uKGhlbHBlciwgY29udGFpbmVyKSB7XG4gIGNvbnN0IGxvb2t1cFByb3BlcnR5ID0gY29udGFpbmVyLmxvb2t1cFByb3BlcnR5O1xuICByZXR1cm4gd3JhcEhlbHBlcihoZWxwZXIsIG9wdGlvbnMgPT4ge1xuICAgIHJldHVybiBVdGlscy5leHRlbmQoeyBsb29rdXBQcm9wZXJ0eSB9LCBvcHRpb25zKTtcbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/handlebars.amd.js b/node_modules/handlebars/dist/handlebars.amd.js index e5c7a2d7..9e6543ec 100644 --- a/node_modules/handlebars/dist/handlebars.amd.js +++ b/node_modules/handlebars/dist/handlebars.amd.js @@ -1,7 +1,7 @@ /**! @license - handlebars v4.7.6 + handlebars v4.7.7 Copyright (C) 2011-2019 by Yehuda Katz @@ -732,7 +732,7 @@ define('handlebars/base',['exports', './utils', './exception', './helpers', './d var _logger2 = _interopRequireDefault(_logger); - var VERSION = '4.7.6'; + var VERSION = '4.7.7'; exports.VERSION = VERSION; var COMPILER_REVISION = 8; exports.COMPILER_REVISION = COMPILER_REVISION; @@ -824,7 +824,7 @@ define('handlebars/base',['exports', './utils', './exception', './helpers', './d exports.createFrame = _utils.createFrame; exports.logger = _logger2['default']; }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU9PLE1BQU0sT0FBTyxHQUF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lXTtcbiAgfSxcblxuICByZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSwgZm4pIHtcbiAgICBpZiAodG9TdHJpbmcuY2FsbChuYW1lKSA9PT0gb2JqZWN0VHlwZSkge1xuICAgICAgaWYgKGZuKSB7XG4gICAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ0FyZyBub3Qgc3VwcG9ydGVkIHdpdGggbXVsdGlwbGUgZGVjb3JhdG9ycycpO1xuICAgICAgfVxuICAgICAgZXh0ZW5kKHRoaXMuZGVjb3JhdG9ycywgbmFtZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuZGVjb3JhdG9yc1tuYW1lXSA9IGZuO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19 ; define('handlebars/safe-string',['exports', 'module'], function (exports, module) { // Build out our basic SafeString type @@ -962,7 +962,7 @@ define('handlebars/runtime',['exports', './utils', './exception', './base', './h loc: loc }); } - return obj[name]; + return container.lookupProperty(obj, name); }, lookupProperty: function lookupProperty(parent, propertyName) { var result = parent[propertyName]; @@ -1219,7 +1219,7 @@ define('handlebars/runtime',['exports', './utils', './exception', './base', './h }); } }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQWVPLFdBQVMsYUFBYSxDQUFDLFlBQVksRUFBRTtBQUMxQyxRQUFNLGdCQUFnQixHQUFHLEFBQUMsWUFBWSxJQUFJLFlBQVksQ0FBQyxDQUFDLENBQUMsSUFBSyxDQUFDO1FBQzdELGVBQWUsU0FkakIsaUJBQWlCLEFBY29CLENBQUM7O0FBRXRDLFFBQ0UsZ0JBQWdCLFVBZmxCLGlDQUFpQyxBQWVzQixJQUNyRCxnQkFBZ0IsVUFsQmxCLGlCQUFpQixBQWtCc0IsRUFDckM7QUFDQSxhQUFPO0tBQ1I7O0FBRUQsUUFBSSxnQkFBZ0IsU0FyQnBCLGlDQUFpQyxBQXFCdUIsRUFBRTtBQUN4RCxVQUFNLGVBQWUsR0FBRyxNQXJCMUIsZ0JBQWdCLENBcUIyQixlQUFlLENBQUM7VUFDdkQsZ0JBQWdCLEdBQUcsTUF0QnZCLGdCQUFnQixDQXNCd0IsZ0JBQWdCLENBQUMsQ0FBQztBQUN4RCxZQUFNLDBCQUNKLHlGQUF5RixHQUN2RixxREFBcUQsR0FDckQsZUFBZSxHQUNmLG1EQUFtRCxHQUNuRCxnQkFBZ0IsR0FDaEIsSUFBSSxDQUNQLENBQUM7S0FDSCxNQUFNOztBQUVMLFlBQU0sMEJBQ0osd0ZBQXdGLEdBQ3RGLGlEQUFpRCxHQUNqRCxZQUFZLENBQUMsQ0FBQyxDQUFDLEdBQ2YsSUFBSSxDQUNQLENBQUM7S0FDSDtHQUNGOztBQUVNLFdBQVMsUUFBUSxDQUFDLFlBQVksRUFBRSxHQUFHL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h0ZW5kZWRPcHRpb25zKTtcbiAgICB9XG4gICAgaWYgKHJlc3VsdCAhPSBudWxsKSB7XG4gICAgICBpZiAob3B0aW9ucy5pbmRlbnQpIHtcbiAgICAgICAgbGV0IGxpbmVzID0gcmVzdWx0LnNwbGl0KCdcXG4nKTtcbiAgICAgICAgZm9yIChsZXQgaSA9IDAsIGwgPSBsaW5lcy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICBpZiAoIWxpbmVzW2ldICYmIGkgKyAxID09PSBsKSB7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBsaW5lc1tpXSA9IG9wdGlvbnMuaW5kZW50ICsgbGluZXNbaV07XG4gICAgICAgIH1cbiAgICAgICAgcmVzdWx0ID0gbGluZXMuam9pbignXFxuJyk7XG4gICAgICB9XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH0gZWxzZSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKFxuICAgICAgICAnVGhlIHBhcnRpYWwgJyArXG4gICAgICAgICAgb3B0aW9ucy5uYW1lICtcbiAgICAgICAgICAnIGNvdWxkIG5vdCBiZSBjb21waWxlZCB3aGVuIHJ1bm5pbmcgaW4gcnVudGltZS1vbmx5IG1vZGUnXG4gICAgICApO1xuICAgIH1cbiAgfVxuXG4gIC8vIEp1c3QgYWRkIHdhdGVyXG4gIGxldCBjb250YWluZXIgPSB7XG4gICAgc3RyaWN0OiBmdW5jdGlvbihvYmosIG5hbWUsIGxvYykge1xuICAgICAgaWYgKCFvYmogfHwgIShuYW1lIGluIG9iaikpIHtcbiAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignXCInICsgbmFtZSArICdcIiBub3QgZGVmaW5lZCBpbiAnICsgb2JqLCB7XG4gICAgICAgICAgbG9jOiBsb2NcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gb2JqW25hbWVdO1xuICAgIH0sXG4gICAgbG9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gICAgICBkZXB0aHMgPVxuICAgICAgICAgIGNvbnRleHQgIT0gb3B0aW9ucy5kZXB0aHNbMF1cbiAgICAgICAgICAgID8gW2NvbnRleHRdLmNvbmNhdChvcHRpb25zLmRlcHRocylcbiAgICAgICAgICAgIDogb3B0aW9ucy5kZXB0aHM7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBkZXB0aHMgPSBbY29udGV4dF07XG4gICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gbWFpbihjb250ZXh0IC8qLCBvcHRpb25zKi8pIHtcbiAgICAgIHJldHVybiAoXG4gICAgICAgICcnICtcbiAgICAgICAgdGVtcGxhdGVTcGVjLm1haW4oXG4gICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAgY29udGFpbmVyLmhlbHBlcnMsXG4gICAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzLFxuICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgYmxvY2tQYXJhbXMsXG4gICAgICAgICAgZGVwdGhzXG4gICAgICAgIClcbiAgICAgICk7XG4gICAgfVxuXG4gICAgbWFpbiA9IGV4ZWN1dGVEZWNvcmF0b3JzKFxuICAgICAgdGVtcGxhdGVTcGVjLm1haW4sXG4gICAgICBtYWluLFxuICAgICAgY29udGFpbmVyLFxuICAgICAgb3B0aW9ucy5kZXB0aHMgfHwgW10sXG4gICAgICBkYXRhLFxuICAgICAgYmxvY2tQYXJhbXNcbiAgICApO1xuICAgIHJldHVybiBtYWluKGNvbnRleHQsIG9wdGlvbnMpO1xuICB9XG5cbiAgcmV0LmlzVG9wID0gdHJ1ZTtcblxuICByZXQuX3NldHVwID0gZnVuY3Rpb24ob3B0aW9ucykge1xuICAgIGlmICghb3B0aW9ucy5wYXJ0aWFsKSB7XG4gICAgICBsZXQgbWVyZ2VkSGVscGVycyA9IFV0aWxzLmV4dGVuZCh7fSwgZW52LmhlbHBlcnMsIG9wdGlvbnMuaGVscGVycyk7XG4g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ydGlhbCwgY29udGV4dCwgb3B0aW9ucyk7XG5cbiAgICBsZXQgZXh0ZW5kZWRPcHRpb25zID0gVXRpbHMuZXh0ZW5kKHt9LCBvcHRpb25zLCB7XG4gICAgICBob29rczogdGhpcy5ob29rcyxcbiAgICAgIHByb3RvQWNjZXNzQ29udHJvbDogdGhpcy5wcm90b0FjY2Vzc0NvbnRyb2xcbiAgICB9KTtcblxuICAgIGxldCByZXN1bHQgPSBlbnYuVk0uaW52b2tlUGFydGlhbC5jYWxsKFxuICAgICAgdGhpcyxcbiAgICAgIHBhcnRpYWwsXG4gICAgICBjb250ZXh0LFxuICAgICAgZXh0ZW5kZWRPcHRpb25zXG4gICAgKTtcblxuICAgIGlmIChyZXN1bHQgPT0gbnVsbCAmJiBlbnYuY29tcGlsZSkge1xuICAgICAgb3B0aW9ucy5wYXJ0aWFsc1tvcHRpb25zLm5hbWVdID0gZW52LmNvbXBpbGUoXG4gICAgICAgIHBhcnRpYWwsXG4gICAgICAgIHRlbXBsYXRlU3BlYy5jb21waWxlck9wdGlvbnMsXG4gICAgICAgIGVudlxuICAgICAgKTtcbiAgICAgIHJlc3VsdCA9IG9wdGlvbnMucGFydGlhbHNbb3B0aW9ucy5uYW1lXShjb250ZXh0LCBleHRlbmRlZE9wdGlvbnMpO1xuICAgIH1cbiAgICBpZiAocmVzdWx0ICE9IG51bGwpIHtcbiAgICAgIGlmIChvcHRpb25zLmluZGVudCkge1xuICAgICAgICBsZXQgbGluZXMgPSByZXN1bHQuc3BsaXQoJ1xcbicpO1xuICAgICAgICBmb3IgKGxldCBpID0gMCwgbCA9IGxpbmVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgIGlmICghbGluZXNbaV0gJiYgaSArIDEgPT09IGwpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGxpbmVzW2ldID0gb3B0aW9ucy5pbmRlbnQgKyBsaW5lc1tpXTtcbiAgICAgICAgfVxuIC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YWxzID0gY29udGFpbmVyLm1lcmdlSWZOZWVkZWQoXG4gICAgICAgICAgb3B0aW9ucy5wYXJ0aWFscyxcbiAgICAgICAgICBlbnYucGFydGlhbHNcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlUGFydGlhbCB8fCB0ZW1wbGF0ZVNwZWMudXNlRGVjb3JhdG9ycykge1xuICAgICAgICBjb250YWluZXIuZGVjb3JhdG9ycyA9IFV0aWxzLmV4dGVuZChcbiAgICAgICAgICB7fSxcbiAgICAgICAgICBlbnYuZGVjb3JhdG9ycyxcbiAgICAgICAgICBvcHRpb25zLmRlY29yYXRvcnNcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29udGFpbmVyLmhvb2tzID0ge307XG4gICAgICBjb250YWluZXIucHJvdG9BY2Nlc3NDb250cm9sID0gY3JlYXRlUHJvdG9BY2Nlc3NDb250cm9sKG9wdGlvbnMpO1xuXG4gICAgICBsZXQga2VlcEhlbHBlckluSGVscGVycyA9XG4gICAgICAgIG9wdGlvbnMuYWxsb3dDYWxsc1RvSGVscGVyTWlzc2luZyB8fFxuICAgICAgICB0ZW1wbGF0ZVdhc1ByZWNvbXBpbGVkV2l0aENvbXBpbGVyVjc7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdoZWxwZXJNaXNzaW5nJywga2VlcEhlbHBlckluSGVscGVycyk7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdibG9ja0hlbHBlck1pc3NpbmcnLCBrZWVwSGVscGVySW5IZWxwZXJzKTtcbiAgICB9IGVsc2Uge1xuICAgICAgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCA9IG9wdGlvbnMucHJvdG9BY2Nlc3NDb250cm9sOyAvLyBpbnRlcm5hbCBvcHRpb25cbiAgICAgIGNvbnRhaW5lci5oZWxwZXJzID0gb3B0aW9ucy5oZWxwZXJzO1xuICAg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AgbWVyZ2VkSGVscGVyc1toZWxwZXJOYW1lXSA9IHBhc3NMb29rdXBQcm9wZXJ0eU9wdGlvbihoZWxwZXIsIGNvbnRhaW5lcik7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBwYXNzTG9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpIHtcbiAgY29uc3QgbG9va3VwUHJvcGVydHkgPSBjb250YWluZXIubG9va3VwUHJvcGVydHk7XG4gIHJldHVybiB3cmFwSGVscGVyKGhlbHBlciwgb3B0aW9ucyA9PiB7XG4gICAgcmV0dXJuIFV0aWxzLmV4dGVuZCh7IGxvb2t1cFByb3BlcnR5IH0sIG9wdGlvbnMpO1xuICB9KTtcbn1cbiJdfQ== ; define('handlebars/no-conflict',['exports', 'module'], function (exports, module) { 'use strict'; @@ -3441,7 +3441,7 @@ define('handlebars/compiler/javascript-compiler',['exports', 'module', '../base' return this.internalNameLookup(parent, name); }, depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; }, compilerInfo: function compilerInfo() { @@ -4567,7 +4567,7 @@ define('handlebars/compiler/javascript-compiler',['exports', 'module', '../base' module.exports = JavaScriptCompiler; }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2phdmFzY3JpcHQtY29tcGlsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFLQSxXQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDdEIsUUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7R0FDcEI7O0FBRUQsV0FBUyxrQkFBa0IsR0FBRyxFQUFFOztBQUVoQyxvQkFBa0IsQ0FBQyxTQUFTLEdBQUc7OztBQU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pXTtcbiAgICAgICAgICAgIHJldC51c2VEZWNvcmF0b3JzID0gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHRoaXMuZW52aXJvbm1lbnQudXNlUGFydGlhbCkge1xuICAgICAgICByZXQudXNlUGFydGlhbCA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmRhdGEpIHtcbiAgICAgICAgcmV0LnVzZURhdGEgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMudXNlRGVwdGhzKSB7XG4gICAgICAgIHJldC51c2VEZXB0aHMgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMudXNlQmxvY2tQYXJhbXMpIHtcbiAgICAgICAgcmV0LnVzZUJsb2NrUGFyYW1zID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLm9wdGlvbnMuY29tcGF0KSB7XG4gICAgICAgIHJldC5jb21wYXQgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICBpZiAoIWFzT2JqZWN0KSB7XG4gICAgICAgIHJldC5jb21waWxlciA9IEpTT04uc3RyaW5naWZ5KHJldC5jb21waWxlcik7XG5cbiAgICAgICAgdGhpcy5zb3VyY2UuY3VycmVudExvY2F0aW9uID0geyBzdGFydDogeyBsaW5lOiAxLCBjb2x1bW46IDAgfSB9O1xuICAgICAgICByZXQgPSB0aGlzLm9iamVjdExpdGVyYWwocmV0KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5zcmNOYW1lKSB7XG4gICAgICAgICAgcmV0ID0gcmV0LnRvU3RyaW5nV2l0aFNvdXJjZU1hcCh7IGZpbGU6IG9wdGlvbnMuZGVzdE5hbWUgfSk7XG4gICAgICAgICAgcmV0Lm1hcCA9IHJldC5tYXAgJiYgcmV0Lm1hcC50b1N0cmluZygpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldCA9IHJldC50b1N0cmluZyg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0gZWxzZSB7XG4gICAgICB0aGlzLmRlY29yYXRvcnMgPSB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgbGV0IGZuID0gdGhpcy5jcmVhdGVGdW5jdGlvbkNvbnRleHQoYXNPYmplY3QpO1xuICAgIGlmICghdGhpcy5pc0NoaWxkKSB7XG4gICAgICBsZXQgcmV0ID0ge1xuICAgICAgICBjb21waWxlcjogdGhpcy5jb21waWxlckluZm8oKSxcbiAgICAgICAgbWFpbjogZm5cbiAgICAgIH07XG5cbiAgICAgIGlmICh0aGlzLmRlY29yYXRvcnMpIHtcbiAgICAgICAgcmV0Lm1haW5fZCA9IHRoaXMuZGVjb3JhdG9yczsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBjYW1lbGNhc2VcbiAgICAgICAgcmV0LnVzZURlY29yYXRvcnMgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICBsZXQgeyBwcm9ncmFtcywgZGVjb3JhdG9ycyB9ID0gdGhpcy5jb250ZXh0O1xuICAgICAgZm9yIChpID0gMCwgbCA9IHByb2dyYW1zLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICBpZiAocHJvZ3JhbXNbaV0pIHtcbiAgICAgICAgICByZXRbaV0gPSBwcm9ncmFtc1tpXTtcbiAgICAgICAgICBpZiAoZGVjb3JhdG9yc1tpXSkge1xuICAgICAgICAgICAgcmV0W2kgKyAnX2QnXSA9IGRlY29yYXRvcnNbaV07XG4gICAgICAgICAgICByZXQudXNlRGVjb3JhdG9ycyA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLmVudmlyb25tZW50LnVzZVBhcnRpYWwpIHtcbiAgICAgICAgcmV0LnVzZVBhcnRpYWwgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMub3B0aW9ucy5kYXRhKSB7XG4gICAgICAgIHJldC51c2VEYXRhID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZURlcHRocykge1xuICAgICAgICByZXQudXNlRGVwdGhzID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZUJsb2NrUGFyYW1zKSB7XG4gICAgICAgIHJldC51c2VCbG9ja1BhcmFtcyA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmNvbXBhdCkge1xuICAgICAgICByZXQuY29tcGF0ID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKCFhc09iamVjdCkge1xuICAgICAgICByZXQuY29tcGlsZXIgPSBKU09OLnN0cmluZ2lmeShyZXQuY29tcGlsZXIpO1xuXG4gICAgICAgIHRoaXMuc291cmNlLmN1cnJlbnRMb2NhdGlvbiA9IHsgc3RhcnQ6IHsgbGluZTogMSwgY29sdW1uOiAwIH0gfTtcbiAgICAgICAgcmV0ID0gdGhpcy5vYmplY3RMaXRlcmFsKHJldCk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuc3JjTmFtZSkge1xuICAgICAgICAgIHJldCA9IHJldC50b1N0cmluZ1dpdGhTb3VyY2VNYXAoeyBmaWxlOiBvcHRpb25zLmRlc3ROYW1lIH0pO1xuICAgICAgICAgIHJldC5tYXAgPSByZXQubWFwICYmIHJldC5tYXAudG9TdHJpbmcoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXQgPSByZXQudG9TdHJpbmcoKTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0LmNvbXBpbGVyT3B0aW9ucyA9IHRoaXMub3B0aW9ucztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHJldDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGZuO1xuICAgIH1cbiAgfSxcblxuICBwcmVhbWJsZTogZnVuY3Rpb24oKSB7XG4gICAgLy8gdHJhY2sgdGhlIGxhc3QgY29udGV4dCBwdXNoZWQgaW50byBwbGFjZSB0byBhbG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ICAgbGV0IHZhbHVlID0gdGhpcy5wb3BTdGFjaygpLFxuICAgICAgY29udGV4dCxcbiAgICAgIHR5cGUsXG4gICAgICBpZDtcblxuICAgIGlmICh0aGlzLnRyYWNrSWRzKSB7XG4gICAgICBpZCA9IHRoaXMucG9wU3RhY2soKTtcbiAgICB9XG4gICAgaWYgKHRoaXMuc3RyaW5nUGFyYW1zKSB7XG4gICAgICB0eXBlID0gdGhpcy5wb3BTdGFjaygpO1xuICAgICAgY29udGV4dCA9IHRoaXMucG9wU3RhY2soKTtcbiAgICB9XG5cbiAgICBsZXQgaGFzaCA9IHRoaXMuaGFzaDtcbiAgICBpZiAoY29udGV4dCkge1xuICAgICAgaGFzaC5jb250ZXh0c1trZXldID0gY29udGV4dDtcbiAgICB9XG4gICAgaWYgKHR5cGUpIHtcbiAgICAgIGhhc2gudHlwZXNba2V5XSA9IHR5cGU7XG4gICAgfVxuICAgIGlmIChpZCkge1xuICAgICAgaGFzaC5pZHNba2V5XSA9IGlkO1xuICAgIH1cbiAgICBoYXNoLnZhbHVlc1trZXldID0gdmFsdWU7XG4gIH0sXG5cbiAgcHVzaElkOiBmdW5jdGlvbih0eXBlLCBuYW1lLCBjaGlsZCkge1xuICAgIGlmICh0eXBlID09PSAnQmxvY2tQYXJhbScpIHtcbiAgICAgIHRoaXMucHVzaFN0YWNrTGl0ZXJhbChcbiAgICAgICAgJ2Jsb2NrUGFyYW1zWycgK1xuICAgICAgICAgIG5hbWVbMF0gK1xuICAgICAgICAgICddLnBhdGhbJyArXG4gICAgICAgICAgbmFtZVsxXSArXG4gICAgICAgICAgJ10nICtcbiAgICAgICAgICAoY2hpbGQgPyAnICsgJyArIEpTT04uc3RyaW5naWZ5KCcuJyArIGNoaWxkKSA6ICcnKVxuICAgICAgKTtcbiAgICB9IGVsc2UgaWYgKHR5cGUgPT09ICdQYXRoRXhwcmVzc2lvbicpIHtcbiAgICAgIHRoaXMucHVzaFN0cmluZyhuYW1lKTtcbiAgICB9IGVsc2Ug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3JpcHRDb21waWxlcjtcbiJdfQ== ; define('handlebars',['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) { 'use strict'; diff --git a/node_modules/handlebars/dist/handlebars.amd.min.js b/node_modules/handlebars/dist/handlebars.amd.min.js index 76d09f2d..b5da9dc4 100644 --- a/node_modules/handlebars/dist/handlebars.amd.min.js +++ b/node_modules/handlebars/dist/handlebars.amd.min.js @@ -1,7 +1,7 @@ /**! @license - handlebars v4.7.6 + handlebars v4.7.7 Copyright (C) 2011-2019 by Yehuda Katz @@ -24,6 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -define("handlebars/utils",["exports"],function(a){"use strict";function b(a){return j[a]}function c(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.exports=c}),define("handlebars/compiler/visitor",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){this.parents=[]}function f(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function g(a){f.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function h(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var i=d(c);e.prototype={constructor:e,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!e.prototype[c.type])throw new i["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new i["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b0)throw new o["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new o["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}a.__esModule=!0,a.SourceLocation=e,a.id=f,a.stripFlags=g,a.stripComment=h,a.preparePath=i,a.prepareMustache=j,a.prepareRawBlock=k,a.prepareBlock=l,a.prepareProgram=m,a.preparePartialBlock=n;var o=c(b)}),define("handlebars/compiler/base",["exports","./parser","./whitespace-control","./helpers","../utils"],function(a,b,c,d,e){"use strict";function f(a){return a&&a.__esModule?a:{"default":a}}function g(a,b){if("Program"===a.type)return a;i["default"].yy=k,k.locInfo=function(a){return new k.SourceLocation(b&&b.srcName,a)};var c=i["default"].parse(a);return c}function h(a,b){var c=g(a,b),d=new j["default"](b);return d.accept(c)}a.__esModule=!0,a.parseWithoutProcessing=g,a.parse=h;var i=f(b),j=f(c);a.parser=i["default"];var k={};e.extend(k,d)}),define("handlebars/compiler/compiler",["exports","../exception","../utils","./ast"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(){}function g(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function h(a,b,d){function e(){var c=d.parse(a,b),e=(new d.Compiler).compile(c,b),f=(new d.JavaScriptCompiler).compile(e,b,void 0,!0);return d.template(f)}function f(a,b){return g||(g=e()),g.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=c.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var g=void 0;return f._setup=function(a){return g||(g=e()),g._setup(a)},f._child=function(a,b,c,d){return g||(g=e()),g._child(a,b,c,d)},f}function i(a,b){if(a===b)return!0;if(c.isArray(a)&&c.isArray(b)&&a.length===b.length){for(var d=0;d1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){j(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,l["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=l["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c=0)return[b,f]}}}}),define("handlebars/compiler/code-gen",["exports","module","../utils"],function(a,b,c){"use strict";function d(a,b,d){if(c.isArray(a)){for(var e=[],f=0,g=a.length;f":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.exports=c}),define("handlebars/compiler/visitor",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){this.parents=[]}function f(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function g(a){f.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function h(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var i=d(c);e.prototype={constructor:e,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!e.prototype[c.type])throw new i["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new i["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b0)throw new o["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new o["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}a.__esModule=!0,a.SourceLocation=e,a.id=f,a.stripFlags=g,a.stripComment=h,a.preparePath=i,a.prepareMustache=j,a.prepareRawBlock=k,a.prepareBlock=l,a.prepareProgram=m,a.preparePartialBlock=n;var o=c(b)}),define("handlebars/compiler/base",["exports","./parser","./whitespace-control","./helpers","../utils"],function(a,b,c,d,e){"use strict";function f(a){return a&&a.__esModule?a:{"default":a}}function g(a,b){if("Program"===a.type)return a;i["default"].yy=k,k.locInfo=function(a){return new k.SourceLocation(b&&b.srcName,a)};var c=i["default"].parse(a);return c}function h(a,b){var c=g(a,b),d=new j["default"](b);return d.accept(c)}a.__esModule=!0,a.parseWithoutProcessing=g,a.parse=h;var i=f(b),j=f(c);a.parser=i["default"];var k={};e.extend(k,d)}),define("handlebars/compiler/compiler",["exports","../exception","../utils","./ast"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(){}function g(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function h(a,b,d){function e(){var c=d.parse(a,b),e=(new d.Compiler).compile(c,b),f=(new d.JavaScriptCompiler).compile(e,b,void 0,!0);return d.template(f)}function f(a,b){return g||(g=e()),g.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=c.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var g=void 0;return f._setup=function(a){return g||(g=e()),g._setup(a)},f._child=function(a,b,c,d){return g||(g=e()),g._child(a,b,c,d)},f}function i(a,b){if(a===b)return!0;if(c.isArray(a)&&c.isArray(b)&&a.length===b.length){for(var d=0;d1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){j(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,l["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=l["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c=0)return[b,f]}}}}),define("handlebars/compiler/code-gen",["exports","module","../utils"],function(a,b,c){"use strict";function d(a,b,d){if(c.isArray(a)){for(var e=[],f=0,g=a.length;f0&&(c+=", "+d.join(", "));var e=0;Object.keys(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var g=this.mergeSource(c);return a?(f.push(g),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",g,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var f=this;if(this.options.strict||this.options.assumeObjects)return void this.push(j(this.options.strict&&e,this,b,a));for(var g=b.length;cthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(49),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(49),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;cthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(12)["default"],f=c(2)["default"];b.__esModule=!0;var g=c(4),h=c(5),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(12)["default"],f=c(2)["default"];b.__esModule=!0;var g=c(4),h=c(5),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b 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`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/handlebars/node_modules/minimist/test/all_bool.js b/node_modules/handlebars/node_modules/minimist/test/all_bool.js deleted file mode 100644 index ac835483..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,32 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/node_modules/handlebars/node_modules/minimist/test/bool.js b/node_modules/handlebars/node_modules/minimist/test/bool.js deleted file mode 100644 index 5f7dbde1..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,178 +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 array with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var alt = [ '--harp', 'derp' ]; - var opts = { - alias: { 'h': ['herp', 'harp'] }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, 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(); -}); - -test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, true); - t.end(); -}); - -test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true - }, - boolean: ['boool'] - }); - - 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/handlebars/node_modules/minimist/test/dash.js b/node_modules/handlebars/node_modules/minimist/test/dash.js deleted file mode 100644 index 5a4fa5be..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,31 +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' ] }); -}); - -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); -}); diff --git a/node_modules/handlebars/node_modules/minimist/test/default_bool.js b/node_modules/handlebars/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 780a3112..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,35 +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(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); - -}) diff --git a/node_modules/handlebars/node_modules/minimist/test/dotted.js b/node_modules/handlebars/node_modules/minimist/test/dotted.js deleted file mode 100644 index d8b3e856..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/minimist/test/kv_short.js b/node_modules/handlebars/node_modules/minimist/test/kv_short.js deleted file mode 100644 index f813b305..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/kv_short.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-b=123' ]); - t.deepEqual(argv, { b: 123, _: [] }); -}); - -test('multi short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-a=whatever', '-b=robots' ]); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); diff --git a/node_modules/handlebars/node_modules/minimist/test/long.js b/node_modules/handlebars/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/minimist/test/num.js b/node_modules/handlebars/node_modules/minimist/test/num.js deleted file mode 100644 index 2cc77f4d..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/minimist/test/parse.js b/node_modules/handlebars/node_modules/minimist/test/parse.js deleted file mode 100644 index 7b4a2a17..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/minimist/test/parse_modified.js b/node_modules/handlebars/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index ab620dc5..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/minimist/test/proto.js b/node_modules/handlebars/node_modules/minimist/test/proto.js deleted file mode 100644 index 8649107e..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/proto.js +++ /dev/null @@ -1,44 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('proto pollution', function (t) { - var argv = parse(['--__proto__.x','123']); - t.equal({}.x, undefined); - t.equal(argv.__proto__.x, undefined); - t.equal(argv.x, undefined); - t.end(); -}); - -test('proto pollution (array)', function (t) { - var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']); - t.equal({}.z, undefined); - t.deepEqual(argv.x, [4,5]); - t.equal(argv.x.z, undefined); - t.equal(argv.x.__proto__.z, undefined); - t.end(); -}); - -test('proto pollution (number)', function (t) { - var argv = parse(['--x','5','--x.__proto__.z','100']); - t.equal({}.z, undefined); - t.equal((4).z, undefined); - t.equal(argv.x, 5); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (string)', function (t) { - var argv = parse(['--x','abc','--x.__proto__.z','def']); - t.equal({}.z, undefined); - t.equal('...'.z, undefined); - t.equal(argv.x, 'abc'); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (constructor)', function (t) { - var argv = parse(['--constructor.prototype.y','123']); - t.equal({}.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); diff --git a/node_modules/handlebars/node_modules/minimist/test/short.js b/node_modules/handlebars/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/minimist/test/stop_early.js b/node_modules/handlebars/node_modules/minimist/test/stop_early.js deleted file mode 100644 index bdf9fbcb..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,15 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'] - }); - - t.end(); -}); diff --git a/node_modules/handlebars/node_modules/minimist/test/unknown.js b/node_modules/handlebars/node_modules/minimist/test/unknown.js deleted file mode 100644 index 462a36bd..00000000 --- a/node_modules/handlebars/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,102 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'true', '--derp', 'true' ]; - var regular = [ '--herp', 'true', '-d', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [] - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; - var regular = [ '--herp', 'hello', '-d', 'moon' ]; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello' ]; - var regular = [ '--herp', 'hello' ]; - var opts = { - default: { 'h': 'bar' }, - alias: { 'h': 'herp' }, - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '--bad', '--', 'good', 'arg' ]; - var opts = { - '--': true, - unknown: unknownFn - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - '_': [] - }) - t.end(); -}); diff --git a/node_modules/handlebars/node_modules/minimist/test/whitespace.js b/node_modules/handlebars/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/LICENSE b/node_modules/handlebars/node_modules/wordwrap/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/README.markdown b/node_modules/handlebars/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e0..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/example/center.js b/node_modules/handlebars/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae9..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/example/meat.js b/node_modules/handlebars/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e10..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/index.js b/node_modules/handlebars/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc9452..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/package.json b/node_modules/handlebars/node_modules/wordwrap/package.json deleted file mode 100644 index cbc8c31a..00000000 --- a/node_modules/handlebars/node_modules/wordwrap/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "wordwrap@1.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "wordwrap@1.0.0", - "_id": "wordwrap@1.0.0", - "_inBundle": false, - "_integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "_location": "/handlebars/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": [ - "/handlebars" - ], - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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/handlebars/node_modules/wordwrap/test/break.js b/node_modules/handlebars/node_modules/wordwrap/test/break.js deleted file mode 100644 index 7d0e8b54..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/test/idleness.txt b/node_modules/handlebars/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f4907..00000000 --- a/node_modules/handlebars/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/handlebars/node_modules/wordwrap/test/wrap.js b/node_modules/handlebars/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 01ea4718..00000000 --- a/node_modules/handlebars/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/handlebars/package.json b/node_modules/handlebars/package.json index a5eb0738..ffeaf7d2 100644 --- a/node_modules/handlebars/package.json +++ b/node_modules/handlebars/package.json @@ -1,55 +1,34 @@ { - "_args": [ - [ - "handlebars@4.7.6", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "handlebars@4.7.6", - "_id": "handlebars@4.7.6", - "_inBundle": false, - "_integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", - "_location": "/handlebars", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "handlebars@4.7.6", - "name": "handlebars", - "escapedName": "handlebars", - "rawSpec": "4.7.6", - "saveSpec": null, - "fetchSpec": "4.7.6" - }, - "_requiredBy": [ - "/istanbul-reports" - ], - "_resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "_spec": "4.7.6", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Yehuda Katz" - }, + "name": "handlebars", "barename": "handlebars", - "bin": { - "handlebars": "bin/handlebars" - }, - "browser": { - ".": "./dist/cjs/handlebars.js", - "./runtime": "./dist/cjs/handlebars.runtime.js" + "version": "4.7.7", + "description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration", + "homepage": "http://www.handlebarsjs.com/", + "keywords": [ + "handlebars", + "mustache", + "template", + "html" + ], + "repository": { + "type": "git", + "url": "https://github.com/wycats/handlebars.js.git" }, - "bugs": { - "url": "https://github.com/wycats/handlebars.js/issues" + "author": "Yehuda Katz", + "license": "MIT", + "readmeFilename": "README.md", + "engines": { + "node": ">=0.4.7" }, "dependencies": { "minimist": "^1.2.5", "neo-async": "^2.6.0", "source-map": "^0.6.1", - "uglify-js": "^3.1.4", "wordwrap": "^1.0.0" }, - "description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration", + "optionalDependencies": { + "uglify-js": "^3.1.4" + }, "devDependencies": { "@knappi/grunt-saucelabs": "^9.0.2", "aws-sdk": "^2.1.49", @@ -95,8 +74,34 @@ "webpack": "^1.12.6", "webpack-dev-server": "^1.12.1" }, - "engines": { - "node": ">=0.4.7" + "main": "lib/index.js", + "types": "types/index.d.ts", + "browser": { + ".": "./dist/cjs/handlebars.js", + "./runtime": "./dist/cjs/handlebars.runtime.js" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "scripts": { + "format": "prettier --write '**/*.js' && eslint --fix .", + "check-format": "prettier --check '**/*.js'", + "lint": "eslint --max-warnings 0 .", + "dtslint": "dtslint types", + "test": "grunt", + "extensive-tests-and-publish-to-aws": "npx mocha tasks/task-tests/ && grunt --stack extensive-tests-and-publish-to-aws", + "integration-test": "grunt integration-tests", + "--- combined tasks ---": "", + "check-before-pull-request": "concurrently --kill-others-on-fail npm:lint npm:dtslint npm:check-format npm:test" + }, + "jspm": { + "main": "handlebars", + "directories": { + "lib": "dist/amd" + }, + "buildConfig": { + "minify": true + } }, "files": [ "bin", @@ -110,28 +115,11 @@ "types/*.d.ts", "runtime.d.ts" ], - "homepage": "http://www.handlebarsjs.com/", "husky": { "hooks": { "pre-commit": "lint-staged" } }, - "jspm": { - "main": "handlebars", - "directories": { - "lib": "dist/amd" - }, - "buildConfig": { - "minify": true - } - }, - "keywords": [ - "handlebars", - "mustache", - "template", - "html" - ], - "license": "MIT", "lint-staged": { "*.{js,css,json,md}": [ "prettier --write", @@ -141,27 +129,5 @@ "eslint --fix", "git add" ] - }, - "main": "lib/index.js", - "name": "handlebars", - "optionalDependencies": { - "uglify-js": "^3.1.4" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/wycats/handlebars.js.git" - }, - "scripts": { - "--- combined tasks ---": "", - "check-before-pull-request": "concurrently --kill-others-on-fail npm:lint npm:dtslint npm:check-format npm:test", - "check-format": "prettier --check '**/*.js'", - "dtslint": "dtslint types", - "extensive-tests-and-publish-to-aws": "npx mocha tasks/task-tests/ && grunt --stack extensive-tests-and-publish-to-aws", - "format": "prettier --write '**/*.js' && eslint --fix .", - "integration-test": "grunt integration-tests", - "lint": "eslint --max-warnings 0 .", - "test": "grunt" - }, - "types": "types/index.d.ts", - "version": "4.7.6" + } } diff --git a/node_modules/handlebars/release-notes.md b/node_modules/handlebars/release-notes.md index fa945d3a..cabef32b 100644 --- a/node_modules/handlebars/release-notes.md +++ b/node_modules/handlebars/release-notes.md @@ -2,7 +2,26 @@ ## Development -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...master) +[Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.7...master) + +## v4.7.7 - February 15th, 2021 + +- fix weird error in integration tests - eb860c0 +- fix: check prototype property access in strict-mode (#1736) - b6d3de7 +- fix: escape property names in compat mode (#1736) - f058970 +- refactor: In spec tests, use expectTemplate over equals and shouldThrow (#1683) - 77825f8 +- chore: start testing on Node.js 12 and 13 - 3789a30 + +(POSSIBLY) BREAKING CHANGES: + +- the changes from version [4.6.0](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md#v460---january-8th-2020) now also apply + in when using the compile-option "strict: true". Access to prototype properties is forbidden completely by default, specific properties or methods + can be allowed via runtime-options. See #1633 for details. If you are using Handlebars as documented, you should not be accessing prototype properties + from your template anyway, so the changes should not be a problem for you. Only the use of undocumented features can break your build. + +That is why we only bump the patch version despite mentioning breaking changes. + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7) ## v4.7.6 - April 3rd, 2020 diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc deleted file mode 100644 index f78f6f18..00000000 --- a/node_modules/has-symbols/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0 - } -} diff --git a/node_modules/has-symbols/.npmignore b/node_modules/has-symbols/.npmignore deleted file mode 100644 index 5148e527..00000000 --- a/node_modules/has-symbols/.npmignore +++ /dev/null @@ -1,37 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules -jspm_packages - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history diff --git a/node_modules/has-symbols/.travis.yml b/node_modules/has-symbols/.travis.yml deleted file mode 100644 index 3b3331a3..00000000 --- a/node_modules/has-symbols/.travis.yml +++ /dev/null @@ -1,113 +0,0 @@ -language: node_js -node_js: - - "6.6" - - "6.5" - - "6.4" - - "6.3" - - "6.2" - - "6.1" - - "6.0" - - "5.12" - - "5.11" - - "5.10" - - "5.9" - - "5.8" - - "5.7" - - "5.6" - - "5.5" - - "5.4" - - "5.3" - - "5.2" - - "5.1" - - "5.0" - - "4.5" - - "4.4" - - "4.3" - - "4.2" - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' -script: - - 'if [ -n "${LINT-}" ]; then npm run lint ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "node" - env: LINT=true - allow_failures: - - node_js: "6.5" - - node_js: "6.4" - - node_js: "6.3" - - node_js: "6.2" - - node_js: "6.1" - - node_js: "6.0" - - node_js: "5.11" - - node_js: "5.10" - - node_js: "5.9" - - node_js: "5.8" - - node_js: "5.7" - - node_js: "5.6" - - node_js: "5.5" - - node_js: "5.4" - - node_js: "5.3" - - node_js: "5.2" - - node_js: "5.1" - - node_js: "5.0" - - node_js: "4.4" - - node_js: "4.3" - - node_js: "4.2" - - node_js: "4.1" - - node_js: "4.0" - - node_js: "iojs-v3.2" - - node_js: "iojs-v3.1" - - node_js: "iojs-v3.0" - - node_js: "iojs-v2.4" - - node_js: "iojs-v2.3" - - node_js: "iojs-v2.2" - - node_js: "iojs-v2.1" - - node_js: "iojs-v2.0" - - node_js: "iojs-v1.7" - - node_js: "iojs-v1.6" - - node_js: "iojs-v1.5" - - node_js: "iojs-v1.4" - - node_js: "iojs-v1.3" - - node_js: "iojs-v1.2" - - node_js: "iojs-v1.1" - - node_js: "iojs-v1.0" - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.6" - - node_js: "0.4" diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md deleted file mode 100644 index da7f9da7..00000000 --- a/node_modules/has-symbols/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -1.0.0 / 2016-09-19 -================= - * Initial release. diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE deleted file mode 100644 index df31cbf3..00000000 --- a/node_modules/has-symbols/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Jordan Harband - -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/has-symbols/README.md b/node_modules/has-symbols/README.md deleted file mode 100644 index b27b31ac..00000000 --- a/node_modules/has-symbols/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# has-symbols [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -Determine if the JS environment has Symbol support. Supports spec, or shams. - -## Example - -```js -var hasSymbols = require('has-symbols'); - -hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. - -var hasSymbolsKinda = require('has-symbols/shams'); -hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. -``` - -## Supported Symbol shams - - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) - - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/has-symbols -[2]: http://versionbadg.es/ljharb/has-symbols.svg -[3]: https://travis-ci.org/ljharb/has-symbols.svg -[4]: https://travis-ci.org/ljharb/has-symbols -[5]: https://david-dm.org/ljharb/has-symbols.svg -[6]: https://david-dm.org/ljharb/has-symbols -[7]: https://david-dm.org/ljharb/has-symbols/dev-status.svg -[8]: https://david-dm.org/ljharb/has-symbols#info=devDependencies -[9]: https://ci.testling.com/ljharb/has-symbols.png -[10]: https://ci.testling.com/ljharb/has-symbols -[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/has-symbols.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/has-symbols.svg -[downloads-url]: http://npm-stat.com/charts.html?package=has-symbols diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js deleted file mode 100644 index f72159e0..00000000 --- a/node_modules/has-symbols/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var origSymbol = global.Symbol; -var hasSymbolSham = require('./shams'); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json deleted file mode 100644 index 9b0ec144..00000000 --- a/node_modules/has-symbols/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - "has-symbols@1.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "has-symbols@1.0.0", - "_id": "has-symbols@1.0.0", - "_inBundle": false, - "_integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "_location": "/has-symbols", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "has-symbols@1.0.0", - "name": "has-symbols", - "escapedName": "has-symbols", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/is-symbol", - "/object.assign" - ], - "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "bugs": { - "url": "https://github.com/ljharb/has-symbols/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": {}, - "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "devDependencies": { - "@ljharb/eslint-config": "^8.0.0", - "core-js": "^2.4.1", - "eslint": "^3.5.0", - "get-own-property-symbols": "^0.9.2", - "nsp": "^2.6.1", - "safe-publish-latest": "^1.0.1", - "tape": "^4.6.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/has-symbols#readme", - "keywords": [ - "Symbol", - "symbols", - "typeof", - "sham", - "polyfill", - "native", - "core-js", - "ES6" - ], - "license": "MIT", - "main": "index.js", - "name": "has-symbols", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/has-symbols.git" - }, - "scripts": { - "lint": "eslint *.js", - "posttest": "npm run --silent security", - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "security": "nsp check", - "test": "npm run --silent tests-only", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "node test/shams/get-own-property-symbols.js", - "test:staging": "node --harmony --es-staging test", - "test:stock": "node test", - "tests-only": "npm run --silent test:stock && npm run --silent test:staging && npm run --silent test:shams" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js deleted file mode 100644 index f6c1ff4a..00000000 --- a/node_modules/has-symbols/shams.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/* eslint complexity: [2, 17], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js deleted file mode 100644 index fc32aff9..00000000 --- a/node_modules/has-symbols/test/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasSymbols = require('../'); -var runSymbolTests = require('./tests'); - -test('interface', function (t) { - t.equal(typeof hasSymbols, 'function', 'is a function'); - t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); - t.end(); -}); - -test('Symbols are supported', { skip: !hasSymbols() }, function (t) { - runSymbolTests(t); - t.end(); -}); - -test('Symbols are not supported', { skip: hasSymbols() }, function (t) { - t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); - t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js deleted file mode 100644 index df5365c2..00000000 --- a/node_modules/has-symbols/test/shams/core-js.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - require('core-js/fn/symbol'); - require('core-js/fn/symbol/to-string-tag'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js deleted file mode 100644 index 9191b248..00000000 --- a/node_modules/has-symbols/test/shams/get-own-property-symbols.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - - require('get-own-property-symbols'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js deleted file mode 100644 index 93ff0eae..00000000 --- a/node_modules/has-symbols/test/tests.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -module.exports = function runSymbolTests(t) { - t.equal(typeof Symbol, 'function', 'global Symbol is a function'); - - if (typeof Symbol !== 'function') { return false }; - - t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); - - /* - t.equal( - Symbol.prototype.toString.call(Symbol('foo')), - Symbol.prototype.toString.call(Symbol('foo')), - 'two symbols with the same description stringify the same' - ); - */ - - var foo = Symbol('foo'); - - /* - t.notEqual( - String(foo), - String(Symbol('bar')), - 'two symbols with different descriptions do not stringify the same' - ); - */ - - t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); - // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); - - t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - t.notEqual(typeof sym, 'string', 'Symbol is not a string'); - t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } - - t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); - t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { - configurable: true, - enumerable: true, - value: 42, - writable: true - }, 'property descriptor is correct'); -}; diff --git a/node_modules/has/LICENSE-MIT b/node_modules/has/LICENSE-MIT deleted file mode 100644 index ae7014d3..00000000 --- a/node_modules/has/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Thiago de Arruda - -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/has/README.md b/node_modules/has/README.md deleted file mode 100644 index 635e3a4b..00000000 --- a/node_modules/has/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# has - -> Object.prototype.hasOwnProperty.call shortcut - -## Installation - -```sh -npm install --save has -``` - -## Usage - -```js -var has = require('has'); - -has({}, 'hasOwnProperty'); // false -has(Object.prototype, 'hasOwnProperty'); // true -``` diff --git a/node_modules/has/package.json b/node_modules/has/package.json deleted file mode 100644 index 6c19c461..00000000 --- a/node_modules/has/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "has@1.0.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "has@1.0.3", - "_id": "has@1.0.3", - "_inBundle": false, - "_integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "_location": "/has", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "has@1.0.3", - "name": "has", - "escapedName": "has", - "rawSpec": "1.0.3", - "saveSpec": null, - "fetchSpec": "1.0.3" - }, - "_requiredBy": [ - "/es-abstract", - "/is-regex" - ], - "_resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "_spec": "1.0.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Thiago de Arruda", - "email": "tpadilha84@gmail.com" - }, - "bugs": { - "url": "https://github.com/tarruda/has/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": { - "function-bind": "^1.1.1" - }, - "description": "Object.prototype.hasOwnProperty.call shortcut", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "eslint": "^4.19.1", - "tape": "^4.9.0" - }, - "engines": { - "node": ">= 0.4.0" - }, - "homepage": "https://github.com/tarruda/has", - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" - } - ], - "main": "./src", - "name": "has", - "repository": { - "type": "git", - "url": "git://github.com/tarruda/has.git" - }, - "scripts": { - "lint": "eslint .", - "pretest": "npm run lint", - "test": "tape test" - }, - "version": "1.0.3" -} diff --git a/node_modules/has/src/index.js b/node_modules/has/src/index.js deleted file mode 100644 index dd92dd90..00000000 --- a/node_modules/has/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js deleted file mode 100644 index 43d480b2..00000000 --- a/node_modules/has/test/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var test = require('tape'); -var has = require('../'); - -test('has', function (t) { - t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); - t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); - t.end(); -}); diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md index 9eedbb80..6987fb4a 100644 --- a/node_modules/hosted-git-info/CHANGELOG.md +++ b/node_modules/hosted-git-info/CHANGELOG.md @@ -2,6 +2,63 @@ 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. + +## [2.8.9](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9) (2021-04-07) + + +### Bug Fixes + +* backport regex fix from [#76](https://github.com/npm/hosted-git-info/issues/76) ([29adfe5](https://github.com/npm/hosted-git-info/commit/29adfe5)), closes [#84](https://github.com/npm/hosted-git-info/issues/84) + + + + +## [2.8.8](https://github.com/npm/hosted-git-info/compare/v2.8.7...v2.8.8) (2020-02-29) + + +### Bug Fixes + +* [#61](https://github.com/npm/hosted-git-info/issues/61) & [#65](https://github.com/npm/hosted-git-info/issues/65) addressing issues w/ url.URL implmentation which regressed node 6 support ([5038b18](https://github.com/npm/hosted-git-info/commit/5038b18)), closes [#66](https://github.com/npm/hosted-git-info/issues/66) + + + + +## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26) + + +### Bug Fixes + +* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62) +* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60) + + + + +## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25) + + + + +## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07) + + +### Bug Fixes + +* updated pathmatch for gitlab ([e8325b5](https://github.com/npm/hosted-git-info/commit/e8325b5)), closes [#51](https://github.com/npm/hosted-git-info/issues/51) +* updated pathmatch for gitlab ([ffe056f](https://github.com/npm/hosted-git-info/commit/ffe056f)) + + + + +## [2.8.4](https://github.com/npm/hosted-git-info/compare/v2.8.3...v2.8.4) (2019-08-12) + + + + +## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12) + + + ## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05) diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js index d81be205..8147e334 100644 --- a/node_modules/hosted-git-info/git-host-info.js +++ b/node_modules/hosted-git-info/git-host-info.js @@ -25,7 +25,7 @@ var gitHosts = module.exports = { 'bugstemplate': 'https://{domain}/{user}/{project}/issues', 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}', 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}', - 'pathmatch': /^[/]([^/]+)[/](.+?)(?:[.]git|[/])?$/ + 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/ }, gist: { 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js index ee5bb1af..9616fbaa 100644 --- a/node_modules/hosted-git-info/git-host.js +++ b/node_modules/hosted-git-info/git-host.js @@ -9,8 +9,8 @@ var extend = Object.assign || function _extend (target, source) { // Don't do anything if source isn't an object if (source === null || typeof source !== 'object') return target - const keys = Object.keys(source) - let i = keys.length + var keys = Object.keys(source) + var i = keys.length while (i--) { target[keys[i]] = source[keys[i]] } diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js index adae4604..08857722 100644 --- a/node_modules/hosted-git-info/index.js +++ b/node_modules/hosted-git-info/index.js @@ -2,8 +2,6 @@ var url = require('url') var gitHosts = require('./git-host-info.js') var GitHost = module.exports = require('./git-host.js') -var LRU = require('lru-cache') -var cache = new LRU({max: 1000}) var protocolToRepresentationMap = { 'git+ssh:': 'sshurl', @@ -24,15 +22,17 @@ var authProtocols = { 'git+http:': true } +var cache = {} + module.exports.fromUrl = function (giturl, opts) { if (typeof giturl !== 'string') return var key = giturl + JSON.stringify(opts || {}) - if (!cache.has(key)) { - cache.set(key, fromUrl(giturl, opts)) + if (!(key in cache)) { + cache[key] = fromUrl(giturl, opts) } - return cache.get(key) + return cache[key] } function fromUrl (giturl, opts) { @@ -41,13 +41,13 @@ function fromUrl (giturl, opts) { isGitHubShorthand(giturl) ? 'github:' + giturl : giturl ) var parsed = parseGitUrl(url) - var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')) + var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/) var matches = Object.keys(gitHosts).map(function (gitHostName) { try { var gitHostInfo = gitHosts[gitHostName] var auth = null if (parsed.auth && authProtocols[parsed.protocol]) { - auth = decodeURIComponent(parsed.auth) + auth = parsed.auth } var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null var user = null @@ -55,7 +55,7 @@ function fromUrl (giturl, opts) { var defaultRepresentation = null if (shortcutMatch && shortcutMatch[1] === gitHostName) { user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) - project = decodeURIComponent(shortcutMatch[3]) + project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, '')) defaultRepresentation = 'shortcut' } else { if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return @@ -64,6 +64,7 @@ function fromUrl (giturl, opts) { var pathmatch = gitHostInfo.pathmatch var matched = parsed.path.match(pathmatch) if (!matched) return + /* istanbul ignore else */ if (matched[1] !== null && matched[1] !== undefined) { user = decodeURIComponent(matched[1].replace(/^:/, '')) } @@ -105,7 +106,30 @@ function fixupUnqualifiedGist (giturl) { function parseGitUrl (giturl) { var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) - if (!matched) return url.parse(giturl) + if (!matched) { + var legacy = url.parse(giturl) + // If we don't have url.URL, then sorry, this is just not fixable. + // This affects Node <= 6.12. + if (legacy.auth && typeof url.URL === 'function') { + // git urls can be in the form of scp-style/ssh-connect strings, like + // git+ssh://user@host.com:some/path, which the legacy url parser + // supports, but WhatWG url.URL class does not. However, the legacy + // parser de-urlencodes the username and password, so something like + // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes + // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong. + // Pull off just the auth and host, so we dont' get the confusing + // scp-style URL, then pass that to the WhatWG parser to get the + // auth properly escaped. + var authmatch = giturl.match(/[^@]+@[^:/]+/) + /* istanbul ignore else - this should be impossible */ + if (authmatch) { + var whatwg = new url.URL(authmatch[0]) + legacy.auth = whatwg.username || '' + if (whatwg.password) legacy.auth += ':' + whatwg.password + } + } + return legacy + } return { protocol: 'git+ssh:', slashes: true, diff --git a/node_modules/hosted-git-info/node_modules/lru-cache/LICENSE b/node_modules/hosted-git-info/node_modules/lru-cache/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/hosted-git-info/node_modules/lru-cache/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/hosted-git-info/node_modules/lru-cache/README.md b/node_modules/hosted-git-info/node_modules/lru-cache/README.md deleted file mode 100644 index 435dfebb..00000000 --- a/node_modules/hosted-git-info/node_modules/lru-cache/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) - -## Installation: - -```javascript -npm install lru-cache --save -``` - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n, key) { return n * 2 + key.length } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = new LRU(options) - , otherCache = new LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -// non-string keys ARE fully supported -// but note that it must be THE SAME object, not -// just a JSON-equivalent object. -var someObject = { a: 1 } -cache.set(someObject, 'a value') -// Object keys are not toString()-ed -cache.set('[object Object]', 'a different value') -assert.equal(cache.get(someObject), 'a value') -// A similar object with same keys/values won't work, -// because it's a different object identity -assert.equal(cache.get({ a: 1 }), undefined) - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. Setting it to a non-number or negative number will - throw a `TypeError`. Setting it to 0 makes it be `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. - Setting this to a negative value will make everything seem old! - Setting it to a non-number will throw a `TypeError`. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n, key){return n.length}`. The default is - `function(){return 1}`, which is fine if you want to store `max` - like-sized things. The item is passed as the first argument, and - the key is passed as the second argumnet. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. -* `noDisposeOnSet` By default, if you set a `dispose()` method, then - it'll be called whenever a `set()` operation overwrites an existing - key. If you set this option, `dispose()` will only be called when a - key falls out of the cache, not when it is overwritten. -* `updateAgeOnGet` When using time-expiring entries with `maxAge`, - setting this to `true` will make each item's effective time update - to the current time whenever it is retrieved from cache, causing it - to not expire. (It can still fall out of cache based on recency of - use, of course.) - -## API - -* `set(key, value, maxAge)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. `maxAge` is optional and overrides the - cache `maxAge` option if provided. - - If the key is not found, `get()` will return `undefined`. - - The key and val can be any value. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `rforEach(function(value,key,cache), [thisp])` - - The same as `cache.forEach(...)` but items are iterated over in - reverse order. (ie, less recently used items are iterated over - first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. - -* `length` - - Return total length of objects in cache taking into account - `length` options function. - -* `itemCount` - - Return total quantity of objects currently in cache. Note, that - `stale` (see options) items are returned as part of this item - count. - -* `dump()` - - Return an array of the cache entries ready for serialization and usage - with 'destinationCache.load(arr)`. - -* `load(cacheEntriesArray)` - - Loads another cache entries array, obtained with `sourceCache.dump()`, - into the cache. The destination cache is reset before loading new entries - -* `prune()` - - Manually iterates over the entire cache proactively pruning old entries diff --git a/node_modules/hosted-git-info/node_modules/lru-cache/index.js b/node_modules/hosted-git-info/node_modules/lru-cache/index.js deleted file mode 100644 index 573b6b85..00000000 --- a/node_modules/hosted-git-info/node_modules/lru-cache/index.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict' - -// A linked list to keep track of recently-used-ness -const Yallist = require('yallist') - -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') - -const naiveLength = () => 1 - -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity - - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } - - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') - - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } - - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } - - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') - - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } - - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength - - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) - } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } - } - - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next - } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } - - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } - - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } - - dumpLru () { - return this[LRU_LIST] - } - - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] - - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) - - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } - - const node = this[CACHE].get(key) - const item = node.value - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - - const hit = new Entry(key, value, len, now, maxAge) - - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value) - - return false - } - - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } - - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } - - get (key) { - return get(this, key, true) - } - - peek (key) { - return get(this, key, false) - } - - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null - - del(this, node) - return node.value - } - - del (key) { - del(this, this[CACHE].get(key)) - } - - load (arr) { - // reset the cache - this.reset() - - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const expiresAt = hit.e || 0 - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v) - else { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } - } - - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value - } -} - -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} - -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } - } -} - -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) - - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) - } -} - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} - -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} - -module.exports = LRUCache diff --git a/node_modules/hosted-git-info/node_modules/lru-cache/package.json b/node_modules/hosted-git-info/node_modules/lru-cache/package.json deleted file mode 100644 index f82a0530..00000000 --- a/node_modules/hosted-git-info/node_modules/lru-cache/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_args": [ - [ - "lru-cache@5.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "lru-cache@5.1.1", - "_id": "lru-cache@5.1.1", - "_inBundle": false, - "_integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "_location": "/hosted-git-info/lru-cache", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "lru-cache@5.1.1", - "name": "lru-cache", - "escapedName": "lru-cache", - "rawSpec": "5.1.1", - "saveSpec": null, - "fetchSpec": "5.1.1" - }, - "_requiredBy": [ - "/hosted-git-info" - ], - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "_spec": "5.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "dependencies": { - "yallist": "^3.0.2" - }, - "description": "A cache object that deletes the least-recently-used items.", - "devDependencies": { - "benchmark": "^2.1.4", - "tap": "^12.1.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/isaacs/node-lru-cache#readme", - "keywords": [ - "mru", - "lru", - "cache" - ], - "license": "ISC", - "main": "index.js", - "name": "lru-cache", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "scripts": { - "coveragerport": "tap --coverage-report=html", - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", - "test": "tap test/*.js --100 -J" - }, - "version": "5.1.1" -} diff --git a/node_modules/hosted-git-info/node_modules/yallist/LICENSE b/node_modules/hosted-git-info/node_modules/yallist/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/hosted-git-info/node_modules/yallist/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/hosted-git-info/node_modules/yallist/README.md b/node_modules/hosted-git-info/node_modules/yallist/README.md deleted file mode 100644 index f5861018..00000000 --- a/node_modules/hosted-git-info/node_modules/yallist/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# yallist - -Yet Another Linked List - -There are many doubly-linked list implementations like it, but this -one is mine. - -For when an array would be too big, and a Map can't be iterated in -reverse order. - - -[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) - -## basic usage - -```javascript -var yallist = require('yallist') -var myList = yallist.create([1, 2, 3]) -myList.push('foo') -myList.unshift('bar') -// of course pop() and shift() are there, too -console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] -myList.forEach(function (k) { - // walk the list head to tail -}) -myList.forEachReverse(function (k, index, list) { - // walk the list tail to head -}) -var myDoubledList = myList.map(function (k) { - return k + k -}) -// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] -// mapReverse is also a thing -var myDoubledListReverse = myList.mapReverse(function (k) { - return k + k -}) // ['foofoo', 6, 4, 2, 'barbar'] - -var reduced = myList.reduce(function (set, entry) { - set += entry - return set -}, 'start') -console.log(reduced) // 'startfoo123bar' -``` - -## api - -The whole API is considered "public". - -Functions with the same name as an Array method work more or less the -same way. - -There's reverse versions of most things because that's the point. - -### Yallist - -Default export, the class that holds and manages a list. - -Call it with either a forEach-able (like an array) or a set of -arguments, to initialize the list. - -The Array-ish methods all act like you'd expect. No magic length, -though, so if you change that it won't automatically prune or add -empty spots. - -### Yallist.create(..) - -Alias for Yallist function. Some people like factories. - -#### yallist.head - -The first node in the list - -#### yallist.tail - -The last node in the list - -#### yallist.length - -The number of nodes in the list. (Change this at your peril. It is -not magic like Array length.) - -#### yallist.toArray() - -Convert the list to an array. - -#### yallist.forEach(fn, [thisp]) - -Call a function on each item in the list. - -#### yallist.forEachReverse(fn, [thisp]) - -Call a function on each item in the list, in reverse order. - -#### yallist.get(n) - -Get the data at position `n` in the list. If you use this a lot, -probably better off just using an Array. - -#### yallist.getReverse(n) - -Get the data at position `n`, counting from the tail. - -#### yallist.map(fn, thisp) - -Create a new Yallist with the result of calling the function on each -item. - -#### yallist.mapReverse(fn, thisp) - -Same as `map`, but in reverse. - -#### yallist.pop() - -Get the data from the list tail, and remove the tail from the list. - -#### yallist.push(item, ...) - -Insert one or more items to the tail of the list. - -#### yallist.reduce(fn, initialValue) - -Like Array.reduce. - -#### yallist.reduceReverse - -Like Array.reduce, but in reverse. - -#### yallist.reverse - -Reverse the list in place. - -#### yallist.shift() - -Get the data from the list head, and remove the head from the list. - -#### yallist.slice([from], [to]) - -Just like Array.slice, but returns a new Yallist. - -#### yallist.sliceReverse([from], [to]) - -Just like yallist.slice, but the result is returned in reverse. - -#### yallist.toArray() - -Create an array representation of the list. - -#### yallist.toArrayReverse() - -Create a reversed array representation of the list. - -#### yallist.unshift(item, ...) - -Insert one or more items to the head of the list. - -#### yallist.unshiftNode(node) - -Move a Node object to the front of the list. (That is, pull it out of -wherever it lives, and make it the new head.) - -If the node belongs to a different list, then that list will remove it -first. - -#### yallist.pushNode(node) - -Move a Node object to the end of the list. (That is, pull it out of -wherever it lives, and make it the new tail.) - -If the node belongs to a list already, then that list will remove it -first. - -#### yallist.removeNode(node) - -Remove a node from the list, preserving referential integrity of head -and tail and other nodes. - -Will throw an error if you try to have a list remove a node that -doesn't belong to it. - -### Yallist.Node - -The class that holds the data and is actually the list. - -Call with `var n = new Node(value, previousNode, nextNode)` - -Note that if you do direct operations on Nodes themselves, it's very -easy to get into weird states where the list is broken. Be careful :) - -#### node.next - -The next node in the list. - -#### node.prev - -The previous node in the list. - -#### node.value - -The data the node contains. - -#### node.list - -The list to which this node belongs. (Null if it does not belong to -any list.) diff --git a/node_modules/hosted-git-info/node_modules/yallist/iterator.js b/node_modules/hosted-git-info/node_modules/yallist/iterator.js deleted file mode 100644 index d41c97a1..00000000 --- a/node_modules/hosted-git-info/node_modules/yallist/iterator.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } - } -} diff --git a/node_modules/hosted-git-info/node_modules/yallist/package.json b/node_modules/hosted-git-info/node_modules/yallist/package.json deleted file mode 100644 index f66a2d4e..00000000 --- a/node_modules/hosted-git-info/node_modules/yallist/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "yallist@3.0.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "yallist@3.0.3", - "_id": "yallist@3.0.3", - "_inBundle": false, - "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "_location": "/hosted-git-info/yallist", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "yallist@3.0.3", - "name": "yallist", - "escapedName": "yallist", - "rawSpec": "3.0.3", - "saveSpec": null, - "fetchSpec": "3.0.3" - }, - "_requiredBy": [ - "/hosted-git-info/lru-cache" - ], - "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "_spec": "3.0.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/yallist/issues" - }, - "dependencies": {}, - "description": "Yet Another Linked List", - "devDependencies": { - "tap": "^12.1.0" - }, - "directories": { - "test": "test" - }, - "files": [ - "yallist.js", - "iterator.js" - ], - "homepage": "https://github.com/isaacs/yallist#readme", - "license": "ISC", - "main": "yallist.js", - "name": "yallist", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/yallist.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --100" - }, - "version": "3.0.3" -} diff --git a/node_modules/hosted-git-info/node_modules/yallist/yallist.js b/node_modules/hosted-git-info/node_modules/yallist/yallist.js deleted file mode 100644 index b0ab36cf..00000000 --- a/node_modules/hosted-git-info/node_modules/yallist/yallist.js +++ /dev/null @@ -1,376 +0,0 @@ -'use strict' -module.exports = Yallist - -Yallist.Node = Node -Yallist.create = Yallist - -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() - } - - self.tail = null - self.head = null - self.length = 0 - - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) - } - } - - return self -} - -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') - } - - var next = node.next - var prev = node.prev - - if (next) { - next.prev = prev - } - - if (prev) { - prev.next = next - } - - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev - } - - node.list.length-- - node.next = null - node.prev = null - node.list = null -} - -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node - } - - this.head = node - if (!this.tail) { - this.tail = node - } - this.length++ -} - -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node - } - - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} - -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } - - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res -} - -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } - - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null - } - this.length-- - return res -} - -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } -} - -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } -} - -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next - } - return res -} - -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res -} - -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } - - return acc -} - -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } - - return acc -} - -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} - -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} - -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p - } - this.head = tail - this.tail = head - return this -} - -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail - } - self.length++ -} - -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} - -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) - } - - this.list = list - this.value = value - - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null - } - - if (next) { - next.prev = this - this.next = next - } else { - this.next = null - } -} - -try { - // add if support for Symbol.iterator is present - require('./iterator.js')(Yallist) -} catch (er) {} diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json index 9f75f110..8cc554c3 100644 --- a/node_modules/hosted-git-info/package.json +++ b/node_modules/hosted-git-info/package.json @@ -1,45 +1,32 @@ { - "_args": [ - [ - "hosted-git-info@2.8.2", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "hosted-git-info@2.8.2", - "_id": "hosted-git-info@2.8.2", - "_inBundle": false, - "_integrity": "sha512-CyjlXII6LMsPMyUzxpTt8fzh5QwzGqPmQXgY/Jyf4Zfp27t/FvfhwoE/8laaMUcMy816CkWF20I7NeQhwwY88w==", - "_location": "/hosted-git-info", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "hosted-git-info@2.8.2", - "name": "hosted-git-info", - "escapedName": "hosted-git-info", - "rawSpec": "2.8.2", - "saveSpec": null, - "fetchSpec": "2.8.2" + "name": "hosted-git-info", + "version": "2.8.9", + "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/hosted-git-info.git" }, - "_requiredBy": [ - "/normalize-package-data" + "keywords": [ + "git", + "github", + "bitbucket", + "gitlab" ], - "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.2.tgz", - "_spec": "2.8.2", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org" - }, + "author": "Rebecca Turner (http://re-becca.org)", + "license": "ISC", "bugs": { "url": "https://github.com/npm/hosted-git-info/issues" }, - "dependencies": { - "lru-cache": "^5.1.1" + "homepage": "https://github.com/npm/hosted-git-info", + "scripts": { + "prerelease": "npm t", + "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", + "posttest": "standard", + "release": "standard-version -s", + "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js", + "test": "tap -J --coverage=90 --no-esm test/*.js" }, - "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "devDependencies": { "standard": "^11.0.1", "standard-version": "^4.4.0", @@ -49,27 +36,5 @@ "index.js", "git-host.js", "git-host-info.js" - ], - "homepage": "https://github.com/npm/hosted-git-info", - "keywords": [ - "git", - "github", - "bitbucket", - "gitlab" - ], - "license": "ISC", - "main": "index.js", - "name": "hosted-git-info", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/hosted-git-info.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --100 --no-esm test/*.js" - }, - "version": "2.8.2" + ] } diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js deleted file mode 100644 index 27f9cbb8..00000000 --- a/node_modules/invert-kv/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -module.exports = object => { - if (typeof object !== 'object') { - throw new TypeError('Expected an object'); - } - - const ret = {}; - - for (const key of Object.keys(object)) { - const value = object[key]; - ret[value] = key; - } - - return ret; -}; diff --git a/node_modules/invert-kv/license b/node_modules/invert-kv/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/invert-kv/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/invert-kv/package.json b/node_modules/invert-kv/package.json deleted file mode 100644 index 1587d6bc..00000000 --- a/node_modules/invert-kv/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "invert-kv@2.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "invert-kv@2.0.0", - "_id": "invert-kv@2.0.0", - "_inBundle": false, - "_integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "_location": "/invert-kv", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "invert-kv@2.0.0", - "name": "invert-kv", - "escapedName": "invert-kv", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/lcid" - ], - "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/invert-kv/issues" - }, - "description": "Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}`", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/invert-kv#readme", - "keywords": [ - "object", - "key", - "value", - "kv", - "invert" - ], - "license": "MIT", - "name": "invert-kv", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/invert-kv.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md deleted file mode 100644 index 365a9799..00000000 --- a/node_modules/invert-kv/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -# invert-kv [![Build Status](https://travis-ci.org/sindresorhus/invert-kv.svg?branch=master)](https://travis-ci.org/sindresorhus/invert-kv) - -> Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}` - - -## Install - -``` -$ npm install invert-kv -``` - - -## Usage - -```js -const invertKv = require('invert-kv'); - -invertKv({foo: 'bar', unicorn: 'rainbow'}); -//=> {bar: 'foo', rainbow: 'unicorn'} -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-buffer/LICENSE b/node_modules/is-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/is-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -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/is-buffer/README.md b/node_modules/is-buffer/README.md deleted file mode 100644 index cce0a8cf..00000000 --- a/node_modules/is-buffer/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/is-buffer -[npm-image]: https://img.shields.io/npm/v/is-buffer.svg -[npm-url]: https://npmjs.org/package/is-buffer -[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg -[downloads-url]: https://npmjs.org/package/is-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg -[saucelabs-url]: https://saucelabs.com/u/is-buffer - -## Why not use `Buffer.isBuffer`? - -This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). - -It's future-proof and works in node too! - -## install - -```bash -npm install is-buffer -``` - -## usage - -```js -var isBuffer = require('is-buffer') - -isBuffer(new Buffer(4)) // true - -isBuffer(undefined) // false -isBuffer(null) // false -isBuffer('') // false -isBuffer(true) // false -isBuffer(false) // false -isBuffer(0) // false -isBuffer(1) // false -isBuffer(1.0) // false -isBuffer('string') // false -isBuffer({}) // false -isBuffer(function foo () {}) // false -``` - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/is-buffer/index.js b/node_modules/is-buffer/index.js deleted file mode 100644 index da9bfdd7..00000000 --- a/node_modules/is-buffer/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -module.exports = function isBuffer (obj) { - return obj != null && obj.constructor != null && - typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json deleted file mode 100644 index d60fb8d2..00000000 --- a/node_modules/is-buffer/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_args": [ - [ - "is-buffer@2.0.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "is-buffer@2.0.3", - "_id": "is-buffer@2.0.3", - "_inBundle": false, - "_integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", - "_location": "/is-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-buffer@2.0.3", - "name": "is-buffer", - "escapedName": "is-buffer", - "rawSpec": "2.0.3", - "saveSpec": null, - "fetchSpec": "2.0.3" - }, - "_requiredBy": [ - "/flat" - ], - "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "_spec": "2.0.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/is-buffer/issues" - }, - "dependencies": {}, - "description": "Determine if an object is a Buffer", - "devDependencies": { - "airtap": "0.0.7", - "standard": "*", - "tape": "^4.0.0" - }, - "engines": { - "node": ">=4" - }, - "homepage": "https://github.com/feross/is-buffer#readme", - "keywords": [ - "arraybuffer", - "browser", - "browser buffer", - "browserify", - "buffer", - "buffers", - "core buffer", - "dataview", - "float32array", - "float64array", - "int16array", - "int32array", - "type", - "typed array", - "uint32array" - ], - "license": "MIT", - "main": "index.js", - "name": "is-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/is-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "testling": { - "files": "test/*.js" - }, - "version": "2.0.3" -} diff --git a/node_modules/is-callable/.editorconfig b/node_modules/is-callable/.editorconfig deleted file mode 100644 index bc228f82..00000000 --- a/node_modules/is-callable/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/is-callable/.eslintrc b/node_modules/is-callable/.eslintrc deleted file mode 100644 index db619b50..00000000 --- a/node_modules/is-callable/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": 0, - "max-statements": [2, 12], - "max-statements-per-line": [2, { "max": 2 }] - } -} diff --git a/node_modules/is-callable/.istanbul.yml b/node_modules/is-callable/.istanbul.yml deleted file mode 100644 index 9affe0bc..00000000 --- a/node_modules/is-callable/.istanbul.yml +++ /dev/null @@ -1,47 +0,0 @@ -verbose: false -instrumentation: - root: . - extensions: - - .js - - .jsx - default-excludes: true - excludes: [] - variable: __coverage__ - compact: true - preserve-comments: false - complete-copy: false - save-baseline: false - baseline-file: ./coverage/coverage-baseline.raw.json - include-all-sources: false - include-pid: false - es-modules: false - auto-wrap: false -reporting: - print: summary - reports: - - html - dir: ./coverage - summarizer: pkg - report-config: {} - watermarks: - statements: [50, 80] - functions: [50, 80] - branches: [50, 80] - lines: [50, 80] -hooks: - hook-run-in-context: false - post-require-hook: null - handle-sigint: false -check: - global: - statements: 100 - lines: 100 - branches: 100 - functions: 100 - excludes: [] - each: - statements: 100 - lines: 100 - branches: 100 - functions: 100 - excludes: [] diff --git a/node_modules/is-callable/.jscs.json b/node_modules/is-callable/.jscs.json deleted file mode 100644 index b4d9b8b4..00000000 --- a/node_modules/is-callable/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/is-callable/.travis.yml b/node_modules/is-callable/.travis.yml deleted file mode 100644 index 767256c8..00000000 --- a/node_modules/is-callable/.travis.yml +++ /dev/null @@ -1,225 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "10.4" - - "9.11" - - "8.11" - - "7.10" - - "6.14" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/is-callable/CHANGELOG.md b/node_modules/is-callable/CHANGELOG.md deleted file mode 100644 index 58286a05..00000000 --- a/node_modules/is-callable/CHANGELOG.md +++ /dev/null @@ -1,56 +0,0 @@ -1.1.4 / 2018-07-02 -================= - * [Fix] improve `class` and arrow function detection (#30, #31) - * [Tests] on all latest node minors; improve matrix - * [Dev Deps] update all dev deps - -1.1.3 / 2016-02-27 -================= - * [Fix] ensure “class “ doesn’t screw up “class” detection - * [Tests] up to `node` `v5.7`, `v4.3` - * [Dev Deps] update to `eslint` v2, `@ljharb/eslint-config`, `jscs` - -1.1.2 / 2016-01-15 -================= - * [Fix] Make sure comments don’t screw up “class” detection (#4) - * [Tests] up to `node` `v5.3` - * [Tests] Add `parallelshell`, run both `--es-staging` and stock tests at once - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` - * [Refactor] convert `isNonES6ClassFn` into `isES6ClassFn` - -1.1.1 / 2015-11-30 -================= - * [Fix] do not throw when a non-function has a function in its [[Prototype]] (#2) - * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `semver` - * [Tests] up to `node` `v5.1` - * [Tests] no longer allow node 0.8 to fail. - * [Tests] fix npm upgrades in older nodes - -1.1.0 / 2015-10-02 -================= - * [Fix] Some browsers report TypedArray constructors as `typeof object` - * [New] return false for "class" constructors, when possible. - * [Tests] up to `io.js` `v3.3`, `node` `v4.1` - * [Dev Deps] update `eslint`, `editorconfig-tools`, `nsp`, `tape`, `semver`, `jscs`, `covert`, `make-arrow-function` - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - -1.0.4 / 2015-01-30 -================= - * If @@toStringTag is not present, use the old-school Object#toString test. - -1.0.3 / 2015-01-29 -================= - * Add tests to ensure arrow functions are callable. - * Refactor to aid optimization of non-try/catch code. - -1.0.2 / 2015-01-29 -================= - * Fix broken package.json - -1.0.1 / 2015-01-29 -================= - * Add early exit for typeof not "function" - -1.0.0 / 2015-01-29 -================= - * Initial release. diff --git a/node_modules/is-callable/LICENSE b/node_modules/is-callable/LICENSE deleted file mode 100644 index b43df444..00000000 --- a/node_modules/is-callable/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -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/is-callable/Makefile b/node_modules/is-callable/Makefile deleted file mode 100644 index b9e4fe1a..00000000 --- a/node_modules/is-callable/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/is-callable/README.md b/node_modules/is-callable/README.md deleted file mode 100644 index 0cb65879..00000000 --- a/node_modules/is-callable/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# is-callable [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -[![browser support][9]][10] - -Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag. - -## Example - -```js -var isCallable = require('is-callable'); -var assert = require('assert'); - -assert.notOk(isCallable(undefined)); -assert.notOk(isCallable(null)); -assert.notOk(isCallable(false)); -assert.notOk(isCallable(true)); -assert.notOk(isCallable([])); -assert.notOk(isCallable({})); -assert.notOk(isCallable(/a/g)); -assert.notOk(isCallable(new RegExp('a', 'g'))); -assert.notOk(isCallable(new Date())); -assert.notOk(isCallable(42)); -assert.notOk(isCallable(NaN)); -assert.notOk(isCallable(Infinity)); -assert.notOk(isCallable(new Number(42))); -assert.notOk(isCallable('foo')); -assert.notOk(isCallable(Object('foo'))); - -assert.ok(isCallable(function () {})); -assert.ok(isCallable(function* () {})); -assert.ok(isCallable(x => x * x)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/is-callable -[2]: http://versionbadg.es/ljharb/is-callable.svg -[3]: https://travis-ci.org/ljharb/is-callable.svg -[4]: https://travis-ci.org/ljharb/is-callable -[5]: https://david-dm.org/ljharb/is-callable.svg -[6]: https://david-dm.org/ljharb/is-callable -[7]: https://david-dm.org/ljharb/is-callable/dev-status.svg -[8]: https://david-dm.org/ljharb/is-callable#info=devDependencies -[9]: https://ci.testling.com/ljharb/is-callable.png -[10]: https://ci.testling.com/ljharb/is-callable -[11]: https://nodei.co/npm/is-callable.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-callable.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-callable.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-callable diff --git a/node_modules/is-callable/index.js b/node_modules/is-callable/index.js deleted file mode 100644 index d9820b51..00000000 --- a/node_modules/is-callable/index.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var fnToStr = Function.prototype.toString; - -var constructorRegex = /^\s*class\b/; -var isES6ClassFn = function isES6ClassFunction(value) { - try { - var fnStr = fnToStr.call(value); - return constructorRegex.test(fnStr); - } catch (e) { - return false; // not a function - } -}; - -var tryFunctionObject = function tryFunctionToStr(value) { - try { - if (isES6ClassFn(value)) { return false; } - fnToStr.call(value); - return true; - } catch (e) { - return false; - } -}; -var toStr = Object.prototype.toString; -var fnClass = '[object Function]'; -var genClass = '[object GeneratorFunction]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = function isCallable(value) { - if (!value) { return false; } - if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } - if (hasToStringTag) { return tryFunctionObject(value); } - if (isES6ClassFn(value)) { return false; } - var strClass = toStr.call(value); - return strClass === fnClass || strClass === genClass; -}; diff --git a/node_modules/is-callable/package.json b/node_modules/is-callable/package.json deleted file mode 100644 index 88ce794d..00000000 --- a/node_modules/is-callable/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "_args": [ - [ - "is-callable@1.1.4", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "is-callable@1.1.4", - "_id": "is-callable@1.1.4", - "_inBundle": false, - "_integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "_location": "/is-callable", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-callable@1.1.4", - "name": "is-callable", - "escapedName": "is-callable", - "rawSpec": "1.1.4", - "saveSpec": null, - "fetchSpec": "1.1.4" - }, - "_requiredBy": [ - "/es-abstract", - "/es-to-primitive" - ], - "_resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "_spec": "1.1.4", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "bugs": { - "url": "https://github.com/ljharb/is-callable/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": {}, - "description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "editorconfig-tools": "^0.1.1", - "eslint": "^4.19.1", - "foreach": "^2.0.5", - "istanbul": "1.1.0-alpha.1", - "istanbul-merge": "^1.1.1", - "jscs": "^3.0.7", - "make-arrow-function": "^1.1.0", - "make-generator-function": "^1.1.0", - "nsp": "^3.2.1", - "rimraf": "^2.6.2", - "semver": "^5.5.0", - "tape": "^4.9.1" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/is-callable#readme", - "keywords": [ - "Function", - "function", - "callable", - "generator", - "generator function", - "arrow", - "arrow function", - "ES6", - "toStringTag", - "@@toStringTag" - ], - "license": "MIT", - "main": "index.js", - "name": "is-callable", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-callable.git" - }, - "scripts": { - "coverage": "npm run --silent istanbul", - "covert": "covert test.js", - "covert:quiet": "covert test.js --quiet", - "eslint": "eslint *.js", - "istanbul": "npm run --silent istanbul:clean && npm run --silent istanbul:std && npm run --silent istanbul:harmony && npm run --silent istanbul:merge && istanbul check", - "istanbul:clean": "rimraf coverage coverage-std coverage-harmony", - "istanbul:harmony": "node --harmony ./node_modules/istanbul/lib/cli.js cover test.js --dir coverage-harmony", - "istanbul:merge": "istanbul-merge --out coverage/coverage.raw.json coverage-harmony/coverage.raw.json coverage-std/coverage.raw.json && istanbul report html", - "istanbul:std": "istanbul cover test.js --report html --dir coverage-std", - "jscs": "jscs *.js", - "lint": "npm run jscs && npm run eslint", - "posttest": "npm run --silent security", - "prelint": "editorconfig-tools check *", - "pretest": "npm run --silent lint", - "security": "nsp check", - "test": "npm run --silent tests-only", - "test:staging": "node --es-staging test.js", - "test:stock": "node test.js", - "tests-only": "npm run --silent test:stock && npm run --silent test:staging" - }, - "testling": { - "files": "test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.1.4" -} diff --git a/node_modules/is-callable/test.js b/node_modules/is-callable/test.js deleted file mode 100644 index f5be51d8..00000000 --- a/node_modules/is-callable/test.js +++ /dev/null @@ -1,158 +0,0 @@ -'use strict'; - -/* eslint no-magic-numbers: 1 */ - -var test = require('tape'); -var isCallable = require('./'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; -var genFn = require('make-generator-function'); -var arrowFn = require('make-arrow-function')(); -var weirdlyCommentedArrowFn; -var asyncFn; -var asyncArrowFn; -try { - /* eslint no-new-func: 0 */ - weirdlyCommentedArrowFn = Function('return cl/*/**/=>/**/ass - 1;')(); - asyncFn = Function('return async function foo() {};')(); - asyncArrowFn = Function('return async () => {};')(); -} catch (e) { /**/ } -var forEach = require('foreach'); - -var noop = function () {}; -var classFake = function classFake() { }; // eslint-disable-line func-name-matching -var returnClass = function () { return ' class '; }; -var return3 = function () { return 3; }; -/* for coverage */ -noop(); -classFake(); -returnClass(); -return3(); -/* end for coverage */ - -var invokeFunction = function invokeFunctionString(str) { - var result; - try { - /* eslint-disable no-new-func */ - var fn = Function(str); - /* eslint-enable no-new-func */ - result = fn(); - } catch (e) {} - return result; -}; - -var classConstructor = invokeFunction('"use strict"; return class Foo {}'); - -var commentedClass = invokeFunction('"use strict"; return class/*kkk*/\n//blah\n Bar\n//blah\n {}'); -var commentedClassOneLine = invokeFunction('"use strict"; return class/**/A{}'); -var classAnonymous = invokeFunction('"use strict"; return class{}'); -var classAnonymousCommentedOneLine = invokeFunction('"use strict"; return class/*/*/{}'); - -test('not callables', function (t) { - t.test('non-number/string primitives', function (st) { - st.notOk(isCallable(), 'undefined is not callable'); - st.notOk(isCallable(null), 'null is not callable'); - st.notOk(isCallable(false), 'false is not callable'); - st.notOk(isCallable(true), 'true is not callable'); - st.end(); - }); - - t.notOk(isCallable([]), 'array is not callable'); - t.notOk(isCallable({}), 'object is not callable'); - t.notOk(isCallable(/a/g), 'regex literal is not callable'); - t.notOk(isCallable(new RegExp('a', 'g')), 'regex object is not callable'); - t.notOk(isCallable(new Date()), 'new Date() is not callable'); - - t.test('numbers', function (st) { - st.notOk(isCallable(42), 'number is not callable'); - st.notOk(isCallable(Object(42)), 'number object is not callable'); - st.notOk(isCallable(NaN), 'NaN is not callable'); - st.notOk(isCallable(Infinity), 'Infinity is not callable'); - st.end(); - }); - - t.test('strings', function (st) { - st.notOk(isCallable('foo'), 'string primitive is not callable'); - st.notOk(isCallable(Object('foo')), 'string object is not callable'); - st.end(); - }); - - t.test('non-function with function in its [[Prototype]] chain', function (st) { - var Foo = function Bar() {}; - Foo.prototype = noop; - st.equal(true, isCallable(Foo), 'sanity check: Foo is callable'); - st.equal(false, isCallable(new Foo()), 'instance of Foo is not callable'); - st.end(); - }); - - t.end(); -}); - -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { - var fakeFunction = { - toString: function () { return String(return3); }, - valueOf: return3 - }; - fakeFunction[Symbol.toStringTag] = 'Function'; - t.equal(String(fakeFunction), String(return3)); - t.equal(Number(fakeFunction), return3()); - t.notOk(isCallable(fakeFunction), 'fake Function with @@toStringTag "Function" is not callable'); - t.end(); -}); - -var typedArrayNames = [ - 'Int8Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'Int16Array', - 'Uint16Array', - 'Int32Array', - 'Uint32Array', - 'Float32Array', - 'Float64Array' -]; - -test('Functions', function (t) { - t.ok(isCallable(noop), 'function is callable'); - t.ok(isCallable(classFake), 'function with name containing "class" is callable'); - t.ok(isCallable(returnClass), 'function with string " class " is callable'); - t.ok(isCallable(isCallable), 'isCallable is callable'); - t.end(); -}); - -test('Typed Arrays', function (st) { - forEach(typedArrayNames, function (typedArray) { - /* istanbul ignore if : covered in node 0.6 */ - if (typeof global[typedArray] === 'undefined') { - st.comment('# SKIP typed array "' + typedArray + '" not supported'); - } else { - st.ok(isCallable(global[typedArray]), typedArray + ' is callable'); - } - }); - st.end(); -}); - -test('Generators', { skip: !genFn }, function (t) { - t.ok(isCallable(genFn), 'generator function is callable'); - t.end(); -}); - -test('Arrow functions', { skip: !arrowFn }, function (t) { - t.ok(isCallable(arrowFn), 'arrow function is callable'); - t.ok(isCallable(weirdlyCommentedArrowFn), 'weirdly commented arrow functions are callable'); - t.end(); -}); - -test('"Class" constructors', { skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous }, function (t) { - t.notOk(isCallable(classConstructor), 'class constructors are not callable'); - t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not callable'); - t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signature are not callable'); - t.notOk(isCallable(classAnonymous), 'anonymous class constructors are not callable'); - t.notOk(isCallable(classAnonymousCommentedOneLine), 'anonymous one-line class constructors with comments in the signature are not callable'); - t.end(); -}); - -test('`async function`s', { skip: !asyncFn }, function (t) { - t.ok(isCallable(asyncFn), '`async function`s are callable'); - t.ok(isCallable(asyncArrowFn), '`async` arrow functions are callable'); - t.end(); -}); diff --git a/node_modules/is-date-object/.eslintrc b/node_modules/is-date-object/.eslintrc deleted file mode 100644 index 1228f975..00000000 --- a/node_modules/is-date-object/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements": [2, 12] - } -} diff --git a/node_modules/is-date-object/.jscs.json b/node_modules/is-date-object/.jscs.json deleted file mode 100644 index 040bb680..00000000 --- a/node_modules/is-date-object/.jscs.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": "allButReserved", - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": true, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "validateOrderInObjectKeys": "asc-insensitive" -} - diff --git a/node_modules/is-date-object/.npmignore b/node_modules/is-date-object/.npmignore deleted file mode 100644 index 59d842ba..00000000 --- a/node_modules/is-date-object/.npmignore +++ /dev/null @@ -1,28 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules - -# Users Environment Variables -.lock-wscript diff --git a/node_modules/is-date-object/.travis.yml b/node_modules/is-date-object/.travis.yml deleted file mode 100644 index 4c29ed58..00000000 --- a/node_modules/is-date-object/.travis.yml +++ /dev/null @@ -1,58 +0,0 @@ -language: node_js -node_js: - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -before_install: - - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm' -sudo: false -matrix: - fast_finish: true - allow_failures: - - node_js: "4.0" - - node_js: "iojs-v3.2" - - node_js: "iojs-v3.1" - - node_js: "iojs-v3.0" - - node_js: "iojs-v2.4" - - node_js: "iojs-v2.3" - - node_js: "iojs-v2.2" - - node_js: "iojs-v2.1" - - node_js: "iojs-v2.0" - - node_js: "iojs-v1.7" - - node_js: "iojs-v1.6" - - node_js: "iojs-v1.5" - - node_js: "iojs-v1.4" - - node_js: "iojs-v1.3" - - node_js: "iojs-v1.2" - - node_js: "iojs-v1.1" - - node_js: "iojs-v1.0" - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.8" - - node_js: "0.6" - - node_js: "0.4" diff --git a/node_modules/is-date-object/CHANGELOG.md b/node_modules/is-date-object/CHANGELOG.md deleted file mode 100644 index 4a7eab61..00000000 --- a/node_modules/is-date-object/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -1.0.1 / 2015-09-27 -================= - * [Fix] If `@@toStringTag` is not present, use the old-school `Object#toString` test - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Dev Deps] update `is`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape`, `jscs`, `nsp`, `covert` - * [Tests] up to `io.js` `v3.3`, `node` `v4.1` - -1.0.0 / 2015-01-28 -================= - * Initial release. diff --git a/node_modules/is-date-object/LICENSE b/node_modules/is-date-object/LICENSE deleted file mode 100644 index b43df444..00000000 --- a/node_modules/is-date-object/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -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/is-date-object/Makefile b/node_modules/is-date-object/Makefile deleted file mode 100644 index b9e4fe1a..00000000 --- a/node_modules/is-date-object/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/is-date-object/README.md b/node_modules/is-date-object/README.md deleted file mode 100644 index 55b0c596..00000000 --- a/node_modules/is-date-object/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# is-date-object [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -[![browser support][9]][10] - -Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. - -## Example - -```js -var isDate = require('is-date-object'); -var assert = require('assert'); - -assert.notOk(isDate(undefined)); -assert.notOk(isDate(null)); -assert.notOk(isDate(false)); -assert.notOk(isDate(true)); -assert.notOk(isDate(42)); -assert.notOk(isDate('foo')); -assert.notOk(isDate(function () {})); -assert.notOk(isDate([])); -assert.notOk(isDate({})); -assert.notOk(isDate(/a/g)); -assert.notOk(isDate(new RegExp('a', 'g'))); - -assert.ok(isDate(new Date())); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/is-date-object -[2]: http://versionbadg.es/ljharb/is-date-object.svg -[3]: https://travis-ci.org/ljharb/is-date-object.svg -[4]: https://travis-ci.org/ljharb/is-date-object -[5]: https://david-dm.org/ljharb/is-date-object.svg -[6]: https://david-dm.org/ljharb/is-date-object -[7]: https://david-dm.org/ljharb/is-date-object/dev-status.svg -[8]: https://david-dm.org/ljharb/is-date-object#info=devDependencies -[9]: https://ci.testling.com/ljharb/is-date-object.png -[10]: https://ci.testling.com/ljharb/is-date-object -[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-date-object.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-date-object.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-date-object diff --git a/node_modules/is-date-object/index.js b/node_modules/is-date-object/index.js deleted file mode 100644 index fe0d7ecd..00000000 --- a/node_modules/is-date-object/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var getDay = Date.prototype.getDay; -var tryDateObject = function tryDateObject(value) { - try { - getDay.call(value); - return true; - } catch (e) { - return false; - } -}; - -var toStr = Object.prototype.toString; -var dateClass = '[object Date]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = function isDateObject(value) { - if (typeof value !== 'object' || value === null) { return false; } - return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; -}; diff --git a/node_modules/is-date-object/package.json b/node_modules/is-date-object/package.json deleted file mode 100644 index b30bcca6..00000000 --- a/node_modules/is-date-object/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "is-date-object@1.0.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "is-date-object@1.0.1", - "_id": "is-date-object@1.0.1", - "_inBundle": false, - "_integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "_location": "/is-date-object", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-date-object@1.0.1", - "name": "is-date-object", - "escapedName": "is-date-object", - "rawSpec": "1.0.1", - "saveSpec": null, - "fetchSpec": "1.0.1" - }, - "_requiredBy": [ - "/es-to-primitive" - ], - "_resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/is-date-object/issues" - }, - "dependencies": {}, - "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", - "devDependencies": { - "@ljharb/eslint-config": "^1.2.0", - "covert": "^1.1.0", - "eslint": "^1.5.1", - "foreach": "^2.0.5", - "indexof": "^0.0.1", - "is": "^3.1.0", - "jscs": "^2.1.1", - "nsp": "^1.1.0", - "semver": "^5.0.3", - "tape": "^4.2.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/is-date-object#readme", - "keywords": [ - "Date", - "ES6", - "toStringTag", - "@@toStringTag", - "Date object" - ], - "license": "MIT", - "main": "index.js", - "name": "is-date-object", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-date-object.git" - }, - "scripts": { - "coverage": "covert test.js", - "coverage-quiet": "covert test.js --quiet", - "eslint": "eslint test.js *.js", - "jscs": "jscs test.js *.js", - "lint": "npm run jscs && npm run eslint", - "security": "nsp package", - "test": "npm run lint && node --harmony --es-staging test.js && npm run security" - }, - "testling": { - "files": "test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.1" -} diff --git a/node_modules/is-date-object/test.js b/node_modules/is-date-object/test.js deleted file mode 100644 index 29f0917b..00000000 --- a/node_modules/is-date-object/test.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var test = require('tape'); -var isDate = require('./'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; - -test('not Dates', function (t) { - t.notOk(isDate(), 'undefined is not Date'); - t.notOk(isDate(null), 'null is not Date'); - t.notOk(isDate(false), 'false is not Date'); - t.notOk(isDate(true), 'true is not Date'); - t.notOk(isDate(42), 'number is not Date'); - t.notOk(isDate('foo'), 'string is not Date'); - t.notOk(isDate([]), 'array is not Date'); - t.notOk(isDate({}), 'object is not Date'); - t.notOk(isDate(function () {}), 'function is not Date'); - t.notOk(isDate(/a/g), 'regex literal is not Date'); - t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date'); - t.end(); -}); - -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { - var realDate = new Date(); - var fakeDate = { toString: function () { return String(realDate); }, valueOf: function () { return realDate.getTime(); } }; - fakeDate[Symbol.toStringTag] = 'Date'; - t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date'); - t.end(); -}); - -test('Dates', function (t) { - t.ok(isDate(new Date()), 'new Date() is Date'); - t.end(); -}); diff --git a/node_modules/is-regex/.eslintrc b/node_modules/is-regex/.eslintrc deleted file mode 100644 index fbb8e9de..00000000 --- a/node_modules/is-regex/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": [1] - } -} diff --git a/node_modules/is-regex/.jscs.json b/node_modules/is-regex/.jscs.json deleted file mode 100644 index 3d099c4b..00000000 --- a/node_modules/is-regex/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/is-regex/.npmignore b/node_modules/is-regex/.npmignore deleted file mode 100644 index a72b52eb..00000000 --- a/node_modules/is-regex/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules diff --git a/node_modules/is-regex/.travis.yml b/node_modules/is-regex/.travis.yml deleted file mode 100644 index 41137a89..00000000 --- a/node_modules/is-regex/.travis.yml +++ /dev/null @@ -1,165 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "7.5" - - "6.9" - - "5.12" - - "4.7" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "node" - env: PRETEST=true - - node_js: "node" - env: POSTTEST=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7" - env: TEST=true - os: osx - - node_js: "6" - env: TEST=true - os: osx - - node_js: "5" - env: TEST=true - os: osx - - node_js: "4" - env: TEST=true - os: osx - - node_js: "iojs" - env: TEST=true - os: osx - - node_js: "0.12" - env: TEST=true - os: osx - - node_js: "0.10" - env: TEST=true - os: osx - - node_js: "0.8" - env: TEST=true - os: osx - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/is-regex/CHANGELOG.md b/node_modules/is-regex/CHANGELOG.md deleted file mode 100644 index 6d738000..00000000 --- a/node_modules/is-regex/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -1.0.4 / 2016-02-18 -================= - * [Fix] ensure that `lastIndex` is not mutated (#3) - * [Refactor] when try/catch is needed, bail early if the value lacks an own `lastIndex` data property - * [Refactor] use an early return instead of a ternary - * [Refactor] bail earlier when the value is falsy - * Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Dev Deps] update `tape`, `jscs`, `editorconfig-tools`, `eslint`, `semver`, `replace`, `nsp`, `covert`, `@ljharb/eslint-config` - * [Tests] on all the node and io.js versions; improve test matri - * [Tests] Fix tests for faked @@toStringTag - -1.0.3 / 2015-01-29 -================= - * If @@toStringTag is not present, use the old-school Object#toString test. - -1.0.2 / 2015-01-29 -================= - * Improve optimization by separating the try/catch, and bailing out early when not typeof "object". - -1.0.1 / 2015-01-28 -================= - * Update `jscs`, `tape`, `covert` - * Use RegExp#exec to test if something is a regex, which works even with ES6 @@toStringTag. - -1.0.0 / 2014-05-19 -================= - * Initial release. diff --git a/node_modules/is-regex/LICENSE b/node_modules/is-regex/LICENSE deleted file mode 100644 index 47b7b507..00000000 --- a/node_modules/is-regex/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -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/is-regex/Makefile b/node_modules/is-regex/Makefile deleted file mode 100644 index b9e4fe1a..00000000 --- a/node_modules/is-regex/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/is-regex/README.md b/node_modules/is-regex/README.md deleted file mode 100644 index 05baa0eb..00000000 --- a/node_modules/is-regex/README.md +++ /dev/null @@ -1,54 +0,0 @@ -#is-regex [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -[![browser support][9]][10] - -Is this value a JS regex? -This module works cross-realm/iframe, and despite ES6 @@toStringTag. - -## Example - -```js -var isRegex = require('is-regex'); -var assert = require('assert'); - -assert.notOk(isRegex(undefined)); -assert.notOk(isRegex(null)); -assert.notOk(isRegex(false)); -assert.notOk(isRegex(true)); -assert.notOk(isRegex(42)); -assert.notOk(isRegex('foo')); -assert.notOk(isRegex(function () {})); -assert.notOk(isRegex([])); -assert.notOk(isRegex({})); - -assert.ok(isRegex(/a/g)); -assert.ok(isRegex(new RegExp('a', 'g'))); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/is-regex -[2]: http://versionbadg.es/ljharb/is-regex.svg -[3]: https://travis-ci.org/ljharb/is-regex.svg -[4]: https://travis-ci.org/ljharb/is-regex -[5]: https://david-dm.org/ljharb/is-regex.svg -[6]: https://david-dm.org/ljharb/is-regex -[7]: https://david-dm.org/ljharb/is-regex/dev-status.svg -[8]: https://david-dm.org/ljharb/is-regex#info=devDependencies -[9]: https://ci.testling.com/ljharb/is-regex.png -[10]: https://ci.testling.com/ljharb/is-regex -[11]: https://nodei.co/npm/is-regex.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-regex.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-regex.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-regex - diff --git a/node_modules/is-regex/index.js b/node_modules/is-regex/index.js deleted file mode 100644 index be651339..00000000 --- a/node_modules/is-regex/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -var has = require('has'); -var regexExec = RegExp.prototype.exec; -var gOPD = Object.getOwnPropertyDescriptor; - -var tryRegexExecCall = function tryRegexExec(value) { - try { - var lastIndex = value.lastIndex; - value.lastIndex = 0; - - regexExec.call(value); - return true; - } catch (e) { - return false; - } finally { - value.lastIndex = lastIndex; - } -}; -var toStr = Object.prototype.toString; -var regexClass = '[object RegExp]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = function isRegex(value) { - if (!value || typeof value !== 'object') { - return false; - } - if (!hasToStringTag) { - return toStr.call(value) === regexClass; - } - - var descriptor = gOPD(value, 'lastIndex'); - var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); - if (!hasLastIndexDataProperty) { - return false; - } - - return tryRegexExecCall(value); -}; diff --git a/node_modules/is-regex/package.json b/node_modules/is-regex/package.json deleted file mode 100644 index 3d580b87..00000000 --- a/node_modules/is-regex/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - "is-regex@1.0.4", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "is-regex@1.0.4", - "_id": "is-regex@1.0.4", - "_inBundle": false, - "_integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "_location": "/is-regex", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-regex@1.0.4", - "name": "is-regex", - "escapedName": "is-regex", - "rawSpec": "1.0.4", - "saveSpec": null, - "fetchSpec": "1.0.4" - }, - "_requiredBy": [ - "/es-abstract" - ], - "_resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "_spec": "1.0.4", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/is-regex/issues" - }, - "dependencies": { - "has": "^1.0.1" - }, - "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", - "devDependencies": { - "@ljharb/eslint-config": "^11.0.0", - "covert": "^1.1.0", - "editorconfig-tools": "^0.1.1", - "eslint": "^3.15.0", - "jscs": "^3.0.7", - "nsp": "^2.6.2", - "replace": "^0.3.0", - "semver": "^5.3.0", - "tape": "^4.6.3" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/is-regex", - "keywords": [ - "regex", - "regexp", - "is", - "regular expression", - "regular", - "expression" - ], - "license": "MIT", - "main": "index.js", - "name": "is-regex", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-regex.git" - }, - "scripts": { - "coverage": "covert test.js", - "coverage-quiet": "covert test.js --quiet", - "eccheck": "editorconfig-tools check *.js **/*.js > /dev/null", - "eslint": "eslint test.js *.js", - "jscs": "jscs *.js", - "lint": "npm run jscs && npm run eslint", - "posttest": "npm run security", - "pretest": "npm run lint", - "security": "nsp check", - "test": "npm run tests-only", - "tests-only": "node --harmony --es-staging test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..12.0", - "opera/15.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.4" -} diff --git a/node_modules/is-regex/test.js b/node_modules/is-regex/test.js deleted file mode 100644 index 8d390038..00000000 --- a/node_modules/is-regex/test.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -var test = require('tape'); -var isRegex = require('./'); -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -test('not regexes', function (t) { - t.notOk(isRegex(), 'undefined is not regex'); - t.notOk(isRegex(null), 'null is not regex'); - t.notOk(isRegex(false), 'false is not regex'); - t.notOk(isRegex(true), 'true is not regex'); - t.notOk(isRegex(42), 'number is not regex'); - t.notOk(isRegex('foo'), 'string is not regex'); - t.notOk(isRegex([]), 'array is not regex'); - t.notOk(isRegex({}), 'object is not regex'); - t.notOk(isRegex(function () {}), 'function is not regex'); - t.end(); -}); - -test('@@toStringTag', { skip: !hasToStringTag }, function (t) { - var regex = /a/g; - var fakeRegex = { - toString: function () { return String(regex); }, - valueOf: function () { return regex; } - }; - fakeRegex[Symbol.toStringTag] = 'RegExp'; - t.notOk(isRegex(fakeRegex), 'fake RegExp with @@toStringTag "RegExp" is not regex'); - t.end(); -}); - -test('regexes', function (t) { - t.ok(isRegex(/a/g), 'regex literal is regex'); - t.ok(isRegex(new RegExp('a', 'g')), 'regex object is regex'); - t.end(); -}); - -test('does not mutate regexes', function (t) { - t.test('lastIndex is a marker object', function (st) { - var regex = /a/; - var marker = {}; - regex.lastIndex = marker; - st.equal(regex.lastIndex, marker, 'lastIndex is the marker object'); - st.ok(isRegex(regex), 'is regex'); - st.equal(regex.lastIndex, marker, 'lastIndex is the marker object after isRegex'); - st.end(); - }); - - t.test('lastIndex is nonzero', function (st) { - var regex = /a/; - regex.lastIndex = 3; - st.equal(regex.lastIndex, 3, 'lastIndex is 3'); - st.ok(isRegex(regex), 'is regex'); - st.equal(regex.lastIndex, 3, 'lastIndex is 3 after isRegex'); - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/is-symbol/.editorconfig b/node_modules/is-symbol/.editorconfig deleted file mode 100644 index eaa21416..00000000 --- a/node_modules/is-symbol/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/is-symbol/.eslintrc b/node_modules/is-symbol/.eslintrc deleted file mode 100644 index 5f511fd0..00000000 --- a/node_modules/is-symbol/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements": [2, 14] - } -} diff --git a/node_modules/is-symbol/.jscs.json b/node_modules/is-symbol/.jscs.json deleted file mode 100644 index b4d9b8b4..00000000 --- a/node_modules/is-symbol/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/is-symbol/.nvmrc b/node_modules/is-symbol/.nvmrc deleted file mode 100644 index 64f5a0a6..00000000 --- a/node_modules/is-symbol/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -node diff --git a/node_modules/is-symbol/.travis.yml b/node_modules/is-symbol/.travis.yml deleted file mode 100644 index c671d5ea..00000000 --- a/node_modules/is-symbol/.travis.yml +++ /dev/null @@ -1,241 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "10.11" - - "9.11" - - "8.12" - - "7.10" - - "6.14" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/is-symbol/CHANGELOG.md b/node_modules/is-symbol/CHANGELOG.md deleted file mode 100644 index a7b8baf8..00000000 --- a/node_modules/is-symbol/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -1.0.2 / 2018-09-20 -================= - * [Refactor] use `has-symbols` and `object-inspect` - * [Tests] test on all the node minor versions - -1.0.1 / 2015-01-26 -================= - * Corrected description - -1.0.0 / 2015-01-24 -================= - * Initial release diff --git a/node_modules/is-symbol/LICENSE b/node_modules/is-symbol/LICENSE deleted file mode 100644 index b43df444..00000000 --- a/node_modules/is-symbol/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -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/is-symbol/Makefile b/node_modules/is-symbol/Makefile deleted file mode 100644 index b9e4fe1a..00000000 --- a/node_modules/is-symbol/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/is-symbol/README.md b/node_modules/is-symbol/README.md deleted file mode 100644 index 8544c8c0..00000000 --- a/node_modules/is-symbol/README.md +++ /dev/null @@ -1,46 +0,0 @@ -#is-symbol [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -[![browser support][9]][10] - -Is this an ES6 Symbol value? - -## Example - -```js -var isSymbol = require('is-symbol'); -assert(!isSymbol(function () {})); -assert(!isSymbol(null)); -assert(!isSymbol(function* () { yield 42; return Infinity; }); - -assert(isSymbol(Symbol.iterator)); -assert(isSymbol(Symbol('foo'))); -assert(isSymbol(Symbol.for('foo'))); -assert(isSymbol(Object(Symbol('foo')))); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/is-symbol -[2]: http://versionbadg.es/ljharb/is-symbol.svg -[3]: https://travis-ci.org/ljharb/is-symbol.svg -[4]: https://travis-ci.org/ljharb/is-symbol -[5]: https://david-dm.org/ljharb/is-symbol.svg -[6]: https://david-dm.org/ljharb/is-symbol -[7]: https://david-dm.org/ljharb/is-symbol/dev-status.svg -[8]: https://david-dm.org/ljharb/is-symbol#info=devDependencies -[9]: https://ci.testling.com/ljharb/is-symbol.png -[10]: https://ci.testling.com/ljharb/is-symbol -[11]: https://nodei.co/npm/is-symbol.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-symbol.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-symbol.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-symbol diff --git a/node_modules/is-symbol/index.js b/node_modules/is-symbol/index.js deleted file mode 100644 index 3d653e27..00000000 --- a/node_modules/is-symbol/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var toStr = Object.prototype.toString; -var hasSymbols = require('has-symbols')(); - -if (hasSymbols) { - var symToStr = Symbol.prototype.toString; - var symStringRegex = /^Symbol\(.*\)$/; - var isSymbolObject = function isRealSymbolObject(value) { - if (typeof value.valueOf() !== 'symbol') { - return false; - } - return symStringRegex.test(symToStr.call(value)); - }; - - module.exports = function isSymbol(value) { - if (typeof value === 'symbol') { - return true; - } - if (toStr.call(value) !== '[object Symbol]') { - return false; - } - try { - return isSymbolObject(value); - } catch (e) { - return false; - } - }; -} else { - - module.exports = function isSymbol(value) { - // this environment does not support Symbols. - return false && value; - }; -} diff --git a/node_modules/is-symbol/package.json b/node_modules/is-symbol/package.json deleted file mode 100644 index 798083fd..00000000 --- a/node_modules/is-symbol/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - "is-symbol@1.0.2", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "is-symbol@1.0.2", - "_id": "is-symbol@1.0.2", - "_inBundle": false, - "_integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "_location": "/is-symbol", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-symbol@1.0.2", - "name": "is-symbol", - "escapedName": "is-symbol", - "rawSpec": "1.0.2", - "saveSpec": null, - "fetchSpec": "1.0.2" - }, - "_requiredBy": [ - "/es-to-primitive" - ], - "_resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/is-symbol/issues" - }, - "dependencies": { - "has-symbols": "^1.0.0" - }, - "description": "Determine if a value is an ES6 Symbol or not.", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "eslint": "^4.19.1", - "jscs": "^3.0.7", - "nsp": "^3.2.1", - "object-inspect": "^1.6.0", - "safe-publish-latest": "^1.1.2", - "semver": "^5.5.0", - "tape": "^4.9.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/is-symbol#readme", - "keywords": [ - "symbol", - "es6", - "is", - "Symbol" - ], - "license": "MIT", - "main": "index.js", - "name": "is-symbol", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-symbol.git" - }, - "scripts": { - "coverage": "covert test", - "eslint": "eslint *.js */*.js", - "jscs": "jscs *.js */*.js", - "lint": "npm run jscs && npm run eslint", - "posttest": "npm run security", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "security": "nsp check", - "test": "npm run tests-only", - "tests-only": "node --es-staging --harmony test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.2" -} diff --git a/node_modules/is-symbol/test/.eslintrc b/node_modules/is-symbol/test/.eslintrc deleted file mode 100644 index 1ac0d47b..00000000 --- a/node_modules/is-symbol/test/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "rules": { - "max-statements-per-line": [2, { "max": 2 }], - "no-restricted-properties": 0, - "symbol-description": 0, - } -} diff --git a/node_modules/is-symbol/test/index.js b/node_modules/is-symbol/test/index.js deleted file mode 100644 index e01f035c..00000000 --- a/node_modules/is-symbol/test/index.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -var test = require('tape'); -var isSymbol = require('../index'); - -var forEach = function (arr, func) { - var i; - for (i = 0; i < arr.length; ++i) { - func(arr[i], i, arr); - } -}; - -var hasSymbols = require('has-symbols')(); -var inspect = require('object-inspect'); -var debug = function (v, m) { return inspect(v) + ' ' + m; }; - -test('non-symbol values', function (t) { - var nonSymbols = [ - true, - false, - Object(true), - Object(false), - null, - undefined, - {}, - [], - /a/g, - 'string', - 42, - new Date(), - function () {}, - NaN - ]; - t.plan(nonSymbols.length); - forEach(nonSymbols, function (nonSymbol) { - t.equal(false, isSymbol(nonSymbol), debug(nonSymbol, 'is not a symbol')); - }); - t.end(); -}); - -test('faked symbol values', function (t) { - t.test('real symbol valueOf', { skip: !hasSymbols }, function (st) { - var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; - st.equal(false, isSymbol(fakeSymbol), 'object with valueOf returning a symbol is not a symbol'); - st.end(); - }); - - t.test('faked @@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (st) { - var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; - fakeSymbol[Symbol.toStringTag] = 'Symbol'; - st.equal(false, isSymbol(fakeSymbol), 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol'); - var notSoFakeSymbol = { valueOf: function () { return 42; } }; - notSoFakeSymbol[Symbol.toStringTag] = 'Symbol'; - st.equal(false, isSymbol(notSoFakeSymbol), 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol'); - st.end(); - }); - - var fakeSymbolString = { toString: function () { return 'Symbol(foo)'; } }; - t.equal(false, isSymbol(fakeSymbolString), 'object with toString returning Symbol(foo) is not a symbol'); - - t.end(); -}); - -test('Symbol support', { skip: !hasSymbols }, function (t) { - t.test('well-known Symbols', function (st) { - var isWellKnown = function filterer(name) { - return name !== 'for' && name !== 'keyFor' && !(name in filterer); - }; - var wellKnownSymbols = Object.getOwnPropertyNames(Symbol).filter(isWellKnown); - wellKnownSymbols.forEach(function (name) { - var sym = Symbol[name]; - st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); - }); - st.end(); - }); - - t.test('user-created symbols', function (st) { - var symbols = [ - Symbol(), - Symbol('foo'), - Symbol['for']('foo'), - Object(Symbol('object')) - ]; - symbols.forEach(function (sym) { - st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); - }); - st.end(); - }); - - t.end(); -}); - diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/CHANGELOG.md b/node_modules/istanbul-lib-source-maps/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e3..00000000 --- a/node_modules/istanbul-lib-source-maps/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/istanbul-lib-source-maps/node_modules/debug/LICENSE b/node_modules/istanbul-lib-source-maps/node_modules/debug/LICENSE deleted file mode 100644 index 658c933d..00000000 --- a/node_modules/istanbul-lib-source-maps/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -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/istanbul-lib-source-maps/node_modules/debug/README.md b/node_modules/istanbul-lib-source-maps/node_modules/debug/README.md deleted file mode 100644 index 88dae35d..00000000 --- a/node_modules/istanbul-lib-source-maps/node_modules/debug/README.md +++ /dev/null @@ -1,455 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> - -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/istanbul-lib-source-maps/node_modules/debug/dist/debug.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/dist/debug.js deleted file mode 100644 index 89ad0c21..00000000 --- a/node_modules/istanbul-lib-source-maps/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/istanbul-lib-source-maps/node_modules/debug/package.json b/node_modules/istanbul-lib-source-maps/node_modules/debug/package.json deleted file mode 100644 index f578fa7c..00000000 --- a/node_modules/istanbul-lib-source-maps/node_modules/debug/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "debug@4.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "debug@4.1.1", - "_id": "debug@4.1.1", - "_inBundle": false, - "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "_location": "/istanbul-lib-source-maps/debug", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "debug@4.1.1", - "name": "debug", - "escapedName": "debug", - "rawSpec": "4.1.1", - "saveSpec": null, - "fetchSpec": "4.1.1" - }, - "_requiredBy": [ - "/istanbul-lib-source-maps" - ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "_spec": "4.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "dependencies": { - "ms": "^2.1.1" - }, - "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", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.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" - }, - "files": [ - "src", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "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: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" -} diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js deleted file mode 100644 index 5f34c0d0..00000000 --- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js +++ /dev/null @@ -1,264 +0,0 @@ -/* 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; - } - - const 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 - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, 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(...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); -} - -/** - * 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() { - let 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); - -const {formatters} = module.exports; - -/** - * 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; - } -}; diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/common.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/common.js deleted file mode 100644 index 2f82b8dc..00000000 --- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/common.js +++ /dev/null @@ -1,266 +0,0 @@ - -/** - * 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(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) { - let hash = 0; - - for (let 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) { - let prevTime; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const 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 - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const 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); - - const 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() { - const index = createDebug.instances.indexOf(this); - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - return false; - } - - function extend(namespace, delimiter) { - const 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 = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const 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++) { - const instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + 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; - } - - let i; - let 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; diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f2..00000000 --- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js deleted file mode 100644 index 5e1f1541..00000000 --- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/json-schema/README.md b/node_modules/json-schema/README.md index ccc591b6..b5862390 100644 --- a/node_modules/json-schema/README.md +++ b/node_modules/json-schema/README.md @@ -1,5 +1,3 @@ -JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator). +This is a historical repository for the early development of the JSON Schema specification and implementation. This package is considered "finished": it holds the earlier draft specification and a simple, efficient, lightweight implementation of the original core elements of JSON Schema. This repository does not house the latest specifications nor does it implement the latest versions of JSON Schema. This package seeks to maintain the stability (in behavior and size) of this original implementation for the sake of the numerous packages that rely on it. For the latest JSON Schema specifications and implementations, please visit the [JSON Schema site](https://json-schema.org/) (or the [respository](https://github.com/json-schema-org/json-schema-spec)). -Code is licensed under the AFL or BSD license as part of the Persevere -project which is administered under the Dojo foundation, -and all contributions require a Dojo CLA. \ No newline at end of file +Code is licensed under the AFL or BSD 3-Clause license. diff --git a/node_modules/json-schema/draft-00/hyper-schema b/node_modules/json-schema/draft-00/hyper-schema deleted file mode 100644 index 12fe26b6..00000000 --- a/node_modules/json-schema/draft-00/hyper-schema +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-00/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "dot-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-00/json-ref b/node_modules/json-schema/draft-00/json-ref deleted file mode 100644 index 0c825bce..00000000 --- a/node_modules/json-schema/draft-00/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-00/links b/node_modules/json-schema/draft-00/links deleted file mode 100644 index c9b55177..00000000 --- a/node_modules/json-schema/draft-00/links +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-00/schema b/node_modules/json-schema/draft-00/schema deleted file mode 100644 index a3a21443..00000000 --- a/node_modules/json-schema/draft-00/schema +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1 - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "maxDecimal" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-01/hyper-schema b/node_modules/json-schema/draft-01/hyper-schema deleted file mode 100644 index 66e835b6..00000000 --- a/node_modules/json-schema/draft-01/hyper-schema +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-01/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "dot-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-01/json-ref b/node_modules/json-schema/draft-01/json-ref deleted file mode 100644 index f2ad55b1..00000000 --- a/node_modules/json-schema/draft-01/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-01/links b/node_modules/json-schema/draft-01/links deleted file mode 100644 index cb183c4d..00000000 --- a/node_modules/json-schema/draft-01/links +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-01/schema b/node_modules/json-schema/draft-01/schema deleted file mode 100644 index e6b6aea4..00000000 --- a/node_modules/json-schema/draft-01/schema +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1 - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "maxDecimal" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-02/hyper-schema b/node_modules/json-schema/draft-02/hyper-schema deleted file mode 100644 index 2d2bc685..00000000 --- a/node_modules/json-schema/draft-02/hyper-schema +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-02/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "slash-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "slash-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-02/json-ref b/node_modules/json-schema/draft-02/json-ref deleted file mode 100644 index 2b23fcdc..00000000 --- a/node_modules/json-schema/draft-02/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-02/links b/node_modules/json-schema/draft-02/links deleted file mode 100644 index ab971b7c..00000000 --- a/node_modules/json-schema/draft-02/links +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-02/schema b/node_modules/json-schema/draft-02/schema deleted file mode 100644 index cc2b6693..00000000 --- a/node_modules/json-schema/draft-02/schema +++ /dev/null @@ -1,166 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "uniqueItems" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1, - "uniqueItems" : true - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "minimumCanEqual" : false, - "optional" : true, - "default" : 1 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-03/examples/address b/node_modules/json-schema/draft-03/examples/address deleted file mode 100644 index 401f20f1..00000000 --- a/node_modules/json-schema/draft-03/examples/address +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description" : "An Address following the convention of http://microformats.org/wiki/hcard", - "type" : "object", - "properties" : { - "post-office-box" : { "type" : "string" }, - "extended-address" : { "type" : "string" }, - "street-address" : { "type":"string" }, - "locality" : { "type" : "string", "required" : true }, - "region" : { "type" : "string", "required" : true }, - "postal-code" : { "type" : "string" }, - "country-name" : { "type" : "string", "required" : true } - }, - "dependencies" : { - "post-office-box" : "street-address", - "extended-address" : "street-address", - "street-address" : "region", - "locality" : "region", - "region" : "country-name" - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-03/examples/calendar b/node_modules/json-schema/draft-03/examples/calendar deleted file mode 100644 index 0ec47c23..00000000 --- a/node_modules/json-schema/draft-03/examples/calendar +++ /dev/null @@ -1,53 +0,0 @@ -{ - "description" : "A representation of an event", - "type" : "object", - "properties" : { - "dtstart" : { - "format" : "date-time", - "type" : "string", - "description" : "Event starting time", - "required":true - }, - "summary" : { - "type":"string", - "required":true - }, - "location" : { - "type" : "string" - }, - "url" : { - "type" : "string", - "format" : "url" - }, - "dtend" : { - "format" : "date-time", - "type" : "string", - "description" : "Event ending time" - }, - "duration" : { - "format" : "date", - "type" : "string", - "description" : "Event duration" - }, - "rdate" : { - "format" : "date-time", - "type" : "string", - "description" : "Recurrence date" - }, - "rrule" : { - "type" : "string", - "description" : "Recurrence rule" - }, - "category" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "geo" : { "$ref" : "http://json-schema.org/draft-03/geo" } - } -} - - - - diff --git a/node_modules/json-schema/draft-03/examples/card b/node_modules/json-schema/draft-03/examples/card deleted file mode 100644 index a5667ffd..00000000 --- a/node_modules/json-schema/draft-03/examples/card +++ /dev/null @@ -1,105 +0,0 @@ -{ - "description":"A representation of a person, company, organization, or place", - "type":"object", - "properties":{ - "fn":{ - "description":"Formatted Name", - "type":"string" - }, - "familyName":{ - "type":"string", - "required":true - }, - "givenName":{ - "type":"string", - "required":true - }, - "additionalName":{ - "type":"array", - "items":{ - "type":"string" - } - }, - "honorificPrefix":{ - "type":"array", - "items":{ - "type":"string" - } - }, - "honorificSuffix":{ - "type":"array", - "items":{ - "type":"string" - } - }, - "nickname":{ - "type":"string" - }, - "url":{ - "type":"string", - "format":"url" - }, - "email":{ - "type":"object", - "properties":{ - "type":{ - "type":"string" - }, - "value":{ - "type":"string", - "format":"email" - } - } - }, - "tel":{ - "type":"object", - "properties":{ - "type":{ - "type":"string" - }, - "value":{ - "type":"string", - "format":"phone" - } - } - }, - "adr":{"$ref" : "http://json-schema.org/address"}, - "geo":{"$ref" : "http://json-schema.org/geo"}, - "tz":{ - "type":"string" - }, - "photo":{ - "format":"image", - "type":"string" - }, - "logo":{ - "format":"image", - "type":"string" - }, - "sound":{ - "format":"attachment", - "type":"string" - }, - "bday":{ - "type":"string", - "format":"date" - }, - "title":{ - "type":"string" - }, - "role":{ - "type":"string" - }, - "org":{ - "type":"object", - "properties":{ - "organizationName":{ - "type":"string" - }, - "organizationUnit":{ - "type":"string" - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-03/examples/geo b/node_modules/json-schema/draft-03/examples/geo deleted file mode 100644 index 4357a909..00000000 --- a/node_modules/json-schema/draft-03/examples/geo +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description" : "A geographical coordinate", - "type" : "object", - "properties" : { - "latitude" : { "type" : "number" }, - "longitude" : { "type" : "number" } - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-03/examples/interfaces b/node_modules/json-schema/draft-03/examples/interfaces deleted file mode 100644 index b8532f29..00000000 --- a/node_modules/json-schema/draft-03/examples/interfaces +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends":"http://json-schema.org/hyper-schema", - "description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax", - "properties":{ - "methods":{ - "type":"object", - "description":"This defines the set of methods available to the class instances", - "additionalProperties":{ - "type":"object", - "description":"The definition of the method", - "properties":{ - "parameters":{ - "type":"array", - "description":"The set of parameters that should be passed to the method when it is called", - "items":{"$ref":"#"}, - "required": true - }, - "returns":{"$ref":"#"} - } - } - } - } -} diff --git a/node_modules/json-schema/draft-03/hyper-schema b/node_modules/json-schema/draft-03/hyper-schema deleted file mode 100644 index 38ca2e10..00000000 --- a/node_modules/json-schema/draft-03/hyper-schema +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"}, - "id" : "http://json-schema.org/draft-03/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-03/links#"} - }, - - "fragmentResolution" : { - "type" : "string", - "default" : "slash-delimited" - }, - - "root" : { - "type" : "boolean", - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "default" : false - }, - - "contentEncoding" : { - "type" : "string" - }, - - "pathStart" : { - "type" : "string", - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "format" : "media-type" - } - }, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "slash-delimited" -} diff --git a/node_modules/json-schema/draft-03/json-ref b/node_modules/json-schema/draft-03/json-ref deleted file mode 100644 index 66e08f26..00000000 --- a/node_modules/json-schema/draft-03/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "id" : "http://json-schema.org/draft-03/json-ref#", - - "additionalItems" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-03/links b/node_modules/json-schema/draft-03/links deleted file mode 100644 index 9fa63f98..00000000 --- a/node_modules/json-schema/draft-03/links +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "id" : "http://json-schema.org/draft-03/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string", - "required" : true, - "format" : "link-description-object-template" - }, - - "rel" : { - "type" : "string", - "required" : true - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET" - }, - - "enctype" : { - "type" : "string", - "requires" : "method" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} - } - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-03/schema b/node_modules/json-schema/draft-03/schema deleted file mode 100644 index 29d9469f..00000000 --- a/node_modules/json-schema/draft-03/schema +++ /dev/null @@ -1,174 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/schema#", - "id" : "http://json-schema.org/draft-03/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "patternProperties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalItems" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "required" : { - "type" : "boolean", - "default" : false - }, - - "dependencies" : { - "type" : "object", - "additionalProperties" : { - "type" : ["string", "array", {"$ref" : "#"}], - "items" : { - "type" : "string" - } - }, - "default" : {} - }, - - "minimum" : { - "type" : "number" - }, - - "maximum" : { - "type" : "number" - }, - - "exclusiveMinimum" : { - "type" : "boolean", - "default" : false - }, - - "exclusiveMaximum" : { - "type" : "boolean", - "default" : false - }, - - "minItems" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "default" : false - }, - - "pattern" : { - "type" : "string", - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer" - }, - - "enum" : { - "type" : "array", - "minItems" : 1, - "uniqueItems" : true - }, - - "default" : { - "type" : "any" - }, - - "title" : { - "type" : "string" - }, - - "description" : { - "type" : "string" - }, - - "format" : { - "type" : "string" - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "exclusiveMinimum" : true, - "default" : 1 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "id" : { - "type" : "string", - "format" : "uri" - }, - - "$ref" : { - "type" : "string", - "format" : "uri" - }, - - "$schema" : { - "type" : "string", - "format" : "uri" - } - }, - - "dependencies" : { - "exclusiveMinimum" : "minimum", - "exclusiveMaximum" : "maximum" - }, - - "default" : {} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-04/hyper-schema b/node_modules/json-schema/draft-04/hyper-schema deleted file mode 100644 index 63fb34d9..00000000 --- a/node_modules/json-schema/draft-04/hyper-schema +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-04/hyper-schema#", - "extends" : {"$ref" : "http://json-schema.org/draft-04/schema#"}, - "id" : "http://json-schema.org/draft-04/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-04/links#"} - }, - - "fragmentResolution" : { - "type" : "string", - "default" : "json-pointer" - }, - - "root" : { - "type" : "boolean", - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "default" : false - }, - - "contentEncoding" : { - "type" : "string" - }, - - "pathStart" : { - "type" : "string", - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "format" : "media-type" - } - }, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "json-pointer" -} diff --git a/node_modules/json-schema/draft-04/links b/node_modules/json-schema/draft-04/links deleted file mode 100644 index 6c06d293..00000000 --- a/node_modules/json-schema/draft-04/links +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-04/hyper-schema#", - "id" : "http://json-schema.org/draft-04/links#", - "type" : "object", - - "properties" : { - "rel" : { - "type" : "string" - }, - - "href" : { - "type" : "string" - }, - - "template" : { - "type" : "string" - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET" - }, - - "enctype" : { - "type" : "string" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} - } - }, - - "required" : ["rel", "href"], - - "dependencies" : { - "enctype" : "method" - } -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-04/schema b/node_modules/json-schema/draft-04/schema deleted file mode 100644 index 4231b169..00000000 --- a/node_modules/json-schema/draft-04/schema +++ /dev/null @@ -1,189 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-04/schema#", - "id" : "http://json-schema.org/draft-04/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : [ - { - "id" : "#simple-type", - "type" : "string", - "enum" : ["object", "array", "string", "number", "boolean", "null", "any"] - }, - "array" - ], - "items" : { - "type" : [ - {"$ref" : "#simple-type"}, - {"$ref" : "#"} - ] - }, - "uniqueItems" : true, - "default" : "any" - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "enum" : { - "type" : "array", - "minItems" : 1, - "uniqueItems" : true - }, - - "minimum" : { - "type" : "number" - }, - - "maximum" : { - "type" : "number" - }, - - "exclusiveMinimum" : { - "type" : "boolean", - "default" : false - }, - - "exclusiveMaximum" : { - "type" : "boolean", - "default" : false - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "exclusiveMinimum" : true, - "default" : 1 - }, - - "minLength" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer" - }, - - "pattern" : { - "type" : "string" - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalItems" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "minItems" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "default" : false - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "patternProperties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "minProperties" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxProperties" : { - "type" : "integer", - "minimum" : 0 - }, - - "required" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - - "dependencies" : { - "type" : "object", - "additionalProperties" : { - "type" : ["string", "array", {"$ref" : "#"}], - "items" : { - "type" : "string" - } - }, - "default" : {} - }, - - "id" : { - "type" : "string" - }, - - "$ref" : { - "type" : "string" - }, - - "$schema" : { - "type" : "string" - }, - - "title" : { - "type" : "string" - }, - - "description" : { - "type" : "string" - }, - - "default" : { - "type" : "any" - } - }, - - "dependencies" : { - "exclusiveMinimum" : "minimum", - "exclusiveMaximum" : "maximum" - }, - - "default" : {} -} \ No newline at end of file diff --git a/node_modules/json-schema/draft-zyp-json-schema-03.xml b/node_modules/json-schema/draft-zyp-json-schema-03.xml deleted file mode 100644 index cf606208..00000000 --- a/node_modules/json-schema/draft-zyp-json-schema-03.xml +++ /dev/null @@ -1,1120 +0,0 @@ - - - - - - - - - - - - - - - -]> - - - - - - - - - A JSON Media Type for Describing the Structure and Meaning of JSON Documents - - - SitePen (USA) -
- - 530 Lytton Avenue - Palo Alto, CA 94301 - USA - - +1 650 968 8787 - kris@sitepen.com -
-
- - -
- - - Calgary, AB - Canada - - gary.court@gmail.com -
-
- - - Internet Engineering Task Force - JSON - Schema - JavaScript - Object - Notation - Hyper Schema - Hypermedia - - - - JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", - a JSON based format for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - - -
- - -
- - JSON (JavaScript Object Notation) Schema is a JSON media type for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - -
- -
- - - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", - "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be - interpreted as described in RFC 2119. - -
- - - -
- - JSON Schema defines the media type "application/schema+json" for - describing the structure of other - JSON documents. JSON Schema is JSON-based and includes facilities - for describing the structure of JSON documents in terms of - allowable values, descriptions, and interpreting relations with other resources. - - - JSON Schema format is organized into several separate definitions. The first - definition is the core schema specification. This definition is primary - concerned with describing a JSON structure and specifying valid elements - in the structure. The second definition is the Hyper Schema specification - which is intended define elements in a structure that can be interpreted as - hyperlinks. - Hyper Schema builds on JSON Schema to describe the hyperlink structure of - other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate - JSON documents based on their schemas. - - - Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on - property values, as well as define the meaning of the property values - for the purpose of describing a resource and determining hyperlinks - within the representation. - -
- An example JSON Schema that describes products might look like: - - - - - This schema defines the properties of the instance JSON documents, - the required properties (id, name, and price), as well as an optional - property (tags). This also defines the link relations of the instance - JSON documents. - -
- -
- - For this specification, schema will be used to denote a JSON Schema - definition, and an instance refers to a JSON value that the schema - will be describing and validating. - -
- -
- - The JSON Schema media type does not attempt to dictate the structure of JSON - representations that contain data, but rather provides a separate format - for flexibly communicating how a JSON representation should be - interpreted and validated, such that user agents can properly understand - acceptable structures and extrapolate hyperlink information - with the JSON document. It is acknowledged that JSON documents come - in a variety of structures, and JSON is unique in that the structure - of stored data structures often prescribes a non-ambiguous definite - JSON representation. Attempting to force a specific structure is generally - not viable, and therefore JSON Schema allows for a great flexibility - in the structure of the JSON data that it describes. - - - This specification is protocol agnostic. - The underlying protocol (such as HTTP) should sufficiently define the - semantics of the client-server interface, the retrieval of resource - representations linked to by JSON representations, and modification of - those resources. The goal of this - format is to sufficiently describe JSON structures such that one can - utilize existing information available in existing JSON - representations from a large variety of services that leverage a representational state transfer - architecture using existing protocols. - -
-
- -
- - JSON Schema instances are correlated to their schema by the "describedby" - relation, where the schema is defined to be the target of the relation. - Instance representations may be of the "application/json" media type or - any other subtype. Consequently, dictating how an instance - representation should specify the relation to the schema is beyond the normative scope - of this document (since this document specifically defines the JSON - Schema media type, and no other), but it is recommended that instances - specify their schema so that user agents can interpret the instance - representation and messages may retain the self-descriptive - characteristic, avoiding the need for out-of-band information about - instance data. Two approaches are recommended for declaring the - relation to the schema that describes the meaning of a JSON instance's (or collection - of instances) structure. A MIME type parameter named - "profile" or a relation of "describedby" (which could be defined by a Link header) may be used: - -
- - - -
- - or if the content is being transferred by a protocol (such as HTTP) that - provides headers, a Link header can be used: - -
- -; rel="describedby" -]]> - -
- - Instances MAY specify multiple schemas, to indicate all the schemas that - are applicable to the data, and the data SHOULD be valid by all the schemas. - The instance data MAY have multiple schemas - that it is defined by (the instance data SHOULD be valid for those schemas). - Or if the document is a collection of instances, the collection MAY contain - instances from different schemas. When collections contain heterogeneous - instances, the "pathStart" attribute MAY be specified in the - schema to disambiguate which schema should be applied for each item in the - collection. However, ultimately, the mechanism for referencing a schema is up to the - media type of the instance documents (if they choose to specify that schemas - can be referenced). -
- -
- - JSON Schemas can themselves be described using JSON Schemas. - A self-describing JSON Schema for the core JSON Schema can - be found at http://json-schema.org/schema for the latest version or - http://json-schema.org/draft-03/schema for the draft-03 version. The hyper schema - self-description can be found at http://json-schema.org/hyper-schema - or http://json-schema.org/draft-03/hyper-schema. All schemas - used within a protocol with media type definitions - SHOULD include a MIME parameter that refers to the self-descriptive - hyper schema or another schema that extends this hyper schema: - -
- - - -
-
-
-
- -
- - A JSON Schema is a JSON Object that defines various attributes - (including usage and valid values) of a JSON value. JSON - Schema has recursive capabilities; there are a number of elements - in the structure that allow for nested JSON Schemas. - - -
- An example JSON Schema definition could look like: - - - -
- - - A JSON Schema object may have any of the following properties, called schema - attributes (all attributes are optional): - - -
- - This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. - This attribute can take one of two forms: - - - - A string indicating a primitive or simple type. The following are acceptable string values: - - - Value MUST be a string. - Value MUST be a number, floating point numbers are allowed. - Value MUST be an integer, no floating point numbers are allowed. This is a subset of the number type. - Value MUST be a boolean. - Value MUST be an object. - Value MUST be an array. - Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own). - Value MAY be of any type including null. - - - If the property is not defined or is not in this list, then any type of value is acceptable. - Other type values MAY be used for custom purposes, but minimal validators of the specification - implementation can allow any instance value on unknown type values. - - - - An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema. - The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array. - - - - -
- For example, a schema that defines if an instance can be a string or a number would be: - - -
-
- -
- This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order. -
- -
- This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. -
- -
- This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties. -
- -
- This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array. - When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. - When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute using the same rules as "additionalProperties" for objects. -
- -
- This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items. -
- -
- This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional. -
- -
- This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). - - The dependency value can take one of two forms: - - - - If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. - If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. - - - If the dependency value is a schema, then the instance object MUST be valid against the schema. - - - -
- -
- This attribute defines the minimum value of the instance property when the type of the instance value is a number. -
- -
- This attribute defines the maximum value of the instance property when the type of the instance value is a number. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. -
- -
- This attribute defines the minimum number of values in an array when the array is the instance value. -
- -
- This attribute defines the maximum number of values in an array when the array is the instance value. -
- -
- This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). - - Two instance are consider equal if they are both of the same type and: - - - are null; or - are booleans/numbers/strings and have the same value; or - are arrays, contains the same number of items, and each item in the array is equal to the corresponding item in the other array; or - are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. - - -
- -
- When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 -
- -
- When the instance value is a string, this defines the minimum length of the string. -
- -
- When the instance value is a string, this defines the maximum length of the string. -
- -
- This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". -
- -
- This attribute defines the default value of the instance when the instance is undefined. -
- -
- This attribute is a string that provides a short description of the instance property. -
- -
- This attribute is a string that provides a full description of the of purpose the instance property. -
- -
- This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format. - - - The following formats are predefined: - - - This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp. - This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part. - This SHOULD be a time in the format of hh:mm:ss. It is recommended that you use the "date-time" format instead of "time" unless you need to transfer only the time part. - This SHOULD be the difference, measured in milliseconds, between the specified time and midnight, 00:00 of January 1, 1970 UTC. The value SHOULD be a number (integer or float). - A regular expression, following the regular expression specification from ECMA 262/Perl 5. - This is a CSS color (like "#FF0000" or "red"), based on CSS 2.1. - This is a CSS style definition (like "color: red; background-color:#FFF"), based on CSS 2.1. - This SHOULD be a phone number (format MAY follow E.123). - This value SHOULD be a URI. - This SHOULD be an email address. - This SHOULD be an ip version 4 address. - This SHOULD be an ip version 6 address. - This SHOULD be a host-name. - - - - Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format. -
- -
- This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. -
- -
- This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. -
- -
- The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. - - Conceptually, the behavior of extends can be seen as validating an - instance against all constraints in the extending schema as well as - the extended schema(s). More optimized implementations that merge - schemas are possible, but are not required. Some examples of using "extends": - -
- - - -
- -
- - - -
-
-
- -
- - This attribute defines the current URI of this schema (this attribute is - effectively a "self" link). This URI MAY be relative or absolute. If - the URI is relative it is resolved against the current URI of the parent - schema it is contained in. If this schema is not contained in any - parent schema, the current URI of the parent schema is held to be the - URI under which this schema was addressed. If id is missing, the current URI of a schema is - defined to be that of the parent schema. The current URI of the schema - is also used to construct relative references such as for $ref. - -
- -
- - This attribute defines a URI of a schema that contains the full representation of this schema. - When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. - This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. - -
- -
- - This attribute defines a URI of a JSON Schema that is the schema of the current schema. - When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. - - - - A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. - Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. - -
-
- -
- - The following attributes are specified in addition to those - attributes that already provided by the core schema with the specific - purpose of informing user agents of relations between resources based - on JSON data. Just as with JSON - schema attributes, all the attributes in hyper schemas are optional. - Therefore, an empty object is a valid (non-informative) schema, and - essentially describes plain JSON (no constraints on the structures). - Addition of attributes provides additive information for user agents. - - -
- - The value of the links property MUST be an array, where each item - in the array is a link description object which describes the link - relations of the instances. - - -
- - A link description object is used to describe link relations. In - the context of a schema, it defines the link relations of the - instances of the schema, and can be parameterized by the instance - values. The link description format can be used on its own in - regular (non-schema documents), and use of this format can - be declared by referencing the normative link description - schema as the the schema for the data structure that uses the - links. The URI of the normative link description schema is: - http://json-schema.org/links (latest version) or - http://json-schema.org/draft-03/links (draft-03 version). - - -
- - The value of the "href" link description property - indicates the target URI of the related resource. The value - of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 - and MAY be a relative URI. The base URI to be used for relative resolution - SHOULD be the URI used to retrieve the instance object (not the schema) - when used within a schema. Also, when links are used within a schema, the URI - SHOULD be parametrized by the property values of the instance - object, if property values exist for the corresponding variables - in the template (otherwise they MAY be provided from alternate sources, like user input). - - - - Instance property values SHOULD be substituted into the URIs where - matching braces ('{', '}') are found surrounding zero or more characters, - creating an expanded URI. Instance property value substitutions are resolved - by using the text between the braces to denote the property name - from the instance to get the value to substitute. - -
- For example, if an href value is defined: - - - - Then it would be resolved by replace the value of the "id" property value from the instance object. -
- -
- If the value of the "id" property was "45", the expanded URI would be: - - - -
- - If matching braces are found with the string "@" (no quotes) between the braces, then the - actual instance value SHOULD be used to replace the braces, rather than a property value. - This should only be used in situations where the instance is a scalar (string, - boolean, or number), and not for objects or arrays. -
-
- -
- - The value of the "rel" property indicates the name of the - relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. - - - - Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: - - - - If the relation value is "self", when this property is encountered in - the instance object, the object represents a resource and the instance object is - treated as a full representation of the target resource identified by - the specified URI. - - - - This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. - - - - This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. - - - - This relation indicates that the target of the link - SHOULD be treated as the root or the body of the representation for the - purposes of user agent interaction or fragment resolution. All other - properties of the instance objects can be regarded as meta-data - descriptions for the data. - - - - - - The following relations are applicable for schemas (the schema as the "from" resource in the relation): - - - This indicates the target resource that represents collection of instances of a schema. - This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). - - - - -
- For example, if a schema is defined: - - - -
- -
- And if a collection of instance resource's JSON representation was retrieved: - - - -
- - This would indicate that for the first item in the collection, its own - (self) URI would resolve to "/Resource/thing" and the first item's "up" - relation SHOULD be resolved to the resource at "/Resource/parent". - The "children" collection would be located at "/Resource/?upId=thing". -
-
- -
- This property value is a schema that defines the expected structure of the JSON representation of the target of the link. -
- -
- - The following properties also apply to link definition objects, and - provide functionality analogous to HTML forms, in providing a - means for submitting extra (often user supplied) information to send to a server. - - -
- - This attribute defines which method can be used to access the target resource. - In an HTTP environment, this would be "GET" or "POST" (other HTTP methods - such as "PUT" and "DELETE" have semantics that are clearly implied by - accessed resources, and do not need to be defined here). - This defaults to "GET". - -
- -
- - If present, this property indicates a query media type format that the server - supports for querying or posting to the collection of instances at the target - resource. The query can be - suffixed to the target URI to query the collection with - property-based constraints on the resources that SHOULD be returned from - the server or used to post data to the resource (depending on the method). - -
- For example, with the following schema: - - - - This indicates that the client can query the server for instances that have a specific name. -
- -
- For example: - - - -
- - If no enctype or method is specified, only the single URI specified by - the href property is defined. If the method is POST, "application/json" is - the default media type. -
-
- -
- - This attribute contains a schema which defines the acceptable structure of the submitted - request (for a GET request, this schema would define the properties for the query string - and for a POST request, this would define the body). - -
-
-
-
- -
- - This property indicates the fragment resolution protocol to use for - resolving fragment identifiers in URIs within the instance - representations. This applies to the instance object URIs and all - children of the instance object's URIs. The default fragment resolution - protocol is "slash-delimited", which is defined below. Other fragment - resolution protocols MAY be used, but are not defined in this document. - - - - The fragment identifier is based on RFC 2396, Sec 5, and defines the - mechanism for resolving references to entities within a document. - - -
- - With the slash-delimited fragment resolution protocol, the fragment - identifier is interpreted as a series of property reference tokens that start with and - are delimited by the "/" character (\x2F). Each property reference token - is a series of unreserved or escaped URI characters. Each property - reference token SHOULD be interpreted, starting from the beginning of - the fragment identifier, as a path reference in the target JSON - structure. The final target value of the fragment can be determined by - starting with the root of the JSON structure from the representation of - the resource identified by the pre-fragment URI. If the target is a JSON - object, then the new target is the value of the property with the name - identified by the next property reference token in the fragment. If the - target is a JSON array, then the target is determined by finding the - item in array the array with the index defined by the next property - reference token (which MUST be a number). The target is successively - updated for each property reference token, until the entire fragment has - been traversed. - - - - Property names SHOULD be URI-encoded. In particular, any "/" in a - property name MUST be encoded to avoid being interpreted as a property - delimiter. - - - -
- For example, for the following JSON representation: - - - -
- -
- The following fragment identifiers would be resolved: - - - -
-
-
- -
- - The dot-delimited fragment resolution protocol is the same as - slash-delimited fragment resolution protocol except that the "." character - (\x2E) is used as the delimiter between property names (instead of "/") and - the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment - identifiers for referencing the value of the foo propery. - -
-
- -
- This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. -
- -
- If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. -
- -
- - This attribute is a URI that defines what the instance's URI MUST start with in order to validate. - The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, - and is relative to the instance's URI. - - - - When multiple schemas have been referenced for an instance, the user agent - can determine if this schema is applicable for a particular instance by - determining if the URI of the instance begins with the the value of the "pathStart" - attribute. If the URI of the instance does not start with this URI, - or if another schema specifies a starting URI that is longer and also matches the - instance, this schema SHOULD NOT be applied to the instance. Any schema - that does not have a pathStart attribute SHOULD be considered applicable - to all the instances for which it is referenced. - -
- -
- This attribute defines the media type of the instance representations that this schema is defining. -
-
- -
- - This specification is a sub-type of the JSON format, and - consequently the security considerations are generally the same as RFC 4627. - However, an additional issue is that when link relation of "self" - is used to denote a full representation of an object, the user agent - SHOULD NOT consider the representation to be the authoritative representation - of the resource denoted by the target URI if the target URI is not - equivalent to or a sub-path of the the URI used to request the resource - representation which contains the target URI with the "self" link. - -
- For example, if a hyper schema was defined: - - - -
- -
- And a resource was requested from somesite.com: - - - -
- -
- With a response of: - - - -
-
-
- -
- The proposed MIME media type for JSON Schema is "application/schema+json". - Type name: application - Subtype name: schema+json - Required parameters: profile - - The value of the profile parameter SHOULD be a URI (relative or absolute) that - refers to the schema used to define the structure of this structure (the - meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema, - but it is allowable to use other schemas that extend the hyper schema's meta- - schema. - - Optional parameters: pretty - The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. - -
- - This registry is maintained by IANA per RFC 4287 and this specification adds - four values: "full", "create", "instances", "root". New - assignments are subject to IESG Approval, as outlined in RFC 5226. - Requests should be made by email to IANA, which will then forward the - request to the IESG, requesting approval. - -
-
-
- - - - - &rfc2045; - &rfc2119; - &rfc2396; - &rfc3339; - &rfc3986; - &rfc4287; - - - &rfc2616; - &rfc4627; - &rfc5226; - &iddiscovery; - &uritemplate; - &linkheader; - &html401; - &css21; - - -
- - - - - Added example and verbiage to "extends" attribute. - Defined slash-delimited to use a leading slash. - Made "root" a relation instead of an attribute. - Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). - Added more explanation of nullability. - Removed "alternate" attribute. - Upper cased many normative usages of must, may, and should. - Replaced the link submission "properties" attribute to "schema" attribute. - Replaced "optional" attribute with "required" attribute. - Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. - Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. - Replaced "requires" attribute with "dependencies" attribute. - Moved "contentEncoding" attribute to hyper schema. - Added "additionalItems" attribute. - Added "id" attribute. - Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. - Added "patternProperties" attribute. - Schema URIs are now namespace versioned. - Added "$ref" and "$schema" attributes. - - - - - - Replaced "maxDecimal" attribute with "divisibleBy" attribute. - Added slash-delimited fragment resolution protocol and made it the default. - Added language about using links outside of schemas by referencing its normative URI. - Added "uniqueItems" attribute. - Added "targetSchema" attribute to link description object. - - - - - - Fixed category and updates from template. - - - - - - Initial draft. - - - - -
- -
- - - Should we give a preference to MIME headers over Link headers (or only use one)? - Should "root" be a MIME parameter? - Should "format" be renamed to "mediaType" or "contentType" to reflect the usage MIME media types that are allowed? - How should dates be handled? - - -
-
-
diff --git a/node_modules/json-schema/draft-zyp-json-schema-04.xml b/node_modules/json-schema/draft-zyp-json-schema-04.xml deleted file mode 100644 index 8ede6bf9..00000000 --- a/node_modules/json-schema/draft-zyp-json-schema-04.xml +++ /dev/null @@ -1,1072 +0,0 @@ - - - - - - - - - - - - - - -]> - - - - - - - - - A JSON Media Type for Describing the Structure and Meaning of JSON Documents - - - SitePen (USA) -
- - 530 Lytton Avenue - Palo Alto, CA 94301 - USA - - +1 650 968 8787 - kris@sitepen.com -
-
- - -
- - - Calgary, AB - Canada - - gary.court@gmail.com -
-
- - - Internet Engineering Task Force - JSON - Schema - JavaScript - Object - Notation - Hyper Schema - Hypermedia - - - - JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", - a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - - -
- - -
- - JSON (JavaScript Object Notation) Schema is a JSON media type for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - -
- -
- - - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", - "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be - interpreted as described in RFC 2119. - - - - The terms "JSON", "JSON text", "JSON value", "member", "element", "object", - "array", "number", "string", "boolean", "true", "false", and "null" in this - document are to be interpreted as defined in RFC 4627. - - - - This specification also uses the following defined terms: - - - A JSON Schema object. - Equivalent to "JSON value" as defined in RFC 4627. - Equivalent to "member" as defined in RFC 4627. - Equivalent to "element" as defined in RFC 4627. - A property of a JSON Schema object. - - -
- -
- - JSON Schema defines the media type "application/schema+json" for - describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities - for describing the structure of JSON in terms of - allowable values, descriptions, and interpreting relations with other resources. - - - This document is organized into several separate definitions. The first - definition is the core schema specification. This definition is primary - concerned with describing a JSON structure and specifying valid elements - in the structure. The second definition is the Hyper Schema specification - which is intended to define elements in a structure that can be interpreted as - hyperlinks. - Hyper Schema builds on JSON Schema to describe the hyperlink structure of - JSON values. This allows user agents to be able to successfully navigate - documents containing JSON based on their schemas. - - - Cumulatively JSON Schema acts as meta-JSON that can be used to define the - required type and constraints on JSON values, as well as define the meaning - of the JSON values for the purpose of describing a resource and determining - hyperlinks within the representation. - -
- An example JSON Schema that describes products might look like: - - - - - This schema defines the properties of the instance, - the required properties (id, name, and price), as well as an optional - property (tags). This also defines the link relations of the instance. - -
- -
- - The JSON Schema media type does not attempt to dictate the structure of JSON - values that contain data, but rather provides a separate format - for flexibly communicating how a JSON value should be - interpreted and validated, such that user agents can properly understand - acceptable structures and extrapolate hyperlink information - from the JSON. It is acknowledged that JSON values come - in a variety of structures, and JSON is unique in that the structure - of stored data structures often prescribes a non-ambiguous definite - JSON representation. Attempting to force a specific structure is generally - not viable, and therefore JSON Schema allows for a great flexibility - in the structure of the JSON data that it describes. - - - This specification is protocol agnostic. - The underlying protocol (such as HTTP) should sufficiently define the - semantics of the client-server interface, the retrieval of resource - representations linked to by JSON representations, and modification of - those resources. The goal of this - format is to sufficiently describe JSON structures such that one can - utilize existing information available in existing JSON - representations from a large variety of services that leverage a representational state transfer - architecture using existing protocols. - -
-
- -
- - JSON values are correlated to their schema by the "describedby" - relation, where the schema is the target of the relation. - JSON values MUST be of the "application/json" media type or - any other subtype. Consequently, dictating how a JSON value should - specify the relation to the schema is beyond the normative scope - of this document since this document specifically defines the JSON - Schema media type, and no other. It is RECOMMNENDED that JSON values - specify their schema so that user agents can interpret the instance - and retain the self-descriptive characteristics. This avoides the need for out-of-band information about - instance data. Two approaches are recommended for declaring the - relation to the schema that describes the meaning of a JSON instance's (or collection - of instances) structure. A MIME type parameter named - "profile" or a relation of "describedby" (which could be specified by a Link header) may be used: - -
- - - -
- - or if the content is being transferred by a protocol (such as HTTP) that - provides headers, a Link header can be used: - -
- -; rel="describedby" -]]> - -
- - Instances MAY specify multiple schemas, to indicate all the schemas that - are applicable to the data, and the data SHOULD be valid by all the schemas. - The instance data MAY have multiple schemas - that it is described by (the instance data SHOULD be valid for those schemas). - Or if the document is a collection of instances, the collection MAY contain - instances from different schemas. The mechanism for referencing a schema is - determined by the media type of the instance (if it provides a method for - referencing schemas). -
- -
- - JSON Schemas can themselves be described using JSON Schemas. - A self-describing JSON Schema for the core JSON Schema can - be found at http://json-schema.org/schema for the latest version or - http://json-schema.org/draft-04/schema for the draft-04 version. The hyper schema - self-description can be found at http://json-schema.org/hyper-schema - or http://json-schema.org/draft-04/hyper-schema. All schemas - used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive - hyper schema or another schema that extends this hyper schema: - -
- - - -
-
-
-
- -
- - A JSON Schema is a JSON object that defines various attributes - (including usage and valid values) of a JSON value. JSON - Schema has recursive capabilities; there are a number of elements - in the structure that allow for nested JSON Schemas. - - -
- An example JSON Schema could look like: - - - -
- - - A JSON Schema object MAY have any of the following optional properties: - - - - - -
- - This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. - This attribute can take one of two forms: - - - - A string indicating a primitive or simple type. The string MUST be one of the following values: - - - Instance MUST be an object. - Instance MUST be an array. - Instance MUST be a string. - Instance MUST be a number, including floating point numbers. - Instance MUST be the JSON literal "true" or "false". - Instance MUST be the JSON literal "null". Note that without this type, null values are not allowed. - Instance MAY be of any type, including null. - - - - - An array of one or more simple or schema types. - The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array. - - - - If this attribute is not specified, then all value types are accepted. - - -
- For example, a schema that defines if an instance can be a string or a number would be: - - -
-
- -
- - This attribute is an object with properties that specify the schemas for the properties of the instance object. - In this attribute's object, each property value MUST be a schema. - When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute. - Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success. - -
- -
- - This attribute is an object that defines the schema for a set of property names of an object instance. - The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. - If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. - -
- -
- This attribute specifies how any instance property that is not explicitly defined by either the "properties" or "patternProperties" attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean. - If a schema is provided, then all additional properties MUST be valid according to the schema. - If false is provided, then no additional properties are allowed. - The default value is an empty schema, which allows any value for additional properties. -
- -
- This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas. - When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. - When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute the same way as "additionalProperties" for objects is. -
- -
- This attribute specifies how any item in the array instance that is not explicitly defined by "items" (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean. - If a schema is provided: - - If the "items" attribute is unspecified, then all items in the array instance must be valid against this schema. - If the "items" attribute is a schema, then this attribute is ignored. - If the "items" attribute is an array (during tuple typing), then any additional items MUST be valid against this schema. - - - If false is provided, then any additional items in the array are not allowed. - The default value is an empty schema, which allows any value for additional items. -
- -
- This attribute is an array of strings that defines all the property names that must exist on the object instance. -
- -
- This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). - - The dependency value can take one of two forms: - - - - If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. - If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. - - - If the dependency value is a schema, then the instance object MUST be valid against the schema. - - - -
- -
- This attribute defines the minimum value of the instance property when the type of the instance value is a number. -
- -
- This attribute defines the maximum value of the instance property when the type of the instance value is a number. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. -
- -
- This attribute defines the minimum number of values in an array when the array is the instance value. -
- -
- This attribute defines the maximum number of values in an array when the array is the instance value. -
- -
- This attribute defines the minimum number of properties required on an object instance. -
- -
- This attribute defines the maximum number of properties the object instance can have. -
- -
- This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). - - Two instance are consider equal if they are both of the same type and: - - - are null; or - are booleans/numbers/strings and have the same value; or - are arrays, contains the same number of items, and each item in the array is equal to the item at the corresponding index in the other array; or - are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. - - -
- -
- When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 -
- -
- When the instance value is a string, this defines the minimum length of the string. -
- -
- When the instance value is a string, this defines the maximum length of the string. -
- -
- This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". -
- -
- This attribute defines the default value of the instance when the instance is undefined. -
- -
- This attribute is a string that provides a short description of the instance property. -
- -
- This attribute is a string that provides a full description of the of purpose the instance property. -
- -
- This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. -
- -
- This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. -
- -
- The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. - - Conceptually, the behavior of extends can be seen as validating an - instance against all constraints in the extending schema as well as - the extended schema(s). More optimized implementations that merge - schemas are possible, but are not required. Some examples of using "extends": - -
- - - -
- -
- - - -
-
-
- -
- - This attribute defines the current URI of this schema (this attribute is - effectively a "self" link). This URI MAY be relative or absolute. If - the URI is relative it is resolved against the current URI of the parent - schema it is contained in. If this schema is not contained in any - parent schema, the current URI of the parent schema is held to be the - URI under which this schema was addressed. If id is missing, the current URI of a schema is - defined to be that of the parent schema. The current URI of the schema - is also used to construct relative references such as for $ref. - -
- -
- - This attribute defines a URI of a schema that contains the full representation of this schema. - When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. - This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. - -
- -
- - This attribute defines a URI of a JSON Schema that is the schema of the current schema. - When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. - - - - A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. - Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. - -
-
- -
- - The following attributes are specified in addition to those - attributes that already provided by the core schema with the specific - purpose of informing user agents of relations between resources based - on JSON data. Just as with JSON - schema attributes, all the attributes in hyper schemas are optional. - Therefore, an empty object is a valid (non-informative) schema, and - essentially describes plain JSON (no constraints on the structures). - Addition of attributes provides additive information for user agents. - - -
- - The value of the links property MUST be an array, where each item - in the array is a link description object which describes the link - relations of the instances. - - - - -
- - A link description object is used to describe link relations. In - the context of a schema, it defines the link relations of the - instances of the schema, and can be parameterized by the instance - values. The link description format can be used without JSON Schema, - and use of this format can - be declared by referencing the normative link description - schema as the the schema for the data structure that uses the - links. The URI of the normative link description schema is: - http://json-schema.org/links (latest version) or - http://json-schema.org/draft-04/links (draft-04 version). - - -
- - The value of the "href" link description property - indicates the target URI of the related resource. The value - of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 - and MAY be a relative URI. The base URI to be used for relative resolution - SHOULD be the URI used to retrieve the instance object (not the schema) - when used within a schema. Also, when links are used within a schema, the URI - SHOULD be parametrized by the property values of the instance - object, if property values exist for the corresponding variables - in the template (otherwise they MAY be provided from alternate sources, like user input). - - - - Instance property values SHOULD be substituted into the URIs where - matching braces ('{', '}') are found surrounding zero or more characters, - creating an expanded URI. Instance property value substitutions are resolved - by using the text between the braces to denote the property name - from the instance to get the value to substitute. - -
- For example, if an href value is defined: - - - - Then it would be resolved by replace the value of the "id" property value from the instance object. -
- -
- If the value of the "id" property was "45", the expanded URI would be: - - - -
- - If matching braces are found with the string "@" (no quotes) between the braces, then the - actual instance value SHOULD be used to replace the braces, rather than a property value. - This should only be used in situations where the instance is a scalar (string, - boolean, or number), and not for objects or arrays. -
-
- -
- - The value of the "rel" property indicates the name of the - relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. - - - - Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: - - - - If the relation value is "self", when this property is encountered in - the instance object, the object represents a resource and the instance object is - treated as a full representation of the target resource identified by - the specified URI. - - - - This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. - - - - This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. - - - - This relation indicates that the target of the link - SHOULD be treated as the root or the body of the representation for the - purposes of user agent interaction or fragment resolution. All other - properties of the instance objects can be regarded as meta-data - descriptions for the data. - - - - - - The following relations are applicable for schemas (the schema as the "from" resource in the relation): - - - This indicates the target resource that represents collection of instances of a schema. - This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). - - - - -
- For example, if a schema is defined: - - - -
- -
- And if a collection of instance resource's JSON representation was retrieved: - - - -
- - This would indicate that for the first item in the collection, its own - (self) URI would resolve to "/Resource/thing" and the first item's "up" - relation SHOULD be resolved to the resource at "/Resource/parent". - The "children" collection would be located at "/Resource/?upId=thing". -
-
- -
- This property value is a string that defines the templating language used in the "href" attribute. If no templating language is defined, then the default Link Description Object templating langauge is used. -
- -
- This property value is a schema that defines the expected structure of the JSON representation of the target of the link. -
- -
- - The following properties also apply to link definition objects, and - provide functionality analogous to HTML forms, in providing a - means for submitting extra (often user supplied) information to send to a server. - - -
- - This attribute defines which method can be used to access the target resource. - In an HTTP environment, this would be "GET" or "POST" (other HTTP methods - such as "PUT" and "DELETE" have semantics that are clearly implied by - accessed resources, and do not need to be defined here). - This defaults to "GET". - -
- -
- - If present, this property indicates a query media type format that the server - supports for querying or posting to the collection of instances at the target - resource. The query can be - suffixed to the target URI to query the collection with - property-based constraints on the resources that SHOULD be returned from - the server or used to post data to the resource (depending on the method). - -
- For example, with the following schema: - - - - This indicates that the client can query the server for instances that have a specific name. -
- -
- For example: - - - -
- - If no enctype or method is specified, only the single URI specified by - the href property is defined. If the method is POST, "application/json" is - the default media type. -
-
- -
- - This attribute contains a schema which defines the acceptable structure of the submitted - request (for a GET request, this schema would define the properties for the query string - and for a POST request, this would define the body). - -
-
-
-
- -
- - This property indicates the fragment resolution protocol to use for - resolving fragment identifiers in URIs within the instance - representations. This applies to the instance object URIs and all - children of the instance object's URIs. The default fragment resolution - protocol is "json-pointer", which is defined below. Other fragment - resolution protocols MAY be used, but are not defined in this document. - - - - The fragment identifier is based on RFC 3986, Sec 5, and defines the - mechanism for resolving references to entities within a document. - - -
- The "json-pointer" fragment resolution protocol uses a JSON Pointer to resolve fragment identifiers in URIs within instance representations. -
-
- - - -
- This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. -
- -
- If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. -
- -
- - This attribute is a URI that defines what the instance's URI MUST start with in order to validate. - The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, - and is relative to the instance's URI. - - - - When multiple schemas have been referenced for an instance, the user agent - can determine if this schema is applicable for a particular instance by - determining if the URI of the instance begins with the the value of the "pathStart" - attribute. If the URI of the instance does not start with this URI, - or if another schema specifies a starting URI that is longer and also matches the - instance, this schema SHOULD NOT be applied to the instance. Any schema - that does not have a pathStart attribute SHOULD be considered applicable - to all the instances for which it is referenced. - -
- -
- This attribute defines the media type of the instance representations that this schema is defining. -
-
- -
- - This specification is a sub-type of the JSON format, and - consequently the security considerations are generally the same as RFC 4627. - However, an additional issue is that when link relation of "self" - is used to denote a full representation of an object, the user agent - SHOULD NOT consider the representation to be the authoritative representation - of the resource denoted by the target URI if the target URI is not - equivalent to or a sub-path of the the URI used to request the resource - representation which contains the target URI with the "self" link. - -
- For example, if a hyper schema was defined: - - - -
- -
- And a resource was requested from somesite.com: - - - -
- -
- With a response of: - - - -
-
-
- -
- The proposed MIME media type for JSON Schema is "application/schema+json". - Type name: application - Subtype name: schema+json - Required parameters: profile - - The value of the profile parameter SHOULD be a URI (relative or absolute) that - refers to the schema used to define the structure of this structure (the - meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema, - but it is allowable to use other schemas that extend the hyper schema's meta- - schema. - - Optional parameters: pretty - The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. - -
- - This registry is maintained by IANA per RFC 4287 and this specification adds - four values: "full", "create", "instances", "root". New - assignments are subject to IESG Approval, as outlined in RFC 5226. - Requests should be made by email to IANA, which will then forward the - request to the IESG, requesting approval. - -
-
-
- - - - - &rfc2045; - &rfc2119; - &rfc3339; - &rfc3986; - &rfc4287; - - - JSON Pointer - - ForgeRock US, Inc. - - - SitePen (USA) - - - - - - - &rfc2616; - &rfc4627; - &rfc5226; - &iddiscovery; - &uritemplate; - &linkheader; - &html401; - &css21; - - -
- - - - - Changed "required" attribute to an array of strings. - Removed "format" attribute. - Added "minProperties" and "maxProperties" attributes. - Replaced "slash-delimited" fragment resolution with "json-pointer". - Added "template" LDO attribute. - Removed irrelevant "Open Issues" section. - Merged Conventions and Terminology sections. - Defined terms used in specification. - Removed "integer" type in favor of {"type":"number", "divisibleBy":1}. - Restricted "type" to only the core JSON types. - Improved wording of many sections. - - - - - - Added example and verbiage to "extends" attribute. - Defined slash-delimited to use a leading slash. - Made "root" a relation instead of an attribute. - Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). - Added more explanation of nullability. - Removed "alternate" attribute. - Upper cased many normative usages of must, may, and should. - Replaced the link submission "properties" attribute to "schema" attribute. - Replaced "optional" attribute with "required" attribute. - Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. - Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. - Replaced "requires" attribute with "dependencies" attribute. - Moved "contentEncoding" attribute to hyper schema. - Added "additionalItems" attribute. - Added "id" attribute. - Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. - Added "patternProperties" attribute. - Schema URIs are now namespace versioned. - Added "$ref" and "$schema" attributes. - - - - - - Replaced "maxDecimal" attribute with "divisibleBy" attribute. - Added slash-delimited fragment resolution protocol and made it the default. - Added language about using links outside of schemas by referencing its normative URI. - Added "uniqueItems" attribute. - Added "targetSchema" attribute to link description object. - - - - - - Fixed category and updates from template. - - - - - - Initial draft. - - - - -
-
-
diff --git a/node_modules/json-schema/lib/links.js b/node_modules/json-schema/lib/links.js index 8a87f02d..cacb4799 100644 --- a/node_modules/json-schema/lib/links.js +++ b/node_modules/json-schema/lib/links.js @@ -1,7 +1,6 @@ /** * JSON Schema link handler - * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) - * Licensed under the MIT (MIT-LICENSE.txt) license. + * Licensed under AFL-2.1 OR BSD-3-Clause */ (function (root, factory) { if (typeof define === 'function' && define.amd) { diff --git a/node_modules/json-schema/lib/validate.js b/node_modules/json-schema/lib/validate.js index e4dc1511..575973cb 100644 --- a/node_modules/json-schema/lib/validate.js +++ b/node_modules/json-schema/lib/validate.js @@ -1,9 +1,7 @@ /** * JSONSchema Validator - Validates JavaScript objects using JSON Schemas * (http://www.json.com/json-schema-proposal/) - * - * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) - * Licensed under the MIT (MIT-LICENSE.txt) license. + * Licensed under AFL-2.1 OR BSD-3-Clause To use the validator call the validate function with an instance object and an optional schema object. If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), that schema will be used to validate and the schema parameter is not necessary (if both exist, @@ -107,7 +105,7 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O !(value instanceof Array && type == 'array') && !(value instanceof Date && type == 'date') && !(type == 'integer' && value%1===0)){ - return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}]; + return [{property:path,message:value + " - " + (typeof value) + " value found, but a " + type + " is required"}]; } if(type instanceof Array){ var unionErrors=[]; @@ -170,11 +168,11 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){ addError("must be at least " + schema.minLength + " characters long"); } - if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum && + if(typeof schema.minimum !== 'undefined' && typeof value == typeof schema.minimum && schema.minimum > value){ addError("must have a minimum value of " + schema.minimum); } - if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum && + if(typeof schema.maximum !== 'undefined' && typeof value == typeof schema.maximum && schema.maximum < value){ addError("must have a maximum value of " + schema.maximum); } @@ -209,8 +207,8 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O } for(var i in objTypeDef){ - if(objTypeDef.hasOwnProperty(i)){ - var value = instance[i]; + if(objTypeDef.hasOwnProperty(i) && i != '__proto__' && i != 'constructor'){ + var value = instance.hasOwnProperty(i) ? instance[i] : undefined; // skip _not_ specified properties if (value === undefined && options.existingOnly) continue; var propDef = objTypeDef[i]; @@ -231,7 +229,7 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O delete instance[i]; continue; } else { - errors.push({property:path,message:(typeof value) + "The property " + i + + errors.push({property:path,message:"The property " + i + " is not defined in the schema and the schema does not allow additional properties"}); } } diff --git a/node_modules/json-schema/package.json b/node_modules/json-schema/package.json index adc7fca9..d3a7dfbe 100644 --- a/node_modules/json-schema/package.json +++ b/node_modules/json-schema/package.json @@ -1,74 +1,24 @@ { - "_args": [ - [ - "json-schema@0.2.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "json-schema@0.2.3", - "_id": "json-schema@0.2.3", - "_inBundle": false, - "_integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "_location": "/json-schema", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "json-schema@0.2.3", - "name": "json-schema", - "escapedName": "json-schema", - "rawSpec": "0.2.3", - "saveSpec": null, - "fetchSpec": "0.2.3" - }, - "_requiredBy": [ - "/jsprim" - ], - "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "_spec": "0.2.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Kris Zyp" - }, - "bugs": { - "url": "https://github.com/kriszyp/json-schema/issues" - }, + "name": "json-schema", + "version": "0.4.0", + "author": "Kris Zyp", "description": "JSON Schema validation and specifications", - "devDependencies": { - "vows": "*" - }, - "directories": { - "lib": "./lib" - }, - "homepage": "https://github.com/kriszyp/json-schema#readme", + "maintainers":[ + {"name": "Kris Zyp", "email": "kriszyp@gmail.com"}], "keywords": [ "json", "schema" ], - "licenses": [ - { - "type": "AFLv2.1", - "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43" - }, - { - "type": "BSD", - "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13" - } - ], - "main": "./lib/validate.js", - "maintainers": [ - { - "name": "Kris Zyp", - "email": "kriszyp@gmail.com" - } + "files": [ + "lib" ], - "name": "json-schema", + "license": "(AFL-2.1 OR BSD-3-Clause)", "repository": { - "type": "git", - "url": "git+ssh://git@github.com/kriszyp/json-schema.git" - }, - "scripts": { - "test": "echo TESTS DISABLED vows --spec test/*.js" + "type":"git", + "url":"http://github.com/kriszyp/json-schema" }, - "version": "0.2.3" + "directories": { "lib": "./lib" }, + "main": "./lib/validate.js", + "devDependencies": { "vows": "*" }, + "scripts": { "test": "vows --spec test/*.js" } } diff --git a/node_modules/json-schema/test/tests.js b/node_modules/json-schema/test/tests.js deleted file mode 100644 index 2938aea7..00000000 --- a/node_modules/json-schema/test/tests.js +++ /dev/null @@ -1,95 +0,0 @@ -var assert = require('assert'); -var vows = require('vows'); -var path = require('path'); -var fs = require('fs'); - -var validate = require('../lib/validate').validate; - - -var revision = 'draft-03'; -var schemaRoot = path.join(__dirname, '..', revision); -var schemaNames = ['schema', 'hyper-schema', 'links', 'json-ref' ]; -var schemas = {}; - -schemaNames.forEach(function(name) { - var file = path.join(schemaRoot, name); - schemas[name] = loadSchema(file); -}); - -schemaNames.forEach(function(name) { - var s, n = name+'-nsd', f = path.join(schemaRoot, name); - schemas[n] = loadSchema(f); - s = schemas[n]; - delete s['$schema']; -}); - -function loadSchema(path) { - var data = fs.readFileSync(path, 'utf-8'); - var schema = JSON.parse(data); - return schema; -} - -function resultIsValid() { - return function(result) { - assert.isObject(result); - //assert.isBoolean(result.valid); - assert.equal(typeof(result.valid), 'boolean'); - assert.isArray(result.errors); - for (var i = 0; i < result.errors.length; i++) { - assert.notEqual(result.errors[i], null, 'errors['+i+'] is null'); - } - } -} - -function assertValidates(doc, schema) { - var context = {}; - - context[': validate('+doc+', '+schema+')'] = { - topic: validate(schemas[doc], schemas[schema]), - 'returns valid result': resultIsValid(), - 'with valid=true': function(result) { assert.equal(result.valid, true); }, - 'and no errors': function(result) { - // XXX work-around for bug in vows: [null] chokes it - if (result.errors[0] == null) assert.fail('(errors contains null)'); - assert.length(result.errors, 0); - } - }; - - return context; -} - -function assertSelfValidates(doc) { - var context = {}; - - context[': validate('+doc+')'] = { - topic: validate(schemas[doc]), - 'returns valid result': resultIsValid(), - 'with valid=true': function(result) { assert.equal(result.valid, true); }, - 'and no errors': function(result) { assert.length(result.errors, 0); } - }; - - return context; -} - -var suite = vows.describe('JSON Schema').addBatch({ - 'Core-NSD self-validates': assertSelfValidates('schema-nsd'), - 'Core-NSD/Core-NSD': assertValidates('schema-nsd', 'schema-nsd'), - 'Core-NSD/Core': assertValidates('schema-nsd', 'schema'), - - 'Core self-validates': assertSelfValidates('schema'), - 'Core/Core': assertValidates('schema', 'schema'), - - 'Hyper-NSD self-validates': assertSelfValidates('hyper-schema-nsd'), - 'Hyper self-validates': assertSelfValidates('hyper-schema'), - 'Hyper/Hyper': assertValidates('hyper-schema', 'hyper-schema'), - 'Hyper/Core': assertValidates('hyper-schema', 'schema'), - - 'Links-NSD self-validates': assertSelfValidates('links-nsd'), - 'Links self-validates': assertSelfValidates('links'), - 'Links/Hyper': assertValidates('links', 'hyper-schema'), - 'Links/Core': assertValidates('links', 'schema'), - - 'Json-Ref self-validates': assertSelfValidates('json-ref'), - 'Json-Ref/Hyper': assertValidates('json-ref', 'hyper-schema'), - 'Json-Ref/Core': assertValidates('json-ref', 'schema') -}).export(module); diff --git a/node_modules/jsprim/CHANGES.md b/node_modules/jsprim/CHANGES.md index c52d39d6..0e51ff2b 100644 --- a/node_modules/jsprim/CHANGES.md +++ b/node_modules/jsprim/CHANGES.md @@ -4,6 +4,10 @@ None yet. +## v1.4.2 (2021-11-29) + +* #35 Backport json-schema 0.4.0 to version 1.4.x + ## v1.4.1 (2017-08-02) * #21 Update verror dep diff --git a/node_modules/jsprim/package.json b/node_modules/jsprim/package.json index fd7480b4..daad74b7 100644 --- a/node_modules/jsprim/package.json +++ b/node_modules/jsprim/package.json @@ -1,52 +1,20 @@ { - "_args": [ - [ - "jsprim@1.4.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "jsprim@1.4.1", - "_id": "jsprim@1.4.1", - "_inBundle": false, - "_integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "_location": "/jsprim", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jsprim@1.4.1", - "name": "jsprim", - "escapedName": "jsprim", - "rawSpec": "1.4.1", - "saveSpec": null, - "fetchSpec": "1.4.1" - }, - "_requiredBy": [ - "/http-signature" - ], - "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "_spec": "1.4.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "bugs": { - "url": "https://github.com/joyent/node-jsprim/issues" - }, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "description": "utilities for primitive JavaScript types", - "engines": [ - "node >=0.6.0" - ], - "homepage": "https://github.com/joyent/node-jsprim#readme", - "license": "MIT", - "main": "./lib/jsprim.js", - "name": "jsprim", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-jsprim.git" - }, - "version": "1.4.1" + "name": "jsprim", + "version": "1.4.2", + "description": "utilities for primitive JavaScript types", + "main": "./lib/jsprim.js", + "repository": { + "type": "git", + "url": "git://github.com/joyent/node-jsprim.git" + }, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + }, + "license": "MIT" } diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js deleted file mode 100644 index b666ef00..00000000 --- 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 9c89f6a4..00000000 --- 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 e7af2f77..00000000 --- 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 c5dacaff..00000000 --- a/node_modules/lcid/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - "lcid@2.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 2b1aa798..00000000 --- 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/lodash/README.md b/node_modules/lodash/README.md index 292832fe..3ab1a05c 100644 --- a/node_modules/lodash/README.md +++ b/node_modules/lodash/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.15 +# lodash v4.17.21 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.21-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/_baseClone.js b/node_modules/lodash/_baseClone.js index 290de927..69f87054 100644 --- a/node_modules/lodash/_baseClone.js +++ b/node_modules/lodash/_baseClone.js @@ -18,7 +18,8 @@ var Stack = require('./_Stack'), isMap = require('./isMap'), isObject = require('./isObject'), isSet = require('./isSet'), - keys = require('./keys'); + keys = require('./keys'), + keysIn = require('./keysIn'); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, diff --git a/node_modules/lodash/_baseOrderBy.js b/node_modules/lodash/_baseOrderBy.js index d8a46ab2..775a0174 100644 --- a/node_modules/lodash/_baseOrderBy.js +++ b/node_modules/lodash/_baseOrderBy.js @@ -1,10 +1,12 @@ var arrayMap = require('./_arrayMap'), + baseGet = require('./_baseGet'), baseIteratee = require('./_baseIteratee'), baseMap = require('./_baseMap'), baseSortBy = require('./_baseSortBy'), baseUnary = require('./_baseUnary'), compareMultiple = require('./_compareMultiple'), - identity = require('./identity'); + identity = require('./identity'), + isArray = require('./isArray'); /** * The base implementation of `_.orderBy` without param guards. @@ -16,8 +18,21 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { diff --git a/node_modules/lodash/_baseSet.js b/node_modules/lodash/_baseSet.js index 612a24cc..99f4fbf9 100644 --- a/node_modules/lodash/_baseSet.js +++ b/node_modules/lodash/_baseSet.js @@ -29,6 +29,10 @@ function baseSet(object, path, value, customizer) { var key = toKey(path[index]), newValue = value; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; diff --git a/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/lodash/_baseSortedIndexBy.js index bb22e36d..c247b377 100644 --- a/node_modules/lodash/_baseSortedIndexBy.js +++ b/node_modules/lodash/_baseSortedIndexBy.js @@ -22,11 +22,14 @@ var nativeFloor = Math.floor, * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; diff --git a/node_modules/lodash/_equalArrays.js b/node_modules/lodash/_equalArrays.js index f6a3b7c9..824228c7 100644 --- a/node_modules/lodash/_equalArrays.js +++ b/node_modules/lodash/_equalArrays.js @@ -27,10 +27,11 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { if (arrLength != othLength && !(isPartial && othLength > 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, diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js index 17421f37..cdaacd2d 100644 --- a/node_modules/lodash/_equalObjects.js +++ b/node_modules/lodash/_equalObjects.js @@ -39,10 +39,11 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { 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); diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js index 89c77ded..be1d567d 100644 --- a/node_modules/lodash/core.js +++ b/node_modules/lodash/core.js @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.15'; + var VERSION = '4.17.21'; /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -1183,6 +1183,12 @@ if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } + // 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, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; @@ -1293,6 +1299,12 @@ return false; } } + // 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; var skipCtor = isPartial; @@ -1935,6 +1947,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) { return baseFilter(collection, baseIteratee(predicate)); @@ -2188,15 +2204,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]] */ function sortBy(collection, iteratee) { var index = 0; @@ -3503,6 +3519,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 @@ -3518,6 +3537,10 @@ * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(assign({}, source)); diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js index bb543ff5..e425e4d4 100644 --- a/node_modules/lodash/core.min.js +++ b/node_modules/lodash/core.min.js @@ -10,12 +10,12 @@ return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(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=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:Z;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n), -function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){ -return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__; -if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +var u=F(n);return e}function T(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;var c=o.get(n),f=o.get(t);if(c&&f)return c==t&&f==n;for(var c=-1,f=true,a=2&r?[]:Z;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn); +}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n; +return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n); +return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r 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; diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js index 9b95dfef..4131e936 100644 --- a/node_modules/lodash/lodash.js +++ b/node_modules/lodash/lodash.js @@ -12,14 +12,15 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.15'; + var VERSION = '4.17.21'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** Error message constants. */ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', - FUNC_ERROR_TEXT = 'Expected a function'; + FUNC_ERROR_TEXT = 'Expected a function', + INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; @@ -152,10 +153,11 @@ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); - /** Used to match leading and trailing whitespace. */ - var reTrim = /^\s+|\s+$/g, - reTrimStart = /^\s+/, - reTrimEnd = /\s+$/; + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; + + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; /** Used to match wrap detail comments. */ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, @@ -165,6 +167,18 @@ /** Used to match words composed of alphanumeric characters. */ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + /** + * Used to validate the `validate` option in `_.template` variable. + * + * Forbids characters which could potentially change the meaning of the function argument definition: + * - "()," (modification of function parameters) + * - "=" (default value) + * - "[]{}" (destructuring of function parameters) + * - "/" (beginning of a comment) + * - whitespace + */ + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; @@ -993,6 +1007,19 @@ }); } + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } + /** * The base implementation of `_.unary` without support for storing metadata. * @@ -1326,6 +1353,21 @@ : asciiToArray(string); } + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } + /** * Used by `_.unescape` to convert HTML entities to characters. * @@ -3719,8 +3761,21 @@ * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -3977,6 +4032,10 @@ var key = toKey(path[index]), newValue = value; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; @@ -4129,11 +4188,14 @@ * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; @@ -5618,10 +5680,11 @@ if (arrLength != othLength && !(isPartial && othLength > 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 +5846,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 +9231,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 +9984,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) { @@ -12468,7 +12536,7 @@ if (typeof value != 'string') { return value === 0 ? value : +value; } - value = value.replace(reTrim, ''); + value = baseTrim(value); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) @@ -14799,11 +14867,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,12 +14904,16 @@ // 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'; } + // Throw an error if a forbidden character was found in `variable`, to prevent + // potential command injection attacks. + else if (reForbiddenIdentifierChars.test(variable)) { + throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); + } + // Cleanup code by stripping empty strings. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) .replace(reEmptyStringMiddle, '$1') @@ -14955,7 +15027,7 @@ function trim(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { - return string.replace(reTrim, ''); + return baseTrim(string); } if (!string || !(chars = baseToString(chars))) { return string; @@ -14990,7 +15062,7 @@ function trimEnd(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { - return string.replace(reTrimEnd, ''); + return string.slice(0, trimmedEndIndex(string) + 1); } if (!string || !(chars = baseToString(chars))) { return string; @@ -15544,6 +15616,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 +15634,10 @@ * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.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 +15652,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 +15671,10 @@ * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(objects, _.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 +15898,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 +15928,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 +15951,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 13ec307d..4219da73 100644 --- a/node_modules/lodash/lodash.min.js +++ b/node_modules/lodash/lodash.min.js @@ -1,137 +1,140 @@ /** * @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 L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e; +return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,$n=[["ary",mn],["bind",_n],["bindKey",vn],["curry",yn],["curryRight",dn],["flip",jn],["partial",bn],["partialRight",wn],["rearg",xn]],Dn="[object Arguments]",Mn="[object Array]",Fn="[object AsyncFunction]",Nn="[object Boolean]",Pn="[object Date]",qn="[object DOMException]",Zn="[object Error]",Kn="[object Function]",Vn="[object GeneratorFunction]",Gn="[object Map]",Hn="[object Number]",Jn="[object Null]",Yn="[object Object]",Qn="[object Promise]",Xn="[object Proxy]",nt="[object RegExp]",tt="[object Set]",rt="[object String]",et="[object Symbol]",ut="[object Undefined]",it="[object WeakMap]",ot="[object WeakSet]",ft="[object ArrayBuffer]",ct="[object DataView]",at="[object Float32Array]",lt="[object Float64Array]",st="[object Int8Array]",ht="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",dt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\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",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["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"],Zr=-1,Kr={}; +Kr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={"\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"},Hr={"&":"&","<":"<",">":">",'"':""","'":"'"},Jr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){ +try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t, +this.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1, +n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(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=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){ +f.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if("function"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(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,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++uu?0:u+r), +e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&rt}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n=120&&p.length>=120)?new yr(a&&p):X}p=n[0]; +var _=-1,v=l[0];n:for(;++_-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(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;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(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=il(u);++e>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r); +return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(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 Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&"function"==typeof i?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],!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&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n; +return t=null==t?Wn:t,!!t&&("number"==r||"symbol"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n0){if(++t>=On)return arguments[0]}else t=0; +return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo); +}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)), +dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t), +(bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if("function"!=typeof t)throw new pl(en); +return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_; +}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new pl(en);return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m), +s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new pl(en);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(Cf.Cache||sr),r}function Uf(n){if("function"!=typeof n)throw new pl(en);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 Bf(n){return zf(2,n)}function Tf(n,t){if("function"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if("function"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u), +Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t="function"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t="function"==typeof t?t:X,Fr(n,an|sn,t)}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n); +}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r="function"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e; +}function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||"string"==typeof n.message&&"string"==typeof n.name&&!gc(n)}function ec(n){return"number"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return"number"==typeof n&&n==kc(n)}function oc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&"object"==typeof n}function ac(n,t){ +return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r="function"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return"number"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;var r=bl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){ +return ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return"string"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return"symbol"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){ +var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if("number"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t); +}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je); +}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++et){ +var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t); +var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e>>0)?(n=Ec(n),n&&("string"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s="__p += '",h=sl((t.escape||Ht).source+"|"+l.source+"|"+(l===It?Ft:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+(bl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zr+"]")+"\n"; +n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),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 _=bl.call(t,"variable")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(dt,""):s).replace(bt,"$1").replace(wt,"$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=Xh(function(){return cl(f,p+"return "+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,""); +if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join("")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index; +c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++uWn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r1?n[t-1]:X;return r="function"==typeof r?(n.pop(), +r):X,Ho(n,r)}),Qs=gi(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 Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i="function"==typeof r,o=Hf(t)?il(t.length):[]; +return ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn; +}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e); +}),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){ +return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){ +return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh, +Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc, +Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf, +Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea, +Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po, +Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh, +Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka, +Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc, +Z.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ct.prototype[n]=function(r){ +r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?"Right":"")}),e},Ct.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){ +var r="take"+(t?"Right":"");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return"function"==typeof n?new Ct(this):this.map(function(r){ +return Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t); +u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,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 Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(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=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:"wrapper",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs, +Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this); \ No newline at end of file diff --git a/node_modules/lodash/matches.js b/node_modules/lodash/matches.js index 11145db3..e10b3519 100644 --- a/node_modules/lodash/matches.js +++ b/node_modules/lodash/matches.js @@ -16,6 +16,9 @@ var CLONE_DEEP_FLAG = 1; * 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 @@ -31,6 +34,10 @@ var CLONE_DEEP_FLAG = 1; * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.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)); diff --git a/node_modules/lodash/matchesProperty.js b/node_modules/lodash/matchesProperty.js index cc062ac9..e6f1a882 100644 --- a/node_modules/lodash/matchesProperty.js +++ b/node_modules/lodash/matchesProperty.js @@ -13,6 +13,9 @@ var CLONE_DEEP_FLAG = 1; * `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 @@ -29,6 +32,10 @@ var CLONE_DEEP_FLAG = 1; * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(objects, _.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)); diff --git a/node_modules/lodash/overEvery.js b/node_modules/lodash/overEvery.js index c115d153..fb19d13e 100644 --- a/node_modules/lodash/overEvery.js +++ b/node_modules/lodash/overEvery.js @@ -5,6 +5,10 @@ var arrayEvery = require('./_arrayEvery'), * 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 diff --git a/node_modules/lodash/overSome.js b/node_modules/lodash/overSome.js index f902907a..414ab66b 100644 --- a/node_modules/lodash/overSome.js +++ b/node_modules/lodash/overSome.js @@ -5,6 +5,10 @@ var arraySome = require('./_arraySome'), * 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 @@ -24,6 +28,9 @@ var arraySome = require('./_arraySome'), * * 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/package.json b/node_modules/lodash/package.json index 744b4e45..b35fd95c 100644 --- a/node_modules/lodash/package.json +++ b/node_modules/lodash/package.json @@ -1,71 +1,17 @@ { - "_args": [ - [ - "lodash@4.17.15", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "lodash@4.17.15", - "_id": "lodash@4.17.15", - "_inBundle": false, - "_integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "_location": "/lodash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "lodash@4.17.15", - "name": "lodash", - "escapedName": "lodash", - "rawSpec": "4.17.15", - "saveSpec": null, - "fetchSpec": "4.17.15" - }, - "_requiredBy": [ - "/@babel/generator", - "/@babel/traverse", - "/@babel/types", - "/@sinonjs/samsam", - "/yargs-unparser" - ], - "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "_spec": "4.17.15", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be" - } - ], + "name": "lodash", + "version": "4.17.21", "description": "Lodash modular utilities.", + "keywords": "modules, stdlib, util", "homepage": "https://lodash.com/", + "repository": "lodash/lodash", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "modules", - "stdlib", - "util" - ], "license": "MIT", "main": "lodash.js", - "name": "lodash", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" - }, - "version": "4.17.15" + "author": "John-David Dalton ", + "contributors": [ + "John-David Dalton ", + "Mathias Bynens " + ], + "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" } } diff --git a/node_modules/lodash/parseInt.js b/node_modules/lodash/parseInt.js index 82badf03..b89ac639 100644 --- a/node_modules/lodash/parseInt.js +++ b/node_modules/lodash/parseInt.js @@ -1,7 +1,7 @@ var root = require('./_root'), toString = require('./toString'); -/** Used to match leading and trailing whitespace. */ +/** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /* Built-in method references for those with the same name as other `lodash` methods. */ diff --git a/node_modules/lodash/sortBy.js b/node_modules/lodash/sortBy.js index 4ba8f7a0..d756aba6 100644 --- a/node_modules/lodash/sortBy.js +++ b/node_modules/lodash/sortBy.js @@ -22,15 +22,15 @@ var baseFlatten = require('./_baseFlatten'), * 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) { diff --git a/node_modules/lodash/template.js b/node_modules/lodash/template.js index f71d1302..5c6d6f49 100644 --- a/node_modules/lodash/template.js +++ b/node_modules/lodash/template.js @@ -10,11 +10,26 @@ var assignInWith = require('./assignInWith'), templateSettings = require('./templateSettings'), toString = require('./toString'); +/** Error message constants. */ +var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; + /** Used to match empty string literals in compiled template source. */ var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; +/** + * Used to validate the `validate` option in `_.template` variable. + * + * Forbids characters which could potentially change the meaning of the function argument definition: + * - "()," (modification of function parameters) + * - "=" (default value) + * - "[]{}" (destructuring of function parameters) + * - "/" (beginning of a comment) + * - whitespace + */ +var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + /** * Used to match * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). @@ -169,11 +184,11 @@ function template(string, options, guard) { // 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 = hasOwnProperty.call(options, 'sourceURL') ? ('//# sourceURL=' + - (options.sourceURL + '').replace(/[\r\n]/g, ' ') + + (options.sourceURL + '').replace(/\s/g, ' ') + '\n') : ''; @@ -206,12 +221,16 @@ function template(string, options, guard) { // 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'; } + // Throw an error if a forbidden character was found in `variable`, to prevent + // potential command injection attacks. + else if (reForbiddenIdentifierChars.test(variable)) { + throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); + } + // Cleanup code by stripping empty strings. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) .replace(reEmptyStringMiddle, '$1') diff --git a/node_modules/lodash/toNumber.js b/node_modules/lodash/toNumber.js index b0f72de3..cf46f10d 100644 --- a/node_modules/lodash/toNumber.js +++ b/node_modules/lodash/toNumber.js @@ -1,12 +1,10 @@ -var isObject = require('./isObject'), +var baseTrim = require('./_baseTrim'), + isObject = require('./isObject'), isSymbol = require('./isSymbol'); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; @@ -56,7 +54,7 @@ function toNumber(value) { if (typeof value != 'string') { return value === 0 ? value : +value; } - value = value.replace(reTrim, ''); + value = baseTrim(value); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) diff --git a/node_modules/lodash/trim.js b/node_modules/lodash/trim.js index 5e38c8ef..13a6ad74 100644 --- a/node_modules/lodash/trim.js +++ b/node_modules/lodash/trim.js @@ -1,13 +1,11 @@ var baseToString = require('./_baseToString'), + baseTrim = require('./_baseTrim'), castSlice = require('./_castSlice'), charsEndIndex = require('./_charsEndIndex'), charsStartIndex = require('./_charsStartIndex'), stringToArray = require('./_stringToArray'), toString = require('./toString'); -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - /** * Removes leading and trailing whitespace or specified characters from `string`. * @@ -33,7 +31,7 @@ var reTrim = /^\s+|\s+$/g; function trim(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { - return string.replace(reTrim, ''); + return baseTrim(string); } if (!string || !(chars = baseToString(chars))) { return string; diff --git a/node_modules/lodash/trimEnd.js b/node_modules/lodash/trimEnd.js index 82c54a98..8dcd4936 100644 --- a/node_modules/lodash/trimEnd.js +++ b/node_modules/lodash/trimEnd.js @@ -2,10 +2,8 @@ var baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), charsEndIndex = require('./_charsEndIndex'), stringToArray = require('./_stringToArray'), - toString = require('./toString'); - -/** Used to match leading and trailing whitespace. */ -var reTrimEnd = /\s+$/; + toString = require('./toString'), + trimmedEndIndex = require('./_trimmedEndIndex'); /** * Removes trailing whitespace or specified characters from `string`. @@ -29,7 +27,7 @@ var reTrimEnd = /\s+$/; function trimEnd(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { - return string.replace(reTrimEnd, ''); + return string.slice(0, trimmedEndIndex(string) + 1); } if (!string || !(chars = baseToString(chars))) { return string; diff --git a/node_modules/lodash/trimStart.js b/node_modules/lodash/trimStart.js index 30f4f47a..6cba766a 100644 --- a/node_modules/lodash/trimStart.js +++ b/node_modules/lodash/trimStart.js @@ -4,7 +4,7 @@ var baseToString = require('./_baseToString'), stringToArray = require('./_stringToArray'), toString = require('./toString'); -/** Used to match leading and trailing whitespace. */ +/** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /** diff --git a/node_modules/log-symbols/browser.js b/node_modules/log-symbols/browser.js index b60dd384..a66f8ec4 100644 --- a/node_modules/log-symbols/browser.js +++ b/node_modules/log-symbols/browser.js @@ -1,4 +1,5 @@ 'use strict'; + module.exports = { info: 'ℹ️', success: '✅', diff --git a/node_modules/log-symbols/index.js b/node_modules/log-symbols/index.js index 247bb59d..12347e09 100644 --- a/node_modules/log-symbols/index.js +++ b/node_modules/log-symbols/index.js @@ -1,7 +1,6 @@ 'use strict'; const chalk = require('chalk'); - -const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; +const isUnicodeSupported = require('is-unicode-supported'); const main = { info: chalk.blue('ℹ'), @@ -10,11 +9,11 @@ const main = { error: chalk.red('✖') }; -const fallbacks = { +const fallback = { info: chalk.blue('i'), success: chalk.green('√'), warning: chalk.yellow('‼'), error: chalk.red('×') }; -module.exports = isSupported ? main : fallbacks; +module.exports = isUnicodeSupported() ? main : fallback; diff --git a/node_modules/log-symbols/license b/node_modules/log-symbols/license index e7af2f77..fa7ceba3 100644 --- a/node_modules/log-symbols/license +++ b/node_modules/log-symbols/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://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: diff --git a/node_modules/log-symbols/package.json b/node_modules/log-symbols/package.json index a3d8bdae..b9886e44 100644 --- a/node_modules/log-symbols/package.json +++ b/node_modules/log-symbols/package.json @@ -1,86 +1,52 @@ { - "_args": [ - [ - "log-symbols@2.2.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "log-symbols@2.2.0", - "_id": "log-symbols@2.2.0", - "_inBundle": false, - "_integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "_location": "/log-symbols", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "log-symbols@2.2.0", - "name": "log-symbols", - "escapedName": "log-symbols", - "rawSpec": "2.2.0", - "saveSpec": null, - "fetchSpec": "2.2.0" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "_spec": "2.2.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/sindresorhus/log-symbols/issues" - }, - "dependencies": { - "chalk": "^2.0.1" - }, - "description": "Colored symbols for various log levels. Example: ✔︎ Success", - "devDependencies": { - "ava": "*", - "strip-ansi": "^4.0.0", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/sindresorhus/log-symbols#readme", - "keywords": [ - "unicode", - "cli", - "cmd", - "command-line", - "characters", - "char", - "symbol", - "symbols", - "figure", - "figures", - "fallback", - "win", - "windows", - "log", - "logging", - "terminal", - "stdout" - ], - "license": "MIT", - "name": "log-symbols", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/log-symbols.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.2.0" + "name": "log-symbols", + "version": "4.1.0", + "description": "Colored symbols for various log levels. Example: `✔︎ Success`", + "license": "MIT", + "repository": "sindresorhus/log-symbols", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts", + "browser.js" + ], + "keywords": [ + "unicode", + "cli", + "cmd", + "command-line", + "characters", + "symbol", + "symbols", + "figure", + "figures", + "fallback", + "windows", + "log", + "logging", + "terminal", + "stdout" + ], + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "strip-ansi": "^6.0.0", + "tsd": "^0.14.0", + "xo": "^0.38.2" + }, + "browser": "browser.js" } diff --git a/node_modules/log-symbols/readme.md b/node_modules/log-symbols/readme.md index 8459a57b..d464eae9 100644 --- a/node_modules/log-symbols/readme.md +++ b/node_modules/log-symbols/readme.md @@ -1,27 +1,25 @@ -# log-symbols [![Build Status](https://travis-ci.org/sindresorhus/log-symbols.svg?branch=master)](https://travis-ci.org/sindresorhus/log-symbols) +# log-symbols - + > Colored symbols for various log levels Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437). - ## Install ``` $ npm install log-symbols ``` - ## Usage ```js const logSymbols = require('log-symbols'); console.log(logSymbols.success, 'Finished successfully!'); -// On good OSes: ✔ Finished successfully! -// On Windows: √ Finished successfully! +// Terminals with Unicode support: ✔ Finished successfully! +// Terminals without Unicode support: √ Finished successfully! ``` ## API @@ -33,13 +31,21 @@ console.log(logSymbols.success, 'Finished successfully!'); #### warning #### error - ## Related - [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows CMD fallbacks - [py-log-symbols](https://github.com/ManrajGrover/py-log-symbols) - Python port - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) +- [log-symbols](https://github.com/palash25/log-symbols) - Ruby port +- [guumaster/logsymbols](https://github.com/guumaster/logsymbols) - Golang port + +--- + +
+ + 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. +
+
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 fbf5ce08..00000000 --- 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 ff137dec..00000000 --- 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 0711ab00..00000000 --- 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 07d873f1..00000000 --- a/node_modules/map-age-cleaner/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "map-age-cleaner@0.1.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 471d9335..00000000 --- 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 78662552..00000000 --- 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 51faf012..00000000 --- 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 e7af2f77..00000000 --- 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 4ffe3074..00000000 --- a/node_modules/mem/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - "mem@4.3.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 add4222b..00000000 --- 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/mimic-fn/index.d.ts b/node_modules/mimic-fn/index.d.ts deleted file mode 100644 index b4047d58..00000000 --- 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 1a597051..00000000 --- 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 e7af2f77..00000000 --- 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 d5f90bca..00000000 --- a/node_modules/mimic-fn/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "mimic-fn@2.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 0ef8a13d..00000000 --- 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/minimatch/README.md b/node_modules/minimatch/README.md index ad72b813..33ede1d6 100644 --- a/node_modules/minimatch/README.md +++ b/node_modules/minimatch/README.md @@ -2,7 +2,7 @@ A minimal matching utility. -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) +[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch) This is the matching library used internally by npm. @@ -171,6 +171,27 @@ Suppress the behavior of treating a leading `!` character as negation. Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.) +### partial + +Compare a partial path to a pattern. As long as the parts of the path that +are present are not contradicted by the pattern, it will be treated as a +match. This is useful in applications where you're walking through a +folder structure, and don't yet have the full path, but want to ensure that +you do not walk down paths that can never be a match. + +For example, + +```js +minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d +minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d +minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a +``` + +### allowWindowsEscape + +Windows path separator `\` is by default converted to `/`, which +prohibits the usage of `\` as a escape character. This flag skips that +behavior and allows using the escape character. ## Comparisons to other fnmatch/glob implementations diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js index 5b5f8cf4..fda45ade 100644 --- a/node_modules/minimatch/minimatch.js +++ b/node_modules/minimatch/minimatch.js @@ -1,10 +1,10 @@ module.exports = minimatch minimatch.Minimatch = Minimatch -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} +var path = (function () { try { return require('path') } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = require('brace-expansion') @@ -56,43 +56,64 @@ function filter (pattern, options) { } function ext (a, b) { - a = a || {} b = b || {} var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) return t } minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } var orig = minimatch var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } return m } Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} @@ -101,9 +122,6 @@ function minimatch (p, pattern, options) { return false } - // "" only matches "" - if (pattern.trim() === '') return p === '' - return new Minimatch(pattern, options).match(p) } @@ -112,15 +130,14 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} + pattern = pattern.trim() // windows support: need to use /, not \ - if (path.sep !== '/') { + if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } @@ -131,6 +148,7 @@ function Minimatch (pattern, options) { this.negate = false this.comment = false this.empty = false + this.partial = !!options.partial // make the set of regexps etc. this.make() @@ -140,9 +158,6 @@ Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { - // don't do it more than once. - if (this._made) return - var pattern = this.pattern var options = this.options @@ -162,7 +177,7 @@ function make () { // step 2: expand braces var set = this.globSet = this.braceExpand() - if (options.debug) this.debug = console.error + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) @@ -242,12 +257,11 @@ function braceExpand (pattern, options) { pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } + assertValidPattern(pattern) - if (options.nobrace || - !pattern.match(/\{.*\}/)) { + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } @@ -255,6 +269,17 @@ function braceExpand (pattern, options) { return expand(pattern) } +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -269,14 +294,17 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } + assertValidPattern(pattern) var options = this.options // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } if (pattern === '') return '' var re = '' @@ -332,10 +360,12 @@ function parse (pattern, isSub) { } switch (c) { - case '/': + /* istanbul ignore next */ + case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false + } case '\\': clearStateChar() @@ -454,25 +484,23 @@ function parse (pattern, isSub) { // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } // finish up the class. @@ -556,9 +584,7 @@ function parse (pattern, isSub) { // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true + case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS @@ -620,7 +646,7 @@ function parse (pattern, isSub) { var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { + } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line @@ -678,7 +704,7 @@ function makeRe () { try { this.regexp = new RegExp(re, flags) - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp @@ -696,8 +722,8 @@ minimatch.match = function (list, pattern, options) { return list } -Minimatch.prototype.match = match -function match (f, partial) { +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. @@ -779,6 +805,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // should be impossible. // some invalid regexp stuff in the set. + /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { @@ -852,6 +879,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then + /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) @@ -865,11 +893,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } + hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) @@ -900,16 +924,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is ok if we're doing the match as part of // a glob fs traversal. return partial - } else if (pi === pl) { + } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd + return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. + /* istanbul ignore next */ throw new Error('wtf?') } diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json index 198af317..566efdfe 100644 --- a/node_modules/minimatch/package.json +++ b/node_modules/minimatch/package.json @@ -1,69 +1,33 @@ { - "_args": [ - [ - "minimatch@3.0.4", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "minimatch@3.0.4", - "_id": "minimatch@3.0.4", - "_inBundle": false, - "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "_location": "/minimatch", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "minimatch@3.0.4", - "name": "minimatch", - "escapedName": "minimatch", - "rawSpec": "3.0.4", - "saveSpec": null, - "fetchSpec": "3.0.4" + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.1.2", + "publishConfig": { + "tag": "v3-legacy" }, - "_requiredBy": [ - "/glob", - "/mocha", - "/test-exclude" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "_spec": "3.0.4", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" + "engines": { + "node": "*" }, "dependencies": { "brace-expansion": "^1.1.7" }, - "description": "a glob matcher in javascript", "devDependencies": { - "tap": "^10.3.2" - }, - "engines": { - "node": "*" + "tap": "^15.1.6" }, + "license": "ISC", "files": [ "minimatch.js" - ], - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "name": "minimatch", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --cov" - }, - "version": "3.0.4" + ] } diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- a/node_modules/minimist/.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/minimist/example/parse.js b/node_modules/minimist/example/parse.js index f7c8d498..9d90ffb2 100644 --- a/node_modules/minimist/example/parse.js +++ b/node_modules/minimist/example/parse.js @@ -1,2 +1,4 @@ +'use strict'; + var argv = require('../')(process.argv.slice(2)); console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js index d2afe5e4..f020f394 100644 --- a/node_modules/minimist/index.js +++ b/node_modules/minimist/index.js @@ -1,245 +1,263 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].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 argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - - 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); - }); - } - - function setKey (obj, keys, value) { - var o = obj; - 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; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - 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]*)$/); - var key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, next, arg); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - 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, arg) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { - setArg(letters[j], next.split('=')[1], arg); - broken = true; - break; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, args[i+1], arg); - i++; - } - else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } - else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - 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]); - }); - } - }); - - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } - - return argv; -}; +'use strict'; -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); +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; + var key = keys[keys.length - 1]; + return key in o; } -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 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 isConstructorOrProto(obj, key) { + return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__'; +} + +module.exports = function (args, opts) { + if (!opts) { opts = {}; } + + var flags = { + bools: {}, + strings: {}, + unknownFn: null, + }; + + if (typeof opts.unknown === 'function') { + flags.unknownFn = opts.unknown; + } + + if (typeof opts.boolean === 'boolean' && opts.boolean) { + flags.allBools = true; + } else { + [].concat(opts.boolean).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + 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]) { + [].concat(aliases[key]).forEach(function (k) { + flags.strings[k] = true; + }); + } + }); + + var defaults = opts.default || {}; + + var argv = { _: [] }; + + function argDefined(key, arg) { + return (flags.allBools && (/^--[^=]+$/).test(arg)) + || flags.strings[key] + || flags.bools[key] + || aliases[key]; + } + + function setKey(obj, keys, value) { + var o = obj; + for (var i = 0; i < keys.length - 1; i++) { + var key = keys[i]; + if (isConstructorOrProto(o, key)) { 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 lastKey = keys[keys.length - 1]; + if (isConstructorOrProto(o, lastKey)) { return; } + if ( + o === Object.prototype + || o === Number.prototype + || o === String.prototype + ) { + o = {}; + } + if (o === Array.prototype) { o = []; } + if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') { + o[lastKey] = value; + } else if (Array.isArray(o[lastKey])) { + o[lastKey].push(value); + } else { + o[lastKey] = [o[lastKey], value]; + } + } + + function setArg(key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) { return; } + } + + 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); + }); + } + + 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('--')); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + var key; + var next; + + 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]*)$/); + key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } else if ((/^--no-.+/).test(arg)) { + key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } else if ((/^--.+/).test(arg)) { + key = arg.match(/^--(.+)/)[1]; + next = args[i + 1]; + if ( + next !== undefined + && !(/^(-|--)[^-]/).test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true) + ) { + setArg(key, next, arg); + i += 1; + } else if ((/^(true|false)$/).test(next)) { + setArg(key, next === 'true', arg); + i += 1; + } else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } else if ((/^-[^-]+/).test(arg)) { + var letters = arg.slice(1, -1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + + if (next === '-') { + setArg(letters[j], next, arg); + continue; + } + + if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') { + setArg(letters[j], next.slice(1), arg); + broken = true; + break; + } + + if ( + (/[A-Za-z]/).test(letters[j]) + && (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next) + ) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], arg.slice(j + 2), arg); + broken = true; + break; + } else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if ( + args[i + 1] + && !(/^(-|--)[^-]/).test(args[i + 1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true) + ) { + setArg(key, args[i + 1], arg); + i += 1; + } else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) { + setArg(key, args[i + 1] === 'true', arg); + i += 1; + } else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (k) { + if (!hasKey(argv, k.split('.'))) { + setKey(argv, k.split('.'), defaults[k]); + + (aliases[k] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[k]); + }); + } + }); + + if (opts['--']) { + argv['--'] = notFlags.slice(); + } else { + notFlags.forEach(function (k) { + argv._.push(k); + }); + } + + return argv; +}; diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json index 1d0f1eb7..c10a3344 100644 --- a/node_modules/minimist/package.json +++ b/node_modules/minimist/package.json @@ -1,76 +1,75 @@ { - "_args": [ - [ - "minimist@1.2.5", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "minimist@1.2.5", - "_id": "minimist@1.2.5", - "_inBundle": false, - "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "_location": "/minimist", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "minimist@1.2.5", - "name": "minimist", - "escapedName": "minimist", - "rawSpec": "1.2.5", - "saveSpec": null, - "fetchSpec": "1.2.5" - }, - "_requiredBy": [ - "/coveralls" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "_spec": "1.2.5", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "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": { - "coverage": "covert test/*.js", - "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": "1.2.5" + "name": "minimist", + "version": "1.2.8", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=auto", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/minimistjs/minimist.git" + }, + "homepage": "https://github.com/minimistjs/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown deleted file mode 100644 index 5fd97ab1..00000000 --- a/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,95 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.log(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' } -``` - -# 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 -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 boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `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 -* `opts.stopEarly` - when true, populate `argv._` with everything after the -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`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js index ac835483..befa0c99 100644 --- a/node_modules/minimist/test/all_bool.js +++ b/node_modules/minimist/test/all_bool.js @@ -1,32 +1,34 @@ +'use strict'; + var parse = require('../'); var test = require('tape'); test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true, + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'], + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); }); test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true, + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: 55, + _: ['moo', 'cow'], + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); }); diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js index 5f7dbde1..e58d47e4 100644 --- a/node_modules/minimist/test/bool.js +++ b/node_modules/minimist/test/bool.js @@ -1,178 +1,177 @@ +'use strict'; + 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(); + 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(); + 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(); + var aliased = ['-h', 'derp']; + var regular = ['--herp', 'derp']; + 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(); + 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 array with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var alt = [ '--harp', 'derp' ]; - var opts = { - alias: { 'h': ['herp', 'harp'] }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); + var aliased = ['-h', 'derp']; + var regular = ['--herp', 'derp']; + var alt = ['--harp', 'derp']; + var opts = { + alias: { h: ['herp', 'harp'] }, + boolean: 'h', + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var altPropertyArgv = parse(alt, opts); + var expected = { + harp: true, + herp: true, + h: true, + _: ['derp'], + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.same(altPropertyArgv, 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(); + 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(); +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(); }); test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, true); - t.end(); + var parsed = parse(['--boool=true'], { + default: { + boool: false, + }, + boolean: ['boool'], + }); + + t.same(parsed.boool, true); + t.end(); }); test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, false); - t.end(); + var parsed = parse(['--boool=false'], { + default: { + boool: true, + }, + boolean: ['boool'], + }); + + 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 + var opts = { boolean: 'h' }; + var result = parse(['-h', 'true.txt'], opts); + var expected = { + h: true, + _: ['true.txt'], + }; + + t.same(result, expected); + t.end(); +}); diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js index 5a4fa5be..70788177 100644 --- a/node_modules/minimist/test/dash.js +++ b/node_modules/minimist/test/dash.js @@ -1,31 +1,43 @@ +'use strict'; + 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: '-', _: [] } - ); + t.plan(6); + t.deepEqual(parse(['-n', '-']), { n: '-', _: [] }); + t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] }); + 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' ] }); + t.plan(2); + t.deepEqual(parse(['-a', '--', 'b']), { a: true, _: ['b'] }); + t.deepEqual(parse(['--a', '--', 'b']), { a: true, _: ['b'] }); +}); + +test('move arguments after the -- into their own `--` array', function (t) { + t.plan(1); + t.deepEqual( + parse(['--name', 'John', 'before', '--', 'after'], { '--': true }), + { name: 'John', _: ['before'], '--': ['after'] } + ); }); -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); +test('--- option value', function (t) { + // A multi-dash value is largely an edge case, but check the behaviour is as expected, + // and in particular the same for short option and long option (as made consistent in Jan 2023). + t.plan(2); + t.deepEqual(parse(['-n', '---']), { n: '---', _: [] }); + t.deepEqual(parse(['--nnn', '---']), { nnn: '---', _: [] }); }); + diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js index 780a3112..4e9f6250 100644 --- a/node_modules/minimist/test/default_bool.js +++ b/node_modules/minimist/test/default_bool.js @@ -1,35 +1,37 @@ +'use strict'; + 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(); + 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(); + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false }, + }); + t.equal(argv.somefalse, false); + t.end(); }); test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null }, + }); + t.equal(argv.maybe, null); -}) + var argvLong = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null }, + }); + t.equal(argvLong.maybe, true); + t.end(); +}); diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js index d8b3e856..126ff033 100644 --- a/node_modules/minimist/test/dotted.js +++ b/node_modules/minimist/test/dotted.js @@ -1,22 +1,24 @@ +'use strict'; + 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(); + 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(); + 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(); + var argv = parse('', { default: { 'a.b': 11 } }); + t.equal(argv.a.b, 11); + t.end(); }); diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js index f813b305..6d1b53a7 100644 --- a/node_modules/minimist/test/kv_short.js +++ b/node_modules/minimist/test/kv_short.js @@ -1,16 +1,32 @@ +'use strict'; + var parse = require('../'); var test = require('tape'); -test('short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-b=123' ]); - t.deepEqual(argv, { b: 123, _: [] }); +test('short -k=v', function (t) { + t.plan(1); + + var argv = parse(['-b=123']); + t.deepEqual(argv, { b: 123, _: [] }); +}); + +test('multi short -k=v', function (t) { + t.plan(1); + + var argv = parse(['-a=whatever', '-b=robots']); + t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); }); -test('multi short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-a=whatever', '-b=robots' ]); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); +test('short with embedded equals -k=a=b', function (t) { + t.plan(1); + + var argv = parse(['-k=a=b']); + t.deepEqual(argv, { k: 'a=b', _: [] }); +}); + +test('short with later equals like -ab=c', function (t) { + t.plan(1); + + var argv = parse(['-ab=c']); + t.deepEqual(argv, { a: true, b: 'c', _: [] }); }); diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js index 5d3a1e09..9fef51f1 100644 --- a/node_modules/minimist/test/long.js +++ b/node_modules/minimist/test/long.js @@ -1,31 +1,33 @@ +'use strict'; + 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(); + 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/minimist/test/num.js b/node_modules/minimist/test/num.js index 2cc77f4d..074393ec 100644 --- a/node_modules/minimist/test/num.js +++ b/node_modules/minimist/test/num.js @@ -1,36 +1,38 @@ +'use strict'; + 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(); + 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(); + 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/minimist/test/parse.js b/node_modules/minimist/test/parse.js index 7b4a2a17..65d9d909 100644 --- a/node_modules/minimist/test/parse.js +++ b/node_modules/minimist/test/parse.js @@ -1,197 +1,209 @@ +'use strict'; + 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(); + 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(); + 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(); + 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(); + 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('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('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(); + 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'); +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 str = parse(['--str'], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); + var letters = parse(['-art'], { + string: ['a', 't'], + }); - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); - t.end(); + 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('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'); + + var z = parse(['-s123'], { + alias: { str: ['s', 'S'] }, + string: ['str'], + }); + + t.deepEqual( + z, + { _: [], s: '123', S: '123', str: '123' }, + 'opt.string works with multiple aliases' + ); + 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(); + 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(); + 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(); + 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(); + 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/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js index ab620dc5..32965d13 100644 --- a/node_modules/minimist/test/parse_modified.js +++ b/node_modules/minimist/test/parse_modified.js @@ -1,9 +1,11 @@ +'use strict'; + 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] }); +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/minimist/test/proto.js b/node_modules/minimist/test/proto.js index 8649107e..6e629dd3 100644 --- a/node_modules/minimist/test/proto.js +++ b/node_modules/minimist/test/proto.js @@ -1,44 +1,64 @@ +'use strict'; + +/* eslint no-proto: 0 */ + var parse = require('../'); var test = require('tape'); test('proto pollution', function (t) { - var argv = parse(['--__proto__.x','123']); - t.equal({}.x, undefined); - t.equal(argv.__proto__.x, undefined); - t.equal(argv.x, undefined); - t.end(); + var argv = parse(['--__proto__.x', '123']); + t.equal({}.x, undefined); + t.equal(argv.__proto__.x, undefined); + t.equal(argv.x, undefined); + t.end(); }); test('proto pollution (array)', function (t) { - var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']); - t.equal({}.z, undefined); - t.deepEqual(argv.x, [4,5]); - t.equal(argv.x.z, undefined); - t.equal(argv.x.__proto__.z, undefined); - t.end(); + var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']); + t.equal({}.z, undefined); + t.deepEqual(argv.x, [4, 5]); + t.equal(argv.x.z, undefined); + t.equal(argv.x.__proto__.z, undefined); + t.end(); }); test('proto pollution (number)', function (t) { - var argv = parse(['--x','5','--x.__proto__.z','100']); - t.equal({}.z, undefined); - t.equal((4).z, undefined); - t.equal(argv.x, 5); - t.equal(argv.x.z, undefined); - t.end(); + var argv = parse(['--x', '5', '--x.__proto__.z', '100']); + t.equal({}.z, undefined); + t.equal((4).z, undefined); + t.equal(argv.x, 5); + t.equal(argv.x.z, undefined); + t.end(); }); test('proto pollution (string)', function (t) { - var argv = parse(['--x','abc','--x.__proto__.z','def']); - t.equal({}.z, undefined); - t.equal('...'.z, undefined); - t.equal(argv.x, 'abc'); - t.equal(argv.x.z, undefined); - t.end(); + var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']); + t.equal({}.z, undefined); + t.equal('...'.z, undefined); + t.equal(argv.x, 'abc'); + t.equal(argv.x.z, undefined); + t.end(); }); test('proto pollution (constructor)', function (t) { - var argv = parse(['--constructor.prototype.y','123']); - t.equal({}.y, undefined); - t.equal(argv.y, undefined); - t.end(); + var argv = parse(['--constructor.prototype.y', '123']); + t.equal({}.y, undefined); + t.equal(argv.y, undefined); + t.end(); +}); + +test('proto pollution (constructor function)', function (t) { + var argv = parse(['--_.concat.constructor.prototype.y', '123']); + function fnToBeTested() {} + t.equal(fnToBeTested.y, undefined); + t.equal(argv.y, undefined); + t.end(); +}); + +// powered by snyk - https://github.com/backstage/backstage/issues/10343 +test('proto pollution (constructor function) snyk', function (t) { + var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); + t.equal(function () {}.foo, undefined); + t.equal(argv.y, undefined); + t.end(); }); diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js index d513a1c2..4a7b8438 100644 --- a/node_modules/minimist/test/short.js +++ b/node_modules/minimist/test/short.js @@ -1,67 +1,69 @@ +'use strict'; + 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, _: [] } - ); + 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(); + 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(); + 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(); + t.deepEqual( + parse(['-h', 'localhost', '-fp', '555', 'script.js']), + { + f: true, p: 555, h: 'localhost', + _: ['script.js'], + } + ); + t.end(); }); diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js index bdf9fbcb..52a6a919 100644 --- a/node_modules/minimist/test/stop_early.js +++ b/node_modules/minimist/test/stop_early.js @@ -1,15 +1,17 @@ +'use strict'; + var parse = require('../'); var test = require('tape'); test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true - }); + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true, + }); - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'] - }); + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'], + }); - t.end(); + t.end(); }); diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js index 462a36bd..4f2e0ca4 100644 --- a/node_modules/minimist/test/unknown.js +++ b/node_modules/minimist/test/unknown.js @@ -1,102 +1,104 @@ +'use strict'; + var parse = require('../'); var test = require('tape'); test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'true', '--derp', 'true' ]; - var regular = [ '--herp', 'true', '-d', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['-h', 'true', '--derp', 'true']; + var regular = ['--herp', 'true', '-d', 'true']; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn, + }; + parse(aliased, opts); + parse(regular, opts); - t.same(unknown, ['--derp', '-d']); - t.end(); + t.same(unknown, ['--derp', '-d']); + t.end(); }); test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [] - }); - t.end(); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn, + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [], + }); + t.end(); }); test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; - var regular = [ '--herp', 'hello', '-d', 'moon' ]; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['-h', 'hello', '--derp', 'goodbye']; + var regular = ['--herp', 'hello', '-d', 'moon']; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn, + }; + parse(aliased, opts); + parse(regular, opts); - t.same(unknown, ['--derp', '-d']); - t.end(); + t.same(unknown, ['--derp', '-d']); + t.end(); }); test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello' ]; - var regular = [ '--herp', 'hello' ]; - var opts = { - default: { 'h': 'bar' }, - alias: { 'h': 'herp' }, - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['-h', 'hello']; + var regular = ['--herp', 'hello']; + var opts = { + default: { h: 'bar' }, + alias: { h: 'herp' }, + unknown: unknownFn, + }; + parse(aliased, opts); + parse(regular, opts); - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage }); test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '--bad', '--', 'good', 'arg' ]; - var opts = { - '--': true, - unknown: unknownFn - }; - var argv = parse(aliased, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['--bad', '--', 'good', 'arg']; + var opts = { + '--': true, + unknown: unknownFn, + }; + var argv = parse(aliased, opts); - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - '_': [] - }) - t.end(); + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + _: [], + }); + t.end(); }); diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js index 8a52a58c..4fdaf1d3 100644 --- a/node_modules/minimist/test/whitespace.js +++ b/node_modules/minimist/test/whitespace.js @@ -1,8 +1,10 @@ +'use strict'; + 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'); +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/.travis.yml b/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- 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 e6924212..00000000 --- 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 6ce241b5..2f128707 100644 --- a/node_modules/mkdirp/index.js +++ b/node_modules/mkdirp/index.js @@ -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); 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 cc4dba29..00000000 --- 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 ee27ba4b..00000000 --- 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 abff3e8e..00000000 --- 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 584f551a..00000000 --- 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 1f64bb7d..00000000 --- a/node_modules/mkdirp/node_modules/minimist/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "minimist@0.0.8", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 c2563532..00000000 --- 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 8b034b99..00000000 --- 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 f0041ee4..00000000 --- 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 ef0ae349..00000000 --- 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 5d3a1e09..00000000 --- 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 8a906466..00000000 --- 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 21851b03..00000000 --- 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 d513a1c2..00000000 --- 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 8a52a58c..00000000 --- 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 6a0243e2..1b99f446 100644 --- a/node_modules/mkdirp/package.json +++ b/node_modules/mkdirp/package.json @@ -1,67 +1,34 @@ { - "_args": [ - [ - "mkdirp@0.5.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "mkdirp@0.5.1", - "_id": "mkdirp@0.5.1", - "_inBundle": false, - "_integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "_location": "/mkdirp", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "mkdirp@0.5.1", - "name": "mkdirp", - "escapedName": "mkdirp", - "rawSpec": "0.5.1", - "saveSpec": null, - "fetchSpec": "0.5.1" - }, - "_requiredBy": [ - "/mocha", - "/spawn-wrap" - ], - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "_spec": "0.5.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "dependencies": { - "minimist": "0.0.8" - }, + "name": "mkdirp", "description": "Recursively mkdir, like `mkdir -p`", - "devDependencies": { - "mock-fs": "2 >=2.7.0", - "tap": "1" + "version": "0.5.4", + "publishConfig": { + "tag": "legacy" }, - "homepage": "https://github.com/substack/node-mkdirp#readme", + "author": "James Halliday (http://substack.net)", + "main": "index.js", "keywords": [ "mkdir", "directory" ], - "license": "MIT", - "main": "index.js", - "name": "mkdirp", "repository": { "type": "git", - "url": "git+https://github.com/substack/node-mkdirp.git" + "url": "https://github.com/substack/node-mkdirp.git" }, "scripts": { "test": "tap test/*.js" }, - "version": "0.5.1" + "dependencies": { + "minimist": "^1.2.5" + }, + "devDependencies": { + "mock-fs": "^3.7.0", + "tap": "^5.4.2" + }, + "bin": "bin/cmd.js", + "license": "MIT", + "files": [ + "bin", + "index.js" + ] } diff --git a/node_modules/mkdirp/test/chmod.js b/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 6a404b93..00000000 --- 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 2433b9ad..00000000 --- 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 eaa8921c..00000000 --- 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 97186b62..00000000 --- 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 6c370aa6..00000000 --- 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 fbce44b8..00000000 --- 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 398229fe..00000000 --- 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 b0b9e183..00000000 --- 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 4ddb3427..00000000 --- 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 bce68e56..00000000 --- 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 7c222d35..00000000 --- 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 9e7d079d..00000000 --- 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 8c8dc938..00000000 --- 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 2033c63a..00000000 --- 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 11a76147..00000000 --- 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/mocha/CHANGELOG.md b/node_modules/mocha/CHANGELOG.md deleted file mode 100644 index f61ff115..00000000 --- a/node_modules/mocha/CHANGELOG.md +++ /dev/null @@ -1,1816 +0,0 @@ -# 6.2.0 / 2019-07-18 - -## :tada: Enhancements - -- [#3827](https://github.com/mochajs/mocha/issues/3827): Do not fork child-process if no Node flags are present ([**@boneskull**](https://github.com/boneskull)) -- [#3725](https://github.com/mochajs/mocha/issues/3725): Base reporter store ref to console.log, see [mocha/wiki](https://github.com/mochajs/mocha/wiki/HOW-TO:-Correctly-stub-stdout) ([**@craigtaub**](https://github.com/craigtaub)) - -## :bug: Fixes - -- [#3942](https://github.com/mochajs/mocha/issues/3942): Fix "No test files found" Error when file is passed via `--file` ([**@gabegorelick**](https://github.com/gabegorelick)) -- [#3914](https://github.com/mochajs/mocha/issues/3914): Modify Mocha constructor to accept options `global` or `globals` ([**@pascalpp**](https://github.com/pascalpp)) -- [#3894](https://github.com/mochajs/mocha/issues/3894): Fix parsing of config files with `_mocha` binary ([**@juergba**](https://github.com/juergba)) -- [#3834](https://github.com/mochajs/mocha/issues/3834): Fix CLI parsing with default values ([**@boneskull**](https://github.com/boneskull), [**@juergba**](https://github.com/juergba)) -- [#3831](https://github.com/mochajs/mocha/issues/3831): Fix `--timeout`/`--slow` string values and duplicate arguments ([**@boneskull**](https://github.com/boneskull), [**@juergba**](https://github.com/juergba)) - -## :book: Documentation - -- [#3906](https://github.com/mochajs/mocha/issues/3906): Document option to define custom report name for XUnit reporter ([**@pkuczynski**](https://github.com/pkuczynski)) -- [#3889](https://github.com/mochajs/mocha/issues/3889): Adds doc links for mocha-examples ([**@craigtaub**](https://github.com/craigtaub)) -- [#3887](https://github.com/mochajs/mocha/issues/3887): Fix broken links ([**@toyjhlee**](https://github.com/toyjhlee)) -- [#3841](https://github.com/mochajs/mocha/issues/3841): Fix anchors to configuration section ([**@trescube**](https://github.com/trescube)) - -## :mag: Coverage - -- [#3915](https://github.com/mochajs/mocha/issues/3915), [#3929](https://github.com/mochajs/mocha/issues/3929): Increase tests coverage for `--watch` options ([**@geigerzaehler**](https://github.com/geigerzaehler)) - -## :nut_and_bolt: Other - -- [#3953](https://github.com/mochajs/mocha/issues/3953): Collect test files later, prepares improvements to the `--watch` mode behavior ([**@geigerzaehler**](https://github.com/geigerzaehler)) -- [#3939](https://github.com/mochajs/mocha/issues/3939): Upgrade for npm audit ([**@boneskull**](https://github.com/boneskull)) -- [#3930](https://github.com/mochajs/mocha/issues/3930): Extract `runWatch` into separate module ([**@geigerzaehler**](https://github.com/geigerzaehler)) -- [#3922](https://github.com/mochajs/mocha/issues/3922): Add `mocha.min.js` file to stacktrace filter ([**@brian-lagerman**](https://github.com/brian-lagerman)) -- [#3919](https://github.com/mochajs/mocha/issues/3919): Update CI config files to use Node-12.x ([**@plroebuck**](https://github.com/plroebuck)) -- [#3892](https://github.com/mochajs/mocha/issues/3892): Rework reporter tests ([**@plroebuck**](https://github.com/plroebuck)) -- [#3872](https://github.com/mochajs/mocha/issues/3872): Rename `--exclude` to `--ignore` and create alias ([**@boneskull**](https://github.com/boneskull)) -- [#3963](https://github.com/mochajs/mocha/issues/3963): Hide stacktrace when cli args are missing ([**@outsideris**](https://github.com/outsideris)) -- [#3956](https://github.com/mochajs/mocha/issues/3956): Do not redeclare variable in docs array example ([**@DanielRuf**](https://github.com/DanielRuf)) -- [#3957](https://github.com/mochajs/mocha/issues/3957): Remove duplicate line-height property in `mocha.css` ([**@DanielRuf**](https://github.com/DanielRuf)) -- [#3960](https://github.com/mochajs/mocha/issues/3960): Don't re-initialize grep option on watch re-run ([**@geigerzaehler**](https://github.com/geigerzaehler)) - -# 6.1.4 / 2019-04-18 - -## :lock: Security Fixes - -- [#3877](https://github.com/mochajs/mocha/issues/3877): Upgrade [js-yaml](https://npm.im/js-yaml), addressing [code injection vulnerability](https://www.npmjs.com/advisories/813) ([**@bjornstar**](https://github.com/bjornstar)) - -# 6.1.3 / 2019-04-11 - -## :bug: Fixes - -- [#3863](https://github.com/mochajs/mocha/issues/3863): Fix `yargs`-related global scope pollution ([**@inukshuk**](https://github.com/inukshuk)) -- [#3869](https://github.com/mochajs/mocha/issues/3869): Fix failure when installed w/ `pnpm` ([**@boneskull**](https://github.com/boneskull)) - -# 6.1.2 / 2019-04-08 - -## :bug: Fixes - -- [#3867](https://github.com/mochajs/mocha/issues/3867): Re-publish v6.1.1 from POSIX OS to avoid dropped executable flags ([**@boneskull**](https://github.com/boneskull)) - -# 6.1.1 / 2019-04-07 - -## :bug: Fixes - -- [#3866](https://github.com/mochajs/mocha/issues/3866): Fix Windows End-of-Line publishing issue ([**@juergba**](https://github.com/juergba) & [**@cspotcode**](https://github.com/cspotcode)) - -# 6.1.0 / 2019-04-07 - -## :lock: Security Fixes - -- [#3845](https://github.com/mochajs/mocha/issues/3845): Update dependency "js-yaml" to v3.13.0 per npm security advisory ([**@plroebuck**](https://github.com/plroebuck)) - -## :tada: Enhancements - -- [#3766](https://github.com/mochajs/mocha/issues/3766): Make reporter constructor support optional `options` parameter ([**@plroebuck**](https://github.com/plroebuck)) -- [#3760](https://github.com/mochajs/mocha/issues/3760): Add support for config files with `.jsonc` extension ([**@sstephant**](https://github.com/sstephant)) - -## :fax: Deprecations - -These are _soft_-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha: - -- [#3719](https://github.com/mochajs/mocha/issues/3719): Deprecate `this.skip()` for "after all" hooks ([**@juergba**](https://github.com/juergba)) - -## :bug: Fixes - -- [#3829](https://github.com/mochajs/mocha/issues/3829): Use cwd-relative pathname to load config file ([**@plroebuck**](https://github.com/plroebuck)) -- [#3745](https://github.com/mochajs/mocha/issues/3745): Fix async calls of `this.skip()` in "before each" hooks ([**@juergba**](https://github.com/juergba)) -- [#3669](https://github.com/mochajs/mocha/issues/3669): Enable `--allow-uncaught` for uncaught exceptions thrown inside hooks ([**@givanse**](https://github.com/givanse)) - -and some regressions: - -- [#3848](https://github.com/mochajs/mocha/issues/3848): Fix `Suite` cloning by copying `root` property ([**@fatso83**](https://github.com/fatso83)) -- [#3816](https://github.com/mochajs/mocha/issues/3816): Guard against undefined timeout option ([**@boneskull**](https://github.com/boneskull)) -- [#3814](https://github.com/mochajs/mocha/issues/3814): Update "yargs" in order to avoid deprecation message ([**@boneskull**](https://github.com/boneskull)) -- [#3788](https://github.com/mochajs/mocha/issues/3788): Fix support for multiple node flags ([**@aginzberg**](https://github.com/aginzberg)) - -## :book: Documentation - -- [mochajs/mocha-examples](https://github.com/mochajs/mocha-examples): New repository of working examples of common configurations using mocha ([**@craigtaub**](https://github.com/craigtaub)) -- [#3850](https://github.com/mochajs/mocha/issues/3850): Remove pound icon showing on header hover on docs ([**@jd2rogers2**](https://github.com/jd2rogers2)) -- [#3812](https://github.com/mochajs/mocha/issues/3812): Add autoprefixer to documentation page CSS ([**@Munter**](https://github.com/Munter)) -- [#3811](https://github.com/mochajs/mocha/issues/3811): Update doc examples "tests.html" ([**@DavidLi119**](https://github.com/DavidLi119)) -- [#3807](https://github.com/mochajs/mocha/issues/3807): Mocha website HTML tweaks ([**@plroebuck**](https://github.com/plroebuck)) -- [#3793](https://github.com/mochajs/mocha/issues/3793): Update config file example ".mocharc.yml" ([**@cspotcode**](https://github.com/cspotcode)) - -## :nut_and_bolt: Other - -- [#3830](https://github.com/mochajs/mocha/issues/3830): Replace dependency "findup-sync" with "find-up" for faster startup ([**@cspotcode**](https://github.com/cspotcode)) -- [#3799](https://github.com/mochajs/mocha/issues/3799): Update devDependencies to fix many npm vulnerabilities ([**@XhmikosR**](https://github.com/XhmikosR)) - -# 6.0.2 / 2019-02-25 - -## :bug: Fixes - -Two more regressions fixed: - -- [#3768](https://github.com/mochajs/mocha/issues/3768): Test file paths no longer dropped from `mocha.opts` ([**@boneskull**](https://github.com/boneskull)) -- [#3767](https://github.com/mochajs/mocha/issues/3767): `--require` does not break on module names that look like certain `node` flags ([**@boneskull**](https://github.com/boneskull)) - -# 6.0.1 / 2019-02-21 - -The obligatory round of post-major-release bugfixes. - -## :bug: Fixes - -These issues were regressions. - -- [#3754](https://github.com/mochajs/mocha/issues/3754): Mocha again finds `test.js` when run without arguments ([**@plroebuck**](https://github.com/plroebuck)) -- [#3756](https://github.com/mochajs/mocha/issues/3756): Mocha again supports third-party interfaces via `--ui` ([**@boneskull**](https://github.com/boneskull)) -- [#3755](https://github.com/mochajs/mocha/issues/3755): Fix broken `--watch` ([**@boneskull**](https://github.com/boneskull)) -- [#3759](https://github.com/mochajs/mocha/issues/3759): Fix unwelcome deprecation notice when Mocha run against languages (CoffeeScript) with implicit return statements; _returning a non-`undefined` value from a `describe` callback is no longer considered deprecated_ ([**@boneskull**](https://github.com/boneskull)) - -## :book: Documentation - -- [#3738](https://github.com/mochajs/mocha/issues/3738): Upgrade to `@mocha/docdash@2` ([**@tendonstrength**](https://github.com/tendonstrength)) -- [#3751](https://github.com/mochajs/mocha/issues/3751): Use preferred names for example config files ([**@Szauka**](https://github.com/Szauka)) - -# 6.0.0 / 2019-02-18 - -## :tada: Enhancements - -- [#3726](https://github.com/mochajs/mocha/issues/3726): Add ability to unload files from `require` cache ([**@plroebuck**](https://github.com/plroebuck)) - -## :bug: Fixes - -- [#3737](https://github.com/mochajs/mocha/issues/3737): Fix falsy values from options globals ([**@plroebuck**](https://github.com/plroebuck)) -- [#3707](https://github.com/mochajs/mocha/issues/3707): Fix encapsulation issues for `Suite#_onlyTests` and `Suite#_onlySuites` ([**@vkarpov15**](https://github.com/vkarpov15)) -- [#3711](https://github.com/mochajs/mocha/issues/3711): Fix diagnostic messages dealing with plurality and markup of output ([**@plroebuck**](https://github.com/plroebuck)) -- [#3723](https://github.com/mochajs/mocha/issues/3723): Fix "reporter-option" to allow comma-separated options ([**@boneskull**](https://github.com/boneskull)) -- [#3722](https://github.com/mochajs/mocha/issues/3722): Fix code quality and performance of `lookupFiles` and `files` ([**@plroebuck**](https://github.com/plroebuck)) -- [#3650](https://github.com/mochajs/mocha/issues/3650), [#3654](https://github.com/mochajs/mocha/issues/3654): Fix noisy error message when no files found ([**@craigtaub**](https://github.com/craigtaub)) -- [#3632](https://github.com/mochajs/mocha/issues/3632): Tests having an empty title are no longer confused with the "root" suite ([**@juergba**](https://github.com/juergba)) -- [#3666](https://github.com/mochajs/mocha/issues/3666): Fix missing error codes ([**@vkarpov15**](https://github.com/vkarpov15)) -- [#3684](https://github.com/mochajs/mocha/issues/3684): Fix exiting problem in Node.js v11.7.0+ ([**@addaleax**](https://github.com/addaleax)) -- [#3691](https://github.com/mochajs/mocha/issues/3691): Fix `--delay` (and other boolean options) not working in all cases ([**@boneskull**](https://github.com/boneskull)) -- [#3692](https://github.com/mochajs/mocha/issues/3692): Fix invalid command-line argument usage not causing actual errors ([**@boneskull**](https://github.com/boneskull)) -- [#3698](https://github.com/mochajs/mocha/issues/3698), [#3699](https://github.com/mochajs/mocha/issues/3699): Fix debug-related Node.js options not working in all cases ([**@boneskull**](https://github.com/boneskull)) -- [#3700](https://github.com/mochajs/mocha/issues/3700): Growl notifications now show the correct number of tests run ([**@outsideris**](https://github.com/outsideris)) -- [#3686](https://github.com/mochajs/mocha/issues/3686): Avoid potential ReDoS when diffing large objects ([**@cyjake**](https://github.com/cyjake)) -- [#3715](https://github.com/mochajs/mocha/issues/3715): Fix incorrect order of emitted events when used programmatically ([**@boneskull**](https://github.com/boneskull)) -- [#3706](https://github.com/mochajs/mocha/issues/3706): Fix regression wherein `--reporter-option`/`--reporter-options` did not support comma-separated key/value pairs ([**@boneskull**](https://github.com/boneskull)) - -## :book: Documentation - -- [#3652](https://github.com/mochajs/mocha/issues/3652): Switch from Jekyll to Eleventy ([**@Munter**](https://github.com/Munter)) - -## :nut_and_bolt: Other - -- [#3677](https://github.com/mochajs/mocha/issues/3677): Add error objects for createUnsupportedError and createInvalidExceptionError ([**@boneskull**](https://github.com/boneskull)) -- [#3733](https://github.com/mochajs/mocha/issues/3733): Removed unnecessary processing in post-processing hook ([**@wanseob**](https://github.com/wanseob)) -- [#3730](https://github.com/mochajs/mocha/issues/3730): Update nyc to latest version ([**@coreyfarrell**](https://github.com/coreyfarrell)) -- [#3648](https://github.com/mochajs/mocha/issues/3648), [#3680](https://github.com/mochajs/mocha/issues/3680): Fixes to support latest versions of [unexpected](https://npm.im/unexpected) and [unexpected-sinon](https://npm.im/unexpected-sinon) ([**@sunesimonsen**](https://github.com/sunesimonsen)) -- [#3638](https://github.com/mochajs/mocha/issues/3638): Add meta tag to site ([**@MartijnCuppens**](https://github.com/MartijnCuppens)) -- [#3653](https://github.com/mochajs/mocha/issues/3653): Fix parts of test suite failing to run on Windows ([**@boneskull**](https://github.com/boneskull)) - -# 6.0.0-1 / 2019-01-02 - -## :bug: Fixes - -- Fix missing `mocharc.json` in published package ([**@boneskull**](https://github.com/boneskull)) - -# 6.0.0-0 / 2019-01-01 - -**Documentation for this release can be found at [next.mochajs.org](https://next.mochajs.org)**! - -Welcome [**@plroebuck**](https://github.com/plroebuck), [**@craigtaub**](https://github.com/craigtaub), & [**@markowsiak**](https://github.com/markowsiak) to the team! - -## :boom: Breaking Changes - -- [#3149](https://github.com/mochajs/mocha/issues/3149): **Drop Node.js v4.x support** ([**@outsideris**](https://github.com/outsideris)) -- [#3556](https://github.com/mochajs/mocha/issues/3556): Changes to command-line options ([**@boneskull**](https://github.com/boneskull)): - - `--grep` and `--fgrep` are now mutually exclusive; attempting to use both will cause Mocha to fail instead of simply ignoring `--grep` - - `--compilers` is no longer supported; attempting to use will cause Mocha to fail with a link to more information - - `-d` is no longer an alias for `--debug`; `-d` is currently ignored - - [#3275](https://github.com/mochajs/mocha/issues/3275): `--watch-extensions` no longer implies `js`; it must be explicitly added ([**@TheDancingCode**](https://github.com/TheDancingCode)) -- [#2908](https://github.com/mochajs/mocha/issues/2908): `tap` reporter emits error messages ([**@chrmod**](https://github.com/chrmod)) -- [#2819](https://github.com/mochajs/mocha/issues/2819): When conditionally skipping in a `before` hook, subsequent `before` hooks _and_ tests in nested suites are now skipped ([**@bannmoore**](https://github.com/bannmoore)) -- [#627](https://github.com/mochajs/mocha/issues/627): Emit filepath in "timeout exceeded" exceptions where applicable ([**@boneskull**](https://github.com/boneskull)) -- [#3556](https://github.com/mochajs/mocha/issues/3556): `lib/template.html` has moved to `lib/browser/template.html` ([**@boneskull**](https://github.com/boneskull)) -- [#2576](https://github.com/mochajs/mocha/issues/2576): An exception is now thrown if Mocha fails to parse or find a `mocha.opts` at a user-specified path ([**@plroebuck**](https://github.com/plroebuck)) -- [#3458](https://github.com/mochajs/mocha/issues/3458): Instantiating a `Base`-extending reporter without a `Runner` parameter will throw an exception ([**@craigtaub**](https://github.com/craigtaub)) -- [#3125](https://github.com/mochajs/mocha/issues/3125): For consumers of Mocha's programmatic API, all exceptions thrown from Mocha now have a `code` property (and some will have additional metadata). Some `Error` messages have changed. **Please use the `code` property to check `Error` types instead of the `message` property**; these descriptions will be localized in the future. ([**@craigtaub**](https://github.com/craigtaub)) - -## :fax: Deprecations - -These are _soft_-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha: - -- `-gc` users should use `--gc-global` instead -- Consumers of the function exported by `bin/options` should now use the `loadMochaOpts` or `loadOptions` (preferred) functions exported by the `lib/cli/options` module - -Regarding the `Mocha` class constructor (from `lib/mocha`): - -- Use property `color: false` instead of `useColors: false` -- Use property `timeout: false` instead of `enableTimeouts: false` - -All of the above deprecations were introduced by [#3556](https://github.com/mochajs/mocha/issues/3556). - -`mocha.opts` is now considered "legacy"; please prefer RC file or `package.json` over `mocha.opts`. - -## :tada: Enhancements - -Enhancements introduced in [#3556](https://github.com/mochajs/mocha/issues/3556): - -- Mocha now supports "RC" files in JS, JSON, YAML, or `package.json`-based (using `mocha` property) format - - - `.mocharc.js`, `.mocharc.json`, `.mocharc.yaml` or `.mocharc.yml` are valid "rc" file names and will be automatically loaded - - Use `--config /path/to/rc/file` to specify an explicit path - - Use `--package /path/to/package.json` to specify an explicit `package.json` to read the `mocha` prop from - - Use `--no-config` or `--no-package` to completely disable loading of configuration via RC file and `package.json`, respectively - - Configurations are merged as applicable using the priority list: - 1. Command-line arguments - 1. RC file - 1. `package.json` - 1. `mocha.opts` - 1. Mocha's own defaults - - Check out these [example config files](https://github.com/mochajs/mocha/tree/master/example/config) - -- Node/V8 flag support in `mocha` executable: - - - Support all allowed `node` flags as supported by the running version of `node` (also thanks to [**@demurgos**](https://github.com/demurgos)) - - Support any V8 flag by prepending `--v8-` to the flag name - - All flags are also supported via config files, `package.json` properties, or `mocha.opts` - - Debug-related flags (e.g., `--inspect`) now _imply_ `--no-timeouts` - - Use of e.g., `--debug` will automatically invoke `--inspect` if supported by running version of `node` - -- Support negation of any Mocha-specific command-line flag by prepending `--no-` to the flag name - -- Interfaces now have descriptions when listed using `--interfaces` flag - -- `Mocha` constructor supports all options - -- `--extension` is now an alias for `--watch-extensions` and affects _non-watch-mode_ test runs as well. For example, to run _only_ `test/*.coffee` (not `test/*.js`), you can do `mocha --require coffee-script/register --extensions coffee`. - -- [#3552](https://github.com/mochajs/mocha/issues/3552): `tap` reporter is now TAP13-capable ([**@plroebuck**](https://github.com/plroebuck) & [**@mollstam**](https://github.com/mollstam)) - -- [#3535](https://github.com/mochajs/mocha/issues/3535): Mocha's version can now be queried programmatically via public property `Mocha.prototype.version` ([**@plroebuck**](https://github.com/plroebuck)) - -- [#3428](https://github.com/mochajs/mocha/issues/3428): `xunit` reporter shows diffs ([**@mlucool**](https://github.com/mlucool)) - -- [#2529](https://github.com/mochajs/mocha/issues/2529): `Runner` now emits a `retry` event when tests are retried (reporters can listen for this) ([**@catdad**](https://github.com/catdad)) - -- [#2962](https://github.com/mochajs/mocha/issues/2962), [#3111](https://github.com/mochajs/mocha/issues/3111): In-browser notification support; warn about missing prereqs when `--growl` supplied ([**@plroebuck**](https://github.com/plroebuck)) - -## :bug: Fixes - -- [#3356](https://github.com/mochajs/mocha/issues/3356): `--no-timeouts` and `--timeout 0` now does what you'd expect ([**@boneskull**](https://github.com/boneskull)) -- [#3475](https://github.com/mochajs/mocha/issues/3475): Restore `--no-exit` option ([**@boneskull**](https://github.com/boneskull)) -- [#3570](https://github.com/mochajs/mocha/issues/3570): Long-running tests now respect `SIGINT` ([**@boneskull**](https://github.com/boneskull)) -- [#2944](https://github.com/mochajs/mocha/issues/2944): `--forbid-only` and `--forbid-pending` now "fail fast" when encountered on a suite ([**@outsideris**](https://github.com/outsideris)) -- [#1652](https://github.com/mochajs/mocha/issues/1652), [#2951](https://github.com/mochajs/mocha/issues/2951): Fix broken clamping of timeout values ([**@plroebuck**](https://github.com/plroebuck)) -- [#2095](https://github.com/mochajs/mocha/issues/2095), [#3521](https://github.com/mochajs/mocha/issues/3521): Do not log `stdout:` prefix in browser console ([**@Bamieh**](https://github.com/Bamieh)) -- [#3595](https://github.com/mochajs/mocha/issues/3595): Fix mochajs.org deployment problems ([**@papandreou**](https://github.com/papandreou)) -- [#3518](https://github.com/mochajs/mocha/issues/3518): Improve `utils.isPromise()` ([**@fabiosantoscode**](https://github.com/fabiosantoscode)) -- [#3320](https://github.com/mochajs/mocha/issues/3320): Fail gracefully when non-extensible objects are thrown in async tests ([**@fargies**](https://github.com/fargies)) -- [#2475](https://github.com/mochajs/mocha/issues/2475): XUnit does not duplicate test result numbers in "errors" and "failures"; "failures" will **always** be zero ([**@mlucool**](https://github.com/mlucool)) -- [#3398](https://github.com/mochajs/mocha/issues/3398), [#3598](https://github.com/mochajs/mocha/issues/3598), [#3457](https://github.com/mochajs/mocha/issues/3457), [#3617](https://github.com/mochajs/mocha/issues/3617): Fix regression wherein `--bail` would not execute "after" nor "after each" hooks ([**@juergba**](https://github.com/juergba)) -- [#3580](https://github.com/mochajs/mocha/issues/3580): Fix potential exception when using XUnit reporter programmatically ([**@Lana-Light**](https://github.com/Lana-Light)) -- [#1304](https://github.com/mochajs/mocha/issues/1304): Do not output color to `TERM=dumb` ([**@plroebuck**](https://github.com/plroebuck)) - -## :book: Documentation - -- [#3525](https://github.com/mochajs/mocha/issues/3525): Improvements to `.github/CONTRIBUTING.md` ([**@markowsiak**](https://github.com/markowsiak)) -- [#3466](https://github.com/mochajs/mocha/issues/3466): Update description of `slow` option ([**@finfin**](https://github.com/finfin)) -- [#3405](https://github.com/mochajs/mocha/issues/3405): Remove references to bower installations ([**@goteamtim**](https://github.com/goteamtim)) -- [#3361](https://github.com/mochajs/mocha/issues/3361): Improvements to `--watch` docs ([**@benglass**](https://github.com/benglass)) -- [#3136](https://github.com/mochajs/mocha/issues/3136): Improve docs around globbing and shell expansion ([**@akrawchyk**](https://github.com/akrawchyk)) -- [#2819](https://github.com/mochajs/mocha/issues/2819): Update docs around skips and hooks ([**@bannmoore**](https://github.com/bannmoore)) -- Many improvements by [**@outsideris**](https://github.com/outsideris) - -## :nut_and_bolt: Other - -- [#3557](https://github.com/mochajs/mocha/issues/3557): Use `ms` userland module instead of hand-rolled solution ([**@gizemkeser**](https://github.com/gizemkeser)) -- Many CI fixes and other refactors by [**@plroebuck**](https://github.com/plroebuck) -- Test refactors by [**@outsideris**](https://github.com/outsideris) - -# 5.2.0 / 2018-05-18 - -## :tada: Enhancements - -- [#3375](https://github.com/mochajs/mocha/pull/3375): Add support for comments in `mocha.opts` ([@plroebuck](https://github.com/plroebuck)) - -## :bug: Fixes - -- [#3346](https://github.com/mochajs/mocha/pull/3346): Exit correctly from `before` hooks when using `--bail` ([@outsideris](https://github.com/outsideris)) - -## :book: Documentation - -- [#3328](https://github.com/mochajs/mocha/pull/3328): Mocha-flavored [API docs](https://mochajs.org/api/)! ([@Munter](https://github.com/munter)) - -## :nut_and_bolt: Other - -- [#3330](https://github.com/mochajs/mocha/pull/3330): Use `Buffer.from()` ([@harrysarson](https://github.com/harrysarson)) -- [#3295](https://github.com/mochajs/mocha/pull/3295): Remove redundant folder ([@DavNej](https://github.com/DajNev)) -- [#3356](https://github.com/mochajs/mocha/pull/3356): Refactoring ([@plroebuck](https://github.com/plroebuck)) - -# 5.1.1 / 2018-04-18 - -## :bug: Fixes - -- [#3325](https://github.com/mochajs/mocha/issues/3325): Revert change which broke `--watch` ([@boneskull](https://github.com/boneskull)) - -# 5.1.0 / 2018-04-12 - -## :tada: Enhancements - -- [#3210](https://github.com/mochajs/mocha/pull/3210): Add `--exclude` option ([@metalex9](https://github.com/metalex9)) - -## :bug: Fixes - -- [#3318](https://github.com/mochajs/mocha/pull/3318): Fix failures in circular objects in JSON reporter ([@jeversmann](https://github.com/jeversmann), [@boneskull](https://github.com/boneskull)) - -## :book: Documentation - -- [#3323](https://github.com/mochajs/mocha/pull/3323): Publish actual [API documentation](https://mochajs.org/api/)! ([@dfberry](https://github.com/dfberry), [@Munter](https://github.com/munter)) -- [#3299](https://github.com/mochajs/mocha/pull/3299): Improve docs around exclusive tests ([@nicgirault](https://github.com/nicgirault)) - -## :nut_and_bolt: Other - -- [#3302](https://github.com/mochajs/mocha/pull/3302), [#3308](https://github.com/mochajs/mocha/pull/3308), [#3310](https://github.com/mochajs/mocha/pull/3310), [#3315](https://github.com/mochajs/mocha/pull/3315), [#3316](https://github.com/mochajs/mocha/pull/3316): Build matrix improvements ([more info](https://boneskull.com/mocha-and-travis-ci-build-stages/)) ([@outsideris](https://github.com/outsideris), [@boneskull](https://github.com/boneskull)) -- [#3272](https://github.com/mochajs/mocha/pull/3272): Refactor reporter tests ([@jMuzsik](https://github.com/jMuzsik)) - -# 5.0.5 / 2018-03-22 - -Welcome [@outsideris](https://github.com/outsideris) to the team! - -## :bug: Fixes - -- [#3096](https://github.com/mochajs/mocha/issues/3096): Fix `--bail` failing to bail within hooks ([@outsideris](https://github.com/outsideris)) -- [#3184](https://github.com/mochajs/mocha/issues/3184): Don't skip too many suites (using `describe.skip()`) ([@outsideris](https://github.com/outsideris)) - -## :book: Documentation - -- [#3133](https://github.com/mochajs/mocha/issues/3133): Improve docs regarding "pending" behavior ([@ematicipo](https://github.com/ematicipo)) -- [#3276](https://github.com/mochajs/mocha/pull/3276), [#3274](https://github.com/mochajs/mocha/pull/3274): Fix broken stuff in `CHANGELOG.md` ([@tagoro9](https://github.com/tagoro9), [@honzajavorek](https://github.com/honzajavorek)) - -## :nut_and_bolt: Other - -- [#3208](https://github.com/mochajs/mocha/issues/3208): Improve test coverage for AMD users ([@outsideris](https://github.com/outsideris)) -- [#3267](https://github.com/mochajs/mocha/pull/3267): Remove vestiges of PhantomJS from CI ([@anishkny](https://github.com/anishkny)) -- [#2952](https://github.com/mochajs/mocha/issues/2952): Fix a debug message ([@boneskull](https://github.com/boneskull)) - -# 5.0.4 / 2018-03-07 - -## :bug: Fixes - -- [#3265](https://github.com/mochajs/mocha/issues/3265): Fixes regression in "watch" functionality introduced in v5.0.2 ([@outsideris](https://github.com/outsideris)) - -# 5.0.3 / 2018-03-06 - -This patch features a fix to address a potential "low severity" [ReDoS vulnerability](https://snyk.io/vuln/npm:diff:20180305) in the [diff](https://npm.im/diff) package (a dependency of Mocha). - -## :lock: Security Fixes - -- [#3266](https://github.com/mochajs/mocha/pull/3266): Bump `diff` to v3.5.0 ([@anishkny](https://github.com/anishkny)) - -## :nut_and_bolt: Other - -- [#3011](https://github.com/mochajs/mocha/issues/3011): Expose `generateDiff()` in `Base` reporter ([@harrysarson](https://github.com/harrysarson)) - -# 5.0.2 / 2018-03-05 - -This release fixes a class of tests which report as _false positives_. **Certain tests will now break**, though they would have previously been reported as passing. Details below. Sorry for the inconvenience! - -## :bug: Fixes - -- [#3226](https://github.com/mochajs/mocha/issues/3226): Do not swallow errors that are thrown asynchronously from passing tests ([@boneskull](https://github.com/boneskull)). Example: - - \```js - it('should actually fail, sorry!', function (done) { - // passing assertion - assert(true === true); - - // test complete & is marked as passing - done(); - - // ...but something evil lurks within - setTimeout(() => { - throw new Error('chaos!'); - }, 100); - }); - \``` - - Previously to this version, Mocha would have _silently swallowed_ the `chaos!` exception, and you wouldn't know. Well, _now you know_. Mocha cannot recover from this gracefully, so it will exit with a nonzero code. - - **Maintainers of external reporters**: _If_ a test of this class is encountered, the `Runner` instance will emit the `end` event _twice_; you _may_ need to change your reporter to use `runner.once('end')` intead of `runner.on('end')`. - -- [#3093](https://github.com/mochajs/mocha/issues/3093): Fix stack trace reformatting problem ([@outsideris](https://github.com/outsideris)) - -## :nut_and_bolt: Other - -- [#3248](https://github.com/mochajs/mocha/issues/3248): Update `browser-stdout` to v1.3.1 ([@honzajavorek](https://github.com/honzajavorek)) - -# 5.0.1 / 2018-02-07 - -...your garden-variety patch release. - -Special thanks to [Wallaby.js](https://wallabyjs.com) for their continued support! :heart: - -## :bug: Fixes - -- [#1838](https://github.com/mochajs/mocha/issues/1838): `--delay` now works with `.only()` ([@silviom](https://github.com/silviom)) -- [#3119](https://github.com/mochajs/mocha/issues/3119): Plug memory leak present in v8 ([@boneskull](https://github.com/boneskull)) - -## :book: Documentation - -- [#3132](https://github.com/mochajs/mocha/issues/3132), [#3098](https://github.com/mochajs/mocha/issues/3098): Update `--glob` docs ([@outsideris](https://github.com/outsideris)) -- [#3212](https://github.com/mochajs/mocha/pull/3212): Update [Wallaby.js](https://wallabyjs.com)-related docs ([@ArtemGovorov](https://github.com/ArtemGovorov)) -- [#3205](https://github.com/mochajs/mocha/pull/3205): Remove outdated cruft ([@boneskull](https://github.com/boneskull)) - -## :nut_and_bolt: Other - -- [#3224](https://github.com/mochajs/mocha/pull/3224): Add proper Wallaby.js config ([@ArtemGovorov](https://github.com/ArtemGovorov)) -- [#3230](https://github.com/mochajs/mocha/pull/3230): Update copyright year ([@josephlin55555](https://github.com/josephlin55555)) - -# 5.0.0 / 2018-01-17 - -Mocha starts off 2018 right by again dropping support for _unmaintained rubbish_. - -Welcome [@vkarpov15](https://github.com/vkarpov15) to the team! - -## :boom: Breaking Changes - -- **[#3148](https://github.com/mochajs/mocha/issues/3148): Drop support for IE9 and IE10** ([@Bamieh](https://github.com/Bamieh)) - Practically speaking, only code which consumes (through bundling or otherwise) the userland [buffer](https://npm.im/buffer) module should be affected. However, Mocha will no longer test against these browsers, nor apply fixes for them. - -## :tada: Enhancements - -- [#3181](https://github.com/mochajs/mocha/issues/3181): Add useful new `--file` command line argument ([documentation](https://mochajs.org/#--file-file)) ([@hswolff](https://github.com/hswolff)) - -## :bug: Fixes - -- [#3187](https://github.com/mochajs/mocha/issues/3187): Fix inaccurate test duration reporting ([@FND](https://github.com/FND)) -- [#3202](https://github.com/mochajs/mocha/pull/3202): Fix bad markup in HTML reporter ([@DanielRuf](https://github.com/DanielRuf)) - -## :sunglasses: Developer Experience - -- [#2352](https://github.com/mochajs/mocha/issues/2352): Ditch GNU Make for [nps](https://npm.im/nps) to manage scripts ([@TedYav](https://github.com/TedYav)) - -## :book: Documentation - -- [#3137](https://github.com/mochajs/mocha/issues/3137): Add missing `--no-timeouts` docs ([@dfberry](https://github.com/dfberry)) -- [#3134](https://github.com/mochajs/mocha/issues/3134): Improve `done()` callback docs ([@maraisr](https://github.com/maraisr)) -- [#3135](https://github.com/mochajs/mocha/issues/3135): Fix cross-references ([@vkarpov15](https://github.com/vkarpov15)) -- [#3163](https://github.com/mochajs/mocha/pull/3163): Fix tpyos ([@tbroadley](https://github.com/tbroadley)) -- [#3177](https://github.com/mochajs/mocha/pull/3177): Tweak `README.md` organization ([@xxczaki](https://github.com/xxczaki)) -- Misc updates ([@boneskull](https://github.com/boneskull)) - -## :nut_and_bolt: Other - -- [#3118](https://github.com/mochajs/mocha/issues/3118): Move TextMate Integration to [its own repo](https://github.com/mochajs/mocha.tmbundle) ([@Bamieh](https://github.com/Bamieh)) -- [#3185](https://github.com/mochajs/mocha/issues/3185): Add Node.js v9 to build matrix; remove v7 ([@xxczaki](https://github.com/xxczaki)) -- [#3172](https://github.com/mochajs/mocha/issues/3172): Markdown linting ([@boneskull](https://github.com/boneskull)) -- Test & Netlify updates ([@Munter](https://github.com/munter), [@boneskull](https://github.com/boneskull)) - -# 4.1.0 / 2017-12-28 - -This is mainly a "housekeeping" release. - -Welcome [@Bamieh](https://github.com/Bamieh) and [@xxczaki](https://github.com/xxczaki) to the team! - -## :bug: Fixes - -- [#2661](https://github.com/mochajs/mocha/issues/2661): `progress` reporter now accepts reporter options ([@canoztokmak](https://github.com/canoztokmak)) -- [#3142](https://github.com/mochajs/mocha/issues/3142): `xit` in `bdd` interface now properly returns its `Test` object ([@Bamieh](https://github.com/Bamieh)) -- [#3075](https://github.com/mochajs/mocha/pull/3075): Diffs now computed eagerly to avoid misinformation when reported ([@abrady0](https://github.com/abrady0)) -- [#2745](https://github.com/mochajs/mocha/issues/2745): `--help` will now help you even if you have a `mocha.opts` ([@Zarel](https://github.com/Zarel)) - -## :tada: Enhancements - -- [#2514](https://github.com/mochajs/mocha/issues/2514): The `--no-diff` flag will completely disable diff output ([@CapacitorSet](https://github.com/CapacitorSet)) -- [#3058](https://github.com/mochajs/mocha/issues/3058): All "setters" in Mocha's API are now also "getters" if called without arguments ([@makepanic](https://github.com/makepanic)) - -## :book: Documentation - -- [#3170](https://github.com/mochajs/mocha/pull/3170): Optimization and site speed improvements ([@Munter](https://github.com/munter)) -- [#2987](https://github.com/mochajs/mocha/issues/2987): Moved the old [site repo](https://github.com/mochajs/mochajs.github.io) into the main repo under `docs/` ([@boneskull](https://github.com/boneskull)) -- [#2896](https://github.com/mochajs/mocha/issues/2896): Add [maintainer guide](https://github.com/mochajs/mocha/blob/master/MAINTAINERS.md) ([@boneskull](https://github.com/boneskull)) -- Various fixes and updates ([@xxczaki](https://github.com/xxczaki), [@maty21](https://github.com/maty21), [@leedm777](https://github.com/leedm777)) - -## :nut_and_bolt: Other - -- Test improvements and fixes ([@eugenet8k](https://github.com/eugenet8k), [@ngeor](https://github.com/ngeor), [@38elements](https://github.com/38elements), [@Gerhut](https://github.com/Gerhut), [@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) -- Refactoring and cruft excision ([@38elements](https://github.com/38elements), [@Bamieh](https://github.com/Bamieh), [@finnigantime](https://github.com/finnigantime), [@boneskull](https://github.com/boneskull)) - -# 4.0.1 / 2017-10-05 - -## :bug: Fixes - -- [#3051](https://github.com/mochajs/mocha/pull/3051): Upgrade Growl to v1.10.3 to fix its [peer dep problems](https://github.com/tj/node-growl/pull/68) ([@dpogue](https://github.com/dpogue)) - -# 4.0.0 / 2017-10-02 - -You might want to read this before filing a new bug! :stuck_out_tongue_closed_eyes: - -## :boom: Breaking Changes - -For more info, please [read this article](https://boneskull.com/mocha-v4-nears-release/). - -### Compatibility - -- [#3016](https://github.com/mochajs/mocha/issues/3016): Drop support for unmaintained versions of Node.js ([@boneskull](https://github.com/boneskull)): - - 0.10.x - - 0.11.x - - 0.12.x - - iojs (any) - - 5.x.x -- [#2979](https://github.com/mochajs/mocha/issues/2979): Drop support for non-ES5-compliant browsers ([@boneskull](https://github.com/boneskull)): - - IE7 - - IE8 - - PhantomJS 1.x -- [#2615](https://github.com/mochajs/mocha/issues/2615): Drop Bower support; old versions (3.x, etc.) will remain available ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) - -### Default Behavior - -- [#2879](https://github.com/mochajs/mocha/issues/2879): By default, Mocha will no longer force the process to exit once all tests complete. This means any test code (or code under test) which would normally prevent `node` from exiting will do so when run in Mocha. Supply the `--exit` flag to revert to pre-v4.0.0 behavior ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) - -### Reporter Output - -- [#2095](https://github.com/mochajs/mocha/issues/2095): Remove `stdout:` prefix from browser reporter logs ([@skeggse](https://github.com/skeggse)) -- [#2295](https://github.com/mochajs/mocha/issues/2295): Add separator in "unified diff" output ([@olsonpm](https://github.com/olsonpm)) -- [#2686](https://github.com/mochajs/mocha/issues/2686): Print failure message when `--forbid-pending` or `--forbid-only` is specified ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2814](https://github.com/mochajs/mocha/pull/2814): Indent contexts for better readability when reporting failures ([@charlierudolph](https://github.com/charlierudolph)) - -## :-1: Deprecations - -- [#2493](https://github.com/mochajs/mocha/issues/2493): The `--compilers` command-line option is now soft-deprecated and will emit a warning on `STDERR`. Read [this](https://github.com/mochajs/mocha/wiki/compilers-deprecation) for more info and workarounds ([@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull)) - -## :tada: Enhancements - -- [#2628](https://github.com/mochajs/mocha/issues/2628): Allow override of default test suite name in XUnit reporter ([@ngeor](https://github.com/ngeor)) - -## :book: Documentation - -- [#3020](https://github.com/mochajs/mocha/pull/3020): Link to CLA in `README.md` and `CONTRIBUTING.md` ([@skeggse](https://github.com/skeggse)) - -## :nut_and_bolt: Other - -- [#2890](https://github.com/mochajs/mocha/issues/2890): Speed up build by (re-)consolidating SauceLabs tests ([@boneskull](https://github.com/boneskull)) - -# 3.5.3 / 2017-09-11 - -## :bug: Fixes - -- [#3003](https://github.com/mochajs/mocha/pull/3003): Fix invalid entities in xUnit reporter first appearing in v3.5.1 ([@jkrems](https://github.com/jkrems)) - -# 3.5.2 / 2017-09-10 - -## :bug: Fixes - -- [#3001](https://github.com/mochajs/mocha/pull/3001): Fix AMD-related failures first appearing in v3.5.1 ([@boneskull](https://github.com/boneskull)) - -# 3.5.1 / 2017-09-09 - -## :newspaper: News - -- :mega: Mocha is now sponsoring [PDXNode](http://pdxnode.org)! If you're in the [Portland](https://wikipedia.org/wiki/Portland,_Oregon) area, come check out the monthly talks and hack nights! - -## :bug: Fixes - -- [#2997](https://github.com/mochajs/mocha/pull/2997): Fix missing `xit` export for "require" interface ([@solodynamo](https://github.com/solodynamo)) -- [#2957](https://github.com/mochajs/mocha/pull/2957): Fix unicode character handling in XUnit reporter failures ([@jkrems](https://github.com/jkrems)) - -## :nut_and_bolt: Other - -- [#2986](https://github.com/mochajs/mocha/pull/2986): Add issue and PR templates ([@kungapal](https://github.com/kungapal)) -- [#2918](https://github.com/mochajs/mocha/pull/2918): Drop bash dependency for glob-related tests ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2922](https://github.com/mochajs/mocha/pull/2922): Improve `--compilers` coverage ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2981](https://github.com/mochajs/mocha/pull/2981): Fix tpyos and spelling errors ([@jsoref](https://github.com/jsoref)) - -# 3.5.0 / 2017-07-31 - -## :newspaper: News - -- Mocha now has a [code of conduct](https://github.com/mochajs/mocha/blob/master/.github/CODE_OF_CONDUCT.md) (thanks [@kungapal](https://github.com/kungapal)!). -- Old issues and PRs are now being marked "stale" by [Probot's "Stale" plugin](https://github.com/probot/stale). If an issue is marked as such, and you would like to see it remain open, simply add a new comment to the ticket or PR. -- **WARNING**: Support for non-ES5-compliant environments will be dropped starting with version 4.0.0 of Mocha! - -## :lock: Security Fixes - -- [#2860](https://github.com/mochajs/mocha/pull/2860): Address [CVE-2015-8315](https://nodesecurity.io/advisories/46) via upgrade of [debug](https://npm.im/debug) ([@boneskull](https://github.com/boneskull)) - -## :tada: Enhancements - -- [#2696](https://github.com/mochajs/mocha/pull/2696): Add `--forbid-only` and `--forbid-pending` flags. Use these in CI or hooks to ensure tests aren't accidentally being skipped! ([@charlierudolph](https://github.com/charlierudolph)) -- [#2813](https://github.com/mochajs/mocha/pull/2813): Support Node.js 8's `--napi-modules` flag ([@jupp0r](https://github.com/jupp0r)) - -## :nut_and_bolt: Other - -- Various CI-and-test-related fixes and improvements ([@boneskull](https://github.com/boneskull), [@dasilvacontin](https://github.com/dasilvacontin), [@PopradiArpad](https://github.com/PopradiArpad), [@Munter](https://github.com/munter), [@ScottFreeCode](https://github.com/ScottFreeCode)) -- "Officially" support Node.js 8 ([@elergy](https://github.com/elergy)) - -# 3.4.2 / 2017-05-24 - -## :bug: Fixes - -- [#2802](https://github.com/mochajs/mocha/issues/2802): Remove call to deprecated `os.tmpDir` ([@makepanic](https://github.com/makepanic)) -- [#2820](https://github.com/mochajs/mocha/pull/2820): Eagerly set `process.exitCode` ([@chrisleck](https://github.com/chrisleck)) - -## :nut_and_bolt: Other - -- [#2807](https://github.com/mochajs/mocha/pull/2807): Move linting into an npm script ([@Munter](https://github.com/munter)) - -# 3.4.1 / 2017-05-14 - -Fixed a publishing mishap with git's autocrlf settings. - -# 3.4.0 / 2017-05-14 - -Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week. - -This week's highlights: - -- `allowUncaught` added to commandline as `--allow-uncaught` (and bugfixed) -- warning-related Node flags - -## :tada: Enhancements - -- [#2793](https://github.com/mochajs/mocha/pull/2793), [#2697](https://github.com/mochajs/mocha/pull/2697): add --allowUncaught to Node.js ([@lrowe](https://github.com/lrowe)) -- [#2733](https://github.com/mochajs/mocha/pull/2733): Add `--no-warnings` and `--trace-warnings` flags ([@sonicdoe](https://github.com/sonicdoe)) - -## :bug: Fixes - -- [#2793](https://github.com/mochajs/mocha/pull/2793), [#2697](https://github.com/mochajs/mocha/pull/2697): fix broken allowUncaught ([@lrowe](https://github.com/lrowe)) - -## :nut_and_bolt: Other - -- [#2778](https://github.com/mochajs/mocha/pull/2778): Add license report and scan status ([@xizhao](https://github.com/xizhao)) -- [#2794](https://github.com/mochajs/mocha/pull/2794): no special case for macOS running Karma locally ([@boneskull](https://github.com/boneskull)) -- [#2795](https://github.com/mochajs/mocha/pull/2795): reverts use of semistandard directly ([#2648](https://github.com/mochajs/mocha/pull/2648)) ([@boneskull](https://github.com/boneskull)) - -# 3.3.0 / 2017-04-24 - -Thanks to all our contributors, maintainers, sponsors, and users! ❤️ - -As highlights: - -- We've got coverage now! -- Testing is looking less flaky \\o/. -- No more nitpicking about "mocha.js" build on PRs. - -## :tada: Enhancements - -- [#2659](https://github.com/mochajs/mocha/pull/2659): Adds support for loading reporter from an absolute or relative path ([@sul4bh](https://github.com/sul4bh)) -- [#2769](https://github.com/mochajs/mocha/pull/2769): Support `--inspect-brk` on command-line ([@igwejk](https://github.com/igwejk)) - -## :bug: Fixes - -- [#2662](https://github.com/mochajs/mocha/pull/2662): Replace unicode chars w/ hex codes in HTML reporter ([@rotemdan](https://github.com/rotemdan)) - -## :mag: Coverage - -- [#2672](https://github.com/mochajs/mocha/pull/2672): Add coverage for node tests ([@c089](https://github.com/c089), [@Munter](https://github.com/munter)) -- [#2680](https://github.com/mochajs/mocha/pull/2680): Increase tests coverage for base reporter ([@epallerols](https://github.com/epallerols)) -- [#2690](https://github.com/mochajs/mocha/pull/2690): Increase tests coverage for doc reporter ([@craigtaub](https://github.com/craigtaub)) -- [#2701](https://github.com/mochajs/mocha/pull/2701): Increase tests coverage for landing, min, tap and list reporters ([@craigtaub](https://github.com/craigtaub)) -- [#2691](https://github.com/mochajs/mocha/pull/2691): Increase tests coverage for spec + dot reporters ([@craigtaub](https://github.com/craigtaub)) -- [#2698](https://github.com/mochajs/mocha/pull/2698): Increase tests coverage for xunit reporter ([@craigtaub](https://github.com/craigtaub)) -- [#2699](https://github.com/mochajs/mocha/pull/2699): Increase tests coverage for json-stream, markdown and progress reporters ([@craigtaub](https://github.com/craigtaub)) -- [#2703](https://github.com/mochajs/mocha/pull/2703): Cover .some() function in utils.js with tests ([@seppevs](https://github.com/seppevs)) -- [#2773](https://github.com/mochajs/mocha/pull/2773): Add tests for loading reporters w/ relative/absolute paths ([@sul4bh](https://github.com/sul4bh)) - -## :nut_and_bolt: Other - -- Remove bin/.eslintrc; ensure execs are linted ([@boneskull](https://github.com/boneskull)) -- [#2542](https://github.com/mochajs/mocha/issues/2542): Expand CONTRIBUTING.md ([@boneskull](https://github.com/boneskull)) -- [#2660](https://github.com/mochajs/mocha/pull/2660): Double timeouts on integration tests ([@Munter](https://github.com/munter)) -- [#2653](https://github.com/mochajs/mocha/pull/2653): Update copyright year ([@Scottkao85], [@Munter](https://github.com/munter)) -- [#2621](https://github.com/mochajs/mocha/pull/2621): Update dependencies to enable Greenkeeper ([@boneskull](https://github.com/boneskull), [@greenkeeper](https://github.com/greenkeeper)) -- [#2625](https://github.com/mochajs/mocha/pull/2625): Use trusty container in travis-ci; use "artifacts" addon ([@boneskull](https://github.com/boneskull)) -- [#2670](https://github.com/mochajs/mocha/pull/2670): doc(CONTRIBUTING): fix link to org members ([@coderbyheart](https://github.com/coderbyheart)) -- Add Mocha propaganda to README.md ([@boneskull](https://github.com/boneskull)) -- [#2470](https://github.com/mochajs/mocha/pull/2470): Avoid test flake in "delay" test ([@boneskull](https://github.com/boneskull)) -- [#2675](https://github.com/mochajs/mocha/pull/2675): Limit browser concurrency on sauce ([@boneskull](https://github.com/boneskull)) -- [#2669](https://github.com/mochajs/mocha/pull/2669): Use temporary test-only build of mocha.js for browsers tests ([@Munter](https://github.com/munter)) -- Fix "projects" link in README.md ([@boneskull](https://github.com/boneskull)) -- [#2678](https://github.com/mochajs/mocha/pull/2678): Chore(Saucelabs): test on IE9, IE10 and IE11 ([@coderbyheart](https://github.com/coderbyheart)) -- [#2648](https://github.com/mochajs/mocha/pull/2648): Use `semistandard` directly ([@kt3k](https://github.com/kt3k)) -- [#2727](https://github.com/mochajs/mocha/pull/2727): Make the build reproducible ([@lamby](https://github.com/lamby)) - -# 3.2.0 / 2016-11-24 - -## :newspaper: News - -### Mocha is now a JS Foundation Project! - -Mocha is proud to have joined the [JS Foundation](https://js.foundation). For more information, [read the announcement](https://js.foundation/announcements/2016/10/17/Linux-Foundation-Unites-JavaScript-Community-Open-Web-Development/). - -### Contributor License Agreement - -Under the foundation, all contributors to Mocha must sign the [JS Foundation CLA](https://js.foundation/CLA/) before their code can be merged. When sending a PR--if you have not already signed the CLA--a friendly bot will ask you to do so. - -Mocha remains licensed under the [MIT license](https://github.com/mochajs/mocha/blob/master/LICENSE). - -## :bug: Bug Fix - -- [#2535](https://github.com/mochajs/mocha/issues/2535): Fix crash when `--watch` encounters broken symlinks ([@villesau](https://github.com/villesau)) -- [#2593](https://github.com/mochajs/mocha/pull/2593): Fix (old) regression; incorrect symbol shown in `list` reporter ([@Aldaviva](https://github.com/Aldaviva)) -- [#2584](https://github.com/mochajs/mocha/issues/2584): Fix potential error when running XUnit reporter ([@vobujs](https://github.com/vobujs)) - -## :tada: Enhancement - -- [#2294](https://github.com/mochajs/mocha/issues/2294): Improve timeout error messaging ([@jeversmann](https://github.com/jeversmann), [@boneskull](https://github.com/boneskull)) -- [#2520](https://github.com/mochajs/mocha/pull/2520): Add info about `--inspect` flag to CLI help ([@ughitsaaron](https://github.com/ughitsaaron)) - -## :nut_and_bolt: Other - -- [#2570](https://github.com/mochajs/mocha/issues/2570): Use [karma-mocha](https://npmjs.com/package/karma-mocha) proper ([@boneskull](https://github.com/boneskull)) -- Licenses updated to reflect new copyright, add link to license and browser matrix to `README.md` ([@boneskull](https://github.com/boneskull), [@ScottFreeCode](https://github.com/ScottFreeCode), [@dasilvacontin](https://github.com/dasilvacontin)) - -Thanks to all our contributors, sponsors and backers! Keep on the lookout for a public roadmap and new contribution guide coming soon. - -# 3.1.2 / 2016-10-10 - -## :bug: Bug Fix - -- [#2528](https://github.com/mochajs/mocha/issues/2528): Recovery gracefully if an `Error`'s `stack` property isn't writable ([@boneskull](https://github.com/boneskull)) - -# 3.1.1 / 2016-10-09 - -## :bug: Bug Fix - -- [#1417](https://github.com/mochajs/mocha/issues/1417): Don't report `done()` was called multiple times when it wasn't ([@frankleonrose](https://github.com/frankleonrose)) - -## :nut_and_bolt: Other - -- [#2490](https://github.com/mochajs/mocha/issues/2490): Lint with [semistandard](https://npmjs.com/package/semistandard) config ([@makepanic](https://github.com/makepanic)) -- [#2525](https://github.com/mochajs/mocha/issues/2525): Lint all `.js` files ([@boneskull](https://github.com/boneskull)) -- [#2524](https://github.com/mochajs/mocha/issues/2524): Provide workaround for developers unable to run browser tests on macOS Sierra ([@boneskull](https://github.com/boneskull)) - -# 3.1.0 / 2016-09-27 - -## :tada: Enhancement - -- [#2357](https://github.com/mochajs/mocha/issues/2357): Support `--inspect` on command-line ([@simov](https://github.com/simov)) -- [#2194](https://github.com/mochajs/mocha/issues/2194): Human-friendly error if no files are matched on command-line ([@Munter](https://github.com/munter)) -- [#1744](https://github.com/mochajs/mocha/issues/1744): Human-friendly error if a Suite has no callback (BDD/TDD only) ([@anton](https://github.com/anton)) - -## :bug: Bug Fix - -- [#2488](https://github.com/mochajs/mocha/issues/2488): Fix case in which _variables beginning with lowercase "D"_ may not have been reported properly as global leaks ([@JustATrick](https://github.com/JustATrick)) :laughing: -- [#2465](https://github.com/mochajs/mocha/issues/2465): Always halt execution in async function when `this.skip()` is called ([@boneskull](https://github.com/boneskull)) -- [#2445](https://github.com/mochajs/mocha/pull/2445): Exits with expected code 130 when `SIGINT` encountered; exit code can no longer rollover at 256 ([@Munter](https://github.com/munter)) -- [#2315](https://github.com/mochajs/mocha/issues/2315): Fix uncaught TypeError thrown from callback stack ([@1999](https://github.com/1999)) -- Fix broken `only()`/`skip()` in IE7/IE8 ([@boneskull](https://github.com/boneskull)) -- [#2502](https://github.com/mochajs/mocha/issues/2502): Fix broken stack trace filter on Node.js under Windows ([@boneskull](https://github.com/boneskull)) -- [#2496](https://github.com/mochajs/mocha/issues/2496): Fix diff output for objects instantiated with `String` constructor ([more](https://youtrack.jetbrains.com/issue/WEB-23383)) ([@boneskull](https://github.com/boneskull)) - -# 3.0.2 / 2016-08-08 - -## :bug: Bug Fix - -- [#2424](https://github.com/mochajs/mocha/issues/2424): Fix error loading Mocha via Require.js ([@boneskull](https://github.com/boneskull)) -- [#2417](https://github.com/mochajs/mocha/issues/2417): Fix execution of _deeply_ nested `describe.only()` suites ([@not-an-aardvark](https://github.com/not-an-aardvark)) -- Remove references to `json-cov` and `html-cov` reporters in CLI ([@boneskull](https://github.com/boneskull)) - -# 3.0.1 / 2016-08-03 - -## :bug: Bug Fix - -- [#2406](https://github.com/mochajs/mocha/issues/2406): Restore execution of nested `describe.only()` suites ([@not-an-aardvark](https://github.com/not-an-aardvark)) - -# 3.0.0 / 2016-07-31 - -## :boom: Breaking Changes - -- :warning: Due to the increasing difficulty of applying security patches made within its dependency tree, as well as looming incompatibilities with Node.js v7.0, **Mocha no longer supports Node.js v0.8**. - -- :warning: **Mocha may no longer be installed by versions of `npm` less than `1.4.0`.** Previously, this requirement only affected Mocha's development dependencies. In short, this allows Mocha to depend on packages which have dependencies fixed to major versions (`^`). - -- `.only()` is no longer "fuzzy", can be used multiple times, and generally just works like you think it should. :joy: - -- To avoid common bugs, when a test injects a callback function (suggesting asynchronous execution), calls it, _and_ returns a `Promise`, Mocha will now throw an exception: - - \```js - const assert = require('assert'); - - it('should complete this test', function (done) { - return new Promise(function (resolve) { - assert.ok(true); - resolve(); - }) - .then(done); - }); - \``` - - The above test will fail with `Error: Resolution method is overspecified. Specify a callback *or* return a Promise; not both.`. - -- When a test timeout value _greater than_ `2147483648` is specified in any context (`--timeout`, `mocha.setup()`, per-suite, per-test, etc.), the timeout will be _disabled_ and the test(s) will be allowed to run indefinitely. This is equivalent to specifying a timeout value of `0`. See [MDN](https://developer.mozilla.org/docs/Web/API/WindowTimers/setTimeout#Maximum_delay_value) for reasoning. - -- The `dot` reporter now uses more visually distinctive characters when indicating "pending" and "failed" tests. - -- Mocha no longer supports [component](https://www.npmjs.com/package/component). - -- The long-forsaken `HTMLCov` and `JSONCov` reporters--and any relationship to the "node-jscoverage" project--have been removed. - -- `spec` reporter now omits leading carriage returns (`\r`) in non-TTY environment. - -## :tada: Enhancements - -- [#808](https://github.com/mochajs/mocha/issues/808): Allow regular-expression-like strings in `--grep` and browser's `grep` querystring; enables flags such as `i` for case-insensitive matches and `u` for unicode. ([@a8m](https://github.com/a8m)) -- [#2000](https://github.com/mochajs/mocha/pull/2000): Use distinctive characters in `dot` reporter; `,` will denote a "pending" test and `!` will denote a "failing" test. ([@elliottcable](https://github.com/elliottcable)) -- [#1632](https://github.com/mochajs/mocha/issues/1632): Throw a useful exception when a suite or test lacks a title. ([@a8m](https://github.com/a8m)) -- [#1481](https://github.com/mochajs/mocha/issues/1481): Better `.only()` behavior. ([@a8m](https://github.com/a8m)) -- [#2334](https://github.com/mochajs/mocha/issues/2334): Allow `this.skip()` in async tests and hooks. ([@boneskull](https://github.com/boneskull)) -- [#1320](https://github.com/mochajs/mocha/pull/1320): Throw a useful exception when test resolution method is overspecified. ([@jugglinmike](https://github.com/jugglinmike)) -- [#2364](https://github.com/mochajs/mocha/pull/2364): Support `--preserve-symlinks`. ([@rosswarren](https://github.com/rosswarren)) - -## :bug: Bug Fixes - -- [#2259](https://github.com/mochajs/mocha/pull/2259): Restore ES3 compatibility. Specifically, support an environment lacking `Date.prototype.toISOString()`, `JSON`, or has a non-standard implementation of `JSON`. ([@ndhoule](https://github.com/ndhoule), [@boneskull](https://github.com/boneskull)) -- [#2286](https://github.com/mochajs/mocha/issues/2286): Fix `after()` failing to execute if test skipped using `this.skip()` in `beforeEach()`; no longer marks the entire suite as "pending". ([@dasilvacontin](https://github.com/dasilvacontin), [@boneskull](https://github.com/boneskull)) -- [#2208](https://github.com/mochajs/mocha/pull/2208): Fix function name display in `markdown` and `html` (browser) reporters. ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#2299](https://github.com/mochajs/mocha/pull/2299): Fix progress bar in `html` (browser) reporter. ([@AviVahl](https://github.com/avivahl)) -- [#2307](https://github.com/mochajs/mocha/pull/2307): Fix `doc` reporter crashing when test fails. ([@jleyba](https://github.com/jleyba)) -- [#2323](https://github.com/mochajs/mocha/issues/2323): Ensure browser entry point (`browser-entry.js`) is published to npm (for use with bundlers). ([@boneskull](https://github.com/boneskull)) -- [#2310](https://github.com/mochajs/mocha/issues/2310): Ensure custom reporter with an absolute path works in Windows. ([@silentcloud](https://github.com/silentcloud)) -- [#2311](https://github.com/mochajs/mocha/issues/2311): Fix problem wherein calling `this.slow()` without a value would blast any previously set value. ([@boneskull](https://github.com/boneskull)) -- [#1813](https://github.com/mochajs/mocha/issues/1813): Ensure Mocha's own test suite will run in Windows. ([@tswaters](https://github.com/tswaters), [@TimothyGu](https://github.com/timothygu), [@boneskull](https://github.com/boneskull)) -- [#2317](https://github.com/mochajs/mocha/issues/2317): Ensure all interfaces are displayed in `--help` on CLI. ([@ScottFreeCode](https://github.com/ScottFreeCode)) -- [#1644](https://github.com/mochajs/mocha/issues/1644): Don't exhibit undefined behavior when calling `this.timeout()` with very large values ([@callumacrae](https://github.com/callumacrae), [@boneskull](https://github.com/boneskull)) -- [#2361](https://github.com/mochajs/mocha/pull/2361): Don't truncate name of thrown anonymous exception. ([@boneskull](https://github.com/boneskull)) -- [#2367](https://github.com/mochajs/mocha/pull/2367): Fix invalid CSS. ([@bensontrent](https://github.com/bensontrent)) -- [#2401](https://github.com/mochajs/mocha/pull/2401): Remove carriage return before each test line in spec reporter. ([@Munter](https://github.com/munter)) - -## :nut_and_bolt: Other - -- Upgrade production dependencies to address security advisories (and because now we can): `glob`, `commander`, `escape-string-regexp`, and `supports-color`. ([@boneskull](https://github.com/boneskull), [@RobLoach](https://github.com/robloach)) -- Add Windows to CI. ([@boneskull](https://github.com/boneskull), [@TimothyGu](https://github.com/timothygu)) -- Ensure appropriate `engines` field in `package.json`. ([@shinnn](https://github.com/shinnn), [@boneskull](https://github.com/boneskull)) -- [#2348](https://github.com/mochajs/mocha/issues/2348): Upgrade ESLint to v2 ([@anthony-redfox](https://github.com/anthony-redfox)) - -We :heart: our [backers and sponsors](https://opencollective.com/mochajs)! - -:shipit: - -# 2.5.3 / 2016-05-25 - -- [#2112](https://github.com/mochajs/mocha/pull/2112) - Fix HTML reporter regression causing duplicate error output ([@danielstjules](https://github.com/danielstjules) via [`6d24063`](https://github.com/mochajs/mocha/commit/6d24063)) -- [#2119](https://github.com/mochajs/mocha/pull/2119) - Make HTML reporter failure/passed links preventDefault to avoid SPA's hash navigation ([@jimenglish81](https://github.com/jimenglish81) via [`9e93efc`](https://github.com/mochajs/mocha/commit/9e93efc)) - -# 2.5.2 / 2016-05-24 - -- [#2178](https://github.com/mochajs/mocha/pull/2178) - Avoid double and triple xUnit XML escaping ([@graingert](https://github.com/graingert) via [`49b5ff1`](https://github.com/mochajs/mocha/commit/49b5ff1)) - -# 2.5.1 / 2016-05-23 - -- Fix [to-iso-string](https://npmjs.com/package/to-iso-string) dependency ([@boneskull](https://github.com/boneskull) via [`bd9450b`](https://github.com/mochajs/mocha/commit/bd9450b)) - -Thanks [**@entertainyou**](https://github.com/entertainyou), [**@SimenB**](https://github.com/SimenB), [**@just-paja**](https://github.com/just-paja) for the heads-up. - -# 2.5.0 / 2016-05-23 - -This has been awhile coming! We needed to feel confident that the next release wouldn't break browser compatibility (e.g. the last few patch releases). - -## Browser Tests in CI - -We now run unit tests against PhantomJS v1.x and an assortment of browsers on [SauceLabs](https://saucelabs.com), including: - -- Internet Explorer v8.0 -- Chrome (latest) -- Firefox (latest) -- Safari (latest) -- Microsoft Edge (latest) - -To accomplish this, we now run Mocha's unit tests (and a handful of integration tests) via [Karma](https://npmjs.com/package/karma) and a modified [karma-mocha](https://npmjs.com/package/karma-mocha). Along the way, we had to solve issue [#880](https://github.com/mochajs/mocha/issues/880) (apologies to [**@mderijcke**](https://github.com/mderijcke) and [**@sukima**](https://github.com/sukima) who had PRs addressing this), as well as replace most usages of [should](https://npmjs.com/package/should) with [expect.js](https://npmjs.com/package/expect.js) for IE8. - -Going forward, when sending PRs, your code will _only_ run against PhantomJS v1.x (and not hit SauceLabs) [because security](https://docs.travis-ci.com/user/pull-requests/#Security-Restrictions-when-testing-Pull-Requests). - -## Node.js 6.x - -Node.js 6.x "just worked" before, but now it's in the CI matrix, so it's "officially" supported. Mocha _still retains support_ for Node.js 0.8.x. - -## "Minor" Release - -You'll see mostly bug fixes below, but also a couple features--as such, it's a "minor" release. - -## TYVM - -Thanks to everyone who contributed, and our fabulous [sponsors and backers](https://opencollective.com/mochajs)! - -- [#2079](https://github.com/mochajs/mocha/issues/2079) - Add browser checks to CI; update [browserify](https://npmjs.com/package/browserify) to v13.0.0 ([@dasilvacontin](https://github.com/dasilvacontin), [@ScottFreeCode](https://github.com/ScottFreeCode), [@boneskull](https://github.com/boneskull) via [`c04c1d7`](https://github.com/mochajs/mocha/commit/c04c1d7), [`0b1e9b3`](https://github.com/mochajs/mocha/commit/0b1e9b3), [`0dde0fa`](https://github.com/mochajs/mocha/commit/0dde0fa), [`f8a3d86`](https://github.com/mochajs/mocha/commit/f8a3d86), [`9e8cbaa`](https://github.com/mochajs/mocha/commit/9e8cbaa)) -- [#880](https://github.com/mochajs/mocha/issues/880) - Make Mocha browserifyable ([@boneskull](https://github.com/boneskull) via [`524862b`](https://github.com/mochajs/mocha/commit/524862b)) -- [#2121](https://github.com/mochajs/mocha/issues/2121) - Update [glob](https://npmjs.com/package/glob) to v3.2.11 ([@astorije](https://github.com/astorije) via [`7920fc4`](https://github.com/mochajs/mocha/commit/7920fc4)) -- [#2126](https://github.com/mochajs/mocha/issues/2126) - Fix dupe error messages in stack trace filter ([@Turbo87](https://github.com/Turbo87) via [`4301caa`](https://github.com/mochajs/mocha/commit/4301caa)) -- [#2109](https://github.com/mochajs/mocha/issues/2109) - Fix certain diffs when objects cannot be coerced into primitives ([@joshlory](https://github.com/joshlory) via [`61fbb7f`](https://github.com/mochajs/mocha/commit/61fbb7f)) -- [#1827](https://github.com/mochajs/mocha/pull/1827) - Fix TWBS/`mocha.css` collisions ([@irnc](https://github.com/irnc) via [`0543798`](https://github.com/mochajs/mocha/commit/0543798)) -- [#1760](https://github.com/mochajs/mocha/issues/1760), [#1936](https://github.com/mochajs/mocha/issues/1936) - Fix `this.skip()` in HTML reporter ([@mislav](https://github.com/mislav) via [`cb4248b`](https://github.com/mochajs/mocha/commit/cb4248b)) -- [#2115](https://github.com/mochajs/mocha/pull/2115) - Fix exceptions thrown from hooks in HTML reporter ([@danielstjules](https://github.com/danielstjules) via [`e290bc0`](https://github.com/mochajs/mocha/commit/e290bc0)) -- [#2089](https://github.com/mochajs/mocha/issues/2089) - Handle Symbol values in `util.stringify()` ([@ryym](https://github.com/ryym) via [`ea61d05`](https://github.com/mochajs/mocha/commit/ea61d05)) -- [#2097](https://github.com/mochajs/mocha/pull/2097) - Fix diff for objects overriding `Object.prototype.hasOwnProperty` ([@mantoni](https://github.com/mantoni) via [`b20fdfe`](https://github.com/mochajs/mocha/commit/b20fdfe)) -- [#2101](https://github.com/mochajs/mocha/pull/2101) - Properly handle non-string "messages" thrown from assertion libraries ([@jkimbo](https://github.com/jkimbo) via [`9c41051`](https://github.com/mochajs/mocha/commit/9c41051)) -- [#2124](https://github.com/mochajs/mocha/pull/2124) - Update [growl](https://npmjs.com/package/growl) ([@benjamine](https://github.com/benjamine) via [`9ae6a85`](https://github.com/mochajs/mocha/commit/9ae6a85)) -- [#2162](https://github.com/mochajs/mocha/pull/2162), [#2205](https://github.com/mochajs/mocha/pull/2205) - JSDoc fixes ([@OlegTsyba](https://github.com/OlegTsyba) via [`8031f20`](https://github.com/mochajs/mocha/commit/8031f20), [@ScottFreeCode](https://github.com/ScottFreeCode) via [`f83b1d9`](https://github.com/mochajs/mocha/commit/f83b1d9)) -- [#2132](https://github.com/mochajs/mocha/issues/2132) - Remove Growl-related cruft ([@julienw](https://github.com/julienw) via [`00d6469`](https://github.com/mochajs/mocha/commit/00d6469)) -- [#2172](https://github.com/mochajs/mocha/pull/2172) - Add [OpenCollective](https://opencollective.com) badge, sponsors & backers ([@xdamman](https://github.com/xdamman), [@boneskull](https://github.com/boneskull) via [`caee94f`](https://github.com/mochajs/mocha/commit/caee94f)) -- [#1841](https://github.com/mochajs/mocha/pull/1841) - Add new logo, banner assets ([@dasilvacontin](https://github.com/dasilvacontin) via [`00fd0e1`](https://github.com/mochajs/mocha/commit/00fd0e1)) -- [#2214](https://github.com/mochajs/mocha/pull/2214) - Update `README.md` header ([@dasilvacontin](https://github.com/dasilvacontin) via [`c0f9be2`](https://github.com/mochajs/mocha/commit/c0f9be2)) -- [#2236](https://github.com/mochajs/mocha/pull/2236) - Better checks for Node.js v0.8 compatibility in CI ([@dasilvacontin](https://github.com/dasilvacontin) via [`ba5637d`](https://github.com/mochajs/mocha/commit/ba5637d)) -- [#2239](https://github.com/mochajs/mocha/issues/2239) - Add Node.js v6.x to CI matrix ([@boneskull](https://github.com/boneskull) via [`3904da4`](https://github.com/mochajs/mocha/commit/3904da4)) - -# 2.4.5 / 2016-01-28 - -- [#2080](https://github.com/mochajs/mocha/issues/2080), [#2078](https://github.com/mochajs/mocha/issues/2078), [#2072](https://github.com/mochajs/mocha/pull/2072), [#2073](https://github.com/mochajs/mocha/pull/2073), [#1200](https://github.com/mochajs/mocha/issues/1200) - Revert changes to console colors in changeset [1192914](https://github.com/mochajs/mocha/commit/119291449cd03a11cdeda9e37cf718a69a012896) and subsequent related changes thereafter. Restores compatibility with IE8 & PhantomJS. See also [mantoni/mochify.js#129](https://github.com/mantoni/mochify.js/issues/129) and [openlayers/ol3#4746](https://github.com/openlayers/ol3/pull/4746) ([@boneskull](https://github.com/boneskull)) -- [#2082](https://github.com/mochajs/mocha/pull/2082) - Fix several test assertions ([@mislav](https://github.com/mislav)) - -# 2.4.4 / 2016-01-27 - -- [#2080](https://github.com/mochajs/mocha/issues/2080) - Fix broken RequireJS compatibility ([@boneskull](https://github.com/boneskull)) - -# 2.4.3 / 2016-01-27 - -- [#2078](https://github.com/mochajs/mocha/issues/2078) - Fix broken IE8 ([@boneskull](https://github.com/boneskull)) - -# 2.4.2 / 2016-01-26 - -- [#2053](https://github.com/mochajs/mocha/pull/2053) - Fix web worker compatibility ([@mislav](https://github.com/mislav)) -- [#2072](https://github.com/mochajs/mocha/pull/2072) - Fix Windows color output ([@thedark1337](https://github.com/thedark1337)) -- [#2073](https://github.com/mochajs/mocha/pull/2073) - Fix colors in `progress` and `landing` reporters ([@gyandeeps](https://github.com/gyandeeps)) - -# 2.4.1 / 2016-01-26 - -- [#2067](https://github.com/mochajs/mocha/pull/2067) - Fix HTML/doc reporter regressions ([@danielstjules](https://github.com/danielstjules)) - -# 2.4.0 / 2016-01-25 - -- [#1945](https://github.com/mochajs/mocha/pull/1945) - Correctly skip tests when skipping in suite's before() ([@ryanshawty](https://github.com/ryanshawty)) -- [#2056](https://github.com/mochajs/mocha/pull/2056) - chore(license): update license year to 2016 ([@pra85](https://github.com/pra85)) -- [#2048](https://github.com/mochajs/mocha/pull/2048) - Fix `this.skip` from spec with HTML reporter ([@mislav](https://github.com/mislav)) -- [#2033](https://github.com/mochajs/mocha/pull/2033) - Update tests for newer versions of should.js ([@tomhughes](https://github.com/tomhughes)) -- [#2037](https://github.com/mochajs/mocha/pull/2037) - Fix for memory leak caused by referenced to deferred test ([@bd82](https://github.com/bd82)) -- [#2038](https://github.com/mochajs/mocha/pull/2038) - Also run Travis-CI on node.js 4 & 5 ([@bd82](https://github.com/bd82)) -- [#2028](https://github.com/mochajs/mocha/pull/2028) - Remove reference to test before afterAll hook runs ([@stonelgh](https://github.com/stonelgh)) -- Bump mkdirp to 0.5.1 to support strict mode ([@danielstjules](https://github.com/danielstjules)) -- [#1977](https://github.com/mochajs/mocha/pull/1977) - safely stringify PhantomJS undefined value ([@ahamid](https://github.com/ahamid)) -- Add the ability to retry tests ([@@longlho]) -- [#1982](https://github.com/mochajs/mocha/pull/1982) - Enable --log-timer-events option [@Alaneor](https://github.com/Alaneor) -- Fix [#1980](https://github.com/mochajs/mocha/issues/1980): Load mocha.opts from bin/mocha and bin/\_mocha ([@danielstjules](https://github.com/danielstjules)) -- [#1976](https://github.com/mochajs/mocha/pull/1976) - Simplify function call ([@iclanzan](https://github.com/iclanzan)) -- [#1963](https://github.com/mochajs/mocha/pull/1963) - Add support --perf-basic-prof ([@robraux](https://github.com/robraux)) -- [#1981](https://github.com/mochajs/mocha/pull/1981) - Fix HTML reporter handling of done and exceptions ([@Standard8](https://github.com/Standard8)) -- [#1993](https://github.com/mochajs/mocha/pull/1993) - propagate "file" property for "exports" interface ([@segrey](https://github.com/segrey)) -- [#1999](https://github.com/mochajs/mocha/pull/1999) - Add support for strict mode ([@tmont](https://github.com/tmont)) -- [#2005](https://github.com/mochajs/mocha/pull/2005) - XUnit Reporter Writes to stdout, falls back to console.log ([@jonnyreeves](https://github.com/jonnyreeves)) -- [#2021](https://github.com/mochajs/mocha/pull/2021) - Fix non ES5 compliant regexp ([@zetaben](https://github.com/zetaben)) -- [#1965] - Don't double install BDD UI ([@cowboyd](https://github.com/cowboyd)) -- [#1995](https://github.com/mochajs/mocha/pull/1995) - Make sure the xunit output dir exists before writing to it ([@ianwremmel](https://github.com/ianwremmel)) -- Use chalk for the base reporter colors; closes [#1200](https://github.com/mochajs/mocha/issues/1200) ([@boneskull](https://github.com/boneskull)) -- Fix requiring custom interfaces ([@jgkim](https://github.com/jgkim)) -- [#1967](https://github.com/mochajs/mocha/pull/1967) Silence Bluebird js warnings ([@krisr](https://github.com/krisr)) - -# 2.3.4 / 2015-11-15 - -- Update debug dependency to 2.2.0 -- remove duplication of mocha.opts on process.argv -- Fix typo in test/reporters/nyan.js - -# 2.3.3 / 2015-09-19 - -- [#1875](https://github.com/mochajs/mocha/issues/1875) - Fix Markdown reporter exceeds maximum call stack size ([@danielstjules](https://github.com/danielstjules)) -- [#1864](https://github.com/mochajs/mocha/issues/1864) - Fix xunit missing output with --reporter-options output ([@danielstjules](https://github.com/danielstjules)) -- [#1846](https://github.com/mochajs/mocha/issues/1846) - Support all harmony flags ([@danielstjules](https://github.com/danielstjules)) -- Fix fragile xunit reporter spec ([@danielstjules](https://github.com/danielstjules)) -- [#1669](https://github.com/mochajs/mocha/issues/1669) - Fix catch uncaught errors outside test suite execution ([@danielstjules](https://github.com/danielstjules)) -- [#1868](https://github.com/mochajs/mocha/issues/1868) - Revert jade to support npm < v1.3.7 ([@danielstjules](https://github.com/danielstjules)) -- [#1766](https://github.com/mochajs/mocha/issues/1766) - Don't remove modules/components from stack trace in the browser ([@danielstjules](https://github.com/danielstjules)) -- [#1798](https://github.com/mochajs/mocha/issues/1798) - Fix correctly attribute mutiple done err with hooks ([@danielstjules](https://github.com/danielstjules)) -- Fix use utils.reduce for IE8 compatibility ([@wsw0108](https://github.com/wsw0108)) -- Some linting errors fixed by [@danielstjules](https://github.com/danielstjules) -- Call the inspect() function if message is not set ([@kevinburke](https://github.com/kevinburke)) - -# 2.3.2 / 2015-09-07 - -- [#1868](https://github.com/mochajs/mocha/issues/1868) - Fix compatibility with older versions of NPM ([@boneskull](https://github.com/boneskull)) - -# 2.3.1 / 2015-09-06 - -- [#1812](https://github.com/mochajs/mocha/issues/1812) - Fix: Bail flag causes before() hooks to be run even after a failure ([@aaroncrows]) - -# 2.3.0 / 2015-08-30 - -- [#553](https://github.com/mochajs/mocha/issues/553) - added --allowUncaught option ([@amsul](https://github.com/amsul)) -- [#1490](https://github.com/mochajs/mocha/issues/1490) - Allow --async-only to be satisfied by returning a promise ([@jlai](https://github.com/jlai)) -- [#1829](https://github.com/mochajs/mocha/issues/1829) - support --max-old-space-size ([@gigadude](https://github.com/gigadude)) -- [#1811](https://github.com/mochajs/mocha/issues/1811) - upgrade Jade dependency ([@outsideris](https://github.com/outsideris)) -- [#1769](https://github.com/mochajs/mocha/issues/1769) - Fix async hook error handling ([@ajaykodali](https://github.com/ajaykodali)) -- [#1230](https://github.com/mochajs/mocha/issues/1230) - More descriptive beforeEach/afterEach messages ([@duncanbeevers](https://github.com/duncanbeevers)) -- [#1787](https://github.com/mochajs/mocha/issues/1787) - Scope loading behaviour instead of using early return ([@aryeguy](https://github.com/aryeguy)) -- [#1789](https://github.com/mochajs/mocha/issues/1789) - Fix: html-runner crashing ([@sunesimonsen](https://github.com/sunesimonsen)) -- [#1749](https://github.com/mochajs/mocha/issues/1749) - Fix maximum call stack error on large amount of tests ([@tinganho](https://github.com/tinganho)) -- [#1230](https://github.com/mochajs/mocha/issues/1230) - Decorate failed hook titles with test title ([@duncanbeevers](https://github.com/duncanbeevers)) -- [#1260](https://github.com/mochajs/mocha/issues/1260) - Build using Browserify ([@ndhoule](https://github.com/ndhoule)) -- [#1728](https://github.com/mochajs/mocha/issues/1728) - Don't use `__proto__` ([@ndhoule](https://github.com/ndhoule)) -- [#1781](https://github.com/mochajs/mocha/issues/1781) - Fix hook error tests ([@glenjamin](https://github.com/glenjamin)) -- [#1754](https://github.com/mochajs/mocha/issues/1754) - Allow boolean --reporter-options ([@papandreou](https://github.com/papandreou)) -- [#1766](https://github.com/mochajs/mocha/issues/1766) - Fix overly aggressive stack suppression ([@moll](https://github.com/moll)) -- [#1752](https://github.com/mochajs/mocha/issues/1752) - Avoid potential infinite loop ([@gsilk](https://github.com/gsilk)) -- [#1761](https://github.com/mochajs/mocha/issues/1761) - Fix problems running under PhantomJS ([@chromakode](https://github.com/chromakode)) -- [#1700](https://github.com/mochajs/mocha/issues/1700) - Fix more problems running under PhantomJS ([@jbnicolai](https://github.com/jbnicolai)) -- [#1774](https://github.com/mochajs/mocha/issues/1774) - Support escaped spaces in CLI options ([@adamgruber](https://github.com/adamgruber)) -- [#1687](https://github.com/mochajs/mocha/issues/1687) - Fix HTML reporter links with special chars ([@benvinegar](https://github.com/benvinegar)) -- [#1359](https://github.com/mochajs/mocha/issues/1359) - Adopt code style and enforce it using ESLint ([@ndhoule](https://github.com/ndhoule) w/ assist from [@jbnicolai](https://github.com/jbnicolai) & [@boneskull](https://github.com/boneskull)) -- various refactors ([@jbnicolai](https://github.com/jbnicolai)) -- [#1758](https://github.com/mochajs/mocha/issues/1758) - Add cross-frame compatible Error checking ([@outdooricon](https://github.com/outdooricon)) -- [#1741](https://github.com/mochajs/mocha/issues/1741) - Remove moot `version` property from bower.json ([@kkirsche](https://github.com/kkirsche)) -- [#1739](https://github.com/mochajs/mocha/issues/1739) - Improve `HISTORY.md` ([@rstacruz](https://github.com/rstacruz)) -- [#1730](https://github.com/mochajs/mocha/issues/1730) - Support more io.js flags ([@ryedog](https://github.com/ryedog)) -- [#1349](https://github.com/mochajs/mocha/issues/1349) - Allow HTML in HTML reporter errors ([@papandreou](https://github.com/papandreou) / [@sunesimonsen](https://github.com/sunesimonsen)) -- [#1572](https://github.com/mochajs/mocha/issues/1572) - Prevent default browser behavior for failure/pass links ([@jschilli](https://github.com/jschilli)) -- [#1630](https://github.com/mochajs/mocha/issues/1630) - Support underscored harmony flags ([@dominicbarnes](https://github.com/dominicbarnes)) -- [#1718](https://github.com/mochajs/mocha/issues/1718) - Support more harmony flags ([@slyg](https://github.com/slyg)) -- [#1689](https://github.com/mochajs/mocha/issues/1689) - Add stack to JSON-stream reporter ([@jonathandelgado](https://github.com/jonathandelgado)) -- [#1654](https://github.com/mochajs/mocha/issues/1654) - Fix `ReferenceError` "location is not defined" ([@jakemmarsh](https://github.com/jakemmarsh)) - -# 2.2.5 / 2015-05-14 - -- [#1699](https://github.com/mochajs/mocha/issues/1699) - Upgrade jsdiff to v1.4.0 ([@nylen](https://github.com/nylen)) -- [#1648](https://github.com/mochajs/mocha/issues/1648) - fix diff background colors in the console ([@nylen](https://github.com/nylen)) -- [#1327](https://github.com/mochajs/mocha/issues/1327) - fix tests running twice, a regression issue. ([#1686](https://github.com/mochajs/mocha/issues/1686), [@danielstjules](https://github.com/danielstjules)) -- [#1675](https://github.com/mochajs/mocha/issues/1675) - add integration tests ([@danielstjules](https://github.com/danielstjules)) -- [#1682](https://github.com/mochajs/mocha/issues/1682) - use a valid SPDX license identifier in package.json ([@kemitchell](https://github.com/kemitchell)) -- [#1660](https://github.com/mochajs/mocha/issues/1660) - fix assertion of invalid dates ([#1661](https://github.com/mochajs/mocha/issues/1661), [@a8m](https://github.com/a8m)) -- [#1241](https://github.com/mochajs/mocha/issues/1241) - fix issue with multiline diffs appearing as single line ([#1655](https://github.com/mochajs/mocha/issues/1655), [@a8m](https://github.com/a8m)) - -# 2.2.4 / 2015-04-08 - -- Load mocha.opts in \_mocha for now (close [#1645](https://github.com/mochajs/mocha/issues/1645)) - -# 2.2.3 / 2015-04-07 - -- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) -- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) -- fix(reporter/base): don't show diffs for errors without expectation -- fix(reporter/base): don't assume error message is first line of stack -- improve: dry up reporter/base test -- fix(reporter/base): explicitly ignore showDiff [#1614](https://github.com/mochajs/mocha/issues/1614) -- Add iojs to travis build -- Pass `--allow-natives-syntax` flag to node. -- Support --harmony_classes flag for io.js -- Fix 1556: Update utils.clean to handle newlines in func declarations -- Fix 1606: fix err handling in IE <= 8 and non-ES5 browsers -- Fix 1585: make \_mocha executable again -- chore(package.json): add a8m as a contributor -- Fixed broken link on html-cov reporter -- support --es_staging flag -- fix issue where menu overlaps content. -- update contributors in package.json -- Remove trailing whitespace from reporter output -- Remove contributors list from readme -- log third-party reporter errors -- [Fix] Exclude not own properties when looping on options -- fix: support node args in mocha.opts (close [#1573](https://github.com/mochajs/mocha/issues/1573)) -- fix(reporter/base): string diff - issue [#1241](https://github.com/mochajs/mocha/issues/1241) - -# 2.2.1 / 2015-03-09 - -- Fix passing of args intended for node/iojs. - -# 2.2.0 / 2015-03-06 - -- Update mocha.js -- Add --fgrep. Use grep for RegExp, fgrep for str -- Ignore async global errors after spec resolution -- Fixing errors that prevent mocha.js from loading in the browser - fixes [#1558](https://github.com/mochajs/mocha/issues/1558) -- fix(utils): issue [#1558](https://github.com/mochajs/mocha/issues/1558) + make -- add ability to delay root suite; closes [#362](https://github.com/mochajs/mocha/issues/362), closes [#1124](https://github.com/mochajs/mocha/issues/1124) -- fix insanity in http tests -- update travis: add node 0.12, add gitter, remove slack -- building -- resolve [#1548](https://github.com/mochajs/mocha/issues/1548): ensure the environment's "node" executable is used -- reporters/base: use supports-color to detect colorable term -- travis: use docker containers -- small fix: commander option for --expose-gc -- Ignore asynchronous errors after global failure -- Improve error output when a test fails with a non-error -- updated travis badge, uses svg instead of img -- Allow skip from test context for [#332](https://github.com/mochajs/mocha/issues/332) -- [JSHINT] Unnecessary semicolon fixed in bin/\_mocha -- Added a reminder about the done() callback to test timeout error messages -- fixes [#1496](https://github.com/mochajs/mocha/issues/1496), in Mocha.run(fn), check if fn exists before executing it, added tests too -- Add Harmony Proxy flag for iojs -- test(utils|ms|\*): test existing units -- add support for some iojs flags -- fix(utils.stringify): issue [#1229](https://github.com/mochajs/mocha/issues/1229), diff viewer -- Remove slack link -- Prevent multiple 'grep=' querystring params in html reporter -- Use grep as regexp (close [#1381](https://github.com/mochajs/mocha/issues/1381)) -- utils.stringify should handle objects without an Object prototype -- in runnable test, comparing to undefined error's message rather than a literal -- Fix test running output truncation on async STDIO -- amended for deprecated customFds option in child_process - -# 2.1.0 / 2014-12-23 - -- showDiff: don’t stringify strings -- Clean up unused module dependencies. -- Filter zero-length strings from mocha.opts -- only write to stdout in reporters -- Revert "only write to stdout in reporters" -- Print colored output only to a tty -- update summary in README.md -- rename Readme.md/History.md to README.md/HISTORY.md because neurotic -- add .mailmap to fix "git shortlog" or "git summary" output -- fixes [#1461](https://github.com/mochajs/mocha/issues/1461): nyan-reporter now respects Base.useColors, fixed bug where Base.color would not return a string when str wasn't a string. -- Use existing test URL builder in failed replay links -- modify .travis.yml: use travis_retry; closes [#1449](https://github.com/mochajs/mocha/issues/1449) -- fix -t 0 behavior; closes [#1446](https://github.com/mochajs/mocha/issues/1446) -- fix tests (whoops) -- improve diff behavior -- Preserve pathname when linking to individual tests -- Fix test -- Tiny typo in comments fixed -- after hooks now being called on failed tests when using bail, fixes [#1093](https://github.com/mochajs/mocha/issues/1093) -- fix throwing undefined/null now makes tests fail, fixes [#1395](https://github.com/mochajs/mocha/issues/1395) -- compiler extensions are added as watched extensions, removed non-standard extensions from watch regex, resolves [#1221](https://github.com/mochajs/mocha/issues/1221) -- prefix/namespace for suite titles in markdown reporter, fixes [#554](https://github.com/mochajs/mocha/issues/554) -- fix more bad markdown in CONTRIBUTING.md -- fix bad markdown in CONTRIBUTING.md -- add setImmediate/clearImmediate to globals; closes [#1435](https://github.com/mochajs/mocha/issues/1435) -- Fix buffer diffs (closes [#1132](https://github.com/mochajs/mocha/issues/1132), closes [#1433](https://github.com/mochajs/mocha/issues/1433)) -- add a CONTRIBUTING.md. closes [#882](https://github.com/mochajs/mocha/issues/882) -- fix intermittent build failures (maybe). closes [#1407](https://github.com/mochajs/mocha/issues/1407) -- add Slack notification to .travis.yml -- Fix slack link -- Add slack room to readme -- Update maintainers -- update maintainers and contributors -- resolves [#1393](https://github.com/mochajs/mocha/issues/1393): kill children with more effort on SIGINT -- xunit reporter support for optionally writing to a file -- if a reporter has a .done method, call it before exiting -- add support for reporter options -- only write to stdout in reporters - -# 2.0.0 / 2014-10-21 - -- remove: support for node 0.6.x, 0.4.x -- fix: landing reporter with non ansi characters ([#211](https://github.com/mochajs/mocha/issues/211)) -- fix: html reporter - preserve query params when navigating to suites/tests ([#1358](https://github.com/mochajs/mocha/issues/1358)) -- fix: json stream reporter add error message to failed test -- fix: fixes for visionmedia -> mochajs -- fix: use stdio, fixes node deprecation warnings ([#1391](https://github.com/mochajs/mocha/issues/1391)) - -# 1.21.5 / 2014-10-11 - -- fix: build for NodeJS v0.6.x -- fix: do not attempt to highlight syntax when non-HTML reporter is used -- update: escape-string-regexp to 1.0.2. -- fix: botched indentation in canonicalize() -- fix: .gitignore: ignore .patch and .diff files -- fix: changed 'Catched' to 'Caught' in uncaught exception error handler messages -- add: `pending` field for json reporter -- fix: Runner.prototype.uncaught: don't double-end runnables that already have a state. -- fix: --recursive, broken by [`f0facd2`](https://github.com/mochajs/mocha/commit/f0facd2e) -- update: replaces escapeRegexp with the escape-string-regexp package. -- update: commander to 2.3.0. -- update: diff to 1.0.8. -- fix: ability to disable syntax highlighting ([#1329](https://github.com/mochajs/mocha/issues/1329)) -- fix: added empty object to errorJSON() call to catch when no error is present -- fix: never time out after calling enableTimeouts(false) -- fix: timeout(0) will work at suite level ([#1300](https://github.com/mochajs/mocha/issues/1300)) -- Fix for --watch+only() issue ([#888](https://github.com/mochajs/mocha/issues/888) ) -- fix: respect err.showDiff, add Base reporter test ([#810](https://github.com/mochajs/mocha/issues/810)) - -# 1.22.1-3 / 2014-07-27 - -- fix: disabling timeouts with this.timeout(0) ([#1301](https://github.com/mochajs/mocha/issues/1301)) - -# 1.22.1-3 / 2014-07-27 - -- fix: local uis and reporters ([#1288](https://github.com/mochajs/mocha/issues/1288)) -- fix: building 1.21.0's changes in the browser ([#1284](https://github.com/mochajs/mocha/issues/1284)) - -# 1.21.0 / 2014-07-23 - -- add: --no-timeouts option ([#1262](https://github.com/mochajs/mocha/issues/1262), [#1268](https://github.com/mochajs/mocha/issues/1268)) -- add: --\*- deprecation node flags ([#1217](https://github.com/mochajs/mocha/issues/1217)) -- add: --watch-extensions argument ([#1247](https://github.com/mochajs/mocha/issues/1247)) -- change: spec reporter is default ([#1228](https://github.com/mochajs/mocha/issues/1228)) -- fix: diff output showing incorrect +/- ([#1182](https://github.com/mochajs/mocha/issues/1182)) -- fix: diffs of circular structures ([#1179](https://github.com/mochajs/mocha/issues/1179)) -- fix: re-render the progress bar when progress has changed only ([#1151](https://github.com/mochajs/mocha/issues/1151)) -- fix support for environments with global and window ([#1159](https://github.com/mochajs/mocha/issues/1159)) -- fix: reverting to previously defined onerror handler ([#1178](https://github.com/mochajs/mocha/issues/1178)) -- fix: stringify non error objects passed to done() ([#1270](https://github.com/mochajs/mocha/issues/1270)) -- fix: using local ui, reporters ([#1267](https://github.com/mochajs/mocha/issues/1267)) -- fix: cleaning es6 arrows ([#1176](https://github.com/mochajs/mocha/issues/1176)) -- fix: don't include attrs in failure tag for xunit ([#1244](https://github.com/mochajs/mocha/issues/1244)) -- fix: fail tests that return a promise if promise is rejected w/o a reason ([#1224](https://github.com/mochajs/mocha/issues/1224)) -- fix: showing failed tests in doc reporter ([#1117](https://github.com/mochajs/mocha/issues/1117)) -- fix: dot reporter dots being off ([#1204](https://github.com/mochajs/mocha/issues/1204)) -- fix: catch empty throws ([#1219](https://github.com/mochajs/mocha/issues/1219)) -- fix: honoring timeout for sync operations ([#1242](https://github.com/mochajs/mocha/issues/1242)) -- update: growl to 1.8.0 - -# 1.20.1 / 2014-06-03 - -- update: should dev dependency to ~4.0.0 ([#1231](https://github.com/mochajs/mocha/issues/1231)) - -# 1.20.0 / 2014-05-28 - -- add: filenames to suite objects ([#1222](https://github.com/mochajs/mocha/issues/1222)) - -# 1.19.0 / 2014-05-17 - -- add: browser script option to package.json -- add: export file in Mocha.Test objects ([#1174](https://github.com/mochajs/mocha/issues/1174)) -- add: add docs for wrapped node flags -- fix: mocha.run() to return error status in browser ([#1216](https://github.com/mochajs/mocha/issues/1216)) -- fix: clean() to show failure details ([#1205](https://github.com/mochajs/mocha/issues/1205)) -- fix: regex that generates html for new keyword ([#1201](https://github.com/mochajs/mocha/issues/1201)) -- fix: sibling suites have inherited but separate contexts ([#1164](https://github.com/mochajs/mocha/issues/1164)) - -# 1.18.2 / 2014-03-18 - -- fix: html runner was prevented from using #mocha as the default root el ([#1162](https://github.com/mochajs/mocha/issues/1162)) - -# 1.18.1 / 2014-03-18 - -- fix: named before/after hooks in bdd, tdd, qunit interfaces ([#1161](https://github.com/mochajs/mocha/issues/1161)) - -# 1.18.0 / 2014-03-13 - -- add: promise support ([#329](https://github.com/mochajs/mocha/issues/329)) -- add: named before/after hooks ([#966](https://github.com/mochajs/mocha/issues/966)) - -# 1.17.1 / 2014-01-22 - -- fix: expected messages in should.js (should.js#168) -- fix: expect errno global in node versions < v0.9.11 ([#1111](https://github.com/mochajs/mocha/issues/1111)) -- fix: unreliable checkGlobals optimization ([#1110](https://github.com/mochajs/mocha/issues/1110)) - -# 1.17.0 / 2014-01-09 - -- add: able to require globals (describe, it, etc.) through mocha ([#1077](https://github.com/mochajs/mocha/issues/1077)) -- fix: abort previous run on --watch change ([#1100](https://github.com/mochajs/mocha/issues/1100)) -- fix: reset context for each --watch triggered run ([#1099](https://github.com/mochajs/mocha/issues/1099)) -- fix: error when cli can't resolve path or pattern ([#799](https://github.com/mochajs/mocha/issues/799)) -- fix: canonicalize objects before stringifying and diffing them ([#1079](https://github.com/mochajs/mocha/issues/1079)) -- fix: make CR call behave like carriage return for non tty ([#1087](https://github.com/mochajs/mocha/issues/1087)) - -# 1.16.2 / 2013-12-23 - -- fix: couple issues with ie 8 ([#1082](https://github.com/mochajs/mocha/issues/1082), [#1081](https://github.com/mochajs/mocha/issues/1081)) -- fix: issue running the xunit reporter in browsers ([#1068](https://github.com/mochajs/mocha/issues/1068)) -- fix: issue with firefox < 3.5 ([#725](https://github.com/mochajs/mocha/issues/725)) - -# 1.16.1 / 2013-12-19 - -- fix: recompiled for missed changes from the last release - -# 1.16.0 / 2013-12-19 - -- add: Runnable.globals(arr) for per test global whitelist ([#1046](https://github.com/mochajs/mocha/issues/1046)) -- add: mocha.throwError(err) for assertion libs to call ([#985](https://github.com/mochajs/mocha/issues/985)) -- remove: --watch's spinner ([#806](https://github.com/mochajs/mocha/issues/806)) -- fix: duplicate test output for multi-line specs in spec reporter ([#1006](https://github.com/mochajs/mocha/issues/1006)) -- fix: gracefully exit on SIGINT ([#1063](https://github.com/mochajs/mocha/issues/1063)) -- fix expose the specified ui only in the browser ([#984](https://github.com/mochajs/mocha/issues/984)) -- fix: ensure process exit code is preserved when using --no-exit ([#1059](https://github.com/mochajs/mocha/issues/1059)) -- fix: return true from window.onerror handler ([#868](https://github.com/mochajs/mocha/issues/868)) -- fix: xunit reporter to use process.stdout.write ([#1068](https://github.com/mochajs/mocha/issues/1068)) -- fix: utils.clean(str) indentation ([#761](https://github.com/mochajs/mocha/issues/761)) -- fix: xunit reporter returning test duration a NaN ([#1039](https://github.com/mochajs/mocha/issues/1039)) - -# 1.15.1 / 2013-12-03 - -- fix: recompiled for missed changes from the last release - -# 1.15.0 / 2013-12-02 - -- add: `--no-exit` to prevent `process.exit()` ([#1018](https://github.com/mochajs/mocha/issues/1018)) -- fix: using inline diffs ([#1044](https://github.com/mochajs/mocha/issues/1044)) -- fix: show pending test details in xunit reporter ([#1051](https://github.com/mochajs/mocha/issues/1051)) -- fix: faster global leak detection ([#1024](https://github.com/mochajs/mocha/issues/1024)) -- fix: yui compression ([#1035](https://github.com/mochajs/mocha/issues/1035)) -- fix: wrapping long lines in test results ([#1030](https://github.com/mochajs/mocha/issues/1030), [#1031](https://github.com/mochajs/mocha/issues/1031)) -- fix: handle errors in hooks ([#1043](https://github.com/mochajs/mocha/issues/1043)) - -# 1.14.0 / 2013-11-02 - -- add: unified diff ([#862](https://github.com/mochajs/mocha/issues/862)) -- add: set MOCHA_COLORS env var to use colors ([#965](https://github.com/mochajs/mocha/issues/965)) -- add: able to override tests links in html reporters ([#776](https://github.com/mochajs/mocha/issues/776)) -- remove: teamcity reporter ([#954](https://github.com/mochajs/mocha/issues/954)) -- update: commander dependency to 2.0.0 ([#1010](https://github.com/mochajs/mocha/issues/1010)) -- fix: mocha --ui will try to require the ui if not built in, as --reporter does ([#1022](https://github.com/mochajs/mocha/issues/1022)) -- fix: send cursor commands only if isatty ([#184](https://github.com/mochajs/mocha/issues/184), [#1003](https://github.com/mochajs/mocha/issues/1003)) -- fix: include assertion message in base reporter ([#993](https://github.com/mochajs/mocha/issues/993), [#991](https://github.com/mochajs/mocha/issues/991)) -- fix: consistent return of it, it.only, and describe, describe.only ([#840](https://github.com/mochajs/mocha/issues/840)) - -# 1.13.0 / 2013-09-15 - -- add: sort test files with --sort ([#813](https://github.com/mochajs/mocha/issues/813)) -- update: diff dependency to 1.0.7 -- update: glob dependency to 3.2.3 ([#927](https://github.com/mochajs/mocha/issues/927)) -- fix: diffs show whitespace differences ([#976](https://github.com/mochajs/mocha/issues/976)) -- fix: improve global leaks ([#783](https://github.com/mochajs/mocha/issues/783)) -- fix: firefox window.getInterface leak -- fix: accessing iframe via window[iframeIndex] leak -- fix: faster global leak checking -- fix: reporter pending css selector ([#970](https://github.com/mochajs/mocha/issues/970)) - -# 1.12.1 / 2013-08-29 - -- remove test.js from .gitignore -- update included version of ms.js - -# 1.12.0 / 2013-07-01 - -- add: prevent diffs for differing types. Closes [#900](https://github.com/mochajs/mocha/issues/900) -- add `Mocha.process` hack for phantomjs -- fix: use compilers with requires -- fix regexps in diffs. Closes [#890](https://github.com/mochajs/mocha/issues/890) -- fix xunit NaN on failure. Closes [#894](https://github.com/mochajs/mocha/issues/894) -- fix: strip tab indentation in `clean` utility method -- fix: textmate bundle installation - -# 1.11.0 / 2013-06-12 - -- add --prof support -- add --harmony support -- add --harmony-generators support -- add "Uncaught " prefix to uncaught exceptions -- add web workers support -- add `suite.skip()` -- change to output # of pending / passing even on failures. Closes [#872](https://github.com/mochajs/mocha/issues/872) -- fix: prevent hooks from being called if we are bailing -- fix `this.timeout(0)` - -# 1.10.0 / 2013-05-21 - -- add add better globbing support for windows via `glob` module -- add support to pass through flags such as --debug-brk=1234. Closes [#852](https://github.com/mochajs/mocha/issues/852) -- add test.only, test.skip to qunit interface -- change to always use word-based diffs for now. Closes [#733](https://github.com/mochajs/mocha/issues/733) -- change `mocha init` tests.html to index.html -- fix `process` global leak in the browser -- fix: use resolve() instead of join() for --require -- fix: filterLeaks() condition to not consider indices in global object as leaks -- fix: restrict mocha.css styling to #mocha id -- fix: save timer references to avoid Sinon interfering in the browser build. - -# 1.9.0 / 2013-04-03 - -- add improved setImmediate implementation -- replace --ignore-leaks with --check-leaks -- change default of ignoreLeaks to true. Closes [#791](https://github.com/mochajs/mocha/issues/791) -- remove scrolling for HTML reporter -- fix retina support -- fix tmbundle, restrict to js scope - -# 1.8.2 / 2013-03-11 - -- add `setImmediate` support for 0.10.x -- fix mocha -w spinner on windows - -# 1.8.1 / 2013-01-09 - -- fix .bail() arity check causing it to default to true - -# 1.8.0 / 2013-01-08 - -- add Mocha() options bail support -- add `Mocha#bail()` method -- add instanceof check back for inheriting from Error -- add component.json -- add diff.js to browser build -- update growl -- fix TAP reporter failures comment :D - -# 1.7.4 / 2012-12-06 - -- add total number of passes and failures to TAP -- remove .bind() calls. re [#680](https://github.com/mochajs/mocha/issues/680) -- fix indexOf. Closes [#680](https://github.com/mochajs/mocha/issues/680) - -# 1.7.3 / 2012-11-30 - -- fix uncaught error support for the browser -- revert uncaught "fix" which breaks node - -# 1.7.2 / 2012-11-28 - -- fix uncaught errors to expose the original error message - -# 1.7.0 / 2012-11-07 - -- add `--async-only` support to prevent false positives for missing `done()` -- add sorting by filename in code coverage -- add HTML 5 doctype to browser template. -- add play button to html reporter to rerun a single test -- add `this.timeout(ms)` as Suite#timeout(ms). Closes [#599](https://github.com/mochajs/mocha/issues/599) -- update growl dependency to 1.6.x -- fix encoding of test-case ?grep. Closes [#637](https://github.com/mochajs/mocha/issues/637) -- fix unicode chars on windows -- fix dom globals in Opera/IE. Closes [#243](https://github.com/mochajs/mocha/issues/243) -- fix markdown reporter a tags -- fix `this.timeout("5s")` support - -# 1.6.0 / 2012-10-02 - -- add object diffs when `err.showDiff` is present -- add hiding of empty suites when pass/failures are toggled -- add faster `.length` checks to `checkGlobals()` before performing the filter - -# 1.5.0 / 2012-09-21 - -- add `ms()` to `.slow()` and `.timeout()` -- add `Mocha#checkLeaks()` to re-enable global leak checks -- add `this.slow()` option [aheckmann] -- add tab, CR, LF to error diffs for now -- add faster `.checkGlobals()` solution [guille] -- remove `fn.call()` from reduce util -- remove `fn.call()` from filter util -- fix forEach. Closes [#582](https://github.com/mochajs/mocha/issues/582) -- fix relaying of signals [TooTallNate] -- fix TAP reporter grep number - -# 1.4.2 / 2012-09-01 - -- add support to multiple `Mocha#globals()` calls, and strings -- add `mocha.reporter()` constructor support [jfirebaugh] -- add `mocha.timeout()` -- move query-string parser to utils.js -- move highlight code to utils.js -- fix third-party reporter support [exogen] -- fix client-side API to match node-side [jfirebaugh] -- fix mocha in iframe [joliss] - -# 1.4.1 / 2012-08-28 - -- add missing `Markdown` export -- fix `Mocha#grep()`, escape regexp strings -- fix reference error when `devicePixelRatio` is not defined. Closes [#549](https://github.com/mochajs/mocha/issues/549) - -# 1.4.0 / 2012-08-22 - -- add mkdir -p to `mocha init`. Closes [#539](https://github.com/mochajs/mocha/issues/539) -- add `.only()`. Closes [#524](https://github.com/mochajs/mocha/issues/524) -- add `.skip()`. Closes [#524](https://github.com/mochajs/mocha/issues/524) -- change str.trim() to use utils.trim(). Closes [#533](https://github.com/mochajs/mocha/issues/533) -- fix HTML progress indicator retina display -- fix url-encoding of click-to-grep HTML functionality - -# 1.3.2 / 2012-08-01 - -- fix exports double-execution regression. Closes [#531](https://github.com/mochajs/mocha/issues/531) - -# 1.3.1 / 2012-08-01 - -- add passes/failures toggling to HTML reporter -- add pending state to `xit()` and `xdescribe()` [Brian Moore] -- add the [**@charset**](https://github.com/charset) "UTF-8"; to fix [#522](https://github.com/mochajs/mocha/issues/522) with FireFox. [Jonathan Creamer] -- add border-bottom to #stats links -- add check for runnable in `Runner#uncaught()`. Closes [#494](https://github.com/mochajs/mocha/issues/494) -- add 0.4 and 0.6 back to travis.yml -- add `-E, --growl-errors` to growl on failures only -- add prefixes to debug() names. Closes [#497](https://github.com/mochajs/mocha/issues/497) -- add `Mocha#invert()` to js api -- change dot reporter to use sexy unicode dots -- fix error when clicking pending test in HTML reporter -- fix `make tm` - -# 1.3.0 / 2012-07-05 - -- add window scrolling to `HTML` reporter -- add v8 `--trace-*` option support -- add support for custom reports via `--reporter MODULE` -- add `--invert` switch to invert `--grep` matches -- fix export of `Nyan` reporter. Closes [#495](https://github.com/mochajs/mocha/issues/495) -- fix escaping of `HTML` suite titles. Closes [#486](https://github.com/mochajs/mocha/issues/486) -- fix `done()` called multiple times with an error test -- change `--grep` - regexp escape the input - -# 1.2.2 / 2012-06-28 - -- Added 0.8.0 support - -# 1.2.1 / 2012-06-25 - -- Added `this.test.error(err)` support to after each hooks. Closes [#287](https://github.com/mochajs/mocha/issues/287) -- Added: export top-level suite on global mocha object (mocha.suite). Closes [#448](https://github.com/mochajs/mocha/issues/448) -- Fixed `js` code block format error in markdown reporter -- Fixed deprecation warning when using `path.existsSync` -- Fixed --globals with wildcard -- Fixed chars in nyan when his head moves back -- Remove `--growl` from test/mocha.opts. Closes [#289](https://github.com/mochajs/mocha/issues/289) - -# 1.2.0 / 2012-06-17 - -- Added `nyan` reporter [Atsuya Takagi] -- Added `mocha init ` to copy client files -- Added "specify" synonym for "it" [domenic] -- Added global leak wildcard support [nathanbowser] -- Fixed runner emitter leak. closes [#432](https://github.com/mochajs/mocha/issues/432) -- Fixed omission of .js extension. Closes [#454](https://github.com/mochajs/mocha/issues/454) - -# 1.1.0 / 2012-05-30 - -- Added: check each `mocha(1)` arg for directories to walk -- Added `--recursive` [tricknotes] -- Added `context` for BDD [hokaccha] -- Added styling for new clickable titles -- Added clickable suite titles to HTML reporter -- Added warning when strings are thrown as errors -- Changed: green arrows again in HTML reporter styling -- Changed ul/li elements instead of divs for better copy-and-pasting [joliss] -- Fixed issue [#325](https://github.com/mochajs/mocha/issues/325) - add better grep support to js api -- Fixed: save timer references to avoid Sinon interfering. - -# 1.0.3 / 2012-04-30 - -- Fixed string diff newlines -- Fixed: removed mocha.css target. Closes [#401](https://github.com/mochajs/mocha/issues/401) - -# 1.0.2 / 2012-04-25 - -- Added HTML reporter duration. Closes [#47](https://github.com/mochajs/mocha/issues/47) -- Fixed: one postMessage event listener [exogen] -- Fixed: allow --globals to be used multiple times. Closes [#100](https://github.com/mochajs/mocha/issues/100) [brendannee] -- Fixed [#158](https://github.com/mochajs/mocha/issues/158): removes jquery include from browser tests -- Fixed grep. Closes [#372](https://github.com/mochajs/mocha/issues/372) [brendannee] -- Fixed [#166](https://github.com/mochajs/mocha/issues/166) - When grepping don't display the empty suites -- Removed test/browser/style.css. Closes [#385](https://github.com/mochajs/mocha/issues/385) - -# 1.0.1 / 2012-04-04 - -- Fixed `.timeout()` in hooks -- Fixed: allow callback for `mocha.run()` in client version -- Fixed browser hook error display. Closes [#361](https://github.com/mochajs/mocha/issues/361) - -# 1.0.0 / 2012-03-24 - -- Added js API. Closes [#265](https://github.com/mochajs/mocha/issues/265) -- Added: initial run of tests with `--watch`. Closes [#345](https://github.com/mochajs/mocha/issues/345) -- Added: mark `location` as a global on the CS. Closes [#311](https://github.com/mochajs/mocha/issues/311) -- Added `markdown` reporter (github flavour) -- Added: scrolling menu to coverage.html. Closes [#335](https://github.com/mochajs/mocha/issues/335) -- Added source line to html report for Safari [Tyson Tate] -- Added "min" reporter, useful for `--watch` [Jakub Nešetřil] -- Added support for arbitrary compilers via . Closes [#338](https://github.com/mochajs/mocha/issues/338) [Ian Young] -- Added Teamcity export to lib/reporters/index [Michael Riley] -- Fixed chopping of first char in error reporting. Closes [#334](https://github.com/mochajs/mocha/issues/334) [reported by topfunky] -- Fixed terrible FF / Opera stack traces - -# 0.14.1 / 2012-03-06 - -- Added lib-cov to _.npmignore_ -- Added reporter to `mocha.run([reporter])` as argument -- Added some margin-top to the HTML reporter -- Removed jQuery dependency -- Fixed `--watch`: purge require cache. Closes [#266](https://github.com/mochajs/mocha/issues/266) - -# 0.14.0 / 2012-03-01 - -- Added string diff support for terminal reporters - -# 0.13.0 / 2012-02-23 - -- Added preliminary test coverage support. Closes [#5](https://github.com/mochajs/mocha/issues/5) -- Added `HTMLCov` reporter -- Added `JSONCov` reporter [kunklejr] -- Added `xdescribe()` and `xit()` to the BDD interface. Closes [#263](https://github.com/mochajs/mocha/issues/263) (docs \* Changed: make json reporter output pretty json -- Fixed node-inspector support, swapped `--debug` for `debug` to match node. Closes [#247](https://github.com/mochajs/mocha/issues/247) - -# 0.12.1 / 2012-02-14 - -- Added `npm docs mocha` support [TooTallNate] -- Added a `Context` object used for hook and test-case this. Closes [#253](https://github.com/mochajs/mocha/issues/253) -- Fixed `Suite#clone()` `.ctx` reference. Closes [#262](https://github.com/mochajs/mocha/issues/262) - -# 0.12.0 / 2012-02-02 - -- Added .coffee `--watch` support. Closes [#242](https://github.com/mochajs/mocha/issues/242) -- Added support to `--require` files relative to the CWD. Closes [#241](https://github.com/mochajs/mocha/issues/241) -- Added quick n dirty syntax highlighting. Closes [#248](https://github.com/mochajs/mocha/issues/248) -- Changed: made HTML progress indicator smaller -- Fixed xunit errors attribute [dhendo] - -# 0.10.2 / 2012-01-21 - -- Fixed suite count in reporter stats. Closes [#222](https://github.com/mochajs/mocha/issues/222) -- Fixed `done()` after timeout error reporting [Phil Sung] -- Changed the 0-based errors to 1 - -# 0.10.1 / 2012-01-17 - -- Added support for node 0.7.x -- Fixed absolute path support. Closes [#215](https://github.com/mochajs/mocha/issues/215) [kompiro] -- Fixed `--no-colors` option [Jussi Virtanen] -- Fixed Arial CSS typo in the correct file - -# 0.10.0 / 2012-01-13 - -- Added `-b, --bail` to exit on first exception [guillermo] -- Added support for `-gc` / `--expose-gc` [TooTallNate] -- Added `qunit`-inspired interface -- Added MIT LICENSE. Closes [#194](https://github.com/mochajs/mocha/issues/194) -- Added: `--watch` all .js in the CWD. Closes [#139](https://github.com/mochajs/mocha/issues/139) -- Fixed `self.test` reference in runner. Closes [#189](https://github.com/mochajs/mocha/issues/189) -- Fixed double reporting of uncaught exceptions after timeout. Closes [#195](https://github.com/mochajs/mocha/issues/195) - -# 0.8.2 / 2012-01-05 - -- Added test-case context support. Closes [#113](https://github.com/mochajs/mocha/issues/113) -- Fixed exit status. Closes [#187](https://github.com/mochajs/mocha/issues/187) -- Update commander. Closes [#190](https://github.com/mochajs/mocha/issues/190) - -# 0.8.1 / 2011-12-30 - -- Fixed reporting of uncaught exceptions. Closes [#183](https://github.com/mochajs/mocha/issues/183) -- Fixed error message defaulting [indutny] -- Changed mocha(1) from bash to node for windows [Nathan Rajlich] - -# 0.8.0 / 2011-12-28 - -- Added `XUnit` reporter [FeeFighters/visionmedia] -- Added `say(1)` notification support [Maciej Małecki] -- Changed: fail when done() is invoked with a non-Error. Closes [#171](https://github.com/mochajs/mocha/issues/171) -- Fixed `err.stack`, defaulting to message. Closes [#180](https://github.com/mochajs/mocha/issues/180) -- Fixed: `make tm` mkdir -p the dest. Closes [#137](https://github.com/mochajs/mocha/issues/137) -- Fixed mocha(1) --help bin name -- Fixed `-d` for `--debug` support - -# 0.7.1 / 2011-12-22 - -- Removed `mocha-debug(1)`, use `mocha --debug` -- Fixed CWD relative requires -- Fixed growl issue on windows [Raynos] -- Fixed: platform specific line endings [TooTallNate] -- Fixed: escape strings in HTML reporter. Closes [#164](https://github.com/mochajs/mocha/issues/164) - -# 0.7.0 / 2011-12-18 - -- Added support for IE{7,8} [guille] -- Changed: better browser nextTick implementation [guille] - -# 0.6.0 / 2011-12-18 - -- Added setZeroTimeout timeout for browser (nicer stack traces). Closes [#153](https://github.com/mochajs/mocha/issues/153) -- Added "view source" on hover for HTML reporter to make it obvious -- Changed: replace custom growl with growl lib -- Fixed duplicate reporting for HTML reporter. Closes [#154](https://github.com/mochajs/mocha/issues/154) -- Fixed silent hook errors in the HTML reporter. Closes [#150](https://github.com/mochajs/mocha/issues/150) - -# 0.5.0 / 2011-12-14 - -- Added: push node_modules directory onto module.paths for relative require Closes [#93](https://github.com/mochajs/mocha/issues/93) -- Added teamcity reporter [blindsey] -- Fixed: recover from uncaught exceptions for tests. Closes [#94](https://github.com/mochajs/mocha/issues/94) -- Fixed: only emit "test end" for uncaught within test, not hook - -# 0.4.0 / 2011-12-14 - -- Added support for test-specific timeouts via `this.timeout(0)`. Closes [#134](https://github.com/mochajs/mocha/issues/134) -- Added guillermo's client-side EventEmitter. Closes [#132](https://github.com/mochajs/mocha/issues/132) -- Added progress indicator to the HTML reporter -- Fixed slow browser tests. Closes [#135](https://github.com/mochajs/mocha/issues/135) -- Fixed "suite" color for light terminals -- Fixed `require()` leak spotted by [guillermo] - -# 0.3.6 / 2011-12-09 - -- Removed suite merging (for now) - -# 0.3.5 / 2011-12-08 - -- Added support for `window.onerror` [guillermo] -- Fixed: clear timeout on uncaught exceptions. Closes [#131](https://github.com/mochajs/mocha/issues/131) [guillermo] -- Added `mocha.css` to PHONY list. -- Added `mocha.js` to PHONY list. - -# 0.3.4 / 2011-12-08 - -- Added: allow `done()` to be called with non-Error -- Added: return Runner from `mocha.run()`. Closes [#126](https://github.com/mochajs/mocha/issues/126) -- Fixed: run afterEach even on failures. Closes [#125](https://github.com/mochajs/mocha/issues/125) -- Fixed clobbering of current runnable. Closes [#121](https://github.com/mochajs/mocha/issues/121) - -# 0.3.3 / 2011-12-08 - -- Fixed hook timeouts. Closes [#120](https://github.com/mochajs/mocha/issues/120) -- Fixed uncaught exceptions in hooks - -# 0.3.2 / 2011-12-05 - -- Fixed weird reporting when `err.message` is not present - -# 0.3.1 / 2011-12-04 - -- Fixed hook event emitter leak. Closes [#117](https://github.com/mochajs/mocha/issues/117) -- Fixed: export `Spec` constructor. Closes [#116](https://github.com/mochajs/mocha/issues/116) - -# 0.3.0 / 2011-12-04 - -- Added `-w, --watch`. Closes [#72](https://github.com/mochajs/mocha/issues/72) -- Added `--ignore-leaks` to ignore global leak checking -- Added browser `?grep=pattern` support -- Added `--globals ` to specify accepted globals. Closes [#99](https://github.com/mochajs/mocha/issues/99) -- Fixed `mocha-debug(1)` on some systems. Closes [#232](https://github.com/mochajs/mocha/issues/232) -- Fixed growl total, use `runner.total` - -# 0.2.0 / 2011-11-30 - -- Added `--globals ` to specify accepted globals. Closes [#99](https://github.com/mochajs/mocha/issues/99) -- Fixed funky highlighting of messages. Closes [#97](https://github.com/mochajs/mocha/issues/97) -- Fixed `mocha-debug(1)`. Closes [#232](https://github.com/mochajs/mocha/issues/232) -- Fixed growl total, use runner.total - -# 0.1.0 / 2011-11-29 - -- Added `suiteSetup` and `suiteTeardown` to TDD interface [David Henderson] -- Added growl icons. Closes [#84](https://github.com/mochajs/mocha/issues/84) -- Fixed coffee-script support - -# 0.0.8 / 2011-11-25 - -- Fixed: use `Runner#total` for accurate reporting - -# 0.0.7 / 2011-11-25 - -- Added `Hook` -- Added `Runnable` -- Changed: `Test` is `Runnable` -- Fixed global leak reporting in hooks -- Fixed: > 2 calls to done() only report the error once -- Fixed: clear timer on failure. Closes [#80](https://github.com/mochajs/mocha/issues/80) - -# 0.0.6 / 2011-11-25 - -- Fixed return on immediate async error. Closes [#80](https://github.com/mochajs/mocha/issues/80) - -# 0.0.5 / 2011-11-24 - -- Fixed: make mocha.opts whitespace less picky [kkaefer] - -# 0.0.4 / 2011-11-24 - -- Added `--interfaces` -- Added `--reporters` -- Added `-c, --colors`. Closes [#69](https://github.com/mochajs/mocha/issues/69) -- Fixed hook timeouts - -# 0.0.3 / 2011-11-23 - -- Added `-C, --no-colors` to explicitly disable -- Added coffee-script support - -# 0.0.2 / 2011-11-22 - -- Fixed global leak detection due to Safari bind() change -- Fixed: escape html entities in Doc reporter -- Fixed: escape html entities in HTML reporter -- Fixed pending test support for HTML reporter. Closes [#66](https://github.com/mochajs/mocha/issues/66) - -# 0.0.1 / 2011-11-22 - -- Added `--timeout` second shorthand support, ex `--timeout 3s`. -- Fixed "test end" event for uncaughtExceptions. Closes [#61](https://github.com/mochajs/mocha/issues/61) - -# 0.0.1-alpha6 / 2011-11-19 - -- Added travis CI support (needs enabling when public) -- Added preliminary browser support -- Added `make mocha.css` target. Closes [#45](https://github.com/mochajs/mocha/issues/45) -- Added stack trace to TAP errors. Closes [#52](https://github.com/mochajs/mocha/issues/52) -- Renamed tearDown to teardown. Closes [#49](https://github.com/mochajs/mocha/issues/49) -- Fixed: cascading hooksc. Closes [#30](https://github.com/mochajs/mocha/issues/30) -- Fixed some colors for non-tty -- Fixed errors thrown in sync test-cases due to nextTick -- Fixed Base.window.width... again give precedence to 0.6.x - -# 0.0.1-alpha5 / 2011-11-17 - -- Added `doc` reporter. Closes [#33](https://github.com/mochajs/mocha/issues/33) -- Added suite merging. Closes [#28](https://github.com/mochajs/mocha/issues/28) -- Added TextMate bundle and `make tm`. Closes [#20](https://github.com/mochajs/mocha/issues/20) - -# 0.0.1-alpha4 / 2011-11-15 - -- Fixed getWindowSize() for 0.4.x - -# 0.0.1-alpha3 / 2011-11-15 - -- Added `-s, --slow ` to specify "slow" test threshold -- Added `mocha-debug(1)` -- Added `mocha.opts` support. Closes [#31](https://github.com/mochajs/mocha/issues/31) -- Added: default [files] to _test/\*.js_ -- Added protection against multiple calls to `done()`. Closes [#35](https://github.com/mochajs/mocha/issues/35) -- Changed: bright yellow for slow Dot reporter tests - -# 0.0.1-alpha2 / 2011-11-08 - -- Missed this one :) - -# 0.0.1-alpha1 / 2011-11-08 - -- Initial release diff --git a/node_modules/mocha/LICENSE b/node_modules/mocha/LICENSE index 9ab23f68..5c622532 100644 --- a/node_modules/mocha/LICENSE +++ b/node_modules/mocha/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2011-2018 JS Foundation and contributors, https://js.foundation +Copyright (c) 2011-2022 OpenJS Foundation and contributors, https://openjsf.org 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/mocha/README.md b/node_modules/mocha/README.md index 81285196..0e5b677e 100644 --- a/node_modules/mocha/README.md +++ b/node_modules/mocha/README.md @@ -2,9 +2,20 @@ Mocha test framework

-

:coffee: Simple, flexible, fun JavaScript test framework for Node.js & The Browser :coffee:

+

☕️ Simple, flexible, fun JavaScript test framework for Node.js & The Browser ☕️

-

Build Status Coverage Status FOSSA Status Gitter OpenCollective OpenCollective +

+GitHub Actions Build Status +Coverage Status +FOSSA Status +Gitter +OpenCollective +OpenCollective +

+ +

+NPM Version +Node Version


Mocha Browser Support h/t SauceLabs

@@ -16,79 +27,33 @@ - [Code of Conduct](https://github.com/mochajs/mocha/blob/master/.github/CODE_OF_CONDUCT.md) - [Contributing](https://github.com/mochajs/mocha/blob/master/.github/CONTRIBUTING.md) - [Gitter Chatroom](https://gitter.im/mochajs/mocha) (ask questions here!) -- [Google Group](https://groups.google.com/group/mochajs) - [Issue Tracker](https://github.com/mochajs/mocha/issues) ## Backers -[Become a backer](https://opencollective.com/mochajs#backer) and show your support to our open source project. - -[![MochaJS Backer](https://opencollective.com/mochajs/backer/0/avatar)](https://opencollective.com/mochajs/backer/0/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/1/avatar)](https://opencollective.com/mochajs/backer/1/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/2/avatar)](https://opencollective.com/mochajs/backer/2/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/3/avatar)](https://opencollective.com/mochajs/backer/3/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/4/avatar)](https://opencollective.com/mochajs/backer/4/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/5/avatar)](https://opencollective.com/mochajs/backer/5/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/6/avatar)](https://opencollective.com/mochajs/backer/6/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/7/avatar)](https://opencollective.com/mochajs/backer/7/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/8/avatar)](https://opencollective.com/mochajs/backer/8/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/9/avatar)](https://opencollective.com/mochajs/backer/9/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/10/avatar)](https://opencollective.com/mochajs/backer/10/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/11/avatar)](https://opencollective.com/mochajs/backer/11/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/12/avatar)](https://opencollective.com/mochajs/backer/12/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/13/avatar)](https://opencollective.com/mochajs/backer/13/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/14/avatar)](https://opencollective.com/mochajs/backer/14/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/15/avatar)](https://opencollective.com/mochajs/backer/15/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/16/avatar)](https://opencollective.com/mochajs/backer/16/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/17/avatar)](https://opencollective.com/mochajs/backer/17/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/18/avatar)](https://opencollective.com/mochajs/backer/18/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/19/avatar)](https://opencollective.com/mochajs/backer/19/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/20/avatar)](https://opencollective.com/mochajs/backer/20/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/21/avatar)](https://opencollective.com/mochajs/backer/21/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/22/avatar)](https://opencollective.com/mochajs/backer/22/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/23/avatar)](https://opencollective.com/mochajs/backer/23/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/24/avatar)](https://opencollective.com/mochajs/backer/24/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/25/avatar)](https://opencollective.com/mochajs/backer/25/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/26/avatar)](https://opencollective.com/mochajs/backer/26/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/27/avatar)](https://opencollective.com/mochajs/backer/27/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/28/avatar)](https://opencollective.com/mochajs/backer/28/website) -[![MochaJS Backer](https://opencollective.com/mochajs/backer/29/avatar)](https://opencollective.com/mochajs/backer/29/website) +[Become a backer](https://opencollective.com/mochajs) and show your support to our open source project on [our site](https://mochajs.org/#backers). + + ## Sponsors -Does your company use Mocha? Ask your manager or marketing team if your company would be interested in supporting our project. Support will allow the maintainers to dedicate more time for maintenance and new features for everyone. Also, your company's logo will show [on GitHub](https://github.com/mochajs/mocha#readme) and on [our site](https://mochajs.org) - who doesn't want a little extra exposure? [Here's the info](https://opencollective.com/mochajs#sponsor). - -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/0/avatar)](https://opencollective.com/mochajs/sponsor/0/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/1/avatar)](https://opencollective.com/mochajs/sponsor/1/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/2/avatar)](https://opencollective.com/mochajs/sponsor/2/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/3/avatar)](https://opencollective.com/mochajs/sponsor/3/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/4/avatar)](https://opencollective.com/mochajs/sponsor/4/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/5/avatar)](https://opencollective.com/mochajs/sponsor/5/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/6/avatar)](https://opencollective.com/mochajs/sponsor/6/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/7/avatar)](https://opencollective.com/mochajs/sponsor/7/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/8/avatar)](https://opencollective.com/mochajs/sponsor/8/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/9/avatar)](https://opencollective.com/mochajs/sponsor/9/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/10/avatar)](https://opencollective.com/mochajs/sponsor/10/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/11/avatar)](https://opencollective.com/mochajs/sponsor/11/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/12/avatar)](https://opencollective.com/mochajs/sponsor/12/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/13/avatar)](https://opencollective.com/mochajs/sponsor/13/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/14/avatar)](https://opencollective.com/mochajs/sponsor/14/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/15/avatar)](https://opencollective.com/mochajs/sponsor/15/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/16/avatar)](https://opencollective.com/mochajs/sponsor/16/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/17/avatar)](https://opencollective.com/mochajs/sponsor/17/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/18/avatar)](https://opencollective.com/mochajs/sponsor/18/website) -[![MochaJS Backer](https://opencollective.com/mochajs/sponsor/19/avatar)](https://opencollective.com/mochajs/sponsor/19/website) +Does your company use Mocha? Ask your manager or marketing team if your company would be interested in supporting our project. Support will allow the maintainers to dedicate more time for maintenance and new features for everyone. Also, your company's logo will show [on GitHub](https://github.com/mochajs/mocha#readme) and on [our site](https://mochajs.org#sponsors) - who doesn't want a little extra exposure? [Here's the info](https://opencollective.com/mochajs). + +[![MochaJS Sponsor](https://opencollective.com/mochajs/tiers/sponsors/0/avatar)](https://opencollective.com/mochajs/tiers/sponsors/0/website) +[![MochaJS Sponsor](https://opencollective.com/mochajs/tiers/sponsors/1/avatar)](https://opencollective.com/mochajs/tiers/sponsors/1/website) +[![MochaJS Sponsor](https://opencollective.com/mochajs/tiers/sponsors/2/avatar)](https://opencollective.com/mochajs/tiers/sponsors/2/website) +[![MochaJS Sponsor](https://opencollective.com/mochajs/tiers/sponsors/3/avatar)](https://opencollective.com/mochajs/tiers/sponsors/3/website) ## Development You might want to know that: -- Mocha is the *most-depended-upon* module on npm (source: [libraries.io](https://libraries.io/search?order=desc&platforms=NPM&sort=dependents_count)), and -- Mocha is an *independent* open-source project, maintained exclusively by volunteers. +- Mocha is one of the _most-depended-upon_ modules on npm (source: [libraries.io](https://libraries.io/search?order=desc&platforms=NPM&sort=dependents_count)), and +- Mocha is an _independent_ open-source project, maintained exclusively by volunteers. You might want to help: -- New to contributing to Mocha? Check out this list of [good first issues](https://github.com/mochajs/mocha/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue) +- New to contributing to Mocha? Check out this list of [good first issues](https://github.com/mochajs/mocha/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue) - Mocha could use a hand with [these issues](https://github.com/mochajs/mocha/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) - The [maintainer's handbook](https://github.com/mochajs/mocha/blob/master/MAINTAINERS.md) explains how things get done @@ -100,6 +65,6 @@ Finally, come [chat with the maintainers](https://gitter.im/mochajs/contributors ## License -[MIT](LICENSE) +Copyright 2011-2022 OpenJS Foundation and contributors. Licensed [MIT](https://github.com/mochajs/mocha/blob/master/LICENSE). [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmochajs%2Fmocha.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmochajs%2Fmocha?ref=badge_large) diff --git a/node_modules/mocha/assets/growl/error.png b/node_modules/mocha/assets/growl/error.png deleted file mode 100644 index a07a1ba5..00000000 Binary files a/node_modules/mocha/assets/growl/error.png and /dev/null differ diff --git a/node_modules/mocha/assets/growl/ok.png b/node_modules/mocha/assets/growl/ok.png deleted file mode 100644 index b3623a59..00000000 Binary files a/node_modules/mocha/assets/growl/ok.png and /dev/null differ diff --git a/node_modules/mocha/bin/mocha b/node_modules/mocha/bin/mocha deleted file mode 100755 index df7cf48c..00000000 --- a/node_modules/mocha/bin/mocha +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -/** - * This wrapper executable checks for known node flags and appends them when found, - * before invoking the "real" executable (`lib/cli/cli.js`) - * - * @module bin/mocha - * @private - */ - -const {deprecate, warn} = require('../lib/utils'); -const {loadOptions} = require('../lib/cli/options'); -const { - unparseNodeFlags, - isNodeFlag, - impliesNoTimeouts -} = require('../lib/cli/node-flags'); -const unparse = require('yargs-unparser'); -const debug = require('debug')('mocha:cli:mocha'); -const {aliases} = require('../lib/cli/run-option-metadata'); -const nodeEnv = require('node-environment-flags'); - -const mochaArgs = {}; -const nodeArgs = {}; - -const opts = loadOptions(process.argv.slice(2)); -debug('loaded opts', opts); - -/** - * Given option/command `value`, disable timeouts if applicable - * @param {string} [value] - Value to check - * @ignore - */ -const disableTimeouts = value => { - if (impliesNoTimeouts(value)) { - debug(`option "${value}" disabled timeouts`); - mochaArgs.timeout = 0; - delete mochaArgs.timeouts; - delete mochaArgs.t; - } -}; - -/** - * If `value` begins with `v8-` and is not explicitly `v8-options`, remove prefix - * @param {string} [value] - Value to check - * @returns {string} `value` with prefix (maybe) removed - * @ignore - */ -const trimV8Option = value => - value !== 'v8-options' && /^v8-/.test(value) ? value.slice(3) : value; - -// sort options into "node" and "mocha" buckets -Object.keys(opts).forEach(opt => { - if (isNodeFlag(opt)) { - nodeArgs[trimV8Option(opt)] = opts[opt]; - disableTimeouts(opt); - } else { - mochaArgs[opt] = opts[opt]; - } -}); - -// Native debugger handling -// see https://nodejs.org/api/debugger.html#debugger_debugger -// look for 'debug' or 'inspect' that would launch this debugger, -// remove it from Mocha's opts and prepend it to Node's opts. -// also coerce depending on Node.js version. -// A deprecation warning will be printed by node, if applicable. -// (mochaArgs._ are "positional" arguments, not prefixed with - or --) -if (/^(debug|inspect)$/.test(mochaArgs._[0])) { - const command = mochaArgs._.shift(); - disableTimeouts(command); - // don't conflict with inspector - ['debug', 'inspect', 'debug-brk', 'inspect-brk'] - .filter(opt => opt in nodeArgs || opt in mochaArgs) - .forEach(opt => { - warn(`command "${command}" provided; --${opt} ignored`); - delete nodeArgs[opt]; - delete mochaArgs[opt]; - }); - nodeArgs._ = [ - parseInt( - process.version - .slice(1) - .split('.') - .shift(), - 10 - ) >= 8 - ? 'inspect' - : 'debug' - ]; -} - -// allow --debug to invoke --inspect on Node.js v8 or newer. -['debug', 'debug-brk'] - .filter(opt => opt in nodeArgs && !nodeEnv.has(opt)) - .forEach(opt => { - const newOpt = opt === 'debug' ? 'inspect' : 'inspect-brk'; - warn( - `"--${opt}" is not available in Node.js ${ - process.version - }; use "--${newOpt}" instead.` - ); - nodeArgs[newOpt] = nodeArgs[opt]; - mochaArgs.timeout = false; - debug(`--${opt} -> ${newOpt}`); - delete nodeArgs[opt]; - }); - -// historical -if (nodeArgs.gc) { - deprecate( - '"-gc" is deprecated and will be removed from a future version of Mocha. Use "--gc-global" instead.' - ); - nodeArgs['gc-global'] = nodeArgs.gc; - delete nodeArgs.gc; -} - -if (Object.keys(nodeArgs).length) { - const {spawn} = require('child_process'); - const mochaPath = require.resolve('../lib/cli/cli.js'); - - debug('final node args', nodeArgs); - - const args = [].concat( - unparseNodeFlags(nodeArgs), - mochaPath, - unparse(mochaArgs, {alias: aliases}) - ); - - debug(`exec ${process.execPath} w/ args:`, args); - - const proc = spawn(process.execPath, args, { - stdio: 'inherit' - }); - - proc.on('exit', (code, signal) => { - process.on('exit', () => { - if (signal) { - process.kill(process.pid, signal); - } else { - process.exit(code); - } - }); - }); - - // terminate children. - process.on('SIGINT', () => { - proc.kill('SIGINT'); // calls runner.abort() - proc.kill('SIGTERM'); // if that didn't work, we're probably in an infinite loop, so make it die. - }); -} else { - require('../lib/cli/cli').main(unparse(mochaArgs, {alias: aliases})); -} diff --git a/node_modules/mocha/bin/options.js b/node_modules/mocha/bin/options.js deleted file mode 100644 index 102fd5a9..00000000 --- a/node_modules/mocha/bin/options.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -/* - * This module is deprecated and will be removed in a future version of Mocha. - * @deprecated Deprecated in v6.0.0; source moved into {@link module:lib/cli/options lib/cli/options module}. - * @module - * @exports module:lib/cli/options - */ - -module.exports = require('../lib/cli/options'); diff --git a/node_modules/mocha/browser-entry.js b/node_modules/mocha/browser-entry.js index fd891177..67517db3 100644 --- a/node_modules/mocha/browser-entry.js +++ b/node_modules/mocha/browser-entry.js @@ -9,6 +9,8 @@ process.stdout = require('browser-stdout')({label: false}); +var parseQuery = require('./lib/browser/parse-query'); +var highlightTags = require('./lib/browser/highlight-tags'); var Mocha = require('./lib/mocha'); /** @@ -38,12 +40,12 @@ var originalOnerrorHandler = global.onerror; * Revert to original onerror handler if previously defined. */ -process.removeListener = function(e, fn) { +process.removeListener = function (e, fn) { if (e === 'uncaughtException') { if (originalOnerrorHandler) { global.onerror = originalOnerrorHandler; } else { - global.onerror = function() {}; + global.onerror = function () {}; } var i = uncaughtExceptionHandlers.indexOf(fn); if (i !== -1) { @@ -52,20 +54,38 @@ process.removeListener = function(e, fn) { } }; +/** + * Implements listenerCount for 'uncaughtException'. + */ + +process.listenerCount = function (name) { + if (name === 'uncaughtException') { + return uncaughtExceptionHandlers.length; + } + return 0; +}; + /** * Implements uncaughtException listener. */ -process.on = function(e, fn) { +process.on = function (e, fn) { if (e === 'uncaughtException') { - global.onerror = function(err, url, line) { + global.onerror = function (err, url, line) { fn(new Error(err + ' (' + url + ':' + line + ')')); - return !mocha.allowUncaught; + return !mocha.options.allowUncaught; }; uncaughtExceptionHandlers.push(fn); } }; +process.listeners = function (e) { + if (e === 'uncaughtException') { + return uncaughtExceptionHandlers; + } + return []; +}; + // The BDD UI is registered by default, but no UI will be functional in the // browser without an explicit call to the overridden `mocha.ui` (see below). // Ensure that this default UI does not expose its methods to the global scope. @@ -90,7 +110,7 @@ function timeslice() { * High-performance override of Runner.immediately. */ -Mocha.Runner.immediately = function(callback) { +Mocha.Runner.immediately = function (callback) { immediateQueue.push(callback); if (!immediateTimeout) { immediateTimeout = setTimeout(timeslice, 0); @@ -102,8 +122,8 @@ Mocha.Runner.immediately = function(callback) { * This is useful when running tests in a browser because window.onerror will * only receive the 'message' attribute of the Error. */ -mocha.throwError = function(err) { - uncaughtExceptionHandlers.forEach(function(fn) { +mocha.throwError = function (err) { + uncaughtExceptionHandlers.forEach(function (fn) { fn(err); }); throw err; @@ -114,7 +134,7 @@ mocha.throwError = function(err) { * Normally this would happen in Mocha.prototype.loadFiles. */ -mocha.ui = function(ui) { +mocha.ui = function (ui) { Mocha.prototype.ui.call(this, ui); this.suite.emit('pre-require', global, null, this); return this; @@ -124,15 +144,23 @@ mocha.ui = function(ui) { * Setup mocha with the given setting options. */ -mocha.setup = function(opts) { +mocha.setup = function (opts) { if (typeof opts === 'string') { opts = {ui: opts}; } - for (var opt in opts) { - if (opts.hasOwnProperty(opt)) { - this[opt](opts[opt]); - } + if (opts.delay === true) { + this.delay(); } + var self = this; + Object.keys(opts) + .filter(function (opt) { + return opt !== 'delay'; + }) + .forEach(function (opt) { + if (Object.prototype.hasOwnProperty.call(opts, opt)) { + self[opt](opts[opt]); + } + }); return this; }; @@ -140,11 +168,11 @@ mocha.setup = function(opts) { * Run mocha, returning the Runner. */ -mocha.run = function(fn) { +mocha.run = function (fn) { var options = mocha.options; mocha.globals('location'); - var query = Mocha.utils.parseQuery(global.location.search || ''); + var query = parseQuery(global.location.search || ''); if (query.grep) { mocha.grep(query.grep); } @@ -155,7 +183,7 @@ mocha.run = function(fn) { mocha.invert(); } - return Mocha.prototype.run.call(mocha, function(err) { + return Mocha.prototype.run.call(mocha, function (err) { // The DOM Document is not available in Web Workers. var document = global.document; if ( @@ -163,7 +191,7 @@ mocha.run = function(fn) { document.getElementById('mocha') && options.noHighlighting !== true ) { - Mocha.utils.highlightTags('code'); + highlightTags('code'); } if (fn) { fn(err); @@ -181,11 +209,18 @@ Mocha.process = process; /** * Expose mocha. */ - global.Mocha = Mocha; global.mocha = mocha; -// this allows test/acceptance/required-tokens.js to pass; thus, -// you can now do `const describe = require('mocha').describe` in a -// browser context (assuming browserification). should fix #880 -module.exports = global; +// for bundlers: enable `import {describe, it} from 'mocha'` +// `bdd` interface only +// prettier-ignore +[ + 'describe', 'context', 'it', 'specify', + 'xdescribe', 'xcontext', 'xit', 'xspecify', + 'before', 'beforeEach', 'afterEach', 'after' +].forEach(function(key) { + mocha[key] = global[key]; +}); + +module.exports = mocha; diff --git a/node_modules/mocha/lib/browser/growl.js b/node_modules/mocha/lib/browser/growl.js deleted file mode 100644 index 01679850..00000000 --- a/node_modules/mocha/lib/browser/growl.js +++ /dev/null @@ -1,168 +0,0 @@ -'use strict'; - -/** - * Web Notifications module. - * @module Growl - */ - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ -var Date = global.Date; -var setTimeout = global.setTimeout; -var EVENT_RUN_END = require('../runner').constants.EVENT_RUN_END; - -/** - * Checks if browser notification support exists. - * - * @public - * @see {@link https://caniuse.com/#feat=notifications|Browser support (notifications)} - * @see {@link https://caniuse.com/#feat=promises|Browser support (promises)} - * @see {@link Mocha#growl} - * @see {@link Mocha#isGrowlCapable} - * @return {boolean} whether browser notification support exists - */ -exports.isCapable = function() { - var hasNotificationSupport = 'Notification' in window; - var hasPromiseSupport = typeof Promise === 'function'; - return process.browser && hasNotificationSupport && hasPromiseSupport; -}; - -/** - * Implements browser notifications as a pseudo-reporter. - * - * @public - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/notification|Notification API} - * @see {@link https://developers.google.com/web/fundamentals/push-notifications/display-a-notification|Displaying a Notification} - * @see {@link Growl#isPermitted} - * @see {@link Mocha#_growl} - * @param {Runner} runner - Runner instance. - */ -exports.notify = function(runner) { - var promise = isPermitted(); - - /** - * Attempt notification. - */ - var sendNotification = function() { - // If user hasn't responded yet... "No notification for you!" (Seinfeld) - Promise.race([promise, Promise.resolve(undefined)]) - .then(canNotify) - .then(function() { - display(runner); - }) - .catch(notPermitted); - }; - - runner.once(EVENT_RUN_END, sendNotification); -}; - -/** - * Checks if browser notification is permitted by user. - * - * @private - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission|Notification.permission} - * @see {@link Mocha#growl} - * @see {@link Mocha#isGrowlPermitted} - * @returns {Promise} promise determining if browser notification - * permissible when fulfilled. - */ -function isPermitted() { - var permitted = { - granted: function allow() { - return Promise.resolve(true); - }, - denied: function deny() { - return Promise.resolve(false); - }, - default: function ask() { - return Notification.requestPermission().then(function(permission) { - return permission === 'granted'; - }); - } - }; - - return permitted[Notification.permission](); -} - -/** - * @summary - * Determines if notification should proceed. - * - * @description - * Notification shall not proceed unless `value` is true. - * - * `value` will equal one of: - *
    - *
  • true (from `isPermitted`)
  • - *
  • false (from `isPermitted`)
  • - *
  • undefined (from `Promise.race`)
  • - *
- * - * @private - * @param {boolean|undefined} value - Determines if notification permissible. - * @returns {Promise} Notification can proceed - */ -function canNotify(value) { - if (!value) { - var why = value === false ? 'blocked' : 'unacknowledged'; - var reason = 'not permitted by user (' + why + ')'; - return Promise.reject(new Error(reason)); - } - return Promise.resolve(); -} - -/** - * Displays the notification. - * - * @private - * @param {Runner} runner - Runner instance. - */ -function display(runner) { - var stats = runner.stats; - var symbol = { - cross: '\u274C', - tick: '\u2705' - }; - var logo = require('../../package').notifyLogo; - var _message; - var message; - var title; - - if (stats.failures) { - _message = stats.failures + ' of ' + stats.tests + ' tests failed'; - message = symbol.cross + ' ' + _message; - title = 'Failed'; - } else { - _message = stats.passes + ' tests passed in ' + stats.duration + 'ms'; - message = symbol.tick + ' ' + _message; - title = 'Passed'; - } - - // Send notification - var options = { - badge: logo, - body: message, - dir: 'ltr', - icon: logo, - lang: 'en-US', - name: 'mocha', - requireInteraction: false, - timestamp: Date.now() - }; - var notification = new Notification(title, options); - - // Autoclose after brief delay (makes various browsers act same) - var FORCE_DURATION = 4000; - setTimeout(notification.close.bind(notification), FORCE_DURATION); -} - -/** - * As notifications are tangential to our purpose, just log the error. - * - * @private - * @param {Error} err - Why notification didn't happen. - */ -function notPermitted(err) { - console.error('notification error:', err.message); -} diff --git a/node_modules/mocha/lib/browser/progress.js b/node_modules/mocha/lib/browser/progress.js index 553fc6eb..c82bc082 100644 --- a/node_modules/mocha/lib/browser/progress.js +++ b/node_modules/mocha/lib/browser/progress.js @@ -1,5 +1,9 @@ 'use strict'; +/** + @module browser/Progress +*/ + /** * Expose `Progress`. */ @@ -23,7 +27,7 @@ function Progress() { * @param {number} size * @return {Progress} Progress instance. */ -Progress.prototype.size = function(size) { +Progress.prototype.size = function (size) { this._size = size; return this; }; @@ -35,7 +39,7 @@ Progress.prototype.size = function(size) { * @param {string} text * @return {Progress} Progress instance. */ -Progress.prototype.text = function(text) { +Progress.prototype.text = function (text) { this._text = text; return this; }; @@ -47,7 +51,7 @@ Progress.prototype.text = function(text) { * @param {number} size * @return {Progress} Progress instance. */ -Progress.prototype.fontSize = function(size) { +Progress.prototype.fontSize = function (size) { this._fontSize = size; return this; }; @@ -58,7 +62,7 @@ Progress.prototype.fontSize = function(size) { * @param {string} family * @return {Progress} Progress instance. */ -Progress.prototype.font = function(family) { +Progress.prototype.font = function (family) { this._font = family; return this; }; @@ -69,7 +73,7 @@ Progress.prototype.font = function(family) { * @param {number} n * @return {Progress} Progress instance. */ -Progress.prototype.update = function(n) { +Progress.prototype.update = function (n) { this.percent = n; return this; }; @@ -80,8 +84,22 @@ Progress.prototype.update = function(n) { * @param {CanvasRenderingContext2d} ctx * @return {Progress} Progress instance. */ -Progress.prototype.draw = function(ctx) { +Progress.prototype.draw = function (ctx) { try { + var darkMatcher = window.matchMedia('(prefers-color-scheme: dark)'); + var isDarkMode = !!darkMatcher.matches; + var lightColors = { + outerCircle: '#9f9f9f', + innerCircle: '#eee', + text: '#000' + }; + var darkColors = { + outerCircle: '#888', + innerCircle: '#444', + text: '#fff' + }; + var colors = isDarkMode ? darkColors : lightColors; + var percent = Math.min(this.percent, 100); var size = this._size; var half = size / 2; @@ -96,13 +114,13 @@ Progress.prototype.draw = function(ctx) { ctx.clearRect(0, 0, size, size); // outer circle - ctx.strokeStyle = '#9f9f9f'; + ctx.strokeStyle = colors.outerCircle; ctx.beginPath(); ctx.arc(x, y, rad, 0, angle, false); ctx.stroke(); // inner circle - ctx.strokeStyle = '#eee'; + ctx.strokeStyle = colors.innerCircle; ctx.beginPath(); ctx.arc(x, y, rad - 1, 0, angle, true); ctx.stroke(); @@ -111,6 +129,7 @@ Progress.prototype.draw = function(ctx) { var text = this._text || (percent | 0) + '%'; var w = ctx.measureText(text).width; + ctx.fillStyle = colors.text; ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1); } catch (ignore) { // don't fail if we can't render progress diff --git a/node_modules/mocha/lib/browser/template.html b/node_modules/mocha/lib/browser/template.html index af4d3e4f..4ebd4af4 100644 --- a/node_modules/mocha/lib/browser/template.html +++ b/node_modules/mocha/lib/browser/template.html @@ -1,16 +1,18 @@ - + Mocha - - + +
- - + + diff --git a/node_modules/mocha/lib/browser/tty.js b/node_modules/mocha/lib/browser/tty.js deleted file mode 100644 index e9033650..00000000 --- a/node_modules/mocha/lib/browser/tty.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -exports.isatty = function isatty() { - return true; -}; - -exports.getWindowSize = function getWindowSize() { - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } - // In a Web Worker, the DOM Window is not available. - return [640, 480]; -}; diff --git a/node_modules/mocha/lib/cli/cli.js b/node_modules/mocha/lib/cli/cli.js index dee8e70d..977a3415 100755 --- a/node_modules/mocha/lib/cli/cli.js +++ b/node_modules/mocha/lib/cli/cli.js @@ -3,38 +3,48 @@ 'use strict'; /** - * This is where we finally parse and handle arguments passed to the `mocha` executable. - * Option parsing is handled by {@link https://npm.im/yargs yargs}. - * If executed via `node`, this module will run {@linkcode module:lib/cli/cli.main main()}. - * - * @private - * @module + * Contains CLI entry point and public API for programmatic usage in Node.js. + * - Option parsing is handled by {@link https://npm.im/yargs yargs}. + * - If executed via `node`, this module will run {@linkcode module:lib/cli.main main()}. + * @public + * @module lib/cli */ const debug = require('debug')('mocha:cli:cli'); const symbols = require('log-symbols'); const yargs = require('yargs/yargs'); const path = require('path'); -const {loadOptions, YARGS_PARSER_CONFIG} = require('./options'); +const { + loadRc, + loadPkgRc, + loadOptions, + YARGS_PARSER_CONFIG +} = require('./options'); +const lookupFiles = require('./lookup-files'); const commands = require('./commands'); const ansi = require('ansi-colors'); const {repository, homepage, version, gitter} = require('../../package.json'); +const {cwd} = require('../utils'); /** * - Accepts an `Array` of arguments * - Modifies {@link https://nodejs.org/api/modules.html#modules_module_paths Node.js' search path} for easy loading of consumer modules * - Sets {@linkcode https://nodejs.org/api/errors.html#errors_error_stacktracelimit Error.stackTraceLimit} to `Infinity` - * @summary Mocha's main entry point from the command-line. + * @public + * @summary Mocha's main command-line entry-point. * @param {string[]} argv - Array of arguments to parse, or by default the lovely `process.argv.slice(2)` + * @param {object} [mochaArgs] - Object of already parsed Mocha arguments (by bin/mocha) */ -exports.main = (argv = process.argv.slice(2)) => { +exports.main = (argv = process.argv.slice(2), mochaArgs) => { debug('entered main with raw args', argv); // ensure we can require() from current working directory - module.paths.push(process.cwd(), path.resolve('node_modules')); + if (typeof module.paths !== 'undefined') { + module.paths.push(cwd(), path.resolve('node_modules')); + } Error.stackTraceLimit = Infinity; // configurable via --stack-trace-limit? - var args = loadOptions(argv); + var args = mochaArgs || loadOptions(argv); yargs() .scriptName('mocha') @@ -46,10 +56,10 @@ exports.main = (argv = process.argv.slice(2)) => { 'Commands:': 'Commands' }) .fail((msg, err, yargs) => { - debug(err); + debug('caught error sometime before command handler: %O', err); yargs.showHelp(); console.error(`\n${symbols.error} ${ansi.red('ERROR:')} ${msg}`); - process.exit(1); + process.exitCode = 1; }) .help('help', 'Show usage information & exit') .alias('help', 'h') @@ -68,6 +78,11 @@ exports.main = (argv = process.argv.slice(2)) => { .parse(args._); }; +exports.lookupFiles = lookupFiles; +exports.loadOptions = loadOptions; +exports.loadPkgRc = loadPkgRc; +exports.loadRc = loadRc; + // allow direct execution if (require.main === module) { exports.main(); diff --git a/node_modules/mocha/lib/cli/collect-files.js b/node_modules/mocha/lib/cli/collect-files.js index 61d54ac4..39934cbf 100644 --- a/node_modules/mocha/lib/cli/collect-files.js +++ b/node_modules/mocha/lib/cli/collect-files.js @@ -4,7 +4,9 @@ const path = require('path'); const ansi = require('ansi-colors'); const debug = require('debug')('mocha:cli:run:helpers'); const minimatch = require('minimatch'); -const utils = require('../utils'); +const {NO_FILES_MATCH_PATTERN} = require('../errors').constants; +const lookupFiles = require('./lookup-files'); +const {castArray} = require('../utils'); /** * Exports a function that collects test files from CLI parameters. @@ -16,55 +18,48 @@ const utils = require('../utils'); /** * Smash together an array of test files in the correct order - * @param {Object} opts - Options - * @param {string[]} opts.extension - File extensions to use - * @param {string[]} opts.spec - Files, dirs, globs to run - * @param {string[]} opts.ignore - Files, dirs, globs to ignore - * @param {string[]} opts.file - List of additional files to include - * @param {boolean} opts.recursive - Find files recursively - * @param {boolean} opts.sort - Sort test files + * @param {FileCollectionOptions} [opts] - Options * @returns {string[]} List of files to test * @private */ -module.exports = ({ignore, extension, file, recursive, sort, spec} = {}) => { - let files = []; +module.exports = ({ + ignore, + extension, + file: fileArgs, + recursive, + sort, + spec +} = {}) => { const unmatched = []; - spec.forEach(arg => { - let newFiles; + const specFiles = spec.reduce((specFiles, arg) => { try { - newFiles = utils.lookupFiles(arg, extension, recursive); + const moreSpecFiles = castArray(lookupFiles(arg, extension, recursive)) + .filter(filename => + ignore.every(pattern => !minimatch(filename, pattern)) + ) + .map(filename => path.resolve(filename)); + return [...specFiles, ...moreSpecFiles]; } catch (err) { - if (err.code === 'ERR_MOCHA_NO_FILES_MATCH_PATTERN') { + if (err.code === NO_FILES_MATCH_PATTERN) { unmatched.push({message: err.message, pattern: err.pattern}); - return; + return specFiles; } throw err; } - - if (typeof newFiles !== 'undefined') { - if (typeof newFiles === 'string') { - newFiles = [newFiles]; - } - newFiles = newFiles.filter(fileName => - ignore.every(pattern => !minimatch(fileName, pattern)) - ); - } - - files = files.concat(newFiles); - }); - - const fileArgs = file.map(filepath => path.resolve(filepath)); - files = files.map(filepath => path.resolve(filepath)); + }, []); // ensure we don't sort the stuff from fileArgs; order is important! if (sort) { - files.sort(); + specFiles.sort(); } // add files given through --file to be ran first - files = fileArgs.concat(files); - debug('files (in order): ', files); + const files = [ + ...fileArgs.map(filepath => path.resolve(filepath)), + ...specFiles + ]; + debug('test files (in order): ', files); if (!files.length) { // give full message details when only 1 file is missing @@ -75,7 +70,7 @@ module.exports = ({ignore, extension, file, recursive, sort, spec} = {}) => { console.error(ansi.red(noneFoundMsg)); process.exit(1); } else { - // print messages as an warning + // print messages as a warning unmatched.forEach(warning => { console.warn(ansi.yellow(`Warning: ${warning.message}`)); }); @@ -83,3 +78,15 @@ module.exports = ({ignore, extension, file, recursive, sort, spec} = {}) => { return files; }; + +/** + * An object to configure how Mocha gathers test files + * @private + * @typedef {Object} FileCollectionOptions + * @property {string[]} extension - File extensions to use + * @property {string[]} spec - Files, dirs, globs to run + * @property {string[]} ignore - Files, dirs, globs to ignore + * @property {string[]} file - List of additional files to include + * @property {boolean} recursive - Find files recursively + * @property {boolean} sort - Sort test files + */ diff --git a/node_modules/mocha/lib/cli/commands.js b/node_modules/mocha/lib/cli/commands.js index eb10c683..1102f860 100644 --- a/node_modules/mocha/lib/cli/commands.js +++ b/node_modules/mocha/lib/cli/commands.js @@ -2,7 +2,7 @@ /** * Exports Yargs commands - * @see https://git.io/fpJ0G + * @see https://github.com/yargs/yargs/blob/main/docs/advanced.md * @private * @module */ diff --git a/node_modules/mocha/lib/cli/config.js b/node_modules/mocha/lib/cli/config.js index 6fa4e2db..ac719833 100644 --- a/node_modules/mocha/lib/cli/config.js +++ b/node_modules/mocha/lib/cli/config.js @@ -2,7 +2,6 @@ /** * Responsible for loading / finding Mocha's "rc" files. - * This doesn't have anything to do with `mocha.opts`. * * @private * @module @@ -12,6 +11,8 @@ const fs = require('fs'); const path = require('path'); const debug = require('debug')('mocha:cli:config'); const findUp = require('find-up'); +const {createUnparsableFileError} = require('../errors'); +const utils = require('../utils'); /** * These are the valid config files, in order of precedence; @@ -21,6 +22,7 @@ const findUp = require('find-up'); * @private */ exports.CONFIG_FILES = [ + '.mocharc.cjs', '.mocharc.js', '.mocharc.yaml', '.mocharc.yml', @@ -28,29 +30,23 @@ exports.CONFIG_FILES = [ '.mocharc.json' ]; -const isModuleNotFoundError = err => - err.code !== 'MODULE_NOT_FOUND' || - err.message.indexOf('Cannot find module') !== -1; - /** * Parsers for various config filetypes. Each accepts a filepath and * returns an object (but could throw) */ const parsers = (exports.parsers = { - yaml: filepath => - require('js-yaml').safeLoad(fs.readFileSync(filepath, 'utf8')), + yaml: filepath => require('js-yaml').load(fs.readFileSync(filepath, 'utf8')), js: filepath => { - const cwdFilepath = path.resolve(filepath); + let cwdFilepath; try { - debug(`parsers: load using cwd-relative path: "${cwdFilepath}"`); + debug('parsers: load cwd-relative path: "%s"', path.resolve(filepath)); + cwdFilepath = require.resolve(path.resolve(filepath)); // evtl. throws return require(cwdFilepath); } catch (err) { - if (isModuleNotFoundError(err)) { - debug(`parsers: retry load as module-relative path: "${filepath}"`); - return require(filepath); - } else { - throw err; // rethrow - } + if (cwdFilepath) throw err; + + debug('parsers: retry load as module-relative path: "%s"', filepath); + return require(filepath); } }, json: filepath => @@ -69,19 +65,22 @@ const parsers = (exports.parsers = { */ exports.loadConfig = filepath => { let config = {}; - debug(`loadConfig: "${filepath}"`); + debug('loadConfig: trying to parse config at %s', filepath); const ext = path.extname(filepath); try { if (ext === '.yml' || ext === '.yaml') { config = parsers.yaml(filepath); - } else if (ext === '.js') { + } else if (ext === '.js' || ext === '.cjs') { config = parsers.js(filepath); } else { config = parsers.json(filepath); } } catch (err) { - throw new Error(`failed to parse config "${filepath}": ${err}`); + throw createUnparsableFileError( + `Unable to read/parse ${filepath}: ${err}`, + filepath + ); } return config; }; @@ -92,10 +91,10 @@ exports.loadConfig = filepath => { * @param {string} [cwd] - Current working directory * @returns {string|null} Filepath to config, if found */ -exports.findConfig = (cwd = process.cwd()) => { +exports.findConfig = (cwd = utils.cwd()) => { const filepath = findUp.sync(exports.CONFIG_FILES, {cwd}); if (filepath) { - debug(`findConfig: found "${filepath}"`); + debug('findConfig: found config file %s', filepath); } return filepath; }; diff --git a/node_modules/mocha/lib/cli/index.js b/node_modules/mocha/lib/cli/index.js index d792f0c9..f20314ea 100644 --- a/node_modules/mocha/lib/cli/index.js +++ b/node_modules/mocha/lib/cli/index.js @@ -1,9 +1,3 @@ 'use strict'; -/** - * Just exports {@link module:lib/cli/cli} for convenience. - * @private - * @module lib/cli - * @exports module:lib/cli/cli - */ module.exports = require('./cli'); diff --git a/node_modules/mocha/lib/cli/init.js b/node_modules/mocha/lib/cli/init.js index ca847c6f..3847aff8 100644 --- a/node_modules/mocha/lib/cli/init.js +++ b/node_modules/mocha/lib/cli/init.js @@ -9,7 +9,6 @@ const fs = require('fs'); const path = require('path'); -const mkdirp = require('mkdirp'); exports.command = 'init '; @@ -24,7 +23,7 @@ exports.builder = yargs => exports.handler = argv => { const destdir = argv.path; const srcdir = path.join(__dirname, '..', '..'); - mkdirp.sync(destdir); + fs.mkdirSync(destdir, {recursive: true}); const css = fs.readFileSync(path.join(srcdir, 'mocha.css')); const js = fs.readFileSync(path.join(srcdir, 'mocha.js')); const tmpl = fs.readFileSync( diff --git a/node_modules/mocha/lib/cli/node-flags.js b/node_modules/mocha/lib/cli/node-flags.js index feffaa93..25ca2669 100644 --- a/node_modules/mocha/lib/cli/node-flags.js +++ b/node_modules/mocha/lib/cli/node-flags.js @@ -6,7 +6,8 @@ * @module */ -const nodeFlags = require('node-environment-flags'); +const nodeFlags = process.allowedNodeEnvironmentFlags; +const {isMochaFlag} = require('./run-option-metadata'); const unparse = require('yargs-unparser'); /** @@ -14,7 +15,7 @@ const unparse = require('yargs-unparser'); * @see {@link impliesNoTimeouts} * @private */ -const debugFlags = new Set(['debug', 'debug-brk', 'inspect', 'inspect-brk']); +const debugFlags = new Set(['inspect', 'inspect-brk']); /** * Mocha has historical support for various `node` and V8 flags which might not @@ -43,16 +44,14 @@ exports.isNodeFlag = (flag, bareword = true) => { flag = flag.replace(/^--?/, ''); } return ( - // treat --require/-r as Mocha flag even though it's also a node flag - !(flag === 'require' || flag === 'r') && // check actual node flags from `process.allowedNodeEnvironmentFlags`, // then historical support for various V8 and non-`NODE_OPTIONS` flags // and also any V8 flags with `--v8-` prefix - (nodeFlags.has(flag) || - debugFlags.has(flag) || - /(?:preserve-symlinks(?:-main)?|harmony(?:[_-]|$)|(?:trace[_-].+$)|gc(?:[_-]global)?$|es[_-]staging$|use[_-]strict$|v8[_-](?!options).+?$)/.test( - flag - )) + (!isMochaFlag(flag) && nodeFlags && nodeFlags.has(flag)) || + debugFlags.has(flag) || + /(?:preserve-symlinks(?:-main)?|harmony(?:[_-]|$)|(?:trace[_-].+$)|gc[_-]global$|es[_-]staging$|use[_-]strict$|v8[_-](?!options).+?$)/.test( + flag + ) ); }; diff --git a/node_modules/mocha/lib/cli/one-and-dones.js b/node_modules/mocha/lib/cli/one-and-dones.js index c981b4bb..21bad6fd 100644 --- a/node_modules/mocha/lib/cli/one-and-dones.js +++ b/node_modules/mocha/lib/cli/one-and-dones.js @@ -8,7 +8,6 @@ * @private */ -const align = require('wide-align'); const Mocha = require('../mocha'); /** @@ -30,7 +29,7 @@ const showKeys = obj => { .forEach(key => { const description = obj[key].description; console.log( - ` ${align.left(key, maxKeyLength + 1)}${ + ` ${key.padEnd(maxKeyLength + 1)}${ description ? `- ${description}` : '' }` ); @@ -48,14 +47,14 @@ exports.ONE_AND_DONES = { * Dump list of built-in interfaces * @private */ - interfaces: () => { + 'list-interfaces': () => { showKeys(Mocha.interfaces); }, /** * Dump list of built-in reporters * @private */ - reporters: () => { + 'list-reporters': () => { showKeys(Mocha.reporters); } }; diff --git a/node_modules/mocha/lib/cli/options.js b/node_modules/mocha/lib/cli/options.js index a88dbfbf..8fa9470e 100644 --- a/node_modules/mocha/lib/cli/options.js +++ b/node_modules/mocha/lib/cli/options.js @@ -2,8 +2,9 @@ /** * Main entry point for handling filesystem-based configuration, - * whether that's `mocha.opts` or a config file or `package.json` or whatever. - * @module + * whether that's a config file or `package.json` or whatever. + * @module lib/cli/options + * @private */ const fs = require('fs'); @@ -15,9 +16,9 @@ const mocharc = require('../mocharc.json'); const {list} = require('./run-helpers'); const {loadConfig, findConfig} = require('./config'); const findUp = require('find-up'); -const {deprecate} = require('../utils'); const debug = require('debug')('mocha:cli:options'); const {isNodeFlag} = require('./node-flags'); +const {createUnparsableFileError} = require('../errors'); /** * The `yargs-parser` namespace @@ -38,7 +39,8 @@ const {isNodeFlag} = require('./node-flags'); const YARGS_PARSER_CONFIG = { 'combine-arrays': true, 'short-option-groups': false, - 'dot-notation': false + 'dot-notation': false, + 'strip-aliased': true }; /** @@ -55,16 +57,19 @@ const configuration = Object.assign({}, YARGS_PARSER_CONFIG, { /** * This is a really fancy way to: - * - ensure unique values for `array`-type options - * - use its array's last element for `boolean`/`number`/`string`- options given multiple times + * - `array`-type options: ensure unique values and evtl. split comma-delimited lists + * - `boolean`/`number`/`string`- options: use last element when given multiple times * This is passed as the `coerce` option to `yargs-parser` * @private * @ignore */ +const globOptions = ['spec', 'ignore']; const coerceOpts = Object.assign( types.array.reduce( (acc, arg) => - Object.assign(acc, {[arg]: v => Array.from(new Set(list(v)))}), + Object.assign(acc, { + [arg]: v => Array.from(new Set(globOptions.includes(arg) ? v : list(v))) + }), {} ), types.boolean @@ -143,107 +148,12 @@ const parse = (args = [], defaultValues = {}, ...configObjects) => { return result.argv; }; -/** - * - Replaces comments with empty strings - * - Replaces escaped spaces (e.g., 'xxx\ yyy') with HTML space - * - Splits on whitespace, creating array of substrings - * - Filters empty string elements from array - * - Replaces any HTML space with space - * @summary Parses options read from run-control file. - * @private - * @param {string} content - Content read from run-control file. - * @returns {string[]} cmdline options (and associated arguments) - * @ignore - */ -const parseMochaOpts = content => - content - .replace(/^#.*$/gm, '') - .replace(/\\\s/g, '%20') - .split(/\s/) - .filter(Boolean) - .map(value => value.replace(/%20/g, ' ')); - -/** - * Prepends options from run-control file to the command line arguments. - * - * @deprecated Deprecated in v6.0.0; This function is no longer used internally and will be removed in a future version. - * @public - * @alias module:lib/cli/options - * @see {@link https://mochajs.org/#mochaopts|mocha.opts} - */ -module.exports = function getOptions() { - deprecate( - 'getOptions() is DEPRECATED and will be removed from a future version of Mocha. Use loadOptions() instead' - ); - if (process.argv.length === 3 && ONE_AND_DONE_ARGS.has(process.argv[2])) { - return; - } - - const optsPath = - process.argv.indexOf('--opts') === -1 - ? mocharc.opts - : process.argv[process.argv.indexOf('--opts') + 1]; - - try { - const options = parseMochaOpts(fs.readFileSync(optsPath, 'utf8')); - - process.argv = process.argv - .slice(0, 2) - .concat(options.concat(process.argv.slice(2))); - } catch (ignore) { - // NOTE: should console.error() and throw the error - } - - process.env.LOADED_MOCHA_OPTS = true; -}; - -/** - * Given filepath in `args.opts`, attempt to load and parse a `mocha.opts` file. - * @param {Object} [args] - Arguments object - * @param {string|boolean} [args.opts] - Filepath to mocha.opts; defaults to whatever's in `mocharc.opts`, or `false` to skip - * @returns {external:yargsParser.Arguments|void} If read, object containing parsed arguments - * @memberof module:lib/cli/options - * @public - */ -const loadMochaOpts = (args = {}) => { - let result; - let filepath = args.opts; - // /dev/null is backwards compat - if (filepath === false || filepath === '/dev/null') { - return result; - } - filepath = filepath || mocharc.opts; - result = {}; - let mochaOpts; - try { - mochaOpts = fs.readFileSync(filepath, 'utf8'); - debug(`read ${filepath}`); - } catch (err) { - if (args.opts) { - throw new Error(`Unable to read ${filepath}: ${err}`); - } - // ignore otherwise. we tried - debug(`No mocha.opts found at ${filepath}`); - } - - // real args should override `mocha.opts` which should override defaults. - // if there's an exception to catch here, I'm not sure what it is. - // by attaching the `no-opts` arg, we avoid re-parsing of `mocha.opts`. - if (mochaOpts) { - result = parse(parseMochaOpts(mochaOpts)); - debug(`${filepath} parsed succesfully`); - } - return result; -}; - -module.exports.loadMochaOpts = loadMochaOpts; - /** * Given path to config file in `args.config`, attempt to load & parse config file. * @param {Object} [args] - Arguments object * @param {string|boolean} [args.config] - Path to config file or `false` to skip * @public - * @memberof module:lib/cli/options + * @alias module:lib/cli.loadRc * @returns {external:yargsParser.Arguments|void} Parsed config, or nothing if `args.config` is `false` */ const loadRc = (args = {}) => { @@ -260,7 +170,7 @@ module.exports.loadRc = loadRc; * @param {Object} [args] - Arguments object * @param {string|boolean} [args.config] - Path to `package.json` or `false` to skip * @public - * @memberof module:lib/cli/options + * @alias module:lib/cli.loadPkgRc * @returns {external:yargsParser.Arguments|void} Parsed config, or nothing if `args.package` is `false` */ const loadPkgRc = (args = {}) => { @@ -274,16 +184,19 @@ const loadPkgRc = (args = {}) => { try { const pkg = JSON.parse(fs.readFileSync(filepath, 'utf8')); if (pkg.mocha) { - debug(`'mocha' prop of package.json parsed:`, pkg.mocha); + debug('`mocha` prop of package.json parsed: %O', pkg.mocha); result = pkg.mocha; } else { - debug(`no config found in ${filepath}`); + debug('no config found in %s', filepath); } } catch (err) { if (args.package) { - throw new Error(`Unable to read/parse ${filepath}: ${err}`); + throw createUnparsableFileError( + `Unable to read/parse ${filepath}: ${err}`, + filepath + ); } - debug(`failed to read default package.json at ${filepath}; ignoring`); + debug('failed to read default package.json at %s; ignoring', filepath); } } return result; @@ -295,21 +208,20 @@ module.exports.loadPkgRc = loadPkgRc; * Priority list: * * 1. Command-line args - * 2. RC file (`.mocharc.js`, `.mocharc.ya?ml`, `mocharc.json`) + * 2. RC file (`.mocharc.c?js`, `.mocharc.ya?ml`, `mocharc.json`) * 3. `mocha` prop of `package.json` - * 4. `mocha.opts` - * 5. default configuration (`lib/mocharc.json`) + * 4. default configuration (`lib/mocharc.json`) * * If a {@link module:lib/cli/one-and-dones.ONE_AND_DONE_ARGS "one-and-done" option} is present in the `argv` array, no external config files will be read. - * @summary Parses options read from `mocha.opts`, `.mocharc.*` and `package.json`. + * @summary Parses options read from `.mocharc.*` and `package.json`. * @param {string|string[]} [argv] - Arguments to parse * @public - * @memberof module:lib/cli/options + * @alias module:lib/cli.loadOptions * @returns {external:yargsParser.Arguments} Parsed args from everything */ const loadOptions = (argv = []) => { let args = parse(argv); - // short-circuit: look for a flag that would abort loading of mocha.opts + // short-circuit: look for a flag that would abort loading of options if ( Array.from(ONE_AND_DONE_ARGS).reduce( (acc, arg) => acc || arg in args, @@ -321,7 +233,6 @@ const loadOptions = (argv = []) => { const rcConfig = loadRc(args); const pkgConfig = loadPkgRc(args); - const optsConfig = loadMochaOpts(args); if (rcConfig) { args.config = false; @@ -331,19 +242,8 @@ const loadOptions = (argv = []) => { args.package = false; args._ = args._.concat(pkgConfig._ || []); } - if (optsConfig) { - args.opts = false; - args._ = args._.concat(optsConfig._ || []); - } - args = parse( - args._, - mocharc, - args, - rcConfig || {}, - pkgConfig || {}, - optsConfig || {} - ); + args = parse(args._, mocharc, args, rcConfig || {}, pkgConfig || {}); // recombine positional arguments and "spec" if (args.spec) { diff --git a/node_modules/mocha/lib/cli/run-helpers.js b/node_modules/mocha/lib/cli/run-helpers.js index 7b3c7aa4..078ca7e4 100644 --- a/node_modules/mocha/lib/cli/run-helpers.js +++ b/node_modules/mocha/lib/cli/run-helpers.js @@ -10,12 +10,12 @@ const fs = require('fs'); const path = require('path'); const debug = require('debug')('mocha:cli:run:helpers'); -const watchRun = require('./watch-run'); +const {watchRun, watchParallelRun} = require('./watch-run'); const collectFiles = require('./collect-files'); - -const cwd = (exports.cwd = process.cwd()); - -exports.watchRun = watchRun; +const {format} = require('util'); +const {createInvalidLegacyPluginError} = require('../errors'); +const {requireOrImport} = require('../nodejs/esm-utils'); +const PluginLoader = require('../plugin-loader'); /** * Exits Mocha when tests + code under test has finished execution (default) @@ -75,53 +75,97 @@ exports.list = str => Array.isArray(str) ? exports.list(str.join(',')) : str.split(/ *, */); /** - * `require()` the modules as required by `--require ` + * `require()` the modules as required by `--require `. + * + * Returns array of `mochaHooks` exports, if any. * @param {string[]} requires - Modules to require + * @returns {Promise} Plugin implementations * @private */ -exports.handleRequires = (requires = []) => { - requires.forEach(mod => { +exports.handleRequires = async (requires = [], {ignoredPlugins = []} = {}) => { + const pluginLoader = PluginLoader.create({ignore: ignoredPlugins}); + for await (const mod of requires) { let modpath = mod; - if (fs.existsSync(mod, {cwd}) || fs.existsSync(`${mod}.js`, {cwd})) { + // this is relative to cwd + if (fs.existsSync(mod) || fs.existsSync(`${mod}.js`)) { modpath = path.resolve(mod); - debug(`resolved ${mod} to ${modpath}`); + debug('resolved required file %s to %s', mod, modpath); } - require(modpath); - debug(`loaded require "${mod}"`); - }); + const requiredModule = await requireOrImport(modpath); + if (requiredModule && typeof requiredModule === 'object') { + if (pluginLoader.load(requiredModule)) { + debug('found one or more plugin implementations in %s', modpath); + } + } + debug('loaded required module "%s"', mod); + } + const plugins = await pluginLoader.finalize(); + if (Object.keys(plugins).length) { + debug('finalized plugin implementations: %O', plugins); + } + return plugins; }; /** - * Collect test files and run mocha instance. + * Collect and load test files, then run mocha instance. * @param {Mocha} mocha - Mocha instance * @param {Options} [opts] - Command line options * @param {boolean} [opts.exit] - Whether or not to force-exit after tests are complete * @param {Object} fileCollectParams - Parameters that control test * file collection. See `lib/cli/collect-files.js`. - * @returns {Runner} + * @returns {Promise} * @private */ -exports.singleRun = (mocha, {exit}, fileCollectParams) => { +const singleRun = async (mocha, {exit}, fileCollectParams) => { const files = collectFiles(fileCollectParams); - debug('running tests with files', files); + debug('single run with %d file(s)', files.length); mocha.files = files; + + // handles ESM modules + await mocha.loadFilesAsync(); return mocha.run(exit ? exitMocha : exitMochaLater); }; /** - * Actually run tests + * Collect files and run tests (using `BufferedRunner`). + * + * This is `async` for consistency. + * + * @param {Mocha} mocha - Mocha instance + * @param {Options} options - Command line options + * @param {Object} fileCollectParams - Parameters that control test + * file collection. See `lib/cli/collect-files.js`. + * @returns {Promise} + * @ignore + * @private + */ +const parallelRun = async (mocha, options, fileCollectParams) => { + const files = collectFiles(fileCollectParams); + debug('executing %d test file(s) in parallel mode', files.length); + mocha.files = files; + + // note that we DO NOT load any files here; this is handled by the worker + return mocha.run(options.exit ? exitMocha : exitMochaLater); +}; + +/** + * Actually run tests. Delegates to one of four different functions: + * - `singleRun`: run tests in serial & exit + * - `watchRun`: run tests in serial, rerunning as files change + * - `parallelRun`: run tests in parallel & exit + * - `watchParallelRun`: run tests in parallel, rerunning as files change * @param {Mocha} mocha - Mocha instance - * @param {Object} opts - Command line options + * @param {Options} opts - Command line options * @private + * @returns {Promise} */ -exports.runMocha = (mocha, options) => { +exports.runMocha = async (mocha, options) => { const { watch = false, extension = [], - ui = 'bdd', - exit = false, ignore = [], file = [], + parallel = false, recursive = false, sort = false, spec = [] @@ -136,43 +180,63 @@ exports.runMocha = (mocha, options) => { spec }; + let run; if (watch) { - watchRun(mocha, {ui}, fileCollectParams); + run = parallel ? watchParallelRun : watchRun; } else { - exports.singleRun(mocha, {exit}, fileCollectParams); + run = parallel ? parallelRun : singleRun; } + + return run(mocha, options, fileCollectParams); }; /** - * Used for `--reporter` and `--ui`. Ensures there's only one, and asserts - * that it actually exists. - * @todo XXX This must get run after requires are processed, as it'll prevent - * interfaces from loading. + * Used for `--reporter` and `--ui`. Ensures there's only one, and asserts that + * it actually exists. This must be run _after_ requires are processed (see + * {@link handleRequires}), as it'll prevent interfaces from loading otherwise. * @param {Object} opts - Options object - * @param {string} key - Resolvable module name or path - * @param {Object} [map] - An object perhaps having key `key` + * @param {"reporter"|"ui"} pluginType - Type of plugin. + * @param {Object} [map] - Used as a cache of sorts; + * `Mocha.reporters` where each key corresponds to a reporter name, + * `Mocha.interfaces` where each key corresponds to an interface name. * @private */ -exports.validatePlugin = (opts, key, map = {}) => { - if (Array.isArray(opts[key])) { - throw new TypeError(`"--${key} <${key}>" can only be specified once`); +exports.validateLegacyPlugin = (opts, pluginType, map = {}) => { + /** + * This should be a unique identifier; either a string (present in `map`), + * or a resolvable (via `require.resolve`) module ID/path. + * @type {string} + */ + const pluginId = opts[pluginType]; + + if (Array.isArray(pluginId)) { + throw createInvalidLegacyPluginError( + `"--${pluginType}" can only be specified once`, + pluginType + ); } - const unknownError = () => new Error(`Unknown "${key}": ${opts[key]}`); + const createUnknownError = err => + createInvalidLegacyPluginError( + format('Could not load %s "%s":\n\n %O', pluginType, pluginId, err), + pluginType, + pluginId + ); - if (!map[opts[key]]) { + // if this exists, then it's already loaded, so nothing more to do. + if (!map[pluginId]) { + let foundId; try { - opts[key] = require(opts[key]); + foundId = require.resolve(pluginId); + map[pluginId] = require(foundId); } catch (err) { - if (err.code === 'MODULE_NOT_FOUND') { - // Try to load reporters from a path (absolute or relative) - try { - opts[key] = require(path.resolve(process.cwd(), opts[key])); - } catch (err) { - throw unknownError(); - } - } else { - throw unknownError(); + if (foundId) throw createUnknownError(err); + + // Try to load reporters from a cwd-relative path + try { + map[pluginId] = require(path.resolve(pluginId)); + } catch (e) { + throw createUnknownError(e); } } } diff --git a/node_modules/mocha/lib/cli/run-option-metadata.js b/node_modules/mocha/lib/cli/run-option-metadata.js index fbc4ea90..492608fb 100644 --- a/node_modules/mocha/lib/cli/run-option-metadata.js +++ b/node_modules/mocha/lib/cli/run-option-metadata.js @@ -12,15 +12,18 @@ * @type {{string:string[]}} * @private */ -exports.types = { +const TYPES = (exports.types = { array: [ 'extension', 'file', 'global', 'ignore', - 'require', + 'node-option', 'reporter-option', - 'spec' + 'require', + 'spec', + 'watch-files', + 'watch-ignore' ], boolean: [ 'allow-uncaught', @@ -30,33 +33,34 @@ exports.types = { 'color', 'delay', 'diff', + 'dry-run', 'exit', + 'fail-zero', 'forbid-only', 'forbid-pending', 'full-trace', - 'growl', 'inline-diffs', - 'interfaces', 'invert', + 'list-interfaces', + 'list-reporters', 'no-colors', + 'parallel', 'recursive', - 'reporters', 'sort', 'watch' ], - number: ['retries'], + number: ['retries', 'jobs'], string: [ 'config', 'fgrep', 'grep', - 'opts', 'package', 'reporter', 'ui', 'slow', 'timeout' ] -}; +}); /** * Option aliases keyed by canonical option name. @@ -68,14 +72,15 @@ exports.aliases = { 'async-only': ['A'], bail: ['b'], color: ['c', 'colors'], - extension: ['watch-extensions'], fgrep: ['f'], global: ['globals'], grep: ['g'], - growl: ['G'], ignore: ['exclude'], invert: ['i'], + jobs: ['j'], 'no-colors': ['C'], + 'node-option': ['n'], + parallel: ['p'], reporter: ['R'], 'reporter-option': ['reporter-options', 'O'], require: ['r'], @@ -85,3 +90,26 @@ exports.aliases = { ui: ['u'], watch: ['w'] }; + +const ALL_MOCHA_FLAGS = Object.keys(TYPES).reduce((acc, key) => { + // gets all flags from each of the fields in `types`, adds those, + // then adds aliases of each flag (if any) + TYPES[key].forEach(flag => { + acc.add(flag); + const aliases = exports.aliases[flag] || []; + aliases.forEach(alias => { + acc.add(alias); + }); + }); + return acc; +}, new Set()); + +/** + * Returns `true` if the provided `flag` is known to Mocha. + * @param {string} flag - Flag to check + * @returns {boolean} If `true`, this is a Mocha flag + * @private + */ +exports.isMochaFlag = flag => { + return ALL_MOCHA_FLAGS.has(flag.replace(/^--?/, '')); +}; diff --git a/node_modules/mocha/lib/cli/run.js b/node_modules/mocha/lib/cli/run.js index bb7c0219..fbbe510e 100644 --- a/node_modules/mocha/lib/cli/run.js +++ b/node_modules/mocha/lib/cli/run.js @@ -7,6 +7,8 @@ * @private */ +const symbols = require('log-symbols'); +const ansi = require('ansi-colors'); const Mocha = require('../mocha'); const { createUnsupportedError, @@ -17,7 +19,7 @@ const { const { list, handleRequires, - validatePlugin, + validateLegacyPlugin, runMocha } = require('./run-helpers'); const {ONE_AND_DONES, ONE_AND_DONE_ARGS} = require('./one-and-dones'); @@ -38,7 +40,7 @@ const GROUPS = { CONFIG: 'Configuration' }; -exports.command = ['$0 [spec..]', 'debug [spec..]']; +exports.command = ['$0 [spec..]', 'inspect']; exports.describe = 'Run tests with Mocha'; @@ -81,18 +83,25 @@ exports.builder = yargs => description: 'Show diff on failure', group: GROUPS.OUTPUT }, + 'dry-run': { + description: 'Report tests without executing them', + group: GROUPS.RULES + }, exit: { description: 'Force Mocha to quit after tests complete', group: GROUPS.RULES }, extension: { default: defaults.extension, - defaultDescription: 'js', - description: 'File extension(s) to load and/or watch', + description: 'File extension(s) to load', group: GROUPS.FILES, requiresArg: true, coerce: list }, + 'fail-zero': { + description: 'Fail test run if no test(s) encountered', + group: GROUPS.RULES + }, fgrep: { conflicts: 'grep', description: 'Only run tests containing this string', @@ -132,10 +141,6 @@ exports.builder = yargs => group: GROUPS.FILTERS, requiresArg: true }, - growl: { - description: 'Enable Growl notifications', - group: GROUPS.OUTPUT - }, ignore: { defaultDescription: '(none)', description: 'Ignore file(s) or glob pattern(s)', @@ -147,25 +152,33 @@ exports.builder = yargs => 'Display actual/expected differences inline within each string', group: GROUPS.OUTPUT }, - interfaces: { - conflicts: Array.from(ONE_AND_DONE_ARGS), - description: 'List built-in user interfaces & exit' - }, invert: { description: 'Inverts --grep and --fgrep matches', group: GROUPS.FILTERS }, + jobs: { + description: + 'Number of concurrent jobs for --parallel; use 1 to run in serial', + defaultDescription: '(number of CPU cores - 1)', + requiresArg: true, + group: GROUPS.RULES + }, + 'list-interfaces': { + conflicts: Array.from(ONE_AND_DONE_ARGS), + description: 'List built-in user interfaces & exit' + }, + 'list-reporters': { + conflicts: Array.from(ONE_AND_DONE_ARGS), + description: 'List built-in reporters & exit' + }, 'no-colors': { description: 'Force-disable color output', group: GROUPS.OUTPUT, hidden: true }, - opts: { - default: defaults.opts, - description: 'Path to `mocha.opts`', - group: GROUPS.CONFIG, - normalize: true, - requiresArg: true + 'node-option': { + description: 'Node or V8 option (no leading "--")', + group: GROUPS.CONFIG }, package: { description: 'Path to package.json for config', @@ -173,6 +186,10 @@ exports.builder = yargs => normalize: true, requiresArg: true }, + parallel: { + description: 'Run tests in parallel', + group: GROUPS.RULES + }, recursive: { description: 'Look for tests in subdirectories', group: GROUPS.FILES @@ -183,10 +200,6 @@ exports.builder = yargs => group: GROUPS.OUTPUT, requiresArg: true }, - reporters: { - conflicts: Array.from(ONE_AND_DONE_ARGS), - description: 'List built-in reporters & exit' - }, 'reporter-option': { coerce: opts => list(opts).reduce((acc, opt) => { @@ -241,6 +254,19 @@ exports.builder = yargs => watch: { description: 'Watch files in the current working directory for changes', group: GROUPS.FILES + }, + 'watch-files': { + description: 'List of paths or globs to watch', + group: GROUPS.FILES, + requiresArg: true, + coerce: list + }, + 'watch-ignore': { + description: 'List of paths or globs to exclude from watching', + group: GROUPS.FILES, + requiresArg: true, + coerce: list, + default: defaults['watch-ignore'] } }) .positional('spec', { @@ -266,28 +292,84 @@ exports.builder = yargs => ); } + if (argv.parallel) { + // yargs.conflicts() can't deal with `--file foo.js --no-parallel`, either + if (argv.file) { + throw createUnsupportedError( + '--parallel runs test files in a non-deterministic order, and is mutually exclusive with --file' + ); + } + + // or this + if (argv.sort) { + throw createUnsupportedError( + '--parallel runs test files in a non-deterministic order, and is mutually exclusive with --sort' + ); + } + + if (argv.reporter === 'progress') { + throw createUnsupportedError( + '--reporter=progress is mutually exclusive with --parallel' + ); + } + + if (argv.reporter === 'markdown') { + throw createUnsupportedError( + '--reporter=markdown is mutually exclusive with --parallel' + ); + } + + if (argv.reporter === 'json-stream') { + throw createUnsupportedError( + '--reporter=json-stream is mutually exclusive with --parallel' + ); + } + } + if (argv.compilers) { throw createUnsupportedError( `--compilers is DEPRECATED and no longer supported. - See https://git.io/vdcSr for migration information.` + See https://github.com/mochajs/mocha/wiki/compilers-deprecation for migration information.` ); } - // load requires first, because it can impact "plugin" validation - handleRequires(argv.require); - validatePlugin(argv, 'reporter', Mocha.reporters); - validatePlugin(argv, 'ui', Mocha.interfaces); + if (argv.opts) { + throw createUnsupportedError( + `--opts: configuring Mocha via 'mocha.opts' is DEPRECATED and no longer supported. + Please use a configuration file instead.` + ); + } return true; }) + .middleware(async (argv, yargs) => { + // currently a failing middleware does not work nicely with yargs' `fail()`. + try { + // load requires first, because it can impact "plugin" validation + const plugins = await handleRequires(argv.require); + validateLegacyPlugin(argv, 'reporter', Mocha.reporters); + validateLegacyPlugin(argv, 'ui', Mocha.interfaces); + Object.assign(argv, plugins); + } catch (err) { + // this could be a bad --require, bad reporter, ui, etc. + console.error(`\n${symbols.error} ${ansi.red('ERROR:')}`, err); + yargs.exit(1); + } + }) .array(types.array) .boolean(types.boolean) .string(types.string) .number(types.number) .alias(aliases); -exports.handler = argv => { +exports.handler = async function (argv) { debug('post-yargs config', argv); const mocha = new Mocha(argv); - runMocha(mocha, argv); + + try { + await runMocha(mocha, argv); + } catch (err) { + console.error('\n' + (err.stack || `Error: ${err.message || err}`)); + process.exit(1); + } }; diff --git a/node_modules/mocha/lib/cli/watch-run.js b/node_modules/mocha/lib/cli/watch-run.js index e7ef34c6..a77ed7a9 100644 --- a/node_modules/mocha/lib/cli/watch-run.js +++ b/node_modules/mocha/lib/cli/watch-run.js @@ -1,8 +1,10 @@ 'use strict'; -const utils = require('../utils'); +const logSymbols = require('log-symbols'); +const debug = require('debug')('mocha:cli:watch'); +const path = require('path'); +const chokidar = require('chokidar'); const Context = require('../context'); -const Mocha = require('../mocha'); const collectFiles = require('./collect-files'); /** @@ -12,71 +14,309 @@ const collectFiles = require('./collect-files'); * @private */ +/** + * Run Mocha in parallel "watch" mode + * @param {Mocha} mocha - Mocha instance + * @param {Object} opts - Options + * @param {string[]} [opts.watchFiles] - List of paths and patterns to + * watch. If not provided all files with an extension included in + * `fileCollectionParams.extension` are watched. See first argument of + * `chokidar.watch`. + * @param {string[]} opts.watchIgnore - List of paths and patterns to + * exclude from watching. See `ignored` option of `chokidar`. + * @param {FileCollectionOptions} fileCollectParams - Parameters that control test + * @private + */ +exports.watchParallelRun = ( + mocha, + {watchFiles, watchIgnore}, + fileCollectParams +) => { + debug('creating parallel watcher'); + + return createWatcher(mocha, { + watchFiles, + watchIgnore, + beforeRun({mocha}) { + // I don't know why we're cloning the root suite. + const rootSuite = mocha.suite.clone(); + + // ensure we aren't leaking event listeners + mocha.dispose(); + + // this `require` is needed because the require cache has been cleared. the dynamic + // exports set via the below call to `mocha.ui()` won't work properly if a + // test depends on this module. + const Mocha = require('../mocha'); + + // ... and now that we've gotten a new module, we need to use it again due + // to `mocha.ui()` call + const newMocha = new Mocha(mocha.options); + // don't know why this is needed + newMocha.suite = rootSuite; + // nor this + newMocha.suite.ctx = new Context(); + + // reset the list of files + newMocha.files = collectFiles(fileCollectParams); + + // because we've swapped out the root suite (see the `run` inner function + // in `createRerunner`), we need to call `mocha.ui()` again to set up the context/globals. + newMocha.ui(newMocha.options.ui); + + // we need to call `newMocha.rootHooks` to set up rootHooks for the new + // suite + newMocha.rootHooks(newMocha.options.rootHooks); + + // in parallel mode, the main Mocha process doesn't actually load the + // files. this flag prevents `mocha.run()` from autoloading. + newMocha.lazyLoadFiles(true); + return newMocha; + }, + fileCollectParams + }); +}; + /** * Run Mocha in "watch" mode * @param {Mocha} mocha - Mocha instance * @param {Object} opts - Options - * @param {string} opts.ui - User interface - * @param {Object} fileCollectParams - Parameters that control test + * @param {string[]} [opts.watchFiles] - List of paths and patterns to + * watch. If not provided all files with an extension included in + * `fileCollectionParams.extension` are watched. See first argument of + * `chokidar.watch`. + * @param {string[]} opts.watchIgnore - List of paths and patterns to + * exclude from watching. See `ignored` option of `chokidar`. + * @param {FileCollectionOptions} fileCollectParams - Parameters that control test * file collection. See `lib/cli/collect-files.js`. - * @param {string[]} fileCollectParams.extension - List of extensions to watch * @private */ -module.exports = (mocha, {ui}, fileCollectParams) => { - let runner; - const files = collectFiles(fileCollectParams); +exports.watchRun = (mocha, {watchFiles, watchIgnore}, fileCollectParams) => { + debug('creating serial watcher'); + + return createWatcher(mocha, { + watchFiles, + watchIgnore, + beforeRun({mocha}) { + mocha.unloadFiles(); + + // I don't know why we're cloning the root suite. + const rootSuite = mocha.suite.clone(); + + // ensure we aren't leaking event listeners + mocha.dispose(); + + // this `require` is needed because the require cache has been cleared. the dynamic + // exports set via the below call to `mocha.ui()` won't work properly if a + // test depends on this module. + const Mocha = require('../mocha'); + + // ... and now that we've gotten a new module, we need to use it again due + // to `mocha.ui()` call + const newMocha = new Mocha(mocha.options); + // don't know why this is needed + newMocha.suite = rootSuite; + // nor this + newMocha.suite.ctx = new Context(); + + // reset the list of files + newMocha.files = collectFiles(fileCollectParams); + + // because we've swapped out the root suite (see the `run` inner function + // in `createRerunner`), we need to call `mocha.ui()` again to set up the context/globals. + newMocha.ui(newMocha.options.ui); + + // we need to call `newMocha.rootHooks` to set up rootHooks for the new + // suite + newMocha.rootHooks(newMocha.options.rootHooks); + + return newMocha; + }, + fileCollectParams + }); +}; + +/** + * Bootstraps a chokidar watcher. Handles keyboard input & signals + * @param {Mocha} mocha - Mocha instance + * @param {Object} opts + * @param {BeforeWatchRun} [opts.beforeRun] - Function to call before + * `mocha.run()` + * @param {string[]} [opts.watchFiles] - List of paths and patterns to watch. If + * not provided all files with an extension included in + * `fileCollectionParams.extension` are watched. See first argument of + * `chokidar.watch`. + * @param {string[]} [opts.watchIgnore] - List of paths and patterns to exclude + * from watching. See `ignored` option of `chokidar`. + * @param {FileCollectionOptions} opts.fileCollectParams - List of extensions to watch if `opts.watchFiles` is not given. + * @returns {FSWatcher} + * @ignore + * @private + */ +const createWatcher = ( + mocha, + {watchFiles, watchIgnore, beforeRun, fileCollectParams} +) => { + if (!watchFiles) { + watchFiles = fileCollectParams.extension.map(ext => `**/*.${ext}`); + } + + debug('ignoring files matching: %s', watchIgnore); + let globalFixtureContext; + + // we handle global fixtures manually + mocha.enableGlobalSetup(false).enableGlobalTeardown(false); + + const watcher = chokidar.watch(watchFiles, { + ignored: watchIgnore, + ignoreInitial: true + }); + + const rerunner = createRerunner(mocha, watcher, { + beforeRun + }); + + watcher.on('ready', async () => { + if (!globalFixtureContext) { + debug('triggering global setup'); + globalFixtureContext = await mocha.runGlobalSetup(); + } + rerunner.run(); + }); + + watcher.on('all', () => { + rerunner.scheduleRun(); + }); - console.log(); hideCursor(); - process.on('SIGINT', () => { + process.on('exit', () => { + showCursor(); + }); + + // this is for testing. + // win32 cannot gracefully shutdown via a signal from a parent + // process; a `SIGINT` from a parent will cause the process + // to immediately exit. during normal course of operation, a user + // will type Ctrl-C and the listener will be invoked, but this + // is not possible in automated testing. + // there may be another way to solve this, but it too will be a hack. + // for our watch tests on win32 we must _fork_ mocha with an IPC channel + if (process.connected) { + process.on('message', msg => { + if (msg === 'SIGINT') { + process.emit('SIGINT'); + } + }); + } + + let exiting = false; + process.on('SIGINT', async () => { showCursor(); - console.log('\n'); - // By UNIX/Posix convention this indicates that the process was - // killed by SIGINT which has portable number 2. - process.exit(128 + 2); + console.error(`${logSymbols.warning} [mocha] cleaning up, please wait...`); + if (!exiting) { + exiting = true; + if (mocha.hasGlobalTeardownFixtures()) { + debug('running global teardown'); + try { + await mocha.runGlobalTeardown(globalFixtureContext); + } catch (err) { + console.error(err); + } + } + process.exit(130); + } + }); + + // Keyboard shortcut for restarting when "rs\n" is typed (ala Nodemon) + process.stdin.resume(); + process.stdin.setEncoding('utf8'); + process.stdin.on('data', data => { + const str = data.toString().trim().toLowerCase(); + if (str === 'rs') rerunner.scheduleRun(); }); - const watchFiles = utils.files(process.cwd(), fileCollectParams.extension); - let runAgain = false; + return watcher; +}; + +/** + * Create an object that allows you to rerun tests on the mocha instance. + * + * @param {Mocha} mocha - Mocha instance + * @param {FSWatcher} watcher - chokidar `FSWatcher` instance + * @param {Object} [opts] - Options! + * @param {BeforeWatchRun} [opts.beforeRun] - Function to call before `mocha.run()` + * @returns {Rerunner} + * @ignore + * @private + */ +const createRerunner = (mocha, watcher, {beforeRun} = {}) => { + // Set to a `Runner` when mocha is running. Set to `null` when mocha is not + // running. + let runner = null; + + // true if a file has changed during a test run + let rerunScheduled = false; - const loadAndRun = () => { + const run = () => { try { - mocha.files = files; - runAgain = false; + mocha = beforeRun ? beforeRun({mocha, watcher}) || mocha : mocha; runner = mocha.run(() => { + debug('finished watch run'); runner = null; - if (runAgain) { + blastCache(watcher); + if (rerunScheduled) { rerun(); + } else { + console.error(`${logSymbols.info} [mocha] waiting for changes...`); } }); } catch (e) { - console.log(e.stack); + console.error(e.stack); } }; - const purge = () => { - watchFiles.forEach(Mocha.unloadFile); - }; - - loadAndRun(); - - const rerun = () => { - purge(); - eraseLine(); - mocha.suite = mocha.suite.clone(); - mocha.suite.ctx = new Context(); - mocha.ui(ui); - loadAndRun(); - }; + const scheduleRun = () => { + if (rerunScheduled) { + return; + } - utils.watch(watchFiles, () => { - runAgain = true; + rerunScheduled = true; if (runner) { runner.abort(); } else { rerun(); } - }); + }; + + const rerun = () => { + rerunScheduled = false; + eraseLine(); + run(); + }; + + return { + scheduleRun, + run + }; +}; + +/** + * Return the list of absolute paths watched by a chokidar watcher. + * + * @param watcher - Instance of a chokidar watcher + * @return {string[]} - List of absolute paths + * @ignore + * @private + */ +const getWatchedFiles = watcher => { + const watchedDirs = watcher.getWatched(); + return Object.keys(watchedDirs).reduce( + (acc, dir) => [ + ...acc, + ...watchedDirs[dir].map(file => path.join(dir, file)) + ], + [] + ); }; /** @@ -104,3 +344,34 @@ const showCursor = () => { const eraseLine = () => { process.stdout.write('\u001b[2K'); }; + +/** + * Blast all of the watched files out of `require.cache` + * @param {FSWatcher} watcher - chokidar FSWatcher + * @ignore + * @private + */ +const blastCache = watcher => { + const files = getWatchedFiles(watcher); + files.forEach(file => { + delete require.cache[file]; + }); + debug('deleted %d file(s) from the require cache', files.length); +}; + +/** + * Callback to be run before `mocha.run()` is called. + * Optionally, it can return a new `Mocha` instance. + * @callback BeforeWatchRun + * @private + * @param {{mocha: Mocha, watcher: FSWatcher}} options + * @returns {Mocha} + */ + +/** + * Object containing run control methods + * @typedef {Object} Rerunner + * @private + * @property {Function} run - Calls `mocha.run()` + * @property {Function} scheduleRun - Schedules another call to `run` + */ diff --git a/node_modules/mocha/lib/context.js b/node_modules/mocha/lib/context.js index 4c6b0c23..388d3082 100644 --- a/node_modules/mocha/lib/context.js +++ b/node_modules/mocha/lib/context.js @@ -22,7 +22,7 @@ function Context() {} * @param {Runnable} runnable * @return {Context} context */ -Context.prototype.runnable = function(runnable) { +Context.prototype.runnable = function (runnable) { if (!arguments.length) { return this._runnable; } @@ -37,7 +37,7 @@ Context.prototype.runnable = function(runnable) { * @param {number} ms * @return {Context} self */ -Context.prototype.timeout = function(ms) { +Context.prototype.timeout = function (ms) { if (!arguments.length) { return this.runnable().timeout(); } @@ -45,21 +45,6 @@ Context.prototype.timeout = function(ms) { return this; }; -/** - * Set test timeout `enabled`. - * - * @private - * @param {boolean} enabled - * @return {Context} self - */ -Context.prototype.enableTimeouts = function(enabled) { - if (!arguments.length) { - return this.runnable().enableTimeouts(); - } - this.runnable().enableTimeouts(enabled); - return this; -}; - /** * Set or get test slowness threshold `ms`. * @@ -67,7 +52,7 @@ Context.prototype.enableTimeouts = function(enabled) { * @param {number} ms * @return {Context} self */ -Context.prototype.slow = function(ms) { +Context.prototype.slow = function (ms) { if (!arguments.length) { return this.runnable().slow(); } @@ -81,7 +66,7 @@ Context.prototype.slow = function(ms) { * @private * @throws Pending */ -Context.prototype.skip = function() { +Context.prototype.skip = function () { this.runnable().skip(); }; @@ -92,7 +77,7 @@ Context.prototype.skip = function() { * @param {number} n * @return {Context} self */ -Context.prototype.retries = function(n) { +Context.prototype.retries = function (n) { if (!arguments.length) { return this.runnable().retries(); } diff --git a/node_modules/mocha/lib/errors.js b/node_modules/mocha/lib/errors.js index fafee70e..bcc7291c 100644 --- a/node_modules/mocha/lib/errors.js +++ b/node_modules/mocha/lib/errors.js @@ -1,22 +1,196 @@ 'use strict'; + +const {format} = require('util'); + +/** + * Contains error codes, factory functions to create throwable error objects, + * and warning/deprecation functions. + * @module + */ + +/** + * process.emitWarning or a polyfill + * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options + * @ignore + */ +const emitWarning = (msg, type) => { + if (process.emitWarning) { + process.emitWarning(msg, type); + } else { + /* istanbul ignore next */ + process.nextTick(function () { + console.warn(type + ': ' + msg); + }); + } +}; + +/** + * Show a deprecation warning. Each distinct message is only displayed once. + * Ignores empty messages. + * + * @param {string} [msg] - Warning to print + * @private + */ +const deprecate = msg => { + msg = String(msg); + if (msg && !deprecate.cache[msg]) { + deprecate.cache[msg] = true; + emitWarning(msg, 'DeprecationWarning'); + } +}; +deprecate.cache = {}; + +/** + * Show a generic warning. + * Ignores empty messages. + * + * @param {string} [msg] - Warning to print + * @private + */ +const warn = msg => { + if (msg) { + emitWarning(msg); + } +}; + /** - * @module Errors + * When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`. + * @public + * @namespace + * @memberof module:lib/errors */ +var constants = { + /** + * An unrecoverable error. + * @constant + * @default + */ + FATAL: 'ERR_MOCHA_FATAL', + + /** + * The type of an argument to a function call is invalid + * @constant + * @default + */ + INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE', + + /** + * The value of an argument to a function call is invalid + * @constant + * @default + */ + INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE', + + /** + * Something was thrown, but it wasn't an `Error` + * @constant + * @default + */ + INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION', + + /** + * An interface (e.g., `Mocha.interfaces`) is unknown or invalid + * @constant + * @default + */ + INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE', + + /** + * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid + * @constant + * @default + */ + INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER', + + /** + * `done()` was called twice in a `Test` or `Hook` callback + * @constant + * @default + */ + MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE', + + /** + * No files matched the pattern provided by the user + * @constant + * @default + */ + NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN', + + /** + * Known, but unsupported behavior of some kind + * @constant + * @default + */ + UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED', + + /** + * Invalid state transition occurring in `Mocha` instance + * @constant + * @default + */ + INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING', + + /** + * Invalid state transition occurring in `Mocha` instance + * @constant + * @default + */ + INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED', + + /** + * Use of `only()` w/ `--forbid-only` results in this error. + * @constant + * @default + */ + FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY', + + /** + * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid + * @constant + * @default + */ + INVALID_PLUGIN_IMPLEMENTATION: 'ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION', + + /** + * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid + * @constant + * @default + */ + INVALID_PLUGIN_DEFINITION: 'ERR_MOCHA_INVALID_PLUGIN_DEFINITION', + + /** + * When a runnable exceeds its allowed run time. + * @constant + * @default + */ + TIMEOUT: 'ERR_MOCHA_TIMEOUT', + + /** + * Input file is not able to be parsed + * @constant + * @default + */ + UNPARSABLE_FILE: 'ERR_MOCHA_UNPARSABLE_FILE' +}; + /** - * Factory functions to create throwable error objects + * A set containing all string values of all Mocha error constants, for use by {@link isMochaError}. + * @private */ +const MOCHA_ERRORS = new Set(Object.values(constants)); /** * Creates an error object to be thrown when no files to be tested could be found using specified pattern. * * @public + * @static * @param {string} message - Error message to be displayed. * @param {string} pattern - User-specified argument value. * @returns {Error} instance detailing the error condition */ function createNoFilesMatchPatternError(message, pattern) { var err = new Error(message); - err.code = 'ERR_MOCHA_NO_FILES_MATCH_PATTERN'; + err.code = constants.NO_FILES_MATCH_PATTERN; err.pattern = pattern; return err; } @@ -31,7 +205,7 @@ function createNoFilesMatchPatternError(message, pattern) { */ function createInvalidReporterError(message, reporter) { var err = new TypeError(message); - err.code = 'ERR_MOCHA_INVALID_REPORTER'; + err.code = constants.INVALID_REPORTER; err.reporter = reporter; return err; } @@ -40,13 +214,14 @@ function createInvalidReporterError(message, reporter) { * Creates an error object to be thrown when the interface specified in the options was not found. * * @public + * @static * @param {string} message - Error message to be displayed. * @param {string} ui - User-specified interface value. * @returns {Error} instance detailing the error condition */ function createInvalidInterfaceError(message, ui) { var err = new Error(message); - err.code = 'ERR_MOCHA_INVALID_INTERFACE'; + err.code = constants.INVALID_INTERFACE; err.interface = ui; return err; } @@ -55,12 +230,13 @@ function createInvalidInterfaceError(message, ui) { * Creates an error object to be thrown when a behavior, option, or parameter is unsupported. * * @public + * @static * @param {string} message - Error message to be displayed. * @returns {Error} instance detailing the error condition */ function createUnsupportedError(message) { var err = new Error(message); - err.code = 'ERR_MOCHA_UNSUPPORTED'; + err.code = constants.UNSUPPORTED; return err; } @@ -68,6 +244,7 @@ function createUnsupportedError(message) { * Creates an error object to be thrown when an argument is missing. * * @public + * @static * @param {string} message - Error message to be displayed. * @param {string} argument - Argument name. * @param {string} expected - Expected argument datatype. @@ -81,6 +258,7 @@ function createMissingArgumentError(message, argument, expected) { * Creates an error object to be thrown when an argument did not use the supported type * * @public + * @static * @param {string} message - Error message to be displayed. * @param {string} argument - Argument name. * @param {string} expected - Expected argument datatype. @@ -88,7 +266,7 @@ function createMissingArgumentError(message, argument, expected) { */ function createInvalidArgumentTypeError(message, argument, expected) { var err = new TypeError(message); - err.code = 'ERR_MOCHA_INVALID_ARG_TYPE'; + err.code = constants.INVALID_ARG_TYPE; err.argument = argument; err.expected = expected; err.actual = typeof argument; @@ -99,6 +277,7 @@ function createInvalidArgumentTypeError(message, argument, expected) { * Creates an error object to be thrown when an argument did not use the supported value * * @public + * @static * @param {string} message - Error message to be displayed. * @param {string} argument - Argument name. * @param {string} value - Argument value. @@ -107,7 +286,7 @@ function createInvalidArgumentTypeError(message, argument, expected) { */ function createInvalidArgumentValueError(message, argument, value, reason) { var err = new TypeError(message); - err.code = 'ERR_MOCHA_INVALID_ARG_VALUE'; + err.code = constants.INVALID_ARG_VALUE; err.argument = argument; err.value = value; err.reason = typeof reason !== 'undefined' ? reason : 'is invalid'; @@ -118,24 +297,267 @@ function createInvalidArgumentValueError(message, argument, value, reason) { * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined. * * @public + * @static * @param {string} message - Error message to be displayed. * @returns {Error} instance detailing the error condition */ function createInvalidExceptionError(message, value) { var err = new Error(message); - err.code = 'ERR_MOCHA_INVALID_EXCEPTION'; + err.code = constants.INVALID_EXCEPTION; + err.valueType = typeof value; + err.value = value; + return err; +} + +/** + * Creates an error object to be thrown when an unrecoverable error occurs. + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} instance detailing the error condition + */ +function createFatalError(message, value) { + var err = new Error(message); + err.code = constants.FATAL; err.valueType = typeof value; err.value = value; return err; } +/** + * Dynamically creates a plugin-type-specific error based on plugin type + * @param {string} message - Error message + * @param {"reporter"|"ui"} pluginType - Plugin type. Future: expand as needed + * @param {string} [pluginId] - Name/path of plugin, if any + * @throws When `pluginType` is not known + * @public + * @static + * @returns {Error} + */ +function createInvalidLegacyPluginError(message, pluginType, pluginId) { + switch (pluginType) { + case 'reporter': + return createInvalidReporterError(message, pluginId); + case 'ui': + return createInvalidInterfaceError(message, pluginId); + default: + throw new Error('unknown pluginType "' + pluginType + '"'); + } +} + +/** + * **DEPRECATED**. Use {@link createInvalidLegacyPluginError} instead Dynamically creates a plugin-type-specific error based on plugin type + * @deprecated + * @param {string} message - Error message + * @param {"reporter"|"interface"} pluginType - Plugin type. Future: expand as needed + * @param {string} [pluginId] - Name/path of plugin, if any + * @throws When `pluginType` is not known + * @public + * @static + * @returns {Error} + */ +function createInvalidPluginError(...args) { + deprecate('Use createInvalidLegacyPluginError() instead'); + return createInvalidLegacyPluginError(...args); +} + +/** + * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed. + * @param {string} message The error message to be displayed. + * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun` + * @param {Mocha} instance the mocha instance that throw this error + * @static + */ +function createMochaInstanceAlreadyDisposedError( + message, + cleanReferencesAfterRun, + instance +) { + var err = new Error(message); + err.code = constants.INSTANCE_ALREADY_DISPOSED; + err.cleanReferencesAfterRun = cleanReferencesAfterRun; + err.instance = instance; + return err; +} + +/** + * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress. + * @param {string} message The error message to be displayed. + * @static + * @public + */ +function createMochaInstanceAlreadyRunningError(message, instance) { + var err = new Error(message); + err.code = constants.INSTANCE_ALREADY_RUNNING; + err.instance = instance; + return err; +} + +/** + * Creates an error object to be thrown when done() is called multiple times in a test + * + * @public + * @param {Runnable} runnable - Original runnable + * @param {Error} [originalErr] - Original error, if any + * @returns {Error} instance detailing the error condition + * @static + */ +function createMultipleDoneError(runnable, originalErr) { + var title; + try { + title = format('<%s>', runnable.fullTitle()); + if (runnable.parent.root) { + title += ' (of root suite)'; + } + } catch (ignored) { + title = format('<%s> (of unknown suite)', runnable.title); + } + var message = format( + 'done() called multiple times in %s %s', + runnable.type ? runnable.type : 'unknown runnable', + title + ); + if (runnable.file) { + message += format(' of file %s', runnable.file); + } + if (originalErr) { + message += format('; in addition, done() received error: %s', originalErr); + } + + var err = new Error(message); + err.code = constants.MULTIPLE_DONE; + err.valueType = typeof originalErr; + err.value = originalErr; + return err; +} + +/** + * Creates an error object to be thrown when `.only()` is used with + * `--forbid-only`. + * @static + * @public + * @param {Mocha} mocha - Mocha instance + * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY} + */ +function createForbiddenExclusivityError(mocha) { + var err = new Error( + mocha.isWorker + ? '`.only` is not supported in parallel mode' + : '`.only` forbidden by --forbid-only' + ); + err.code = constants.FORBIDDEN_EXCLUSIVITY; + return err; +} + +/** + * Creates an error object to be thrown when a plugin definition is invalid + * @static + * @param {string} msg - Error message + * @param {PluginDefinition} [pluginDef] - Problematic plugin definition + * @public + * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} + */ +function createInvalidPluginDefinitionError(msg, pluginDef) { + const err = new Error(msg); + err.code = constants.INVALID_PLUGIN_DEFINITION; + err.pluginDef = pluginDef; + return err; +} + +/** + * Creates an error object to be thrown when a plugin implementation (user code) is invalid + * @static + * @param {string} msg - Error message + * @param {Object} [opts] - Plugin definition and user-supplied implementation + * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition + * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied) + * @public + * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} + */ +function createInvalidPluginImplementationError( + msg, + {pluginDef, pluginImpl} = {} +) { + const err = new Error(msg); + err.code = constants.INVALID_PLUGIN_IMPLEMENTATION; + err.pluginDef = pluginDef; + err.pluginImpl = pluginImpl; + return err; +} + +/** + * Creates an error object to be thrown when a runnable exceeds its allowed run time. + * @static + * @param {string} msg - Error message + * @param {number} [timeout] - Timeout in ms + * @param {string} [file] - File, if given + * @returns {MochaTimeoutError} + */ +function createTimeoutError(msg, timeout, file) { + const err = new Error(msg); + err.code = constants.TIMEOUT; + err.timeout = timeout; + err.file = file; + return err; +} + +/** + * Creates an error object to be thrown when file is unparsable + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} filename - File name + * @returns {Error} Error with code {@link constants.UNPARSABLE_FILE} + */ +function createUnparsableFileError(message, filename) { + var err = new Error(message); + err.code = constants.UNPARSABLE_FILE; + return err; +} + +/** + * Returns `true` if an error came out of Mocha. + * _Can suffer from false negatives, but not false positives._ + * @static + * @public + * @param {*} err - Error, or anything + * @returns {boolean} + */ +const isMochaError = err => + Boolean(err && typeof err === 'object' && MOCHA_ERRORS.has(err.code)); + module.exports = { - createInvalidArgumentTypeError: createInvalidArgumentTypeError, - createInvalidArgumentValueError: createInvalidArgumentValueError, - createInvalidExceptionError: createInvalidExceptionError, - createInvalidInterfaceError: createInvalidInterfaceError, - createInvalidReporterError: createInvalidReporterError, - createMissingArgumentError: createMissingArgumentError, - createNoFilesMatchPatternError: createNoFilesMatchPatternError, - createUnsupportedError: createUnsupportedError + constants, + createFatalError, + createForbiddenExclusivityError, + createInvalidArgumentTypeError, + createInvalidArgumentValueError, + createInvalidExceptionError, + createInvalidInterfaceError, + createInvalidLegacyPluginError, + createInvalidPluginDefinitionError, + createInvalidPluginError, + createInvalidPluginImplementationError, + createInvalidReporterError, + createMissingArgumentError, + createMochaInstanceAlreadyDisposedError, + createMochaInstanceAlreadyRunningError, + createMultipleDoneError, + createNoFilesMatchPatternError, + createTimeoutError, + createUnparsableFileError, + createUnsupportedError, + deprecate, + isMochaError, + warn }; + +/** + * The error thrown when a Runnable times out + * @memberof module:lib/errors + * @typedef {Error} MochaTimeoutError + * @property {constants.TIMEOUT} code - Error code + * @property {number?} timeout Timeout in ms + * @property {string?} file Filepath, if given + */ diff --git a/node_modules/mocha/lib/growl.js b/node_modules/mocha/lib/growl.js deleted file mode 100644 index 53164563..00000000 --- a/node_modules/mocha/lib/growl.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -/** - * Desktop Notifications module. - * @module Growl - */ - -const os = require('os'); -const path = require('path'); -const {sync: which} = require('which'); -const {EVENT_RUN_END} = require('./runner').constants; - -/** - * @summary - * Checks if Growl notification support seems likely. - * - * @description - * Glosses over the distinction between an unsupported platform - * and one that lacks prerequisite software installations. - * - * @public - * @see {@link https://github.com/tj/node-growl/blob/master/README.md|Prerequisite Installs} - * @see {@link Mocha#growl} - * @see {@link Mocha#isGrowlCapable} - * @return {boolean} whether Growl notification support can be expected - */ -exports.isCapable = () => { - if (!process.browser) { - return getSupportBinaries().reduce( - (acc, binary) => acc || Boolean(which(binary, {nothrow: true})), - false - ); - } - return false; -}; - -/** - * Implements desktop notifications as a pseudo-reporter. - * - * @public - * @see {@link Mocha#_growl} - * @param {Runner} runner - Runner instance. - */ -exports.notify = runner => { - runner.once(EVENT_RUN_END, () => { - display(runner); - }); -}; - -/** - * Displays the notification. - * - * @private - * @param {Runner} runner - Runner instance. - */ -const display = runner => { - const growl = require('growl'); - const stats = runner.stats; - const symbol = { - cross: '\u274C', - tick: '\u2705' - }; - let _message; - let message; - let title; - - if (stats.failures) { - _message = `${stats.failures} of ${stats.tests} tests failed`; - message = `${symbol.cross} ${_message}`; - title = 'Failed'; - } else { - _message = `${stats.passes} tests passed in ${stats.duration}ms`; - message = `${symbol.tick} ${_message}`; - title = 'Passed'; - } - - // Send notification - const options = { - image: logo(), - name: 'mocha', - title - }; - growl(message, options, onCompletion); -}; - -/** - * @summary - * Callback for result of attempted Growl notification. - * - * @description - * Despite its appearance, this is not an Error-first - * callback -- all parameters are populated regardless of success. - * - * @private - * @callback Growl~growlCB - * @param {*} err - Error object, or null if successful. - */ -function onCompletion(err) { - if (err) { - // As notifications are tangential to our purpose, just log the error. - const message = - err.code === 'ENOENT' ? 'prerequisite software not found' : err.message; - console.error('notification error:', message); - } -} - -/** - * Returns Mocha logo image path. - * - * @private - * @return {string} Pathname of Mocha logo - */ -const logo = () => { - return path.join(__dirname, '..', 'assets', 'mocha-logo-96.png'); -}; - -/** - * @summary - * Gets platform-specific Growl support binaries. - * - * @description - * Somewhat brittle dependency on `growl` package implementation, but it - * rarely changes. - * - * @private - * @see {@link https://github.com/tj/node-growl/blob/master/lib/growl.js#L28-L126|setupCmd} - * @return {string[]} names of Growl support binaries - */ -const getSupportBinaries = () => { - const binaries = { - Darwin: ['terminal-notifier', 'growlnotify'], - Linux: ['notify-send', 'growl'], - Windows_NT: ['growlnotify.exe'] - }; - return binaries[os.type()] || []; -}; diff --git a/node_modules/mocha/lib/hook.js b/node_modules/mocha/lib/hook.js index 71440d23..862271e7 100644 --- a/node_modules/mocha/lib/hook.js +++ b/node_modules/mocha/lib/hook.js @@ -1,7 +1,8 @@ 'use strict'; var Runnable = require('./runnable'); -var inherits = require('./utils').inherits; +const {inherits, constants} = require('./utils'); +const {MOCHA_ID_PROP_NAME} = constants; /** * Expose `Hook`. @@ -27,6 +28,14 @@ function Hook(title, fn) { */ inherits(Hook, Runnable); +/** + * Resets the state for a next run. + */ +Hook.prototype.reset = function () { + Runnable.prototype.reset.call(this); + delete this._error; +}; + /** * Get or set the test `err`. * @@ -35,7 +44,7 @@ inherits(Hook, Runnable); * @param {Error} err * @return {Error} */ -Hook.prototype.error = function(err) { +Hook.prototype.error = function (err) { if (!arguments.length) { err = this._error; this._error = null; @@ -44,3 +53,37 @@ Hook.prototype.error = function(err) { this._error = err; }; + +/** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ +Hook.prototype.serialize = function serialize() { + return { + $$currentRetry: this.currentRetry(), + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + $$titlePath: this.titlePath(), + ctx: + this.ctx && this.ctx.currentTest + ? { + currentTest: { + title: this.ctx.currentTest.title, + [MOCHA_ID_PROP_NAME]: this.ctx.currentTest.id + } + } + : {}, + duration: this.duration, + file: this.file, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME]: this.parent.id + }, + state: this.state, + title: this.title, + type: this.type, + [MOCHA_ID_PROP_NAME]: this.id + }; +}; diff --git a/node_modules/mocha/lib/interfaces/bdd.js b/node_modules/mocha/lib/interfaces/bdd.js index ef8d281e..40581617 100644 --- a/node_modules/mocha/lib/interfaces/bdd.js +++ b/node_modules/mocha/lib/interfaces/bdd.js @@ -1,8 +1,8 @@ 'use strict'; var Test = require('../test'); -var EVENT_FILE_PRE_REQUIRE = require('../suite').constants - .EVENT_FILE_PRE_REQUIRE; +var EVENT_FILE_PRE_REQUIRE = + require('../suite').constants.EVENT_FILE_PRE_REQUIRE; /** * BDD-style interface: @@ -24,7 +24,7 @@ var EVENT_FILE_PRE_REQUIRE = require('../suite').constants module.exports = function bddInterface(suite) { var suites = [suite]; - suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) { + suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { var common = require('./common')(suites, context, mocha); context.before = common.before; @@ -38,11 +38,11 @@ module.exports = function bddInterface(suite) { * and/or tests. */ - context.describe = context.context = function(title, fn) { + context.describe = context.context = function (title, fn) { return common.suite.create({ - title: title, - file: file, - fn: fn + title, + file, + fn }); }; @@ -50,26 +50,26 @@ module.exports = function bddInterface(suite) { * Pending describe. */ - context.xdescribe = context.xcontext = context.describe.skip = function( - title, - fn - ) { - return common.suite.skip({ - title: title, - file: file, - fn: fn - }); - }; + context.xdescribe = + context.xcontext = + context.describe.skip = + function (title, fn) { + return common.suite.skip({ + title, + file, + fn + }); + }; /** * Exclusive suite. */ - context.describe.only = function(title, fn) { + context.describe.only = function (title, fn) { return common.suite.only({ - title: title, - file: file, - fn: fn + title, + file, + fn }); }; @@ -79,7 +79,7 @@ module.exports = function bddInterface(suite) { * acting as a thunk. */ - context.it = context.specify = function(title, fn) { + context.it = context.specify = function (title, fn) { var suite = suites[0]; if (suite.isPending()) { fn = null; @@ -94,7 +94,7 @@ module.exports = function bddInterface(suite) { * Exclusive test-case. */ - context.it.only = function(title, fn) { + context.it.only = function (title, fn) { return common.test.only(mocha, context.it(title, fn)); }; @@ -102,16 +102,12 @@ module.exports = function bddInterface(suite) { * Pending test case. */ - context.xit = context.xspecify = context.it.skip = function(title) { - return context.it(title); - }; - - /** - * Number of attempts to retry. - */ - context.it.retries = function(n) { - context.retries(n); - }; + context.xit = + context.xspecify = + context.it.skip = + function (title) { + return context.it(title); + }; }); }; diff --git a/node_modules/mocha/lib/interfaces/common.js b/node_modules/mocha/lib/interfaces/common.js index 1802fcc9..ba8b5f85 100644 --- a/node_modules/mocha/lib/interfaces/common.js +++ b/node_modules/mocha/lib/interfaces/common.js @@ -1,18 +1,25 @@ 'use strict'; +/** + @module interfaces/common +*/ + var Suite = require('../suite'); var errors = require('../errors'); var createMissingArgumentError = errors.createMissingArgumentError; +var createUnsupportedError = errors.createUnsupportedError; +var createForbiddenExclusivityError = errors.createForbiddenExclusivityError; /** * Functions common to more than one interface. * + * @private * @param {Suite[]} suites * @param {Context} context * @param {Mocha} mocha * @return {Object} An object containing common functions. */ -module.exports = function(suites, context, mocha) { +module.exports = function (suites, context, mocha) { /** * Check if the suite should be tested. * @@ -49,7 +56,7 @@ module.exports = function(suites, context, mocha) { * @param {string} name * @param {Function} fn */ - before: function(name, fn) { + before: function (name, fn) { suites[0].beforeAll(name, fn); }, @@ -59,7 +66,7 @@ module.exports = function(suites, context, mocha) { * @param {string} name * @param {Function} fn */ - after: function(name, fn) { + after: function (name, fn) { suites[0].afterAll(name, fn); }, @@ -69,7 +76,7 @@ module.exports = function(suites, context, mocha) { * @param {string} name * @param {Function} fn */ - beforeEach: function(name, fn) { + beforeEach: function (name, fn) { suites[0].beforeEach(name, fn); }, @@ -79,7 +86,7 @@ module.exports = function(suites, context, mocha) { * @param {string} name * @param {Function} fn */ - afterEach: function(name, fn) { + afterEach: function (name, fn) { suites[0].afterEach(name, fn); }, @@ -92,6 +99,9 @@ module.exports = function(suites, context, mocha) { * @returns {Suite} */ only: function only(opts) { + if (mocha.options.forbidOnly) { + throw createForbiddenExclusivityError(mocha); + } opts.isOnly = true; return this.create(opts); }, @@ -125,16 +135,14 @@ module.exports = function(suites, context, mocha) { suite.file = opts.file; suites.unshift(suite); if (opts.isOnly) { - if (mocha.options.forbidOnly && shouldBeTested(suite)) { - throw new Error('`.only` forbidden'); - } - - suite.parent.appendOnlySuite(suite); + suite.markOnly(); } - if (suite.pending) { - if (mocha.options.forbidPending && shouldBeTested(suite)) { - throw new Error('Pending test forbidden'); - } + if ( + suite.pending && + mocha.options.forbidPending && + shouldBeTested(suite) + ) { + throw createUnsupportedError('Pending test forbidden'); } if (typeof opts.fn === 'function') { opts.fn.call(suite); @@ -164,8 +172,11 @@ module.exports = function(suites, context, mocha) { * @param {Function} test * @returns {*} */ - only: function(mocha, test) { - test.parent.appendOnlyTest(test); + only: function (mocha, test) { + if (mocha.options.forbidOnly) { + throw createForbiddenExclusivityError(mocha); + } + test.markOnly(); return test; }, @@ -174,17 +185,8 @@ module.exports = function(suites, context, mocha) { * * @param {string} title */ - skip: function(title) { + skip: function (title) { context.test(title); - }, - - /** - * Number of retry attempts - * - * @param {number} n - */ - retries: function(n) { - context.retries(n); } } }; diff --git a/node_modules/mocha/lib/interfaces/exports.js b/node_modules/mocha/lib/interfaces/exports.js index 5b4c7bd6..79b762b5 100644 --- a/node_modules/mocha/lib/interfaces/exports.js +++ b/node_modules/mocha/lib/interfaces/exports.js @@ -19,7 +19,7 @@ var Test = require('../test'); * * @param {Suite} suite Root suite. */ -module.exports = function(suite) { +module.exports = function (suite) { var suites = [suite]; suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit); diff --git a/node_modules/mocha/lib/interfaces/qunit.js b/node_modules/mocha/lib/interfaces/qunit.js index a2dc3320..8f5434c2 100644 --- a/node_modules/mocha/lib/interfaces/qunit.js +++ b/node_modules/mocha/lib/interfaces/qunit.js @@ -1,8 +1,8 @@ 'use strict'; var Test = require('../test'); -var EVENT_FILE_PRE_REQUIRE = require('../suite').constants - .EVENT_FILE_PRE_REQUIRE; +var EVENT_FILE_PRE_REQUIRE = + require('../suite').constants.EVENT_FILE_PRE_REQUIRE; /** * QUnit-style interface: @@ -32,7 +32,7 @@ var EVENT_FILE_PRE_REQUIRE = require('../suite').constants module.exports = function qUnitInterface(suite) { var suites = [suite]; - suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) { + suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { var common = require('./common')(suites, context, mocha); context.before = common.before; @@ -44,13 +44,13 @@ module.exports = function qUnitInterface(suite) { * Describe a "suite" with the given `title`. */ - context.suite = function(title) { + context.suite = function (title) { if (suites.length > 1) { suites.shift(); } return common.suite.create({ - title: title, - file: file, + title, + file, fn: false }); }; @@ -59,13 +59,13 @@ module.exports = function qUnitInterface(suite) { * Exclusive Suite. */ - context.suite.only = function(title) { + context.suite.only = function (title) { if (suites.length > 1) { suites.shift(); } return common.suite.only({ - title: title, - file: file, + title, + file, fn: false }); }; @@ -76,7 +76,7 @@ module.exports = function qUnitInterface(suite) { * acting as a thunk. */ - context.test = function(title, fn) { + context.test = function (title, fn) { var test = new Test(title, fn); test.file = file; suites[0].addTest(test); @@ -87,12 +87,11 @@ module.exports = function qUnitInterface(suite) { * Exclusive test-case. */ - context.test.only = function(title, fn) { + context.test.only = function (title, fn) { return common.test.only(mocha, context.test(title, fn)); }; context.test.skip = common.test.skip; - context.test.retries = common.test.retries; }); }; diff --git a/node_modules/mocha/lib/interfaces/tdd.js b/node_modules/mocha/lib/interfaces/tdd.js index a44c7fe2..8b7b1d57 100644 --- a/node_modules/mocha/lib/interfaces/tdd.js +++ b/node_modules/mocha/lib/interfaces/tdd.js @@ -1,8 +1,8 @@ 'use strict'; var Test = require('../test'); -var EVENT_FILE_PRE_REQUIRE = require('../suite').constants - .EVENT_FILE_PRE_REQUIRE; +var EVENT_FILE_PRE_REQUIRE = + require('../suite').constants.EVENT_FILE_PRE_REQUIRE; /** * TDD-style interface: @@ -29,10 +29,10 @@ var EVENT_FILE_PRE_REQUIRE = require('../suite').constants * * @param {Suite} suite Root suite. */ -module.exports = function(suite) { +module.exports = function (suite) { var suites = [suite]; - suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) { + suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { var common = require('./common')(suites, context, mocha); context.setup = common.beforeEach; @@ -45,33 +45,33 @@ module.exports = function(suite) { * Describe a "suite" with the given `title` and callback `fn` containing * nested suites and/or tests. */ - context.suite = function(title, fn) { + context.suite = function (title, fn) { return common.suite.create({ - title: title, - file: file, - fn: fn + title, + file, + fn }); }; /** * Pending suite. */ - context.suite.skip = function(title, fn) { + context.suite.skip = function (title, fn) { return common.suite.skip({ - title: title, - file: file, - fn: fn + title, + file, + fn }); }; /** * Exclusive test-case. */ - context.suite.only = function(title, fn) { + context.suite.only = function (title, fn) { return common.suite.only({ - title: title, - file: file, - fn: fn + title, + file, + fn }); }; @@ -79,7 +79,7 @@ module.exports = function(suite) { * Describe a specification or test-case with the given `title` and * callback `fn` acting as a thunk. */ - context.test = function(title, fn) { + context.test = function (title, fn) { var suite = suites[0]; if (suite.isPending()) { fn = null; @@ -94,12 +94,11 @@ module.exports = function(suite) { * Exclusive test-case. */ - context.test.only = function(title, fn) { + context.test.only = function (title, fn) { return common.test.only(mocha, context.test(title, fn)); }; context.test.skip = common.test.skip; - context.test.retries = common.test.retries; }); }; diff --git a/node_modules/mocha/lib/mocha.js b/node_modules/mocha/lib/mocha.js index c0a5aa6d..f93865df 100644 --- a/node_modules/mocha/lib/mocha.js +++ b/node_modules/mocha/lib/mocha.js @@ -9,39 +9,67 @@ var escapeRe = require('escape-string-regexp'); var path = require('path'); var builtinReporters = require('./reporters'); -var growl = require('./growl'); var utils = require('./utils'); var mocharc = require('./mocharc.json'); -var errors = require('./errors'); var Suite = require('./suite'); +var esmUtils = require('./nodejs/esm-utils'); var createStatsCollector = require('./stats-collector'); -var createInvalidReporterError = errors.createInvalidReporterError; -var createInvalidInterfaceError = errors.createInvalidInterfaceError; -var EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE; -var EVENT_FILE_POST_REQUIRE = Suite.constants.EVENT_FILE_POST_REQUIRE; -var EVENT_FILE_REQUIRE = Suite.constants.EVENT_FILE_REQUIRE; -var sQuote = utils.sQuote; +const { + createInvalidReporterError, + createInvalidInterfaceError, + createMochaInstanceAlreadyDisposedError, + createMochaInstanceAlreadyRunningError, + createUnsupportedError +} = require('./errors'); +const {EVENT_FILE_PRE_REQUIRE, EVENT_FILE_POST_REQUIRE, EVENT_FILE_REQUIRE} = + Suite.constants; +var debug = require('debug')('mocha:mocha'); exports = module.exports = Mocha; +/** + * A Mocha instance is a finite state machine. + * These are the states it can be in. + * @private + */ +var mochaStates = utils.defineConstants({ + /** + * Initial state of the mocha instance + * @private + */ + INIT: 'init', + /** + * Mocha instance is running tests + * @private + */ + RUNNING: 'running', + /** + * Mocha instance is done running tests and references to test functions and hooks are cleaned. + * You can reset this state by unloading the test files. + * @private + */ + REFERENCES_CLEANED: 'referencesCleaned', + /** + * Mocha instance is disposed and can no longer be used. + * @private + */ + DISPOSED: 'disposed' +}); + /** * To require local UIs and reporters when running in node. */ -if (!process.browser) { - var cwd = process.cwd(); +if (!utils.isBrowser() && typeof module.paths !== 'undefined') { + var cwd = utils.cwd(); module.paths.push(cwd, path.join(cwd, 'node_modules')); } /** * Expose internals. + * @private */ -/** - * @public - * @class utils - * @memberof Mocha - */ exports.utils = utils; exports.interfaces = require('./interfaces'); /** @@ -60,6 +88,61 @@ exports.Suite = Suite; exports.Hook = require('./hook'); exports.Test = require('./test'); +let currentContext; +exports.afterEach = function (...args) { + return (currentContext.afterEach || currentContext.teardown).apply( + this, + args + ); +}; +exports.after = function (...args) { + return (currentContext.after || currentContext.suiteTeardown).apply( + this, + args + ); +}; +exports.beforeEach = function (...args) { + return (currentContext.beforeEach || currentContext.setup).apply(this, args); +}; +exports.before = function (...args) { + return (currentContext.before || currentContext.suiteSetup).apply(this, args); +}; +exports.describe = function (...args) { + return (currentContext.describe || currentContext.suite).apply(this, args); +}; +exports.describe.only = function (...args) { + return (currentContext.describe || currentContext.suite).only.apply( + this, + args + ); +}; +exports.describe.skip = function (...args) { + return (currentContext.describe || currentContext.suite).skip.apply( + this, + args + ); +}; +exports.it = function (...args) { + return (currentContext.it || currentContext.test).apply(this, args); +}; +exports.it.only = function (...args) { + return (currentContext.it || currentContext.test).only.apply(this, args); +}; +exports.it.skip = function (...args) { + return (currentContext.it || currentContext.test).skip.apply(this, args); +}; +exports.xdescribe = exports.describe.skip; +exports.xit = exports.it.skip; +exports.setup = exports.beforeEach; +exports.suiteSetup = exports.before; +exports.suiteTeardown = exports.after; +exports.suite = exports.describe; +exports.teardown = exports.afterEach; +exports.test = exports.it; +exports.run = function (...args) { + return currentContext.run.apply(this, args); +}; + /** * Constructs a new Mocha instance with `options`. * @@ -69,65 +152,51 @@ exports.Test = require('./test'); * @param {boolean} [options.allowUncaught] - Propagate uncaught errors? * @param {boolean} [options.asyncOnly] - Force `done` callback or promise? * @param {boolean} [options.bail] - Bail after first test failure? - * @param {boolean} [options.checkLeaks] - If true, check leaks. + * @param {boolean} [options.checkLeaks] - Check for global variable leaks? + * @param {boolean} [options.color] - Color TTY output from reporter? * @param {boolean} [options.delay] - Delay root suite execution? - * @param {boolean} [options.enableTimeouts] - Enable timeouts? + * @param {boolean} [options.diff] - Show diff on failure? + * @param {boolean} [options.dryRun] - Report tests without running them? + * @param {boolean} [options.failZero] - Fail test run if zero tests? * @param {string} [options.fgrep] - Test filter given string. * @param {boolean} [options.forbidOnly] - Tests marked `only` fail the suite? * @param {boolean} [options.forbidPending] - Pending tests fail the suite? - * @param {boolean} [options.fullStackTrace] - Full stacktrace upon failure? + * @param {boolean} [options.fullTrace] - Full stacktrace upon failure? * @param {string[]} [options.global] - Variables expected in global scope. * @param {RegExp|string} [options.grep] - Test filter given regular expression. - * @param {boolean} [options.growl] - Enable desktop notifications? - * @param {boolean} [options.hideDiff] - Suppress diffs from failures? - * @param {boolean} [options.ignoreLeaks] - Ignore global leaks? + * @param {boolean} [options.inlineDiffs] - Display inline diffs? * @param {boolean} [options.invert] - Invert test filter matches? * @param {boolean} [options.noHighlighting] - Disable syntax highlighting? - * @param {string} [options.reporter] - Reporter name. + * @param {string|constructor} [options.reporter] - Reporter name or constructor. * @param {Object} [options.reporterOption] - Reporter settings object. * @param {number} [options.retries] - Number of times to retry failed tests. * @param {number} [options.slow] - Slow threshold value. * @param {number|string} [options.timeout] - Timeout threshold value. * @param {string} [options.ui] - Interface name. - * @param {boolean} [options.color] - Color TTY output from reporter? - * @param {boolean} [options.useInlineDiffs] - Use inline diffs? + * @param {boolean} [options.parallel] - Run jobs in parallel. + * @param {number} [options.jobs] - Max number of worker processes for parallel runs. + * @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root suite with. + * @param {string[]} [options.require] - Pathname of `rootHooks` plugin for parallel runs. + * @param {boolean} [options.isWorker] - Should be `true` if `Mocha` process is running in a worker process. */ -function Mocha(options) { - options = utils.assign({}, mocharc, options || {}); +function Mocha(options = {}) { + options = {...mocharc, ...options}; this.files = []; this.options = options; // root suite this.suite = new exports.Suite('', new exports.Context(), true); - - if ('useColors' in options) { - utils.deprecate( - 'useColors is DEPRECATED and will be removed from a future version of Mocha. Instead, use the "color" option' - ); - options.color = 'color' in options ? options.color : options.useColors; - } - - // Globals are passed in as options.global, with options.globals for backward compatibility. - options.globals = options.global || options.globals || []; - delete options.global; + this._cleanReferencesAfterRun = true; + this._state = mochaStates.INIT; this.grep(options.grep) .fgrep(options.fgrep) .ui(options.ui) - .bail(options.bail) - .reporter(options.reporter, options.reporterOptions) - .useColors(options.color) + .reporter( + options.reporter, + options.reporterOption || options.reporterOptions // for backwards compatibility + ) .slow(options.slow) - .useInlineDiffs(options.inlineDiffs) - .globals(options.globals); - - if ('enableTimeouts' in options) { - utils.deprecate( - 'enableTimeouts is DEPRECATED and will be removed from a future version of Mocha. Instead, use "timeout: false" to disable timeouts.' - ); - if (options.enableTimeouts === false) { - this.timeout(0); - } - } + .global(options.global); // this guard exists because Suite#timeout does not consider `undefined` to be valid input if (typeof options.timeout !== 'undefined') { @@ -138,41 +207,81 @@ function Mocha(options) { this.retries(options.retries); } - if ('diff' in options) { - this.hideDiff(!options.diff); - } - [ 'allowUncaught', 'asyncOnly', + 'bail', 'checkLeaks', + 'color', 'delay', + 'diff', + 'dryRun', + 'failZero', 'forbidOnly', 'forbidPending', 'fullTrace', - 'growl', + 'inlineDiffs', 'invert' - ].forEach(function(opt) { + ].forEach(function (opt) { if (options[opt]) { this[opt](); } }, this); + + if (options.rootHooks) { + this.rootHooks(options.rootHooks); + } + + /** + * The class which we'll instantiate in {@link Mocha#run}. Defaults to + * {@link Runner} in serial mode; changes in parallel mode. + * @memberof Mocha + * @private + */ + this._runnerClass = exports.Runner; + + /** + * Whether or not to call {@link Mocha#loadFiles} implicitly when calling + * {@link Mocha#run}. If this is `true`, then it's up to the consumer to call + * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}. + * @private + * @memberof Mocha + */ + this._lazyLoadFiles = false; + + /** + * It's useful for a Mocha instance to know if it's running in a worker process. + * We could derive this via other means, but it's helpful to have a flag to refer to. + * @memberof Mocha + * @private + */ + this.isWorker = Boolean(options.isWorker); + + this.globalSetup(options.globalSetup) + .globalTeardown(options.globalTeardown) + .enableGlobalSetup(options.enableGlobalSetup) + .enableGlobalTeardown(options.enableGlobalTeardown); + + if ( + options.parallel && + (typeof options.jobs === 'undefined' || options.jobs > 1) + ) { + debug('attempting to enable parallel mode'); + this.parallelMode(true); + } } /** * Enables or disables bailing on the first failure. * * @public - * @see {@link https://mochajs.org/#-b---bail|CLI option} + * @see [CLI option](../#-bail-b) * @param {boolean} [bail=true] - Whether to bail on first error. * @returns {Mocha} this * @chainable */ -Mocha.prototype.bail = function(bail) { - if (!arguments.length) { - bail = true; - } - this.suite.bail(bail); +Mocha.prototype.bail = function (bail) { + this.suite.bail(bail !== false); return this; }; @@ -184,12 +293,12 @@ Mocha.prototype.bail = function(bail) { * Useful for generic setup code that must be included within test suite. * * @public - * @see {@link https://mochajs.org/#--file-file|CLI option} + * @see [CLI option](../#-file-filedirectoryglob) * @param {string} file - Pathname of file to be loaded. * @returns {Mocha} this * @chainable */ -Mocha.prototype.addFile = function(file) { +Mocha.prototype.addFile = function (file) { this.files.push(file); return this; }; @@ -198,9 +307,9 @@ Mocha.prototype.addFile = function(file) { * Sets reporter to `reporter`, defaults to "spec". * * @public - * @see {@link https://mochajs.org/#-r---reporter-name|CLI option} - * @see {@link https://mochajs.org/#reporters|Reporters} - * @param {String|Function} reporter - Reporter name or constructor. + * @see [CLI option](../#-reporter-name-r-name) + * @see [Reporters](../#reporters) + * @param {String|Function} reporterName - Reporter name or constructor. * @param {Object} [reporterOptions] - Options used to configure the reporter. * @returns {Mocha} this * @chainable @@ -210,53 +319,38 @@ Mocha.prototype.addFile = function(file) { * // Use XUnit reporter and direct its output to file * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' }); */ -Mocha.prototype.reporter = function(reporter, reporterOptions) { - if (typeof reporter === 'function') { - this._reporter = reporter; +Mocha.prototype.reporter = function (reporterName, reporterOptions) { + if (typeof reporterName === 'function') { + this._reporter = reporterName; } else { - reporter = reporter || 'spec'; - var _reporter; + reporterName = reporterName || 'spec'; + var reporter; // Try to load a built-in reporter. - if (builtinReporters[reporter]) { - _reporter = builtinReporters[reporter]; + if (builtinReporters[reporterName]) { + reporter = builtinReporters[reporterName]; } // Try to load reporters from process.cwd() and node_modules - if (!_reporter) { + if (!reporter) { + let foundReporter; try { - _reporter = require(reporter); + foundReporter = require.resolve(reporterName); + reporter = require(foundReporter); } catch (err) { - if ( - err.code !== 'MODULE_NOT_FOUND' || - err.message.indexOf('Cannot find module') !== -1 - ) { - // Try to load reporters from a path (absolute or relative) - try { - _reporter = require(path.resolve(process.cwd(), reporter)); - } catch (_err) { - _err.code !== 'MODULE_NOT_FOUND' || - _err.message.indexOf('Cannot find module') !== -1 - ? console.warn(sQuote(reporter) + ' reporter not found') - : console.warn( - sQuote(reporter) + - ' reporter blew up with error:\n' + - err.stack - ); - } - } else { - console.warn( - sQuote(reporter) + ' reporter blew up with error:\n' + err.stack - ); + if (foundReporter) { + throw createInvalidReporterError(err.message, foundReporter); + } + // Try to load reporters from a cwd-relative path + try { + reporter = require(path.resolve(reporterName)); + } catch (e) { + throw createInvalidReporterError(e.message, reporterName); } } } - if (!_reporter) { - throw createInvalidReporterError( - 'invalid reporter ' + sQuote(reporter), - reporter - ); - } - this._reporter = _reporter; + this._reporter = reporter; } + this.options.reporterOption = reporterOptions; + // alias option name is used in built-in reporters xunit/tap/progress this.options.reporterOptions = reporterOptions; return this; }; @@ -265,14 +359,14 @@ Mocha.prototype.reporter = function(reporter, reporterOptions) { * Sets test UI `name`, defaults to "bdd". * * @public - * @see {@link https://mochajs.org/#-u---ui-name|CLI option} - * @see {@link https://mochajs.org/#interfaces|Interface DSLs} + * @see [CLI option](../#-ui-name-u-name) + * @see [Interface DSLs](../#interfaces) * @param {string|Function} [ui=bdd] - Interface name or class. * @returns {Mocha} this * @chainable * @throws {Error} if requested interface cannot be loaded */ -Mocha.prototype.ui = function(ui) { +Mocha.prototype.ui = function (ui) { var bindInterface; if (typeof ui === 'function') { bindInterface = ui; @@ -283,52 +377,38 @@ Mocha.prototype.ui = function(ui) { try { bindInterface = require(ui); } catch (err) { - throw createInvalidInterfaceError( - 'invalid interface ' + sQuote(ui), - ui - ); + throw createInvalidInterfaceError(`invalid interface '${ui}'`, ui); } } } bindInterface(this.suite); - this.suite.on(EVENT_FILE_PRE_REQUIRE, function(context) { - exports.afterEach = context.afterEach || context.teardown; - exports.after = context.after || context.suiteTeardown; - exports.beforeEach = context.beforeEach || context.setup; - exports.before = context.before || context.suiteSetup; - exports.describe = context.describe || context.suite; - exports.it = context.it || context.test; - exports.xit = context.xit || (context.test && context.test.skip); - exports.setup = context.setup || context.beforeEach; - exports.suiteSetup = context.suiteSetup || context.before; - exports.suiteTeardown = context.suiteTeardown || context.after; - exports.suite = context.suite || context.describe; - exports.teardown = context.teardown || context.afterEach; - exports.test = context.test || context.it; - exports.run = context.run; + this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) { + currentContext = context; }); return this; }; /** - * Loads `files` prior to execution. + * Loads `files` prior to execution. Does not support ES Modules. * * @description * The implementation relies on Node's `require` to execute * the test interface functions and will be subject to its cache. + * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync. * * @private * @see {@link Mocha#addFile} * @see {@link Mocha#run} * @see {@link Mocha#unloadFiles} + * @see {@link Mocha#loadFilesAsync} * @param {Function} [fn] - Callback invoked upon completion. */ -Mocha.prototype.loadFiles = function(fn) { +Mocha.prototype.loadFiles = function (fn) { var self = this; var suite = this.suite; - this.files.forEach(function(file) { + this.files.forEach(function (file) { file = path.resolve(file); suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self); suite.emit(EVENT_FILE_REQUIRE, require(file), file, self); @@ -337,6 +417,46 @@ Mocha.prototype.loadFiles = function(fn) { fn && fn(); }; +/** + * Loads `files` prior to execution. Supports Node ES Modules. + * + * @description + * The implementation relies on Node's `require` and `import` to execute + * the test interface functions and will be subject to its cache. + * Supports both CJS and ESM modules. + * + * @public + * @see {@link Mocha#addFile} + * @see {@link Mocha#run} + * @see {@link Mocha#unloadFiles} + * @param {Object} [options] - Settings object. + * @param {Function} [options.esmDecorator] - Function invoked on esm module name right before importing it. By default will passthrough as is. + * @returns {Promise} + * @example + * + * // loads ESM (and CJS) test files asynchronously, then runs root suite + * mocha.loadFilesAsync() + * .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0)) + * .catch(() => process.exitCode = 1); + */ +Mocha.prototype.loadFilesAsync = function ({esmDecorator} = {}) { + var self = this; + var suite = this.suite; + this.lazyLoadFiles(true); + + return esmUtils.loadFilesAsync( + this.files, + function (file) { + suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self); + }, + function (file, resultModule) { + suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self); + suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self); + }, + esmDecorator + ); +}; + /** * Removes a previously loaded file from Node's `require` cache. * @@ -345,28 +465,43 @@ Mocha.prototype.loadFiles = function(fn) { * @see {@link Mocha#unloadFiles} * @param {string} file - Pathname of file to be unloaded. */ -Mocha.unloadFile = function(file) { - delete require.cache[require.resolve(file)]; +Mocha.unloadFile = function (file) { + if (utils.isBrowser()) { + throw createUnsupportedError( + 'unloadFile() is only supported in a Node.js environment' + ); + } + return require('./nodejs/file-unloader').unloadFile(file); }; /** * Unloads `files` from Node's `require` cache. * * @description - * This allows files to be "freshly" reloaded, providing the ability + * This allows required files to be "freshly" reloaded, providing the ability * to reuse a Mocha instance programmatically. + * Note: does not clear ESM module files from the cache * * Intended for consumers — not used internally * * @public - * @see {@link Mocha.unloadFile} - * @see {@link Mocha#loadFiles} * @see {@link Mocha#run} * @returns {Mocha} this * @chainable */ -Mocha.prototype.unloadFiles = function() { - this.files.forEach(Mocha.unloadFile); +Mocha.prototype.unloadFiles = function () { + if (this._state === mochaStates.DISPOSED) { + throw createMochaInstanceAlreadyDisposedError( + 'Mocha instance is already disposed, it cannot be used again.', + this._cleanReferencesAfterRun, + this + ); + } + + this.files.forEach(function (file) { + Mocha.unloadFile(file); + }); + this._state = mochaStates.INIT; return this; }; @@ -383,7 +518,7 @@ Mocha.prototype.unloadFiles = function() { * // Select tests whose full title begins with `"foo"` followed by a period * mocha.fgrep('foo.'); */ -Mocha.prototype.fgrep = function(str) { +Mocha.prototype.fgrep = function (str) { if (!str) { return this; } @@ -404,7 +539,7 @@ Mocha.prototype.fgrep = function(str) { * Previous filter value will be overwritten on each call! * * @public - * @see {@link https://mochajs.org/#-g---grep-pattern|CLI option} + * @see [CLI option](../#-grep-regexp-g-regexp) * @see {@link Mocha#fgrep} * @see {@link Mocha#invert} * @param {RegExp|String} re - Regular expression used to select tests. @@ -424,10 +559,10 @@ Mocha.prototype.fgrep = function(str) { * // Given embedded test `it('only-this-test')`... * mocha.grep('/^only-this-test$/'); // NO! Use `.only()` to do this! */ -Mocha.prototype.grep = function(re) { +Mocha.prototype.grep = function (re) { if (utils.isString(re)) { // extract args if it's regex-like, i.e: [string, pattern, flag] - var arg = re.match(/^\/(.*)\/(g|i|)$|.*/); + var arg = re.match(/^\/(.*)\/([gimy]{0,4})$|.*/); this.options.grep = new RegExp(arg[1] || arg[0], arg[2]); } else { this.options.grep = re; @@ -447,162 +582,137 @@ Mocha.prototype.grep = function(re) { * // Select tests whose full title does *not* contain `"match"`, ignoring case * mocha.grep(/match/i).invert(); */ -Mocha.prototype.invert = function() { +Mocha.prototype.invert = function () { this.options.invert = true; return this; }; /** - * Enables or disables ignoring global leaks. + * Enables or disables checking for global variables leaked while running tests. * * @public - * @see {@link Mocha#checkLeaks} - * @param {boolean} ignoreLeaks - Whether to ignore global leaks. + * @see [CLI option](../#-check-leaks) + * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks. * @return {Mocha} this * @chainable - * @example - * - * // Ignore global leaks - * mocha.ignoreLeaks(true); */ -Mocha.prototype.ignoreLeaks = function(ignoreLeaks) { - this.options.ignoreLeaks = Boolean(ignoreLeaks); +Mocha.prototype.checkLeaks = function (checkLeaks) { + this.options.checkLeaks = checkLeaks !== false; return this; }; /** - * Enables checking for global variables leaked while running tests. - * + * Enables or disables whether or not to dispose after each test run. + * Disable this to ensure you can run the test suite multiple times. + * If disabled, be sure to dispose mocha when you're done to prevent memory leaks. * @public - * @see {@link https://mochajs.org/#--check-leaks|CLI option} - * @see {@link Mocha#ignoreLeaks} + * @see {@link Mocha#dispose} + * @param {boolean} cleanReferencesAfterRun * @return {Mocha} this * @chainable */ -Mocha.prototype.checkLeaks = function() { - this.options.ignoreLeaks = false; +Mocha.prototype.cleanReferencesAfterRun = function (cleanReferencesAfterRun) { + this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false; return this; }; /** - * Displays full stack trace upon test failure. - * + * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests. + * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector. * @public - * @return {Mocha} this - * @chainable */ -Mocha.prototype.fullTrace = function() { - this.options.fullStackTrace = true; - return this; +Mocha.prototype.dispose = function () { + if (this._state === mochaStates.RUNNING) { + throw createMochaInstanceAlreadyRunningError( + 'Cannot dispose while the mocha instance is still running tests.' + ); + } + this.unloadFiles(); + this._previousRunner && this._previousRunner.dispose(); + this.suite.dispose(); + this._state = mochaStates.DISPOSED; }; /** - * Enables desktop notification support if prerequisite software installed. + * Displays full stack trace upon test failure. * * @public - * @see {@link Mocha#isGrowlCapable} - * @see {@link Mocha#_growl} + * @see [CLI option](../#-full-trace) + * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure. * @return {Mocha} this * @chainable */ -Mocha.prototype.growl = function() { - this.options.growl = this.isGrowlCapable(); - if (!this.options.growl) { - var detail = process.browser - ? 'notification support not available in this browser...' - : 'notification support prerequisites not installed...'; - console.error(detail + ' cannot enable!'); - } +Mocha.prototype.fullTrace = function (fullTrace) { + this.options.fullTrace = fullTrace !== false; return this; }; -/** - * @summary - * Determines if Growl support seems likely. - * - * @description - * Not available when run in browser. - * - * @private - * @see {@link Growl#isCapable} - * @see {@link Mocha#growl} - * @return {boolean} whether Growl support can be expected - */ -Mocha.prototype.isGrowlCapable = growl.isCapable; - -/** - * Implements desktop notifications using a pseudo-reporter. - * - * @private - * @see {@link Mocha#growl} - * @see {@link Growl#notify} - * @param {Runner} runner - Runner instance. - */ -Mocha.prototype._growl = growl.notify; - /** * Specifies whitelist of variable names to be expected in global scope. * * @public - * @see {@link https://mochajs.org/#-global-variable-name|CLI option} + * @see [CLI option](../#-global-variable-name) * @see {@link Mocha#checkLeaks} - * @param {String[]|String} globals - Accepted global variable name(s). + * @param {String[]|String} global - Accepted global variable name(s). * @return {Mocha} this * @chainable * @example * * // Specify variables to be expected in global scope - * mocha.globals(['jQuery', 'MyLib']); + * mocha.global(['jQuery', 'MyLib']); */ -Mocha.prototype.globals = function(globals) { - this.options.globals = this.options.globals - .concat(globals) +Mocha.prototype.global = function (global) { + this.options.global = (this.options.global || []) + .concat(global) .filter(Boolean) - .filter(function(elt, idx, arr) { + .filter(function (elt, idx, arr) { return arr.indexOf(elt) === idx; }); return this; }; +// for backwards compatibility, 'globals' is an alias of 'global' +Mocha.prototype.globals = Mocha.prototype.global; /** * Enables or disables TTY color output by screen-oriented reporters. * * @public - * @param {boolean} colors - Whether to enable color output. + * @see [CLI option](../#-color-c-colors) + * @param {boolean} [color=true] - Whether to enable color output. * @return {Mocha} this * @chainable */ -Mocha.prototype.useColors = function(colors) { - if (colors !== undefined) { - this.options.useColors = colors; - } +Mocha.prototype.color = function (color) { + this.options.color = color !== false; return this; }; /** - * Determines if reporter should use inline diffs (rather than +/-) + * Enables or disables reporter to use inline diffs (rather than +/-) * in test failure output. * * @public - * @param {boolean} inlineDiffs - Whether to use inline diffs. + * @see [CLI option](../#-inline-diffs) + * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs. * @return {Mocha} this * @chainable */ -Mocha.prototype.useInlineDiffs = function(inlineDiffs) { - this.options.useInlineDiffs = inlineDiffs !== undefined && inlineDiffs; +Mocha.prototype.inlineDiffs = function (inlineDiffs) { + this.options.inlineDiffs = inlineDiffs !== false; return this; }; /** - * Determines if reporter should include diffs in test failure output. + * Enables or disables reporter to include diff in test failure output. * * @public - * @param {boolean} hideDiff - Whether to hide diffs. + * @see [CLI option](../#-diff) + * @param {boolean} [diff=true] - Whether to show diff on failure. * @return {Mocha} this * @chainable */ -Mocha.prototype.hideDiff = function(hideDiff) { - this.options.hideDiff = hideDiff !== undefined && hideDiff; +Mocha.prototype.diff = function (diff) { + this.options.diff = diff !== false; return this; }; @@ -615,10 +725,8 @@ Mocha.prototype.hideDiff = function(hideDiff) { * If the value is `0`, timeouts will be disabled. * * @public - * @see {@link https://mochajs.org/#-t---timeout-ms|CLI option} - * @see {@link https://mochajs.org/#--no-timeouts|CLI option} - * @see {@link https://mochajs.org/#timeouts|Timeouts} - * @see {@link Mocha#enableTimeouts} + * @see [CLI option](../#-timeout-ms-t-ms) + * @see [Timeouts](../#timeouts) * @param {number|string} msecs - Timeout threshold value. * @return {Mocha} this * @chainable @@ -631,7 +739,7 @@ Mocha.prototype.hideDiff = function(hideDiff) { * // Same as above but using string argument * mocha.timeout('1s'); */ -Mocha.prototype.timeout = function(msecs) { +Mocha.prototype.timeout = function (msecs) { this.suite.timeout(msecs); return this; }; @@ -640,7 +748,8 @@ Mocha.prototype.timeout = function(msecs) { * Sets the number of times to retry failed tests. * * @public - * @see {@link https://mochajs.org/#retry-tests|Retry Tests} + * @see [CLI option](../#-retries-n) + * @see [Retry Tests](../#retry-tests) * @param {number} retry - Number of times to retry failed tests. * @return {Mocha} this * @chainable @@ -649,8 +758,8 @@ Mocha.prototype.timeout = function(msecs) { * // Allow any failed test to retry one more time * mocha.retries(1); */ -Mocha.prototype.retries = function(n) { - this.suite.retries(n); +Mocha.prototype.retries = function (retry) { + this.suite.retries(retry); return this; }; @@ -658,7 +767,7 @@ Mocha.prototype.retries = function(n) { * Sets slowness threshold value. * * @public - * @see {@link https://mochajs.org/#-s---slow-ms|CLI option} + * @see [CLI option](../#-slow-ms-s-ms) * @param {number} msecs - Slowness threshold value. * @return {Mocha} this * @chainable @@ -671,37 +780,22 @@ Mocha.prototype.retries = function(n) { * // Same as above but using string argument * mocha.slow('0.5s'); */ -Mocha.prototype.slow = function(msecs) { +Mocha.prototype.slow = function (msecs) { this.suite.slow(msecs); return this; }; -/** - * Enables or disables timeouts. - * - * @public - * @see {@link https://mochajs.org/#-t---timeout-ms|CLI option} - * @see {@link https://mochajs.org/#--no-timeouts|CLI option} - * @param {boolean} enableTimeouts - Whether to enable timeouts. - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.enableTimeouts = function(enableTimeouts) { - this.suite.enableTimeouts( - arguments.length && enableTimeouts !== undefined ? enableTimeouts : true - ); - return this; -}; - /** * Forces all tests to either accept a `done` callback or return a promise. * * @public + * @see [CLI option](../#-async-only-a) + * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise. * @return {Mocha} this * @chainable */ -Mocha.prototype.asyncOnly = function() { - this.options.asyncOnly = true; +Mocha.prototype.asyncOnly = function (asyncOnly) { + this.options.asyncOnly = asyncOnly !== false; return this; }; @@ -712,20 +806,22 @@ Mocha.prototype.asyncOnly = function() { * @return {Mocha} this * @chainable */ -Mocha.prototype.noHighlighting = function() { +Mocha.prototype.noHighlighting = function () { this.options.noHighlighting = true; return this; }; /** - * Enables uncaught errors to propagate (in browser). + * Enables or disables uncaught errors to propagate. * * @public + * @see [CLI option](../#-allow-uncaught) + * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors. * @return {Mocha} this * @chainable */ -Mocha.prototype.allowUncaught = function() { - this.options.allowUncaught = true; +Mocha.prototype.allowUncaught = function (allowUncaught) { + this.options.allowUncaught = allowUncaught !== false; return this; }; @@ -734,10 +830,10 @@ Mocha.prototype.allowUncaught = function() { * Delays root suite execution. * * @description - * Used to perform asynch operations before any suites are run. + * Used to perform async operations before any suites are run. * * @public - * @see {@link https://mochajs.org/#delayed-root-suite|delayed root suite} + * @see [delayed root suite](../#delayed-root-suite) * @returns {Mocha} this * @chainable */ @@ -746,15 +842,45 @@ Mocha.prototype.delay = function delay() { return this; }; +/** + * Enables or disables running tests in dry-run mode. + * + * @public + * @see [CLI option](../#-dry-run) + * @param {boolean} [dryRun=true] - Whether to activate dry-run mode. + * @return {Mocha} this + * @chainable + */ +Mocha.prototype.dryRun = function (dryRun) { + this.options.dryRun = dryRun !== false; + return this; +}; + +/** + * Fails test run if no tests encountered with exit-code 1. + * + * @public + * @see [CLI option](../#-fail-zero) + * @param {boolean} [failZero=true] - Whether to fail test run. + * @return {Mocha} this + * @chainable + */ +Mocha.prototype.failZero = function (failZero) { + this.options.failZero = failZero !== false; + return this; +}; + /** * Causes tests marked `only` to fail the suite. * * @public + * @see [CLI option](../#-forbid-only) + * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite. * @returns {Mocha} this * @chainable */ -Mocha.prototype.forbidOnly = function() { - this.options.forbidOnly = true; +Mocha.prototype.forbidOnly = function (forbidOnly) { + this.options.forbidOnly = forbidOnly !== false; return this; }; @@ -762,14 +888,39 @@ Mocha.prototype.forbidOnly = function() { * Causes pending tests and tests marked `skip` to fail the suite. * * @public + * @see [CLI option](../#-forbid-pending) + * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite. * @returns {Mocha} this * @chainable */ -Mocha.prototype.forbidPending = function() { - this.options.forbidPending = true; +Mocha.prototype.forbidPending = function (forbidPending) { + this.options.forbidPending = forbidPending !== false; return this; }; +/** + * Throws an error if mocha is in the wrong state to be able to transition to a "running" state. + * @private + */ +Mocha.prototype._guardRunningStateTransition = function () { + if (this._state === mochaStates.RUNNING) { + throw createMochaInstanceAlreadyRunningError( + 'Mocha instance is currently running tests, cannot start a next test run until this one is done', + this + ); + } + if ( + this._state === mochaStates.DISPOSED || + this._state === mochaStates.REFERENCES_CLEANED + ) { + throw createMochaInstanceAlreadyDisposedError( + 'Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.', + this._cleanReferencesAfterRun, + this + ); + } +}; + /** * Mocha version as specified by "package.json". * @@ -787,6 +938,7 @@ Object.defineProperty(Mocha.prototype, 'version', { /** * Callback to be invoked when test execution is complete. * + * @private * @callback DoneCB * @param {number} failures - Number of failures that occurred. */ @@ -800,24 +952,38 @@ Object.defineProperty(Mocha.prototype, 'version', { * the cache first! * * @public - * @see {@link Mocha#loadFiles} * @see {@link Mocha#unloadFiles} * @see {@link Runner#run} * @param {DoneCB} [fn] - Callback invoked when test execution completed. - * @return {Runner} runner instance + * @returns {Runner} runner instance + * @example + * + * // exit with non-zero status if there were test failures + * mocha.run(failures => process.exitCode = failures ? 1 : 0); */ -Mocha.prototype.run = function(fn) { - if (this.files.length) { +Mocha.prototype.run = function (fn) { + this._guardRunningStateTransition(); + this._state = mochaStates.RUNNING; + if (this._previousRunner) { + this._previousRunner.dispose(); + this.suite.reset(); + } + if (this.files.length && !this._lazyLoadFiles) { this.loadFiles(); } var suite = this.suite; var options = this.options; options.files = this.files; - var runner = new exports.Runner(suite, options.delay); + const runner = new this._runnerClass(suite, { + cleanReferencesAfterRun: this._cleanReferencesAfterRun, + delay: options.delay, + dryRun: options.dryRun, + failZero: options.failZero + }); createStatsCollector(runner); var reporter = new this._reporter(runner, options); - runner.ignoreLeaks = options.ignoreLeaks !== false; - runner.fullStackTrace = options.fullStackTrace; + runner.checkLeaks = options.checkLeaks === true; + runner.fullStackTrace = options.fullTrace; runner.asyncOnly = options.asyncOnly; runner.allowUncaught = options.allowUncaught; runner.forbidOnly = options.forbidOnly; @@ -825,26 +991,326 @@ Mocha.prototype.run = function(fn) { if (options.grep) { runner.grep(options.grep, options.invert); } - if (options.globals) { - runner.globals(options.globals); + if (options.global) { + runner.globals(options.global); } - if (options.growl) { - this._growl(runner); + if (options.color !== undefined) { + exports.reporters.Base.useColors = options.color; } - if (options.useColors !== undefined) { - exports.reporters.Base.useColors = options.useColors; - } - exports.reporters.Base.inlineDiffs = options.useInlineDiffs; - exports.reporters.Base.hideDiff = options.hideDiff; + exports.reporters.Base.inlineDiffs = options.inlineDiffs; + exports.reporters.Base.hideDiff = !options.diff; - function done(failures) { + const done = failures => { + this._previousRunner = runner; + this._state = this._cleanReferencesAfterRun + ? mochaStates.REFERENCES_CLEANED + : mochaStates.INIT; fn = fn || utils.noop; - if (reporter.done) { + if (typeof reporter.done === 'function') { reporter.done(failures, fn); } else { fn(failures); } + }; + + const runAsync = async runner => { + const context = + this.options.enableGlobalSetup && this.hasGlobalSetupFixtures() + ? await this.runGlobalSetup(runner) + : {}; + const failureCount = await runner.runAsync({ + files: this.files, + options + }); + if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) { + await this.runGlobalTeardown(runner, {context}); + } + return failureCount; + }; + + // no "catch" here is intentional. errors coming out of + // Runner#run are considered uncaught/unhandled and caught + // by the `process` event listeners. + // also: returning anything other than `runner` would be a breaking + // change + runAsync(runner).then(done); + + return runner; +}; + +/** + * Assigns hooks to the root suite + * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite + * @chainable + */ +Mocha.prototype.rootHooks = function rootHooks({ + beforeAll = [], + beforeEach = [], + afterAll = [], + afterEach = [] +} = {}) { + beforeAll = utils.castArray(beforeAll); + beforeEach = utils.castArray(beforeEach); + afterAll = utils.castArray(afterAll); + afterEach = utils.castArray(afterEach); + beforeAll.forEach(hook => { + this.suite.beforeAll(hook); + }); + beforeEach.forEach(hook => { + this.suite.beforeEach(hook); + }); + afterAll.forEach(hook => { + this.suite.afterAll(hook); + }); + afterEach.forEach(hook => { + this.suite.afterEach(hook); + }); + return this; +}; + +/** + * Toggles parallel mode. + * + * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to + * use; also enables lazy file loading if not already done so. + * + * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel + * mode, but parallel mode is _not_ a prerequisite for lazy loading! + * @param {boolean} [enable] - If `true`, enable; otherwise disable. + * @throws If run in browser + * @throws If Mocha not in `INIT` state + * @returns {Mocha} + * @chainable + * @public + */ +Mocha.prototype.parallelMode = function parallelMode(enable = true) { + if (utils.isBrowser()) { + throw createUnsupportedError('parallel mode is only supported in Node.js'); + } + const parallel = Boolean(enable); + if ( + parallel === this.options.parallel && + this._lazyLoadFiles && + this._runnerClass !== exports.Runner + ) { + return this; + } + if (this._state !== mochaStates.INIT) { + throw createUnsupportedError( + 'cannot change parallel mode after having called run()' + ); + } + this.options.parallel = parallel; + + // swap Runner class + this._runnerClass = parallel + ? require('./nodejs/parallel-buffered-runner') + : exports.Runner; + + // lazyLoadFiles may have been set `true` otherwise (for ESM loading), + // so keep `true` if so. + return this.lazyLoadFiles(this._lazyLoadFiles || parallel); +}; + +/** + * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This + * setting is used by watch mode, parallel mode, and for loading ESM files. + * @todo This should throw if we've already loaded files; such behavior + * necessitates adding a new state. + * @param {boolean} [enable] - If `true`, disable eager loading of files in + * {@link Mocha#run} + * @chainable + * @public + */ +Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) { + this._lazyLoadFiles = enable === true; + debug('set lazy load to %s', enable); + return this; +}; + +/** + * Configures one or more global setup fixtures. + * + * If given no parameters, _unsets_ any previously-set fixtures. + * @chainable + * @public + * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s) + * @returns {Mocha} + */ +Mocha.prototype.globalSetup = function globalSetup(setupFns = []) { + setupFns = utils.castArray(setupFns); + this.options.globalSetup = setupFns; + debug('configured %d global setup functions', setupFns.length); + return this; +}; + +/** + * Configures one or more global teardown fixtures. + * + * If given no parameters, _unsets_ any previously-set fixtures. + * @chainable + * @public + * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s) + * @returns {Mocha} + */ +Mocha.prototype.globalTeardown = function globalTeardown(teardownFns = []) { + teardownFns = utils.castArray(teardownFns); + this.options.globalTeardown = teardownFns; + debug('configured %d global teardown functions', teardownFns.length); + return this; +}; + +/** + * Run any global setup fixtures sequentially, if any. + * + * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}. + * + * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}. + * @param {object} [context] - Context object if already have one + * @public + * @returns {Promise} Context object + */ +Mocha.prototype.runGlobalSetup = async function runGlobalSetup(context = {}) { + const {globalSetup} = this.options; + if (globalSetup && globalSetup.length) { + debug('run(): global setup starting'); + await this._runGlobalFixtures(globalSetup, context); + debug('run(): global setup complete'); } + return context; +}; + +/** + * Run any global teardown fixtures sequentially, if any. + * + * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}. + * + * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable. + * @param {object} [context] - Context object if already have one + * @public + * @returns {Promise} Context object + */ +Mocha.prototype.runGlobalTeardown = async function runGlobalTeardown( + context = {} +) { + const {globalTeardown} = this.options; + if (globalTeardown && globalTeardown.length) { + debug('run(): global teardown starting'); + await this._runGlobalFixtures(globalTeardown, context); + } + debug('run(): global teardown complete'); + return context; +}; + +/** + * Run global fixtures sequentially with context `context` + * @private + * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run + * @param {object} [context] - context object + * @returns {Promise} context object + */ +Mocha.prototype._runGlobalFixtures = async function _runGlobalFixtures( + fixtureFns = [], + context = {} +) { + for await (const fixtureFn of fixtureFns) { + await fixtureFn.call(context); + } + return context; +}; + +/** + * Toggle execution of any global setup fixture(s) + * + * @chainable + * @public + * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture + * @returns {Mocha} + */ +Mocha.prototype.enableGlobalSetup = function enableGlobalSetup(enabled = true) { + this.options.enableGlobalSetup = Boolean(enabled); + return this; +}; + +/** + * Toggle execution of any global teardown fixture(s) + * + * @chainable + * @public + * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture + * @returns {Mocha} + */ +Mocha.prototype.enableGlobalTeardown = function enableGlobalTeardown( + enabled = true +) { + this.options.enableGlobalTeardown = Boolean(enabled); + return this; +}; - return runner.run(done); +/** + * Returns `true` if one or more global setup fixtures have been supplied. + * @public + * @returns {boolean} + */ +Mocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() { + return Boolean(this.options.globalSetup.length); }; + +/** + * Returns `true` if one or more global teardown fixtures have been supplied. + * @public + * @returns {boolean} + */ +Mocha.prototype.hasGlobalTeardownFixtures = + function hasGlobalTeardownFixtures() { + return Boolean(this.options.globalTeardown.length); + }; + +/** + * An alternative way to define root hooks that works with parallel runs. + * @typedef {Object} MochaRootHookObject + * @property {Function|Function[]} [beforeAll] - "Before all" hook(s) + * @property {Function|Function[]} [beforeEach] - "Before each" hook(s) + * @property {Function|Function[]} [afterAll] - "After all" hook(s) + * @property {Function|Function[]} [afterEach] - "After each" hook(s) + */ + +/** + * An function that returns a {@link MochaRootHookObject}, either sync or async. + @callback MochaRootHookFunction + * @returns {MochaRootHookObject|Promise} + */ + +/** + * A function that's invoked _once_ which is either sync or async. + * Can be a "teardown" or "setup". These will all share the same context. + * @callback MochaGlobalFixture + * @returns {void|Promise} + */ + +/** + * An object making up all necessary parts of a plugin loader and aggregator + * @typedef {Object} PluginDefinition + * @property {string} exportName - Named export to use + * @property {string} [optionName] - Option name for Mocha constructor (use `exportName` if omitted) + * @property {PluginValidator} [validate] - Validator function + * @property {PluginFinalizer} [finalize] - Finalizer/aggregator function + */ + +/** + * A (sync) function to assert a user-supplied plugin implementation is valid. + * + * Defined in a {@link PluginDefinition}. + + * @callback PluginValidator + * @param {*} value - Value to check + * @this {PluginDefinition} + * @returns {void} + */ + +/** + * A function to finalize plugins impls of a particular ilk + * @callback PluginFinalizer + * @param {Array<*>} impls - User-supplied implementations + * @returns {Promise<*>|*} + */ diff --git a/node_modules/mocha/lib/mocharc.json b/node_modules/mocha/lib/mocharc.json index b0cd2667..51c3fce6 100644 --- a/node_modules/mocha/lib/mocharc.json +++ b/node_modules/mocha/lib/mocharc.json @@ -1,10 +1,10 @@ { "diff": true, - "extension": ["js"], - "opts": "./test/mocha.opts", + "extension": ["js", "cjs", "mjs"], "package": "./package.json", "reporter": "spec", "slow": 75, "timeout": 2000, - "ui": "bdd" + "ui": "bdd", + "watch-ignore": ["node_modules", ".git"] } diff --git a/node_modules/mocha/lib/pending.js b/node_modules/mocha/lib/pending.js index bb9a5053..cf9cc84a 100644 --- a/node_modules/mocha/lib/pending.js +++ b/node_modules/mocha/lib/pending.js @@ -1,5 +1,9 @@ 'use strict'; +/** + @module Pending +*/ + module.exports = Pending; /** diff --git a/node_modules/mocha/lib/reporters/base.js b/node_modules/mocha/lib/reporters/base.js index 670a160f..40b59964 100644 --- a/node_modules/mocha/lib/reporters/base.js +++ b/node_modules/mocha/lib/reporters/base.js @@ -6,15 +6,25 @@ * Module dependencies. */ -var tty = require('tty'); var diff = require('diff'); var milliseconds = require('ms'); var utils = require('../utils'); -var supportsColor = process.browser ? null : require('supports-color'); +var supportsColor = require('supports-color'); +var symbols = require('log-symbols'); var constants = require('../runner').constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; +const isBrowser = utils.isBrowser(); + +function getBrowserWindowSize() { + if ('innerHeight' in global) { + return [global.innerHeight, global.innerWidth]; + } + // In a Web Worker, the DOM Window is not available. + return [640, 480]; +} + /** * Expose `Base`. */ @@ -25,7 +35,7 @@ exports = module.exports = Base; * Check if both stdio streams are associated with a tty. */ -var isatty = tty.isatty(1) && tty.isatty(2); +var isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY); /** * Save log references to avoid tests interfering (see GH-3604). @@ -37,7 +47,7 @@ var consoleLog = console.log; */ exports.useColors = - !process.browser && + !isBrowser && (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined); /** @@ -46,6 +56,11 @@ exports.useColors = exports.inlineDiffs = false; +/** + * Truncate diffs longer than this value to avoid slow performance + */ +exports.maxDiffSize = 8192; + /** * Default color map. */ @@ -69,7 +84,9 @@ exports.colors = { light: 90, 'diff gutter': 90, 'diff added': 32, - 'diff removed': 31 + 'diff removed': 31, + 'diff added inline': '30;42', + 'diff removed inline': '30;41' }; /** @@ -77,20 +94,13 @@ exports.colors = { */ exports.symbols = { - ok: '✓', - err: '✖', - dot: '․', + ok: symbols.success, + err: symbols.error, + dot: '.', comma: ',', bang: '!' }; -// With node.js on Windows: use symbols available in terminal default fonts -if (process.platform === 'win32') { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - /** * Color `str` with the given `type`, * allowing colors to be disabled, @@ -102,7 +112,7 @@ if (process.platform === 'win32') { * @param {string} str * @return {string} */ -var color = (exports.color = function(type, str) { +var color = (exports.color = function (type, str) { if (!exports.useColors) { return String(str); } @@ -118,9 +128,11 @@ exports.window = { }; if (isatty) { - exports.window.width = process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1]; + if (isBrowser) { + exports.window.width = getBrowserWindowSize()[1]; + } else { + exports.window.width = process.stdout.getWindowSize(1)[0]; + } } /** @@ -128,23 +140,23 @@ if (isatty) { */ exports.cursor = { - hide: function() { + hide: function () { isatty && process.stdout.write('\u001b[?25l'); }, - show: function() { + show: function () { isatty && process.stdout.write('\u001b[?25h'); }, - deleteLine: function() { + deleteLine: function () { isatty && process.stdout.write('\u001b[2K'); }, - beginningOfLine: function() { + beginningOfLine: function () { isatty && process.stdout.write('\u001b[0G'); }, - CR: function() { + CR: function () { if (isatty) { exports.cursor.deleteLine(); exports.cursor.beginningOfLine(); @@ -154,14 +166,14 @@ exports.cursor = { } }; -function showDiff(err) { +var showDiff = (exports.showDiff = function (err) { return ( err && err.showDiff !== false && sameType(err.actual, err.expected) && err.expected !== undefined ); -} +}); function stringifyDiffObjs(err) { if (!utils.isString(err.actual) || !utils.isString(err.expected)) { @@ -181,10 +193,32 @@ function stringifyDiffObjs(err) { * @param {string} expected * @return {string} Diff */ -var generateDiff = (exports.generateDiff = function(actual, expected) { - return exports.inlineDiffs - ? inlineDiff(actual, expected) - : unifiedDiff(actual, expected); + +var generateDiff = (exports.generateDiff = function (actual, expected) { + try { + var maxLen = exports.maxDiffSize; + var skipped = 0; + if (maxLen > 0) { + skipped = Math.max(actual.length - maxLen, expected.length - maxLen); + actual = actual.slice(0, maxLen); + expected = expected.slice(0, maxLen); + } + let result = exports.inlineDiffs + ? inlineDiff(actual, expected) + : unifiedDiff(actual, expected); + if (skipped > 0) { + result = `${result}\n [mocha] output truncated to ${maxLen} characters, see "maxDiffSize" reporter-option\n`; + } + return result; + } catch (err) { + var msg = + '\n ' + + color('diff added', '+ expected') + + ' ' + + color('diff removed', '- actual: failed to generate Mocha diff') + + '\n'; + return msg; + } }); /** @@ -196,9 +230,10 @@ var generateDiff = (exports.generateDiff = function(actual, expected) { * @param {Object[]} failures - Each is Test instance with corresponding * Error property */ -exports.list = function(failures) { +exports.list = function (failures) { + var multipleErr, multipleTest; Base.consoleLog(); - failures.forEach(function(test, i) { + failures.forEach(function (test, i) { // format var fmt = color('error title', ' %s) %s:\n') + @@ -207,12 +242,21 @@ exports.list = function(failures) { // msg var msg; - var err = test.err; + var err; + if (test.err && test.err.multiple) { + if (multipleTest !== test) { + multipleTest = test; + multipleErr = [test.err].concat(test.err.multiple); + } + err = multipleErr.shift(); + } else { + err = test.err; + } var message; - if (err.message && typeof err.message.toString === 'function') { - message = err.message + ''; - } else if (typeof err.inspect === 'function') { + if (typeof err.inspect === 'function') { message = err.inspect() + ''; + } else if (err.message && typeof err.message.toString === 'function') { + message = err.message + ''; } else { message = ''; } @@ -248,7 +292,7 @@ exports.list = function(failures) { // indented test title var testTitle = ''; - test.titlePath().forEach(function(str, index) { + test.titlePath().forEach(function (str, index) { if (index !== 0) { testTitle += '\n '; } @@ -284,7 +328,13 @@ function Base(runner, options) { this.runner = runner; this.stats = runner.stats; // assigned so Reporters keep a closer reference - runner.on(EVENT_TEST_PASS, function(test) { + var maxDiffSizeOpt = + this.options.reporterOption && this.options.reporterOption.maxDiffSize; + if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) { + exports.maxDiffSize = Number(maxDiffSizeOpt); + } + + runner.on(EVENT_TEST_PASS, function (test) { if (test.duration > test.slow()) { test.speed = 'slow'; } else if (test.duration > test.slow() / 2) { @@ -294,11 +344,16 @@ function Base(runner, options) { } }); - runner.on(EVENT_TEST_FAIL, function(test, err) { + runner.on(EVENT_TEST_FAIL, function (test, err) { if (showDiff(err)) { stringifyDiffObjs(err); } - test.err = err; + // more than one error per test + if (test.err && err instanceof Error) { + test.err.multiple = (test.err.multiple || []).concat(err); + } else { + test.err = err; + } failures.push(test); }); } @@ -307,9 +362,9 @@ function Base(runner, options) { * Outputs common epilogue used by many of the bundled reporters. * * @public - * @memberof Mocha.reporters.Base + * @memberof Mocha.reporters */ -Base.prototype.epilogue = function() { +Base.prototype.epilogue = function () { var stats = this.stats; var fmt; @@ -372,7 +427,7 @@ function inlineDiff(actual, expected) { if (lines.length > 4) { var width = String(lines.length).length; msg = lines - .map(function(str, i) { + .map(function (str, i) { return pad(++i, width) + ' |' + ' ' + str; }) .join('\n'); @@ -381,9 +436,9 @@ function inlineDiff(actual, expected) { // legend msg = '\n' + - color('diff removed', 'actual') + + color('diff removed inline', 'actual') + ' ' + - color('diff added', 'expected') + + color('diff added inline', 'expected') + '\n\n' + msg + '\n'; @@ -429,10 +484,7 @@ function unifiedDiff(actual, expected) { ' ' + colorLines('diff removed', '- actual') + '\n\n' + - lines - .map(cleanUp) - .filter(notBlank) - .join('\n') + lines.map(cleanUp).filter(notBlank).join('\n') ); } @@ -447,12 +499,12 @@ function unifiedDiff(actual, expected) { function errorDiff(actual, expected) { return diff .diffWordsWithSpace(actual, expected) - .map(function(str) { + .map(function (str) { if (str.added) { - return colorLines('diff added', str.value); + return colorLines('diff added inline', str.value); } if (str.removed) { - return colorLines('diff removed', str.value); + return colorLines('diff removed inline', str.value); } return str.value; }) @@ -470,7 +522,7 @@ function errorDiff(actual, expected) { function colorLines(name, str) { return str .split('\n') - .map(function(str) { + .map(function (str) { return color(name, str); }) .join('\n'); diff --git a/node_modules/mocha/lib/reporters/doc.js b/node_modules/mocha/lib/reporters/doc.js index 5a6af8fb..b2c3e488 100644 --- a/node_modules/mocha/lib/reporters/doc.js +++ b/node_modules/mocha/lib/reporters/doc.js @@ -39,7 +39,7 @@ function Doc(runner, options) { return Array(indents).join(' '); } - runner.on(EVENT_SUITE_BEGIN, function(suite) { + runner.on(EVENT_SUITE_BEGIN, function (suite) { if (suite.root) { return; } @@ -50,7 +50,7 @@ function Doc(runner, options) { Base.consoleLog('%s
', indent()); }); - runner.on(EVENT_SUITE_END, function(suite) { + runner.on(EVENT_SUITE_END, function (suite) { if (suite.root) { return; } @@ -60,18 +60,24 @@ function Doc(runner, options) { --indents; }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { Base.consoleLog('%s
%s
', indent(), utils.escape(test.title)); + Base.consoleLog('%s
%s
', indent(), utils.escape(test.file)); var code = utils.escape(utils.clean(test.body)); Base.consoleLog('%s
%s
', indent(), code); }); - runner.on(EVENT_TEST_FAIL, function(test, err) { + runner.on(EVENT_TEST_FAIL, function (test, err) { Base.consoleLog( '%s
%s
', indent(), utils.escape(test.title) ); + Base.consoleLog( + '%s
%s
', + indent(), + utils.escape(test.file) + ); var code = utils.escape(utils.clean(test.body)); Base.consoleLog( '%s
%s
', diff --git a/node_modules/mocha/lib/reporters/dot.js b/node_modules/mocha/lib/reporters/dot.js index 3913f0c6..c67ac8ff 100644 --- a/node_modules/mocha/lib/reporters/dot.js +++ b/node_modules/mocha/lib/reporters/dot.js @@ -38,18 +38,18 @@ function Dot(runner, options) { var width = (Base.window.width * 0.75) | 0; var n = -1; - runner.on(EVENT_RUN_BEGIN, function() { + runner.on(EVENT_RUN_BEGIN, function () { process.stdout.write('\n'); }); - runner.on(EVENT_TEST_PENDING, function() { + runner.on(EVENT_TEST_PENDING, function () { if (++n % width === 0) { process.stdout.write('\n '); } process.stdout.write(Base.color('pending', Base.symbols.comma)); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { if (++n % width === 0) { process.stdout.write('\n '); } @@ -60,14 +60,14 @@ function Dot(runner, options) { } }); - runner.on(EVENT_TEST_FAIL, function() { + runner.on(EVENT_TEST_FAIL, function () { if (++n % width === 0) { process.stdout.write('\n '); } process.stdout.write(Base.color('fail', Base.symbols.bang)); }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { process.stdout.write('\n'); self.epilogue(); }); diff --git a/node_modules/mocha/lib/reporters/html.js b/node_modules/mocha/lib/reporters/html.js index d3f488a9..034fb07f 100644 --- a/node_modules/mocha/lib/reporters/html.js +++ b/node_modules/mocha/lib/reporters/html.js @@ -91,7 +91,7 @@ function HTML(runner, options) { } // pass toggle - on(passesLink, 'click', function(evt) { + on(passesLink, 'click', function (evt) { evt.preventDefault(); unhide(); var name = /pass/.test(report.className) ? '' : ' pass'; @@ -102,7 +102,7 @@ function HTML(runner, options) { }); // failure toggle - on(failuresLink, 'click', function(evt) { + on(failuresLink, 'click', function (evt) { evt.preventDefault(); unhide(); var name = /fail/.test(report.className) ? '' : ' fail'; @@ -119,7 +119,7 @@ function HTML(runner, options) { progress.size(40); } - runner.on(EVENT_SUITE_BEGIN, function(suite) { + runner.on(EVENT_SUITE_BEGIN, function (suite) { if (suite.root) { return; } @@ -138,7 +138,7 @@ function HTML(runner, options) { el.appendChild(stack[0]); }); - runner.on(EVENT_SUITE_END, function(suite) { + runner.on(EVENT_SUITE_END, function (suite) { if (suite.root) { updateStats(); return; @@ -146,7 +146,7 @@ function HTML(runner, options) { stack.shift(); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { var url = self.testURL(test); var markup = '
  • %e%ems ' + @@ -159,7 +159,7 @@ function HTML(runner, options) { updateStats(); }); - runner.on(EVENT_TEST_FAIL, function(test) { + runner.on(EVENT_TEST_FAIL, function (test) { var el = fragment( '
  • %e ' + playIcon + @@ -181,7 +181,7 @@ function HTML(runner, options) { if (indexOfMessage === -1) { stackString = test.err.stack; } else { - stackString = test.err.stack.substr( + stackString = test.err.stack.slice( test.err.message.length + indexOfMessage ); } @@ -215,7 +215,7 @@ function HTML(runner, options) { updateStats(); }); - runner.on(EVENT_TEST_PENDING, function(test) { + runner.on(EVENT_TEST_PENDING, function (test) { var el = fragment( '
  • %e

  • ', test.title @@ -273,7 +273,7 @@ function makeUrl(s) { * * @param {Object} [suite] */ -HTML.prototype.suiteURL = function(suite) { +HTML.prototype.suiteURL = function (suite) { return makeUrl(suite.fullTitle()); }; @@ -282,7 +282,7 @@ HTML.prototype.suiteURL = function(suite) { * * @param {Object} [test] */ -HTML.prototype.testURL = function(test) { +HTML.prototype.testURL = function (test) { return makeUrl(test.fullTitle()); }; @@ -292,10 +292,10 @@ HTML.prototype.testURL = function(test) { * @param {HTMLLIElement} el * @param {string} contents */ -HTML.prototype.addCodeToggle = function(el, contents) { +HTML.prototype.addCodeToggle = function (el, contents) { var h2 = el.getElementsByTagName('h2')[0]; - on(h2, 'click', function() { + on(h2, 'click', function () { pre.style.display = pre.style.display === 'none' ? 'block' : 'none'; }); @@ -323,7 +323,7 @@ function fragment(html) { var div = document.createElement('div'); var i = 1; - div.innerHTML = html.replace(/%([se])/g, function(_, type) { + div.innerHTML = html.replace(/%([se])/g, function (_, type) { switch (type) { case 's': return String(args[i++]); @@ -357,8 +357,8 @@ function hideSuitesWithout(classname) { */ function unhide() { var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); + while (els.length > 0) { + els[0].className = els[0].className.replace('suite hidden', 'suite'); } } diff --git a/node_modules/mocha/lib/reporters/json-stream.js b/node_modules/mocha/lib/reporters/json-stream.js index 27282987..5926587e 100644 --- a/node_modules/mocha/lib/reporters/json-stream.js +++ b/node_modules/mocha/lib/reporters/json-stream.js @@ -35,22 +35,22 @@ function JSONStream(runner, options) { var self = this; var total = runner.total; - runner.once(EVENT_RUN_BEGIN, function() { - writeEvent(['start', {total: total}]); + runner.once(EVENT_RUN_BEGIN, function () { + writeEvent(['start', {total}]); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { writeEvent(['pass', clean(test)]); }); - runner.on(EVENT_TEST_FAIL, function(test, err) { + runner.on(EVENT_TEST_FAIL, function (test, err) { test = clean(test); test.err = err.message; test.stack = err.stack || null; writeEvent(['fail', test]); }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { writeEvent(['end', self.stats]); }); } @@ -82,8 +82,10 @@ function clean(test) { return { title: test.title, fullTitle: test.fullTitle(), + file: test.file, duration: test.duration, - currentRetry: test.currentRetry() + currentRetry: test.currentRetry(), + speed: test.speed }; } diff --git a/node_modules/mocha/lib/reporters/json.js b/node_modules/mocha/lib/reporters/json.js index 12b6289c..6194d874 100644 --- a/node_modules/mocha/lib/reporters/json.js +++ b/node_modules/mocha/lib/reporters/json.js @@ -7,12 +7,16 @@ */ var Base = require('./base'); +var fs = require('fs'); +var path = require('path'); +const createUnsupportedError = require('../errors').createUnsupportedError; +const utils = require('../utils'); var constants = require('../runner').constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; +var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_TEST_END = constants.EVENT_TEST_END; var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; /** * Expose `JSON`. @@ -30,7 +34,7 @@ exports = module.exports = JSONReporter; * @param {Runner} runner - Instance triggers reporter actions. * @param {Object} [options] - runner options */ -function JSONReporter(runner, options) { +function JSONReporter(runner, options = {}) { Base.call(this, runner, options); var self = this; @@ -38,24 +42,32 @@ function JSONReporter(runner, options) { var pending = []; var failures = []; var passes = []; + var output; - runner.on(EVENT_TEST_END, function(test) { + if (options.reporterOption && options.reporterOption.output) { + if (utils.isBrowser()) { + throw createUnsupportedError('file output not supported in browser'); + } + output = options.reporterOption.output; + } + + runner.on(EVENT_TEST_END, function (test) { tests.push(test); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { passes.push(test); }); - runner.on(EVENT_TEST_FAIL, function(test) { + runner.on(EVENT_TEST_FAIL, function (test) { failures.push(test); }); - runner.on(EVENT_TEST_PENDING, function(test) { + runner.on(EVENT_TEST_PENDING, function (test) { pending.push(test); }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { var obj = { stats: self.stats, tests: tests.map(clean), @@ -66,7 +78,20 @@ function JSONReporter(runner, options) { runner.testResults = obj; - process.stdout.write(JSON.stringify(obj, null, 2)); + var json = JSON.stringify(obj, null, 2); + if (output) { + try { + fs.mkdirSync(path.dirname(output), {recursive: true}); + fs.writeFileSync(output, json); + } catch (err) { + console.error( + `${Base.symbols.err} [mocha] writing output to "${output}" failed: ${err.message}\n` + ); + process.stdout.write(json); + } + } else { + process.stdout.write(json); + } }); } @@ -87,8 +112,10 @@ function clean(test) { return { title: test.title, fullTitle: test.fullTitle(), + file: test.file, duration: test.duration, currentRetry: test.currentRetry(), + speed: test.speed, err: cleanCycles(err) }; } @@ -103,7 +130,7 @@ function clean(test) { function cleanCycles(obj) { var cache = []; return JSON.parse( - JSON.stringify(obj, function(key, value) { + JSON.stringify(obj, function (key, value) { if (typeof value === 'object' && value !== null) { if (cache.indexOf(value) !== -1) { // Instead of going in a circle, we'll print [object Object] @@ -126,7 +153,7 @@ function cleanCycles(obj) { */ function errorJSON(err) { var res = {}; - Object.getOwnPropertyNames(err).forEach(function(key) { + Object.getOwnPropertyNames(err).forEach(function (key) { res[key] = err[key]; }, err); return res; diff --git a/node_modules/mocha/lib/reporters/landing.js b/node_modules/mocha/lib/reporters/landing.js index a6af946c..4188c7cd 100644 --- a/node_modules/mocha/lib/reporters/landing.js +++ b/node_modules/mocha/lib/reporters/landing.js @@ -56,26 +56,26 @@ function Landing(runner, options) { var self = this; var width = (Base.window.width * 0.75) | 0; - var total = runner.total; var stream = process.stdout; + var plane = color('plane', '✈'); var crashed = -1; var n = 0; + var total = 0; function runway() { var buf = Array(width).join('-'); return ' ' + color('runway', buf); } - runner.on(EVENT_RUN_BEGIN, function() { + runner.on(EVENT_RUN_BEGIN, function () { stream.write('\n\n\n '); cursor.hide(); }); - runner.on(EVENT_TEST_END, function(test) { + runner.on(EVENT_TEST_END, function (test) { // check if the plane crashed - var col = crashed === -1 ? ((width * ++n) / total) | 0 : crashed; - + var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed; // show the crash if (test.state === STATE_FAILED) { plane = color('plane crash', '✈'); @@ -93,11 +93,19 @@ function Landing(runner, options) { stream.write('\u001b[0m'); }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { cursor.show(); process.stdout.write('\n'); self.epilogue(); }); + + // if cursor is hidden when we ctrl-C, then it will remain hidden unless... + process.once('SIGINT', function () { + cursor.show(); + process.nextTick(function () { + process.kill(process.pid, 'SIGINT'); + }); + }); } /** diff --git a/node_modules/mocha/lib/reporters/list.js b/node_modules/mocha/lib/reporters/list.js index c7ff8c4e..aebdd65e 100644 --- a/node_modules/mocha/lib/reporters/list.js +++ b/node_modules/mocha/lib/reporters/list.js @@ -40,20 +40,20 @@ function List(runner, options) { var self = this; var n = 0; - runner.on(EVENT_RUN_BEGIN, function() { + runner.on(EVENT_RUN_BEGIN, function () { Base.consoleLog(); }); - runner.on(EVENT_TEST_BEGIN, function(test) { + runner.on(EVENT_TEST_BEGIN, function (test) { process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); }); - runner.on(EVENT_TEST_PENDING, function(test) { + runner.on(EVENT_TEST_PENDING, function (test) { var fmt = color('checkmark', ' -') + color('pending', ' %s'); Base.consoleLog(fmt, test.fullTitle()); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { var fmt = color('checkmark', ' ' + Base.symbols.ok) + color('pass', ' %s: ') + @@ -62,7 +62,7 @@ function List(runner, options) { Base.consoleLog(fmt, test.fullTitle(), test.duration); }); - runner.on(EVENT_TEST_FAIL, function(test) { + runner.on(EVENT_TEST_FAIL, function (test) { cursor.CR(); Base.consoleLog(color('fail', ' %d) %s'), ++n, test.fullTitle()); }); diff --git a/node_modules/mocha/lib/reporters/markdown.js b/node_modules/mocha/lib/reporters/markdown.js index 460e2484..d5adfae1 100644 --- a/node_modules/mocha/lib/reporters/markdown.js +++ b/node_modules/mocha/lib/reporters/markdown.js @@ -50,8 +50,8 @@ function Markdown(runner, options) { var ret = obj; var key = SUITE_PREFIX + suite.title; - obj = obj[key] = obj[key] || {suite: suite}; - suite.suites.forEach(function(suite) { + obj = obj[key] = obj[key] || {suite}; + suite.suites.forEach(function (suite) { mapTOC(suite, obj); }); @@ -83,18 +83,18 @@ function Markdown(runner, options) { generateTOC(runner.suite); - runner.on(EVENT_SUITE_BEGIN, function(suite) { + runner.on(EVENT_SUITE_BEGIN, function (suite) { ++level; var slug = utils.slug(suite.fullTitle()); buf += '
    ' + '\n'; buf += title(suite.title) + '\n'; }); - runner.on(EVENT_SUITE_END, function() { + runner.on(EVENT_SUITE_END, function () { --level; }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { var code = utils.clean(test.body); buf += test.title + '.\n'; buf += '\n```js\n'; @@ -102,7 +102,7 @@ function Markdown(runner, options) { buf += '```\n\n'; }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { process.stdout.write('# TOC\n'); process.stdout.write(generateTOC(runner.suite)); process.stdout.write(buf); diff --git a/node_modules/mocha/lib/reporters/min.js b/node_modules/mocha/lib/reporters/min.js index 019ffe59..4de98e6f 100644 --- a/node_modules/mocha/lib/reporters/min.js +++ b/node_modules/mocha/lib/reporters/min.js @@ -34,7 +34,7 @@ exports = module.exports = Min; function Min(runner, options) { Base.call(this, runner, options); - runner.on(EVENT_RUN_BEGIN, function() { + runner.on(EVENT_RUN_BEGIN, function () { // clear screen process.stdout.write('\u001b[2J'); // set cursor position diff --git a/node_modules/mocha/lib/reporters/nyan.js b/node_modules/mocha/lib/reporters/nyan.js index 4eda971e..e7b3fa8f 100644 --- a/node_modules/mocha/lib/reporters/nyan.js +++ b/node_modules/mocha/lib/reporters/nyan.js @@ -46,24 +46,24 @@ function NyanCat(runner, options) { this.trajectories = [[], [], [], []]; this.trajectoryWidthMax = width - nyanCatWidth; - runner.on(EVENT_RUN_BEGIN, function() { + runner.on(EVENT_RUN_BEGIN, function () { Base.cursor.hide(); self.draw(); }); - runner.on(EVENT_TEST_PENDING, function() { + runner.on(EVENT_TEST_PENDING, function () { self.draw(); }); - runner.on(EVENT_TEST_PASS, function() { + runner.on(EVENT_TEST_PASS, function () { self.draw(); }); - runner.on(EVENT_TEST_FAIL, function() { + runner.on(EVENT_TEST_FAIL, function () { self.draw(); }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { Base.cursor.show(); for (var i = 0; i < self.numberOfLines; i++) { write('\n'); @@ -83,7 +83,7 @@ inherits(NyanCat, Base); * @private */ -NyanCat.prototype.draw = function() { +NyanCat.prototype.draw = function () { this.appendRainbow(); this.drawScoreboard(); this.drawRainbow(); @@ -98,7 +98,7 @@ NyanCat.prototype.draw = function() { * @private */ -NyanCat.prototype.drawScoreboard = function() { +NyanCat.prototype.drawScoreboard = function () { var stats = this.stats; function draw(type, n) { @@ -121,7 +121,7 @@ NyanCat.prototype.drawScoreboard = function() { * @private */ -NyanCat.prototype.appendRainbow = function() { +NyanCat.prototype.appendRainbow = function () { var segment = this.tick ? '_' : '-'; var rainbowified = this.rainbowify(segment); @@ -140,10 +140,10 @@ NyanCat.prototype.appendRainbow = function() { * @private */ -NyanCat.prototype.drawRainbow = function() { +NyanCat.prototype.drawRainbow = function () { var self = this; - this.trajectories.forEach(function(line) { + this.trajectories.forEach(function (line) { write('\u001b[' + self.scoreboardWidth + 'C'); write(line.join('')); write('\n'); @@ -157,7 +157,7 @@ NyanCat.prototype.drawRainbow = function() { * * @private */ -NyanCat.prototype.drawNyanCat = function() { +NyanCat.prototype.drawNyanCat = function () { var self = this; var startWidth = this.scoreboardWidth + this.trajectories[0].length; var dist = '\u001b[' + startWidth + 'C'; @@ -193,7 +193,7 @@ NyanCat.prototype.drawNyanCat = function() { * @return {string} */ -NyanCat.prototype.face = function() { +NyanCat.prototype.face = function () { var stats = this.stats; if (stats.failures) { return '( x .x)'; @@ -212,7 +212,7 @@ NyanCat.prototype.face = function() { * @param {number} n */ -NyanCat.prototype.cursorUp = function(n) { +NyanCat.prototype.cursorUp = function (n) { write('\u001b[' + n + 'A'); }; @@ -223,7 +223,7 @@ NyanCat.prototype.cursorUp = function(n) { * @param {number} n */ -NyanCat.prototype.cursorDown = function(n) { +NyanCat.prototype.cursorDown = function (n) { write('\u001b[' + n + 'B'); }; @@ -233,7 +233,7 @@ NyanCat.prototype.cursorDown = function(n) { * @private * @return {Array} */ -NyanCat.prototype.generateColors = function() { +NyanCat.prototype.generateColors = function () { var colors = []; for (var i = 0; i < 6 * 7; i++) { @@ -255,7 +255,7 @@ NyanCat.prototype.generateColors = function() { * @param {string} str * @return {string} */ -NyanCat.prototype.rainbowify = function(str) { +NyanCat.prototype.rainbowify = function (str) { if (!Base.useColors) { return str; } diff --git a/node_modules/mocha/lib/reporters/progress.js b/node_modules/mocha/lib/reporters/progress.js index 0211122a..4f6d8794 100644 --- a/node_modules/mocha/lib/reporters/progress.js +++ b/node_modules/mocha/lib/reporters/progress.js @@ -57,13 +57,13 @@ function Progress(runner, options) { options.verbose = reporterOptions.verbose || false; // tests started - runner.on(EVENT_RUN_BEGIN, function() { + runner.on(EVENT_RUN_BEGIN, function () { process.stdout.write('\n'); cursor.hide(); }); // tests complete - runner.on(EVENT_TEST_END, function() { + runner.on(EVENT_TEST_END, function () { complete++; var percent = complete / total; @@ -89,7 +89,7 @@ function Progress(runner, options) { // tests are complete, output some stats // and the failures if any - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { cursor.show(); process.stdout.write('\n'); self.epilogue(); diff --git a/node_modules/mocha/lib/reporters/spec.js b/node_modules/mocha/lib/reporters/spec.js index e51ed80a..8497249f 100644 --- a/node_modules/mocha/lib/reporters/spec.js +++ b/node_modules/mocha/lib/reporters/spec.js @@ -45,28 +45,28 @@ function Spec(runner, options) { return Array(indents).join(' '); } - runner.on(EVENT_RUN_BEGIN, function() { + runner.on(EVENT_RUN_BEGIN, function () { Base.consoleLog(); }); - runner.on(EVENT_SUITE_BEGIN, function(suite) { + runner.on(EVENT_SUITE_BEGIN, function (suite) { ++indents; Base.consoleLog(color('suite', '%s%s'), indent(), suite.title); }); - runner.on(EVENT_SUITE_END, function() { + runner.on(EVENT_SUITE_END, function () { --indents; if (indents === 1) { Base.consoleLog(); } }); - runner.on(EVENT_TEST_PENDING, function(test) { + runner.on(EVENT_TEST_PENDING, function (test) { var fmt = indent() + color('pending', ' - %s'); Base.consoleLog(fmt, test.title); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { var fmt; if (test.speed === 'fast') { fmt = @@ -84,7 +84,7 @@ function Spec(runner, options) { } }); - runner.on(EVENT_TEST_FAIL, function(test) { + runner.on(EVENT_TEST_FAIL, function (test) { Base.consoleLog(indent() + color('fail', ' %d) %s'), ++n, test.title); }); diff --git a/node_modules/mocha/lib/reporters/tap.js b/node_modules/mocha/lib/reporters/tap.js index 12257a74..37fa8b57 100644 --- a/node_modules/mocha/lib/reporters/tap.js +++ b/node_modules/mocha/lib/reporters/tap.js @@ -49,29 +49,27 @@ function TAP(runner, options) { this._producer = createProducer(tapVersion); - runner.once(EVENT_RUN_BEGIN, function() { - var ntests = runner.grepTotal(runner.suite); + runner.once(EVENT_RUN_BEGIN, function () { self._producer.writeVersion(); - self._producer.writePlan(ntests); }); - runner.on(EVENT_TEST_END, function() { + runner.on(EVENT_TEST_END, function () { ++n; }); - runner.on(EVENT_TEST_PENDING, function(test) { + runner.on(EVENT_TEST_PENDING, function (test) { self._producer.writePending(n, test); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { self._producer.writePass(n, test); }); - runner.on(EVENT_TEST_FAIL, function(test, err) { + runner.on(EVENT_TEST_FAIL, function (test, err) { self._producer.writeFail(n, test, err); }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { self._producer.writeEpilogue(runner.stats); }); } @@ -115,8 +113,8 @@ function println(format, varArgs) { */ function createProducer(tapVersion) { var producers = { - '12': new TAP12Producer(), - '13': new TAP13Producer() + 12: new TAP12Producer(), + 13: new TAP13Producer() }; var producer = producers[tapVersion]; @@ -146,7 +144,7 @@ function TAPProducer() {} * * @abstract */ -TAPProducer.prototype.writeVersion = function() {}; +TAPProducer.prototype.writeVersion = function () {}; /** * Writes the plan to reporter output stream. @@ -154,7 +152,7 @@ TAPProducer.prototype.writeVersion = function() {}; * @abstract * @param {number} ntests - Number of tests that are planned to run. */ -TAPProducer.prototype.writePlan = function(ntests) { +TAPProducer.prototype.writePlan = function (ntests) { println('%d..%d', 1, ntests); }; @@ -165,7 +163,7 @@ TAPProducer.prototype.writePlan = function(ntests) { * @param {number} n - Index of test that passed. * @param {Test} test - Instance containing test information. */ -TAPProducer.prototype.writePass = function(n, test) { +TAPProducer.prototype.writePass = function (n, test) { println('ok %d %s', n, title(test)); }; @@ -176,7 +174,7 @@ TAPProducer.prototype.writePass = function(n, test) { * @param {number} n - Index of test that was skipped. * @param {Test} test - Instance containing test information. */ -TAPProducer.prototype.writePending = function(n, test) { +TAPProducer.prototype.writePending = function (n, test) { println('ok %d %s # SKIP -', n, title(test)); }; @@ -188,7 +186,7 @@ TAPProducer.prototype.writePending = function(n, test) { * @param {Test} test - Instance containing test information. * @param {Error} err - Reason the test failed. */ -TAPProducer.prototype.writeFail = function(n, test, err) { +TAPProducer.prototype.writeFail = function (n, test, err) { println('not ok %d %s', n, title(test)); }; @@ -198,12 +196,13 @@ TAPProducer.prototype.writeFail = function(n, test, err) { * @abstract * @param {Object} stats - Object containing run statistics. */ -TAPProducer.prototype.writeEpilogue = function(stats) { +TAPProducer.prototype.writeEpilogue = function (stats) { // :TBD: Why is this not counting pending tests? println('# tests ' + (stats.passes + stats.failures)); println('# pass ' + stats.passes); // :TBD: Why are we not showing pending results? println('# fail ' + stats.failures); + this.writePlan(stats.passes + stats.failures + stats.pending); }; /** @@ -223,7 +222,7 @@ function TAP12Producer() { * Writes that test failed to reporter output stream, with error formatting. * @override */ - this.writeFail = function(n, test, err) { + this.writeFail = function (n, test, err) { TAPProducer.prototype.writeFail.call(this, n, test, err); if (err.message) { println(err.message.replace(/^/gm, ' ')); @@ -256,7 +255,7 @@ function TAP13Producer() { * Writes the TAP version to reporter output stream. * @override */ - this.writeVersion = function() { + this.writeVersion = function () { println('TAP version 13'); }; @@ -264,7 +263,7 @@ function TAP13Producer() { * Writes that test failed to reporter output stream, with error formatting. * @override */ - this.writeFail = function(n, test, err) { + this.writeFail = function (n, test, err) { TAPProducer.prototype.writeFail.call(this, n, test, err); var emitYamlBlock = err.message != null || err.stack != null; if (emitYamlBlock) { diff --git a/node_modules/mocha/lib/reporters/xunit.js b/node_modules/mocha/lib/reporters/xunit.js index 6c9c937b..ec788c5d 100644 --- a/node_modules/mocha/lib/reporters/xunit.js +++ b/node_modules/mocha/lib/reporters/xunit.js @@ -9,7 +9,6 @@ var Base = require('./base'); var utils = require('../utils'); var fs = require('fs'); -var mkdirp = require('mkdirp'); var path = require('path'); var errors = require('../errors'); var createUnsupportedError = errors.createUnsupportedError; @@ -62,7 +61,9 @@ function XUnit(runner, options) { throw createUnsupportedError('file output not supported in browser'); } - mkdirp.sync(path.dirname(options.reporterOptions.output)); + fs.mkdirSync(path.dirname(options.reporterOptions.output), { + recursive: true + }); self.fileStream = fs.createWriteStream(options.reporterOptions.output); } @@ -73,19 +74,19 @@ function XUnit(runner, options) { // fall back to the default suite name suiteName = suiteName || DEFAULT_SUITE_NAME; - runner.on(EVENT_TEST_PENDING, function(test) { + runner.on(EVENT_TEST_PENDING, function (test) { tests.push(test); }); - runner.on(EVENT_TEST_PASS, function(test) { + runner.on(EVENT_TEST_PASS, function (test) { tests.push(test); }); - runner.on(EVENT_TEST_FAIL, function(test) { + runner.on(EVENT_TEST_FAIL, function (test) { tests.push(test); }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { self.write( tag( 'testsuite', @@ -102,7 +103,7 @@ function XUnit(runner, options) { ) ); - tests.forEach(function(t) { + tests.forEach(function (t) { self.test(t); }); @@ -121,9 +122,9 @@ inherits(XUnit, Base); * @param failures * @param {Function} fn */ -XUnit.prototype.done = function(failures, fn) { +XUnit.prototype.done = function (failures, fn) { if (this.fileStream) { - this.fileStream.end(function() { + this.fileStream.end(function () { fn(failures); }); } else { @@ -136,7 +137,7 @@ XUnit.prototype.done = function(failures, fn) { * * @param {string} line */ -XUnit.prototype.write = function(line) { +XUnit.prototype.write = function (line) { if (this.fileStream) { this.fileStream.write(line + '\n'); } else if (typeof process === 'object' && process.stdout) { @@ -151,7 +152,7 @@ XUnit.prototype.write = function(line) { * * @param {Test} test */ -XUnit.prototype.test = function(test) { +XUnit.prototype.test = function (test) { Base.useColors = false; var attrs = { @@ -163,9 +164,9 @@ XUnit.prototype.test = function(test) { if (test.state === STATE_FAILED) { var err = test.err; var diff = - Base.hideDiff || !err.actual || !err.expected - ? '' - : '\n' + Base.generateDiff(err.actual, err.expected); + !Base.hideDiff && Base.showDiff(err) + ? '\n' + Base.generateDiff(err.actual, err.expected) + : ''; this.write( tag( 'testcase', diff --git a/node_modules/mocha/lib/runnable.js b/node_modules/mocha/lib/runnable.js index 026ab06b..fef49410 100644 --- a/node_modules/mocha/lib/runnable.js +++ b/node_modules/mocha/lib/runnable.js @@ -5,11 +5,15 @@ var Pending = require('./pending'); var debug = require('debug')('mocha:runnable'); var milliseconds = require('ms'); var utils = require('./utils'); -var createInvalidExceptionError = require('./errors') - .createInvalidExceptionError; +const { + createInvalidExceptionError, + createMultipleDoneError, + createTimeoutError +} = require('./errors'); /** * Save timer references to avoid Sinon interfering (see GH-237). + * @private */ var Date = global.Date; var setTimeout = global.setTimeout; @@ -35,11 +39,14 @@ function Runnable(title, fn) { this.sync = !this.async; this._timeout = 2000; this._slow = 75; - this._enableTimeouts = true; - this.timedOut = false; this._retries = -1; - this._currentRetry = 0; - this.pending = false; + utils.assignNewMochaID(this); + Object.defineProperty(this, 'id', { + get() { + return utils.getMochaID(this); + } + }); + this.reset(); } /** @@ -47,6 +54,17 @@ function Runnable(title, fn) { */ utils.inherits(Runnable, EventEmitter); +/** + * Resets the state initially or for a next run. + */ +Runnable.prototype.reset = function () { + this.timedOut = false; + this._currentRetry = 0; + this.pending = false; + delete this.state; + delete this.err; +}; + /** * Get current timeout value in msecs. * @@ -68,7 +86,7 @@ utils.inherits(Runnable, EventEmitter); * @returns {Runnable} this * @chainable */ -Runnable.prototype.timeout = function(ms) { +Runnable.prototype.timeout = function (ms) { if (!arguments.length) { return this._timeout; } @@ -83,10 +101,12 @@ Runnable.prototype.timeout = function(ms) { // see #1652 for reasoning if (ms === range[0] || ms === range[1]) { - this._enableTimeouts = false; + this._timeout = 0; + } else { + this._timeout = ms; } - debug('timeout %d', ms); - this._timeout = ms; + debug('timeout %d', this._timeout); + if (this.timer) { this.resetTimeout(); } @@ -100,7 +120,7 @@ Runnable.prototype.timeout = function(ms) { * @param {number|string} ms * @return {Runnable|number} ms or Runnable instance. */ -Runnable.prototype.slow = function(ms) { +Runnable.prototype.slow = function (ms) { if (!arguments.length || typeof ms === 'undefined') { return this._slow; } @@ -112,30 +132,15 @@ Runnable.prototype.slow = function(ms) { return this; }; -/** - * Set and get whether timeout is `enabled`. - * - * @private - * @param {boolean} enabled - * @return {Runnable|boolean} enabled or Runnable instance. - */ -Runnable.prototype.enableTimeouts = function(enabled) { - if (!arguments.length) { - return this._enableTimeouts; - } - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - /** * Halt and mark as pending. * * @memberof Mocha.Runnable * @public */ -Runnable.prototype.skip = function() { - throw new Pending('sync skip'); +Runnable.prototype.skip = function () { + this.pending = true; + throw new Pending('sync skip; aborting execution'); }; /** @@ -143,7 +148,7 @@ Runnable.prototype.skip = function() { * * @private */ -Runnable.prototype.isPending = function() { +Runnable.prototype.isPending = function () { return this.pending || (this.parent && this.parent.isPending()); }; @@ -152,7 +157,7 @@ Runnable.prototype.isPending = function() { * @return {boolean} * @private */ -Runnable.prototype.isFailed = function() { +Runnable.prototype.isFailed = function () { return !this.isPending() && this.state === constants.STATE_FAILED; }; @@ -161,7 +166,7 @@ Runnable.prototype.isFailed = function() { * @return {boolean} * @private */ -Runnable.prototype.isPassed = function() { +Runnable.prototype.isPassed = function () { return !this.isPending() && this.state === constants.STATE_PASSED; }; @@ -170,7 +175,7 @@ Runnable.prototype.isPassed = function() { * * @private */ -Runnable.prototype.retries = function(n) { +Runnable.prototype.retries = function (n) { if (!arguments.length) { return this._retries; } @@ -182,7 +187,7 @@ Runnable.prototype.retries = function(n) { * * @private */ -Runnable.prototype.currentRetry = function(n) { +Runnable.prototype.currentRetry = function (n) { if (!arguments.length) { return this._currentRetry; } @@ -197,7 +202,7 @@ Runnable.prototype.currentRetry = function(n) { * @public * @return {string} */ -Runnable.prototype.fullTitle = function() { +Runnable.prototype.fullTitle = function () { return this.titlePath().join(' '); }; @@ -208,7 +213,7 @@ Runnable.prototype.fullTitle = function() { * @public * @return {string} */ -Runnable.prototype.titlePath = function() { +Runnable.prototype.titlePath = function () { return this.parent.titlePath().concat([this.title]); }; @@ -217,50 +222,25 @@ Runnable.prototype.titlePath = function() { * * @private */ -Runnable.prototype.clearTimeout = function() { +Runnable.prototype.clearTimeout = function () { clearTimeout(this.timer); }; -/** - * Inspect the runnable void of private properties. - * - * @private - * @return {string} - */ -Runnable.prototype.inspect = function() { - return JSON.stringify( - this, - function(key, val) { - if (key[0] === '_') { - return; - } - if (key === 'parent') { - return '#'; - } - if (key === 'ctx') { - return '#'; - } - return val; - }, - 2 - ); -}; - /** * Reset the timeout. * * @private */ -Runnable.prototype.resetTimeout = function() { +Runnable.prototype.resetTimeout = function () { var self = this; - var ms = this.timeout() || 1e9; + var ms = this.timeout(); - if (!this._enableTimeouts) { + if (ms === 0) { return; } this.clearTimeout(); - this.timer = setTimeout(function() { - if (!self._enableTimeouts) { + this.timer = setTimeout(function () { + if (self.timeout() === 0) { return; } self.callback(self._timeoutError(ms)); @@ -274,7 +254,7 @@ Runnable.prototype.resetTimeout = function() { * @private * @param {string[]} globals */ -Runnable.prototype.globals = function(globals) { +Runnable.prototype.globals = function (globals) { if (!arguments.length) { return this._allowedGlobals; } @@ -287,12 +267,14 @@ Runnable.prototype.globals = function(globals) { * @param {Function} fn * @private */ -Runnable.prototype.run = function(fn) { +Runnable.prototype.run = function (fn) { var self = this; var start = new Date(); var ctx = this.ctx; var finished; - var emitted; + var errorWasHandled = false; + + if (this.isPending()) return fn(); // Sometimes the ctx exists, but it is not runnable if (ctx && ctx.runnable) { @@ -301,17 +283,11 @@ Runnable.prototype.run = function(fn) { // called multiple times function multiple(err) { - if (emitted) { + if (errorWasHandled) { return; } - emitted = true; - var msg = 'done() called multiple times'; - if (err && err.message) { - err.message += " (and Mocha's " + msg + ')'; - self.emit('error', err); - } else { - self.emit('error', new Error(msg)); - } + errorWasHandled = true; + self.emit('error', createMultipleDoneError(self, err)); } // finished @@ -328,58 +304,61 @@ Runnable.prototype.run = function(fn) { self.clearTimeout(); self.duration = new Date() - start; finished = true; - if (!err && self.duration > ms && self._enableTimeouts) { + if (!err && self.duration > ms && ms > 0) { err = self._timeoutError(ms); } fn(err); } - // for .resetTimeout() + // for .resetTimeout() and Runner#uncaught() this.callback = done; + if (this.fn && typeof this.fn.call !== 'function') { + done( + new TypeError( + 'A runnable must be passed a function as its second argument.' + ) + ); + return; + } + // explicit async with `done` argument if (this.async) { this.resetTimeout(); // allows skip() to be used in an explicit async context this.skip = function asyncSkip() { - done(new Pending('async skip call')); - // halt execution. the Runnable will be marked pending - // by the previous call, and the uncaught handler will ignore - // the failure. + this.pending = true; + done(); + // halt execution, the uncaught handler will ignore the failure. throw new Pending('async skip; aborting execution'); }; - if (this.allowUncaught) { - return callFnAsync(this.fn); - } try { callFnAsync(this.fn); } catch (err) { - emitted = true; + // handles async runnables which actually run synchronously + errorWasHandled = true; + if (err instanceof Pending) { + return; // done() is already called in this.skip() + } else if (this.allowUncaught) { + throw err; + } done(Runnable.toValueOrError(err)); } return; } - if (this.allowUncaught) { - if (this.isPending()) { - done(); - } else { - callFn(this.fn); - } - return; - } - // sync or promise-returning try { - if (this.isPending()) { - done(); - } else { - callFn(this.fn); - } + callFn(this.fn); } catch (err) { - emitted = true; + errorWasHandled = true; + if (err instanceof Pending) { + return done(); + } else if (this.allowUncaught) { + throw err; + } done(Runnable.toValueOrError(err)); } @@ -388,13 +367,13 @@ Runnable.prototype.run = function(fn) { if (result && typeof result.then === 'function') { self.resetTimeout(); result.then( - function() { + function () { done(); // Return null so libraries like bluebird do not warn about // subsequently constructed Promises. return null; }, - function(reason) { + function (reason) { done(reason || new Error('Promise rejected with no or falsy reason')); } ); @@ -412,7 +391,7 @@ Runnable.prototype.run = function(fn) { } function callFnAsync(fn) { - var result = fn.call(ctx, function(err) { + var result = fn.call(ctx, function (err) { if (err instanceof Error || toString.call(err) === '[object Error]') { return done(err); } @@ -444,15 +423,12 @@ Runnable.prototype.run = function(fn) { * @returns {Error} a "timeout" error * @private */ -Runnable.prototype._timeoutError = function(ms) { - var msg = - 'Timeout of ' + - ms + - 'ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.'; +Runnable.prototype._timeoutError = function (ms) { + let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.`; if (this.file) { msg += ' (' + this.file + ')'; } - return new Error(msg); + return createTimeoutError(msg, ms, this.file); }; var constants = utils.defineConstants( @@ -473,7 +449,11 @@ var constants = utils.defineConstants( /** * Value of `state` prop when a `Runnable` has passed */ - STATE_PASSED: 'passed' + STATE_PASSED: 'passed', + /** + * Value of `state` prop when a `Runnable` has been skipped by user + */ + STATE_PENDING: 'pending' } ); @@ -483,7 +463,7 @@ var constants = utils.defineConstants( * @returns {*|Error} `value`, otherwise an `Error` * @private */ -Runnable.toValueOrError = function(value) { +Runnable.toValueOrError = function (value) { return ( value || createInvalidExceptionError( diff --git a/node_modules/mocha/lib/runner.js b/node_modules/mocha/lib/runner.js index e41f6c5f..12807725 100644 --- a/node_modules/mocha/lib/runner.js +++ b/node_modules/mocha/lib/runner.js @@ -2,12 +2,11 @@ /** * Module dependencies. + * @private */ -var util = require('util'); var EventEmitter = require('events').EventEmitter; var Pending = require('./pending'); var utils = require('./utils'); -var inherits = utils.inherits; var debug = require('debug')('mocha:runner'); var Runnable = require('./runnable'); var Suite = require('./suite'); @@ -18,17 +17,21 @@ var HOOK_TYPE_BEFORE_ALL = Suite.constants.HOOK_TYPE_BEFORE_ALL; var EVENT_ROOT_SUITE_RUN = Suite.constants.EVENT_ROOT_SUITE_RUN; var STATE_FAILED = Runnable.constants.STATE_FAILED; var STATE_PASSED = Runnable.constants.STATE_PASSED; -var dQuote = utils.dQuote; -var ngettext = utils.ngettext; -var sQuote = utils.sQuote; +var STATE_PENDING = Runnable.constants.STATE_PENDING; var stackFilter = utils.stackTraceFilter(); var stringify = utils.stringify; -var type = utils.type; -var createInvalidExceptionError = require('./errors') - .createInvalidExceptionError; + +const { + createInvalidExceptionError, + createUnsupportedError, + createFatalError, + isMochaError, + constants: errorConstants +} = require('./errors'); /** * Non-enumerable globals. + * @private * @readonly */ var globals = [ @@ -108,40 +111,91 @@ var constants = utils.defineConstants( /** * Emitted when {@link Test} execution has failed, but will retry */ - EVENT_TEST_RETRY: 'retry' + EVENT_TEST_RETRY: 'retry', + /** + * Initial state of Runner + */ + STATE_IDLE: 'idle', + /** + * State set to this value when the Runner has started running + */ + STATE_RUNNING: 'running', + /** + * State set to this value when the Runner has stopped + */ + STATE_STOPPED: 'stopped' } ); -module.exports = Runner; - -/** - * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}. - * - * @extends external:EventEmitter - * @public - * @class - * @param {Suite} suite Root suite - * @param {boolean} [delay] Whether or not to delay execution of root suite - * until ready. - */ -function Runner(suite, delay) { - var self = this; - this._globals = []; - this._abort = false; - this._delay = delay; - this.suite = suite; - this.started = false; - this.total = suite.total(); - this.failures = 0; - this.on(constants.EVENT_TEST_END, function(test) { - self.checkGlobals(test); - }); - this.on(constants.EVENT_HOOK_END, function(hook) { - self.checkGlobals(hook); - }); - this._defaultGrep = /.*/; - this.grep(this._defaultGrep); - this.globals(this.globalProps().concat(extraGlobals())); +class Runner extends EventEmitter { + /** + * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}. + * + * @extends external:EventEmitter + * @public + * @class + * @param {Suite} suite - Root suite + * @param {Object} [opts] - Settings object + * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done. + * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready. + * @param {boolean} [opts.dryRun] - Whether to report tests without running them. + * @param {boolean} [opts.failZero] - Whether to fail test run if zero tests encountered. + */ + constructor(suite, opts = {}) { + super(); + + var self = this; + this._globals = []; + this._abort = false; + this.suite = suite; + this._opts = opts; + this.state = constants.STATE_IDLE; + this.total = suite.total(); + this.failures = 0; + /** + * @type {Map>>} + */ + this._eventListeners = new Map(); + this.on(constants.EVENT_TEST_END, function (test) { + if (test.type === 'test' && test.retriedTest() && test.parent) { + var idx = + test.parent.tests && test.parent.tests.indexOf(test.retriedTest()); + if (idx > -1) test.parent.tests[idx] = test; + } + self.checkGlobals(test); + }); + this.on(constants.EVENT_HOOK_END, function (hook) { + self.checkGlobals(hook); + }); + this._defaultGrep = /.*/; + this.grep(this._defaultGrep); + this.globals(this.globalProps()); + + this.uncaught = this._uncaught.bind(this); + this.unhandled = (reason, promise) => { + if (isMochaError(reason)) { + debug( + 'trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:', + reason + ); + this.uncaught(reason); + } else { + debug( + 'trapped unhandled rejection from (probably) user code; re-emitting on process' + ); + this._removeEventListener( + process, + 'unhandledRejection', + this.unhandled + ); + try { + process.emit('unhandledRejection', reason, promise); + } finally { + this._addEventListener(process, 'unhandledRejection', this.unhandled); + } + } + }; + } } /** @@ -153,9 +207,84 @@ function Runner(suite, delay) { Runner.immediately = global.setImmediate || process.nextTick; /** - * Inherit from `EventEmitter.prototype`. + * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed. + * @param {EventEmitter} target - The `EventEmitter` + * @param {string} eventName - The event name + * @param {string} fn - Listener function + * @private */ -inherits(Runner, EventEmitter); +Runner.prototype._addEventListener = function (target, eventName, listener) { + debug( + '_addEventListener(): adding for event %s; %d current listeners', + eventName, + target.listenerCount(eventName) + ); + /* istanbul ignore next */ + if ( + this._eventListeners.has(target) && + this._eventListeners.get(target).has(eventName) && + this._eventListeners.get(target).get(eventName).has(listener) + ) { + debug( + 'warning: tried to attach duplicate event listener for %s', + eventName + ); + return; + } + target.on(eventName, listener); + const targetListeners = this._eventListeners.has(target) + ? this._eventListeners.get(target) + : new Map(); + const targetEventListeners = targetListeners.has(eventName) + ? targetListeners.get(eventName) + : new Set(); + targetEventListeners.add(listener); + targetListeners.set(eventName, targetEventListeners); + this._eventListeners.set(target, targetListeners); +}; + +/** + * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping. + * @param {EventEmitter} target - The `EventEmitter` + * @param {string} eventName - The event name + * @param {function} listener - Listener function + * @private + */ +Runner.prototype._removeEventListener = function (target, eventName, listener) { + target.removeListener(eventName, listener); + + if (this._eventListeners.has(target)) { + const targetListeners = this._eventListeners.get(target); + if (targetListeners.has(eventName)) { + const targetEventListeners = targetListeners.get(eventName); + targetEventListeners.delete(listener); + if (!targetEventListeners.size) { + targetListeners.delete(eventName); + } + } + if (!targetListeners.size) { + this._eventListeners.delete(target); + } + } else { + debug('trying to remove listener for untracked object %s', target); + } +}; + +/** + * Removes all event handlers set during a run on this instance. + * Remark: this does _not_ clean/dispose the tests or suites themselves. + */ +Runner.prototype.dispose = function () { + this.removeAllListeners(); + this._eventListeners.forEach((targetListeners, target) => { + targetListeners.forEach((targetEventListeners, eventName) => { + targetEventListeners.forEach(listener => { + target.removeListener(eventName, listener); + }); + }); + }); + this._eventListeners.clear(); +}; /** * Run tests with full titles matching `re`. Updates runner.total @@ -167,8 +296,8 @@ inherits(Runner, EventEmitter); * @param {boolean} invert * @return {Runner} Runner instance. */ -Runner.prototype.grep = function(re, invert) { - debug('grep %s', re); +Runner.prototype.grep = function (re, invert) { + debug('grep(): setting to %s', re); this._grep = re; this._invert = invert; this.total = this.grepTotal(this.suite); @@ -184,11 +313,11 @@ Runner.prototype.grep = function(re, invert) { * @param {Suite} suite * @return {number} */ -Runner.prototype.grepTotal = function(suite) { +Runner.prototype.grepTotal = function (suite) { var self = this; var total = 0; - suite.eachTest(function(test) { + suite.eachTest(function (test) { var match = self._grep.test(test.fullTitle()); if (self._invert) { match = !match; @@ -207,7 +336,7 @@ Runner.prototype.grepTotal = function(suite) { * @return {Array} * @private */ -Runner.prototype.globalProps = function() { +Runner.prototype.globalProps = function () { var props = Object.keys(global); // non-enumerables @@ -229,11 +358,11 @@ Runner.prototype.globalProps = function() { * @param {Array} arr * @return {Runner} Runner instance. */ -Runner.prototype.globals = function(arr) { +Runner.prototype.globals = function (arr) { if (!arguments.length) { return this._globals; } - debug('globals %j', arr); + debug('globals(): setting to %O', arr); this._globals = this._globals.concat(arr); return this; }; @@ -243,8 +372,8 @@ Runner.prototype.globals = function(arr) { * * @private */ -Runner.prototype.checkGlobals = function(test) { - if (this.ignoreLeaks) { +Runner.prototype.checkGlobals = function (test) { + if (!this.checkLeaks) { return; } var ok = this._globals; @@ -265,29 +394,49 @@ Runner.prototype.checkGlobals = function(test) { this._globals = this._globals.concat(leaks); if (leaks.length) { - var format = ngettext( - leaks.length, - 'global leak detected: %s', - 'global leaks detected: %s' - ); - var error = new Error(util.format(format, leaks.map(sQuote).join(', '))); - this.fail(test, error); + var msg = `global leak(s) detected: ${leaks.map(e => `'${e}'`).join(', ')}`; + this.fail(test, new Error(msg)); } }; /** * Fail the given `test`. * + * If `test` is a hook, failures work in the following pattern: + * - If bail, run corresponding `after each` and `after` hooks, + * then exit + * - Failed `before` hook skips all tests in a suite and subsuites, + * but jumps to corresponding `after` hook + * - Failed `before each` hook skips remaining tests in a + * suite and jumps to corresponding `after each` hook, + * which is run only once + * - Failed `after` hook does not alter execution order + * - Failed `after each` hook skips remaining tests in a + * suite and subsuites, but executes other `after each` + * hooks + * * @private - * @param {Test} test + * @param {Runnable} test * @param {Error} err + * @param {boolean} [force=false] - Whether to fail a pending test. */ -Runner.prototype.fail = function(test, err) { - if (test.isPending()) { +Runner.prototype.fail = function (test, err, force) { + force = force === true; + if (test.isPending() && !force) { return; } + if (this.state === constants.STATE_STOPPED) { + if (err.code === errorConstants.MULTIPLE_DONE) { + throw err; + } + throw createFatalError( + 'Test failed after root suite execution completed!', + err + ); + } ++this.failures; + debug('total number of failures: %d', this.failures); test.state = STATE_FAILED; if (!isError(err)) { @@ -304,45 +453,6 @@ Runner.prototype.fail = function(test, err) { this.emit(constants.EVENT_TEST_FAIL, test, err); }; -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, run corresponding `after each` and `after` hooks, - * then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @private - * @param {Hook} hook - * @param {Error} err - */ -Runner.prototype.failHook = function(hook, err) { - hook.originalTitle = hook.originalTitle || hook.title; - if (hook.ctx && hook.ctx.currentTest) { - hook.title = - hook.originalTitle + ' for ' + dQuote(hook.ctx.currentTest.title); - } else { - var parentTitle; - if (hook.parent.title) { - parentTitle = hook.parent.title; - } else { - parentTitle = hook.parent.root ? '{root}' : ''; - } - hook.title = hook.originalTitle + ' in ' + dQuote(parentTitle); - } - - this.fail(hook, err); -}; - /** * Run hook `name` callbacks and then invoke `fn()`. * @@ -351,7 +461,9 @@ Runner.prototype.failHook = function(hook, err) { * @param {Function} fn */ -Runner.prototype.hook = function(name, fn) { +Runner.prototype.hook = function (name, fn) { + if (this._opts.dryRun) return fn(); + var suite = this.suite; var hooks = suite.getHooks(name); var self = this; @@ -371,57 +483,79 @@ Runner.prototype.hook = function(name, fn) { hook.ctx.currentTest = self.test; } + setHookTitle(hook); + hook.allowUncaught = self.allowUncaught; self.emit(constants.EVENT_HOOK_BEGIN, hook); if (!hook.listeners('error').length) { - hook.on('error', function(err) { - self.failHook(hook, err); + self._addEventListener(hook, 'error', function (err) { + self.fail(hook, err); }); } - hook.run(function(err) { + hook.run(function cbHookRun(err) { var testError = hook.error(); if (testError) { self.fail(self.test, testError); } - if (err) { - if (err instanceof Pending) { - if (name === HOOK_TYPE_AFTER_ALL) { - utils.deprecate( - 'Skipping a test within an "after all" hook is DEPRECATED and will throw an exception in a future version of Mocha. ' + - 'Use a return statement or other means to abort hook execution.' - ); + // conditional skip + if (hook.pending) { + if (name === HOOK_TYPE_AFTER_EACH) { + // TODO define and implement use case + if (self.test) { + self.test.pending = true; } - if (name === HOOK_TYPE_BEFORE_EACH || name === HOOK_TYPE_AFTER_EACH) { - if (self.test) { - self.test.pending = true; - } - } else { - suite.tests.forEach(function(test) { - test.pending = true; - }); - suite.suites.forEach(function(suite) { - suite.pending = true; - }); - // a pending hook won't be executed twice. - hook.pending = true; + } else if (name === HOOK_TYPE_BEFORE_EACH) { + if (self.test) { + self.test.pending = true; } + self.emit(constants.EVENT_HOOK_END, hook); + hook.pending = false; // activates hook for next test + return fn(new Error('abort hookDown')); + } else if (name === HOOK_TYPE_BEFORE_ALL) { + suite.tests.forEach(function (test) { + test.pending = true; + }); + suite.suites.forEach(function (suite) { + suite.pending = true; + }); + hooks = []; } else { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); + hook.pending = false; + var errForbid = createUnsupportedError('`this.skip` forbidden'); + self.fail(hook, errForbid); + return fn(errForbid); } + } else if (err) { + self.fail(hook, err); + // stop executing hooks, notify callee of hook err + return fn(err); } self.emit(constants.EVENT_HOOK_END, hook); delete hook.ctx.currentTest; + setHookTitle(hook); next(++i); }); + + function setHookTitle(hook) { + hook.originalTitle = hook.originalTitle || hook.title; + if (hook.ctx && hook.ctx.currentTest) { + hook.title = `${hook.originalTitle} for "${hook.ctx.currentTest.title}"`; + } else { + var parentTitle; + if (hook.parent.title) { + parentTitle = hook.parent.title; + } else { + parentTitle = hook.parent.root ? '{root}' : ''; + } + hook.title = `${hook.originalTitle} in "${parentTitle}"`; + } + } } - Runner.immediately(function() { + Runner.immediately(function () { next(0); }); }; @@ -435,7 +569,7 @@ Runner.prototype.hook = function(name, fn) { * @param {Array} suites * @param {Function} fn */ -Runner.prototype.hooks = function(name, suites, fn) { +Runner.prototype.hooks = function (name, suites, fn) { var self = this; var orig = this.suite; @@ -447,7 +581,7 @@ Runner.prototype.hooks = function(name, suites, fn) { return fn(); } - self.hook(name, function(err) { + self.hook(name, function (err) { if (err) { var errSuite = self.suite; self.suite = orig; @@ -462,25 +596,25 @@ Runner.prototype.hooks = function(name, suites, fn) { }; /** - * Run hooks from the top level down. + * Run 'afterEach' hooks from bottom up. * * @param {String} name * @param {Function} fn * @private */ -Runner.prototype.hookUp = function(name, fn) { +Runner.prototype.hookUp = function (name, fn) { var suites = [this.suite].concat(this.parents()).reverse(); this.hooks(name, suites, fn); }; /** - * Run hooks from the bottom up. + * Run 'beforeEach' hooks from top level down. * * @param {String} name * @param {Function} fn * @private */ -Runner.prototype.hookDown = function(name, fn) { +Runner.prototype.hookDown = function (name, fn) { var suites = [this.suite].concat(this.parents()); this.hooks(name, suites, fn); }; @@ -492,7 +626,7 @@ Runner.prototype.hookDown = function(name, fn) { * @return {Array} * @private */ -Runner.prototype.parents = function() { +Runner.prototype.parents = function () { var suite = this.suite; var suites = []; while (suite.parent) { @@ -508,7 +642,9 @@ Runner.prototype.parents = function() { * @param {Function} fn * @private */ -Runner.prototype.runTest = function(fn) { +Runner.prototype.runTest = function (fn) { + if (this._opts.dryRun) return Runner.immediately(fn); + var self = this; var test = this.test; @@ -516,15 +652,10 @@ Runner.prototype.runTest = function(fn) { return; } - var suite = this.parents().reverse()[0] || this.suite; - if (this.forbidOnly && suite.hasOnly()) { - fn(new Error('`.only` forbidden')); - return; - } if (this.asyncOnly) { test.asyncOnly = true; } - test.on('error', function(err) { + this._addEventListener(test, 'error', function (err) { self.fail(test, err); }); if (this.allowUncaught) { @@ -545,7 +676,7 @@ Runner.prototype.runTest = function(fn) { * @param {Suite} suite * @param {Function} fn */ -Runner.prototype.runTests = function(suite, fn) { +Runner.prototype.runTests = function (suite, fn) { var self = this; var tests = suite.tests.slice(); var test; @@ -559,8 +690,7 @@ Runner.prototype.runTests = function(suite, fn) { self.suite = after ? errSuite.parent : errSuite; if (self.suite) { - // call hookUp afterEach - self.hookUp(HOOK_TYPE_AFTER_EACH, function(err2, errSuite2) { + self.hookUp(HOOK_TYPE_AFTER_EACH, function (err2, errSuite2) { self.suite = orig; // some hooks may fail even now if (err2) { @@ -620,12 +750,12 @@ Runner.prototype.runTests = function(suite, fn) { return; } + // static skip, no hooks are executed if (test.isPending()) { if (self.forbidPending) { - test.isPending = alwaysFalse; - self.fail(test, new Error('Pending test forbidden')); - delete test.isPending; + self.fail(test, new Error('Pending test forbidden'), true); } else { + test.state = STATE_PENDING; self.emit(constants.EVENT_TEST_PENDING, test); } self.emit(constants.EVENT_TEST_END, test); @@ -634,32 +764,43 @@ Runner.prototype.runTests = function(suite, fn) { // execute test and hook(s) self.emit(constants.EVENT_TEST_BEGIN, (self.test = test)); - self.hookDown(HOOK_TYPE_BEFORE_EACH, function(err, errSuite) { + self.hookDown(HOOK_TYPE_BEFORE_EACH, function (err, errSuite) { + // conditional skip within beforeEach if (test.isPending()) { if (self.forbidPending) { - test.isPending = alwaysFalse; - self.fail(test, new Error('Pending test forbidden')); - delete test.isPending; + self.fail(test, new Error('Pending test forbidden'), true); } else { + test.state = STATE_PENDING; self.emit(constants.EVENT_TEST_PENDING, test); } self.emit(constants.EVENT_TEST_END, test); - return next(); + // skip inner afterEach hooks below errSuite level + var origSuite = self.suite; + self.suite = errSuite || self.suite; + return self.hookUp(HOOK_TYPE_AFTER_EACH, function (e, eSuite) { + self.suite = origSuite; + next(e, eSuite); + }); } if (err) { return hookErr(err, errSuite, false); } self.currentRunnable = self.test; - self.runTest(function(err) { + self.runTest(function (err) { test = self.test; - if (err) { - var retry = test.currentRetry(); - if (err instanceof Pending && self.forbidPending) { - self.fail(test, new Error('Pending test forbidden')); - } else if (err instanceof Pending) { - test.pending = true; + // conditional skip within it + if (test.pending) { + if (self.forbidPending) { + self.fail(test, new Error('Pending test forbidden'), true); + } else { + test.state = STATE_PENDING; self.emit(constants.EVENT_TEST_PENDING, test); - } else if (retry < test.retries()) { + } + self.emit(constants.EVENT_TEST_END, test); + return self.hookUp(HOOK_TYPE_AFTER_EACH, next); + } else if (err) { + var retry = test.currentRetry(); + if (retry < test.retries()) { var clonedTest = test.clone(); clonedTest.currentRetry(retry + 1); tests.unshift(clonedTest); @@ -673,11 +814,6 @@ Runner.prototype.runTests = function(suite, fn) { self.fail(test, err); } self.emit(constants.EVENT_TEST_END, test); - - if (err instanceof Pending) { - return next(); - } - return self.hookUp(HOOK_TYPE_AFTER_EACH, next); } @@ -694,10 +830,6 @@ Runner.prototype.runTests = function(suite, fn) { next(); }; -function alwaysFalse() { - return false; -} - /** * Run the given `suite` and invoke the callback `fn()` when complete. * @@ -705,15 +837,15 @@ function alwaysFalse() { * @param {Suite} suite * @param {Function} fn */ -Runner.prototype.runSuite = function(suite, fn) { +Runner.prototype.runSuite = function (suite, fn) { var i = 0; var self = this; var total = this.grepTotal(suite); - var afterAllHookCalled = false; - debug('run suite %s', suite.fullTitle()); + debug('runSuite(): running %s', suite.fullTitle()); if (!total || (self.failures && suite._bail)) { + debug('runSuite(): bailing'); return fn(); } @@ -745,7 +877,7 @@ Runner.prototype.runSuite = function(suite, fn) { // huge recursive loop and thus a maximum call stack error. // See comment in `this.runTests()` for more information. if (self._grep !== self._defaultGrep) { - Runner.immediately(function() { + Runner.immediately(function () { self.runSuite(curr, next); }); } else { @@ -757,26 +889,18 @@ Runner.prototype.runSuite = function(suite, fn) { self.suite = suite; self.nextSuite = next; - if (afterAllHookCalled) { - fn(errSuite); - } else { - // mark that the afterAll block has been called once - // and so can be skipped if there is an error in it. - afterAllHookCalled = true; - - // remove reference to test - delete self.test; + // remove reference to test + delete self.test; - self.hook(HOOK_TYPE_AFTER_ALL, function() { - self.emit(constants.EVENT_SUITE_END, suite); - fn(errSuite); - }); - } + self.hook(HOOK_TYPE_AFTER_ALL, function () { + self.emit(constants.EVENT_SUITE_END, suite); + fn(errSuite); + }); } this.nextSuite = next; - this.hook(HOOK_TYPE_BEFORE_ALL, function(err) { + this.hook(HOOK_TYPE_BEFORE_ALL, function (err) { if (err) { return done(); } @@ -785,19 +909,51 @@ Runner.prototype.runSuite = function(suite, fn) { }; /** - * Handle uncaught exceptions. + * Handle uncaught exceptions within runner. * - * @param {Error} err + * This function is bound to the instance as `Runner#uncaught` at instantiation + * time. It's intended to be listening on the `Process.uncaughtException` event. + * In order to not leak EE listeners, we need to ensure no more than a single + * `uncaughtException` listener exists per `Runner`. The only way to do + * this--because this function needs the context (and we don't have lambdas)--is + * to use `Function.prototype.bind`. We need strict equality to unregister and + * _only_ unregister the _one_ listener we set from the + * `Process.uncaughtException` event; would be poor form to just remove + * everything. See {@link Runner#run} for where the event listener is registered + * and unregistered. + * @param {Error} err - Some uncaught error * @private */ -Runner.prototype.uncaught = function(err) { +Runner.prototype._uncaught = function (err) { + // this is defensive to prevent future developers from mis-calling this function. + // it's more likely that it'd be called with the incorrect context--say, the global + // `process` object--than it would to be called with a context that is not a "subclass" + // of `Runner`. + if (!(this instanceof Runner)) { + throw createFatalError( + 'Runner#uncaught() called with invalid context', + this + ); + } if (err instanceof Pending) { + debug('uncaught(): caught a Pending'); return; } + // browser does not exit script when throwing in global.onerror() + if (this.allowUncaught && !utils.isBrowser()) { + debug('uncaught(): bubbling exception due to --allow-uncaught'); + throw err; + } + + if (this.state === constants.STATE_STOPPED) { + debug('uncaught(): throwing after run has completed!'); + throw err; + } + if (err) { - debug('uncaught exception %O', err); + debug('uncaught(): got truthy exception %O', err); } else { - debug('uncaught undefined/falsy exception'); + debug('uncaught(): undefined/falsy exception'); err = createInvalidExceptionError( 'Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger', err @@ -806,6 +962,7 @@ Runner.prototype.uncaught = function(err) { if (!isError(err)) { err = thrown2Error(err); + debug('uncaught(): converted "error" %o to Error', err); } err.uncaught = true; @@ -813,12 +970,15 @@ Runner.prototype.uncaught = function(err) { if (!runnable) { runnable = new Runnable('Uncaught error outside test suite'); + debug('uncaught(): no current Runnable; created a phony one'); runnable.parent = this.suite; - if (this.started) { + if (this.state === constants.STATE_RUNNING) { + debug('uncaught(): failing gracefully'); this.fail(runnable, err); } else { // Can't recover from this failure + debug('uncaught(): test run has not yet started; unrecoverable'); this.emit(constants.EVENT_RUN_BEGIN); this.fail(runnable, err); this.emit(constants.EVENT_RUN_END); @@ -829,43 +989,27 @@ Runner.prototype.uncaught = function(err) { runnable.clearTimeout(); - // Ignore errors if already failed or pending - // See #3226 - if (runnable.isFailed() || runnable.isPending()) { + if (runnable.isFailed()) { + debug('uncaught(): Runnable has already failed'); + // Ignore error if already failed + return; + } else if (runnable.isPending()) { + debug('uncaught(): pending Runnable wound up failing!'); + // report 'pending test' retrospectively as failed + this.fail(runnable, err, true); return; } + // we cannot recover gracefully if a Runnable has already passed // then fails asynchronously - var alreadyPassed = runnable.isPassed(); - // this will change the state to "failed" regardless of the current value - this.fail(runnable, err); - if (!alreadyPassed) { - // recover from test - if (runnable.type === constants.EVENT_TEST_BEGIN) { - this.emit(constants.EVENT_TEST_END, runnable); - this.hookUp(HOOK_TYPE_AFTER_EACH, this.next); - return; - } - debug(runnable); - - // recover from hooks - var errSuite = this.suite; - - // XXX how about a less awful way to determine this? - // if hook failure is in afterEach block - if (runnable.fullTitle().indexOf('after each') > -1) { - return this.hookErr(err, errSuite, true); - } - // if hook failure is in beforeEach block - if (runnable.fullTitle().indexOf('before each') > -1) { - return this.hookErr(err, errSuite, false); - } - // if hook failure is in after or before blocks - return this.nextSuite(errSuite); + if (runnable.isPassed()) { + debug('uncaught(): Runnable has already passed; bailing gracefully'); + this.fail(runnable, err); + this.abort(); + } else { + debug('uncaught(): forcing Runnable to complete with Error'); + return runnable.callback(err); } - - // bail - this.emit(constants.EVENT_RUN_END); }; /** @@ -874,65 +1018,123 @@ Runner.prototype.uncaught = function(err) { * * @public * @memberof Runner - * @param {Function} fn - * @return {Runner} Runner instance. + * @param {Function} fn - Callback when finished + * @param {Object} [opts] - For subclasses + * @param {string[]} opts.files - Files to run + * @param {Options} opts.options - command-line options + * @returns {Runner} Runner instance. */ -Runner.prototype.run = function(fn) { - var self = this; +Runner.prototype.run = function (fn, opts = {}) { var rootSuite = this.suite; + var options = opts.options || {}; - fn = fn || function() {}; + debug('run(): got options: %O', options); + fn = fn || function () {}; - function uncaught(err) { - self.uncaught(err); - } + const end = () => { + if (!this.total && this._opts.failZero) this.failures = 1; + + debug('run(): root suite completed; emitting %s', constants.EVENT_RUN_END); + this.emit(constants.EVENT_RUN_END); + }; + + const begin = () => { + debug('run(): emitting %s', constants.EVENT_RUN_BEGIN); + this.emit(constants.EVENT_RUN_BEGIN); + debug('run(): emitted %s', constants.EVENT_RUN_BEGIN); + + this.runSuite(rootSuite, end); + }; - function start() { + const prepare = () => { + debug('run(): starting'); // If there is an `only` filter if (rootSuite.hasOnly()) { rootSuite.filterOnly(); + debug('run(): filtered exclusive Runnables'); } - self.started = true; - if (self._delay) { - self.emit(constants.EVENT_DELAY_END); + this.state = constants.STATE_RUNNING; + if (this._opts.delay) { + this.emit(constants.EVENT_DELAY_END); + debug('run(): "delay" ended'); } - self.emit(constants.EVENT_RUN_BEGIN); - - self.runSuite(rootSuite, function() { - debug('finished running'); - self.emit(constants.EVENT_RUN_END); - }); - } - debug(constants.EVENT_RUN_BEGIN); + return begin(); + }; // references cleanup to avoid memory leaks - this.on(constants.EVENT_SUITE_END, function(suite) { - suite.cleanReferences(); - }); + if (this._opts.cleanReferencesAfterRun) { + this.on(constants.EVENT_SUITE_END, suite => { + suite.cleanReferences(); + }); + } // callback - this.on(constants.EVENT_RUN_END, function() { - debug(constants.EVENT_RUN_END); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); + this.on(constants.EVENT_RUN_END, function () { + this.state = constants.STATE_STOPPED; + debug('run(): emitted %s', constants.EVENT_RUN_END); + fn(this.failures); }); - // uncaught exception - process.on('uncaughtException', uncaught); + this._removeEventListener(process, 'uncaughtException', this.uncaught); + this._removeEventListener(process, 'unhandledRejection', this.unhandled); + this._addEventListener(process, 'uncaughtException', this.uncaught); + this._addEventListener(process, 'unhandledRejection', this.unhandled); - if (this._delay) { + if (this._opts.delay) { // for reporters, I guess. // might be nice to debounce some dots while we wait. this.emit(constants.EVENT_DELAY_BEGIN, rootSuite); - rootSuite.once(EVENT_ROOT_SUITE_RUN, start); + rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare); + debug('run(): waiting for green light due to --delay'); } else { - start(); + Runner.immediately(prepare); } return this; }; +/** + * Toggle partial object linking behavior; used for building object references from + * unique ID's. Does nothing in serial mode, because the object references already exist. + * Subclasses can implement this (e.g., `ParallelBufferedRunner`) + * @abstract + * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable + * @returns {Runner} + * @chainable + * @public + * @example + * // this reporter needs proper object references when run in parallel mode + * class MyReporter() { + * constructor(runner) { + * this.runner.linkPartialObjects(true) + * .on(EVENT_SUITE_BEGIN, suite => { + // this Suite may be the same object... + * }) + * .on(EVENT_TEST_BEGIN, test => { + * // ...as the `test.parent` property + * }); + * } + * } + */ +Runner.prototype.linkPartialObjects = function (value) { + return this; +}; + +/* + * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`. + * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead. + * @public + * @memberof Runner + * @param {Object} [opts] - Options for {@link Runner#run} + * @returns {Promise} Failure count + */ +Runner.prototype.runAsync = async function runAsync(opts = {}) { + return new Promise(resolve => { + this.run(resolve, opts); + }); +}; + /** * Cleanly abort execution. * @@ -940,13 +1142,38 @@ Runner.prototype.run = function(fn) { * @public * @return {Runner} Runner instance. */ -Runner.prototype.abort = function() { - debug('aborting'); +Runner.prototype.abort = function () { + debug('abort(): aborting'); this._abort = true; return this; }; +/** + * Returns `true` if Mocha is running in parallel mode. For reporters. + * + * Subclasses should return an appropriate value. + * @public + * @returns {false} + */ +Runner.prototype.isParallelMode = function isParallelMode() { + return false; +}; + +/** + * Configures an alternate reporter for worker processes to use. Subclasses + * using worker processes should implement this. + * @public + * @param {string} path - Absolute path to alternate reporter for worker processes to use + * @returns {Runner} + * @throws When in serial mode + * @chainable + * @abstract + */ +Runner.prototype.workerReporter = function () { + throw createUnsupportedError('workerReporter() not supported in serial mode'); +}; + /** * Filter leaks with the given globals flagged as `ok`. * @@ -956,7 +1183,7 @@ Runner.prototype.abort = function() { * @return {Array} */ function filterLeaks(ok, globals) { - return globals.filter(function(key) { + return globals.filter(function (key) { // Firefox and Chrome exposes iframes as index inside the window object if (/^\d+/.test(key)) { return false; @@ -980,7 +1207,7 @@ function filterLeaks(ok, globals) { return false; } - var matched = ok.filter(function(ok) { + var matched = ok.filter(function (ok) { if (~ok.indexOf('*')) { return key.indexOf(ok.split('*')[0]) === 0; } @@ -1012,34 +1239,12 @@ function isError(err) { */ function thrown2Error(err) { return new Error( - 'the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)' + `the ${utils.canonicalType(err)} ${stringify( + err + )} was thrown, throw an Error :)` ); } -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @deprecated - * @todo remove; long since unsupported - * @private - */ -function extraGlobals() { - if (typeof process === 'object' && typeof process.version === 'string') { - var parts = process.version.split('.'); - var nodeVersion = parts.reduce(function(a, v) { - return (a << 8) | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - if (nodeVersion < 0x00090b) { - return ['errno']; - } - } - - return []; -} - Runner.constants = constants; /** @@ -1047,3 +1252,5 @@ Runner.constants = constants; * @external EventEmitter * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter} */ + +module.exports = Runner; diff --git a/node_modules/mocha/lib/stats-collector.js b/node_modules/mocha/lib/stats-collector.js index 938778fb..738fd5d7 100644 --- a/node_modules/mocha/lib/stats-collector.js +++ b/node_modules/mocha/lib/stats-collector.js @@ -56,25 +56,25 @@ function createStatsCollector(runner) { runner.stats = stats; - runner.once(EVENT_RUN_BEGIN, function() { + runner.once(EVENT_RUN_BEGIN, function () { stats.start = new Date(); }); - runner.on(EVENT_SUITE_BEGIN, function(suite) { + runner.on(EVENT_SUITE_BEGIN, function (suite) { suite.root || stats.suites++; }); - runner.on(EVENT_TEST_PASS, function() { + runner.on(EVENT_TEST_PASS, function () { stats.passes++; }); - runner.on(EVENT_TEST_FAIL, function() { + runner.on(EVENT_TEST_FAIL, function () { stats.failures++; }); - runner.on(EVENT_TEST_PENDING, function() { + runner.on(EVENT_TEST_PENDING, function () { stats.pending++; }); - runner.on(EVENT_TEST_END, function() { + runner.on(EVENT_TEST_END, function () { stats.tests++; }); - runner.once(EVENT_RUN_END, function() { + runner.once(EVENT_RUN_END, function () { stats.end = new Date(); stats.duration = stats.end - stats.start; }); diff --git a/node_modules/mocha/lib/suite.js b/node_modules/mocha/lib/suite.js index 191d946b..43cb7556 100644 --- a/node_modules/mocha/lib/suite.js +++ b/node_modules/mocha/lib/suite.js @@ -2,15 +2,24 @@ /** * Module dependencies. + * @private */ -var EventEmitter = require('events').EventEmitter; -var Hook = require('./hook'); -var utils = require('./utils'); -var inherits = utils.inherits; -var debug = require('debug')('mocha:suite'); -var milliseconds = require('ms'); -var errors = require('./errors'); -var createInvalidArgumentTypeError = errors.createInvalidArgumentTypeError; +const {EventEmitter} = require('events'); +const Hook = require('./hook'); +var { + assignNewMochaID, + clamp, + constants: utilsConstants, + defineConstants, + getMochaID, + inherits, + isString +} = require('./utils'); +const debug = require('debug')('mocha:suite'); +const milliseconds = require('ms'); +const errors = require('./errors'); + +const {MOCHA_ID_PROP_NAME} = utilsConstants; /** * Expose `Suite`. @@ -26,7 +35,7 @@ exports = module.exports = Suite; * @param {string} title - Title * @return {Suite} */ -Suite.create = function(parent, title) { +Suite.create = function (parent, title) { var suite = new Suite(title, parent.ctx); suite.parent = parent; title = suite.fullTitle(); @@ -46,8 +55,8 @@ Suite.create = function(parent, title) { * @param {boolean} [isRoot=false] - Whether this is the root suite. */ function Suite(title, parentContext, isRoot) { - if (!utils.isString(title)) { - throw createInvalidArgumentTypeError( + if (!isString(title)) { + throw errors.createInvalidArgumentTypeError( 'Suite argument "title" must be a string. Received type "' + typeof title + '"', @@ -61,30 +70,27 @@ function Suite(title, parentContext, isRoot) { this.ctx = new Context(); this.suites = []; this.tests = []; + this.root = isRoot === true; this.pending = false; + this._retries = -1; this._beforeEach = []; this._beforeAll = []; this._afterEach = []; this._afterAll = []; - this.root = isRoot === true; this._timeout = 2000; - this._enableTimeouts = true; this._slow = 75; this._bail = false; - this._retries = -1; this._onlyTests = []; this._onlySuites = []; - this.delayed = false; + assignNewMochaID(this); - this.on('newListener', function(event) { - if (deprecatedEvents[event]) { - utils.deprecate( - 'Event "' + - event + - '" is deprecated. Please let the Mocha team know about your use case: https://git.io/v6Lwm' - ); + Object.defineProperty(this, 'id', { + get() { + return getMochaID(this); } }); + + this.reset(); } /** @@ -92,20 +98,35 @@ function Suite(title, parentContext, isRoot) { */ inherits(Suite, EventEmitter); +/** + * Resets the state initially or for a next run. + */ +Suite.prototype.reset = function () { + this.delayed = false; + function doReset(thingToReset) { + thingToReset.reset(); + } + this.suites.forEach(doReset); + this.tests.forEach(doReset); + this._beforeEach.forEach(doReset); + this._afterEach.forEach(doReset); + this._beforeAll.forEach(doReset); + this._afterAll.forEach(doReset); +}; + /** * Return a clone of this `Suite`. * * @private * @return {Suite} */ -Suite.prototype.clone = function() { +Suite.prototype.clone = function () { var suite = new Suite(this.title); debug('clone'); suite.ctx = this.ctx; suite.root = this.root; suite.timeout(this.timeout()); suite.retries(this.retries()); - suite.enableTimeouts(this.enableTimeouts()); suite.slow(this.slow()); suite.bail(this.bail()); return suite; @@ -119,16 +140,19 @@ Suite.prototype.clone = function() { * @param {number|string} ms * @return {Suite|number} for chaining */ -Suite.prototype.timeout = function(ms) { +Suite.prototype.timeout = function (ms) { if (!arguments.length) { return this._timeout; } - if (ms.toString() === '0') { - this._enableTimeouts = false; - } if (typeof ms === 'string') { ms = milliseconds(ms); } + + // Clamp to range + var INT_MAX = Math.pow(2, 31) - 1; + var range = [0, INT_MAX]; + ms = clamp(ms, range); + debug('timeout %d', ms); this._timeout = parseInt(ms, 10); return this; @@ -141,7 +165,7 @@ Suite.prototype.timeout = function(ms) { * @param {number|string} n * @return {Suite|number} for chaining */ -Suite.prototype.retries = function(n) { +Suite.prototype.retries = function (n) { if (!arguments.length) { return this._retries; } @@ -150,22 +174,6 @@ Suite.prototype.retries = function(n) { return this; }; -/** - * Set or get timeout to `enabled`. - * - * @private - * @param {boolean} enabled - * @return {Suite|boolean} self or enabled - */ -Suite.prototype.enableTimeouts = function(enabled) { - if (!arguments.length) { - return this._enableTimeouts; - } - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - /** * Set or get slow `ms` or short-hand such as "2s". * @@ -173,7 +181,7 @@ Suite.prototype.enableTimeouts = function(enabled) { * @param {number|string} ms * @return {Suite|number} for chaining */ -Suite.prototype.slow = function(ms) { +Suite.prototype.slow = function (ms) { if (!arguments.length) { return this._slow; } @@ -192,7 +200,7 @@ Suite.prototype.slow = function(ms) { * @param {boolean} bail * @return {Suite|number} for chaining */ -Suite.prototype.bail = function(bail) { +Suite.prototype.bail = function (bail) { if (!arguments.length) { return this._bail; } @@ -206,7 +214,7 @@ Suite.prototype.bail = function(bail) { * * @private */ -Suite.prototype.isPending = function() { +Suite.prototype.isPending = function () { return this.pending || (this.parent && this.parent.isPending()); }; @@ -217,12 +225,11 @@ Suite.prototype.isPending = function() { * @param {Function} fn - Hook callback * @returns {Hook} A new hook */ -Suite.prototype._createHook = function(title, fn) { +Suite.prototype._createHook = function (title, fn) { var hook = new Hook(title, fn); hook.parent = this; hook.timeout(this.timeout()); hook.retries(this.retries()); - hook.enableTimeouts(this.enableTimeouts()); hook.slow(this.slow()); hook.ctx = this.ctx; hook.file = this.file; @@ -237,7 +244,7 @@ Suite.prototype._createHook = function(title, fn) { * @param {Function} fn * @return {Suite} for chaining */ -Suite.prototype.beforeAll = function(title, fn) { +Suite.prototype.beforeAll = function (title, fn) { if (this.isPending()) { return this; } @@ -261,7 +268,7 @@ Suite.prototype.beforeAll = function(title, fn) { * @param {Function} fn * @return {Suite} for chaining */ -Suite.prototype.afterAll = function(title, fn) { +Suite.prototype.afterAll = function (title, fn) { if (this.isPending()) { return this; } @@ -285,7 +292,7 @@ Suite.prototype.afterAll = function(title, fn) { * @param {Function} fn * @return {Suite} for chaining */ -Suite.prototype.beforeEach = function(title, fn) { +Suite.prototype.beforeEach = function (title, fn) { if (this.isPending()) { return this; } @@ -309,7 +316,7 @@ Suite.prototype.beforeEach = function(title, fn) { * @param {Function} fn * @return {Suite} for chaining */ -Suite.prototype.afterEach = function(title, fn) { +Suite.prototype.afterEach = function (title, fn) { if (this.isPending()) { return this; } @@ -332,12 +339,11 @@ Suite.prototype.afterEach = function(title, fn) { * @param {Suite} suite * @return {Suite} for chaining */ -Suite.prototype.addSuite = function(suite) { +Suite.prototype.addSuite = function (suite) { suite.parent = this; suite.root = false; suite.timeout(this.timeout()); suite.retries(this.retries()); - suite.enableTimeouts(this.enableTimeouts()); suite.slow(this.slow()); suite.bail(this.bail()); this.suites.push(suite); @@ -352,11 +358,10 @@ Suite.prototype.addSuite = function(suite) { * @param {Test} test * @return {Suite} for chaining */ -Suite.prototype.addTest = function(test) { +Suite.prototype.addTest = function (test) { test.parent = this; test.timeout(this.timeout()); test.retries(this.retries()); - test.enableTimeouts(this.enableTimeouts()); test.slow(this.slow()); test.ctx = this.ctx; this.tests.push(test); @@ -372,7 +377,7 @@ Suite.prototype.addTest = function(test) { * @public * @return {string} */ -Suite.prototype.fullTitle = function() { +Suite.prototype.fullTitle = function () { return this.titlePath().join(' '); }; @@ -384,7 +389,7 @@ Suite.prototype.fullTitle = function() { * @public * @return {string} */ -Suite.prototype.titlePath = function() { +Suite.prototype.titlePath = function () { var result = []; if (this.parent) { result = result.concat(this.parent.titlePath()); @@ -402,9 +407,9 @@ Suite.prototype.titlePath = function() { * @public * @return {number} */ -Suite.prototype.total = function() { +Suite.prototype.total = function () { return ( - this.suites.reduce(function(sum, suite) { + this.suites.reduce(function (sum, suite) { return sum + suite.total(); }, 0) + this.tests.length ); @@ -418,9 +423,9 @@ Suite.prototype.total = function() { * @param {Function} fn * @return {Suite} */ -Suite.prototype.eachTest = function(fn) { +Suite.prototype.eachTest = function (fn) { this.tests.forEach(fn); - this.suites.forEach(function(suite) { + this.suites.forEach(function (suite) { suite.eachTest(fn); }); return this; @@ -446,7 +451,7 @@ Suite.prototype.hasOnly = function hasOnly() { return ( this._onlyTests.length > 0 || this._onlySuites.length > 0 || - this.suites.some(function(suite) { + this.suites.some(function (suite) { return suite.hasOnly(); }) ); @@ -466,7 +471,7 @@ Suite.prototype.filterOnly = function filterOnly() { } else { // Otherwise, do not run any of the tests in this suite. this.tests = []; - this._onlySuites.forEach(function(onlySuite) { + this._onlySuites.forEach(function (onlySuite) { // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite. // Otherwise, all of the tests on this `only` suite should be run, so don't filter it. if (onlySuite.hasOnly()) { @@ -475,7 +480,7 @@ Suite.prototype.filterOnly = function filterOnly() { }); // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants. var onlySuites = this._onlySuites; - this.suites = this.suites.filter(function(childSuite) { + this.suites = this.suites.filter(function (childSuite) { return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly(); }); } @@ -489,17 +494,26 @@ Suite.prototype.filterOnly = function filterOnly() { * @private * @param {Suite} suite */ -Suite.prototype.appendOnlySuite = function(suite) { +Suite.prototype.appendOnlySuite = function (suite) { this._onlySuites.push(suite); }; +/** + * Marks a suite to be `only`. + * + * @private + */ +Suite.prototype.markOnly = function () { + this.parent && this.parent.appendOnlySuite(this); +}; + /** * Adds a test to the list of tests marked `only`. * * @private * @param {Test} test */ -Suite.prototype.appendOnlyTest = function(test) { +Suite.prototype.appendOnlyTest = function (test) { this._onlyTests.push(test); }; @@ -511,6 +525,16 @@ Suite.prototype.getHooks = function getHooks(name) { return this['_' + name]; }; +/** + * cleans all references from this suite and all child suites. + */ +Suite.prototype.dispose = function () { + this.suites.forEach(function (suite) { + suite.dispose(); + }); + this.cleanReferences(); +}; + /** * Cleans up the references to all the deferred functions * (before/after/beforeEach/afterEach) and tests of a Suite. @@ -549,7 +573,25 @@ Suite.prototype.cleanReferences = function cleanReferences() { } }; -var constants = utils.defineConstants( +/** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ +Suite.prototype.serialize = function serialize() { + return { + _bail: this._bail, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + root: this.root, + title: this.title, + [MOCHA_ID_PROP_NAME]: this.id, + parent: this.parent ? {[MOCHA_ID_PROP_NAME]: this.parent.id} : null + }; +}; + +var constants = defineConstants( /** * {@link Suite}-related constants. * @public @@ -561,7 +603,7 @@ var constants = utils.defineConstants( */ { /** - * Event emitted after a test file has been loaded Not emitted in browser. + * Event emitted after a test file has been loaded. Not emitted in browser. */ EVENT_FILE_POST_REQUIRE: 'post-require', /** @@ -573,70 +615,52 @@ var constants = utils.defineConstants( */ EVENT_FILE_REQUIRE: 'require', /** - * Event emitted when `global.run()` is called (use with `delay` option) + * Event emitted when `global.run()` is called (use with `delay` option). */ EVENT_ROOT_SUITE_RUN: 'run', /** - * Namespace for collection of a `Suite`'s "after all" hooks + * Namespace for collection of a `Suite`'s "after all" hooks. */ HOOK_TYPE_AFTER_ALL: 'afterAll', /** - * Namespace for collection of a `Suite`'s "after each" hooks + * Namespace for collection of a `Suite`'s "after each" hooks. */ HOOK_TYPE_AFTER_EACH: 'afterEach', /** - * Namespace for collection of a `Suite`'s "before all" hooks + * Namespace for collection of a `Suite`'s "before all" hooks. */ HOOK_TYPE_BEFORE_ALL: 'beforeAll', /** - * Namespace for collection of a `Suite`'s "before all" hooks + * Namespace for collection of a `Suite`'s "before each" hooks. */ HOOK_TYPE_BEFORE_EACH: 'beforeEach', - // the following events are all deprecated - /** - * Emitted after an "after all" `Hook` has been added to a `Suite`. Deprecated + * Emitted after a child `Suite` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_SUITE: 'suite', + /** + * Emitted after an "after all" `Hook` has been added to a `Suite`. */ EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll', /** - * Emitted after an "after each" `Hook` has been added to a `Suite` Deprecated + * Emitted after an "after each" `Hook` has been added to a `Suite`. */ EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach', /** - * Emitted after an "before all" `Hook` has been added to a `Suite` Deprecated + * Emitted after an "before all" `Hook` has been added to a `Suite`. */ EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll', /** - * Emitted after an "before each" `Hook` has been added to a `Suite` Deprecated + * Emitted after an "before each" `Hook` has been added to a `Suite`. */ EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach', /** - * Emitted after a child `Suite` has been added to a `Suite`. Deprecated - */ - EVENT_SUITE_ADD_SUITE: 'suite', - /** - * Emitted after a `Test` has been added to a `Suite`. Deprecated + * Emitted after a `Test` has been added to a `Suite`. */ EVENT_SUITE_ADD_TEST: 'test' } ); -/** - * @summary There are no known use cases for these events. - * @desc This is a `Set`-like object having all keys being the constant's string value and the value being `true`. - * @todo Remove eventually - * @type {Object} - * @ignore - */ -var deprecatedEvents = Object.keys(constants) - .filter(function(constant) { - return constant.substring(0, 15) === 'EVENT_SUITE_ADD'; - }) - .reduce(function(acc, constant) { - acc[constants[constant]] = true; - return acc; - }, utils.createMap()); - Suite.constants = constants; diff --git a/node_modules/mocha/lib/test.js b/node_modules/mocha/lib/test.js index f32008a8..0b8fe18b 100644 --- a/node_modules/mocha/lib/test.js +++ b/node_modules/mocha/lib/test.js @@ -5,6 +5,8 @@ var errors = require('./errors'); var createInvalidArgumentTypeError = errors.createInvalidArgumentTypeError; var isString = utils.isString; +const {MOCHA_ID_PROP_NAME} = utils.constants; + module.exports = Test; /** @@ -26,9 +28,9 @@ function Test(title, fn) { 'string' ); } - Runnable.call(this, title, fn); - this.pending = !fn; this.type = 'test'; + Runnable.call(this, title, fn); + this.reset(); } /** @@ -36,16 +38,76 @@ function Test(title, fn) { */ utils.inherits(Test, Runnable); -Test.prototype.clone = function() { +/** + * Resets the state initially or for a next run. + */ +Test.prototype.reset = function () { + Runnable.prototype.reset.call(this); + this.pending = !this.fn; + delete this.state; +}; + +/** + * Set or get retried test + * + * @private + */ +Test.prototype.retriedTest = function (n) { + if (!arguments.length) { + return this._retriedTest; + } + this._retriedTest = n; +}; + +/** + * Add test to the list of tests marked `only`. + * + * @private + */ +Test.prototype.markOnly = function () { + this.parent.appendOnlyTest(this); +}; + +Test.prototype.clone = function () { var test = new Test(this.title, this.fn); test.timeout(this.timeout()); test.slow(this.slow()); - test.enableTimeouts(this.enableTimeouts()); test.retries(this.retries()); test.currentRetry(this.currentRetry()); + test.retriedTest(this.retriedTest() || this); test.globals(this.globals()); test.parent = this.parent; test.file = this.file; test.ctx = this.ctx; return test; }; + +/** + * Returns an minimal object suitable for transmission over IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ +Test.prototype.serialize = function serialize() { + return { + $$currentRetry: this._currentRetry, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.pending), + $$retriedTest: this._retriedTest || null, + $$slow: this._slow, + $$titlePath: this.titlePath(), + body: this.body, + duration: this.duration, + err: this.err, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME]: this.parent.id + }, + speed: this.speed, + state: this.state, + title: this.title, + type: this.type, + file: this.file, + [MOCHA_ID_PROP_NAME]: this.id + }; +}; diff --git a/node_modules/mocha/lib/utils.js b/node_modules/mocha/lib/utils.js index 996e8435..7e1d5668 100644 --- a/node_modules/mocha/lib/utils.js +++ b/node_modules/mocha/lib/utils.js @@ -9,16 +9,12 @@ * Module dependencies. */ -var fs = require('fs'); +const {nanoid} = require('nanoid/non-secure'); var path = require('path'); var util = require('util'); -var glob = require('glob'); var he = require('he'); -var errors = require('./errors'); -var createNoFilesMatchPatternError = errors.createNoFilesMatchPatternError; -var createMissingArgumentError = errors.createMissingArgumentError; -var assign = (exports.assign = require('object.assign').getPolyfill()); +const MOCHA_ID_PROP_NAME = '__mocha_id__'; /** * Inherit the prototype methods from one constructor into another. @@ -38,7 +34,7 @@ exports.inherits = util.inherits; * @param {string} html * @return {string} */ -exports.escape = function(html) { +exports.escape = function (html) { return he.encode(String(html), {useNamedReferences: false}); }; @@ -49,84 +45,10 @@ exports.escape = function(html) { * @param {Object} obj * @return {boolean} */ -exports.isString = function(obj) { +exports.isString = function (obj) { return typeof obj === 'string'; }; -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @private - * @param {Array} files - * @param {Function} fn - */ -exports.watch = function(files, fn) { - var options = {interval: 100}; - var debug = require('debug')('mocha:watch'); - files.forEach(function(file) { - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev) { - if (prev.mtime < curr.mtime) { - fn(file); - } - }); - }); -}; - -/** - * Predicate to screen `pathname` for further consideration. - * - * @description - * Returns false for pathname referencing: - *
      - *
    • 'npm' package installation directory - *
    • 'git' version control directory - *
    - * - * @private - * @param {string} pathname - File or directory name to screen - * @return {boolean} whether pathname should be further considered - * @example - * ['node_modules', 'test.js'].filter(considerFurther); // => ['test.js'] - */ -function considerFurther(pathname) { - var ignore = ['node_modules', '.git']; - - return !~ignore.indexOf(pathname); -} - -/** - * Lookup files in the given `dir`. - * - * @description - * Filenames are returned in _traversal_ order by the OS/filesystem. - * **Make no assumption that the names will be sorted in any fashion.** - * - * @private - * @param {string} dir - * @param {string[]} [exts=['js']] - * @param {Array} [ret=[]] - * @return {Array} - */ -exports.files = function(dir, exts, ret) { - ret = ret || []; - exts = exts || ['js']; - - fs.readdirSync(dir) - .filter(considerFurther) - .forEach(function(dirent) { - var pathname = path.join(dir, dirent); - if (fs.lstatSync(pathname).isDirectory()) { - exports.files(pathname, exts, ret); - } else if (hasMatchingExtname(pathname, exts)) { - ret.push(pathname); - } - }); - - return ret; -}; - /** * Compute a slug from the given `str`. * @@ -134,11 +56,12 @@ exports.files = function(dir, exts, ret) { * @param {string} str * @return {string} */ -exports.slug = function(str) { +exports.slug = function (str) { return str .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); + .replace(/\s+/g, '-') + .replace(/[^-\w]/g, '') + .replace(/-{2,}/g, '-'); }; /** @@ -147,13 +70,13 @@ exports.slug = function(str) { * @param {string} str * @return {string} */ -exports.clean = function(str) { +exports.clean = function (str) { str = str .replace(/\r\n?|[\n\u2028\u2029]/g, '\n') .replace(/^\uFEFF/, '') // (traditional)-> space/name parameters body (lambda)-> parameters body multi-statement/single keep body content .replace( - /^function(?:\s*|\s+[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\s*\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\s*\}|((?:.|\n)*))$/, + /^function(?:\s*|\s[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\}|((?:.|\n)*))$/, '$1$2$3' ); @@ -169,67 +92,6 @@ exports.clean = function(str) { return str.trim(); }; -/** - * Parse the given `qs`. - * - * @private - * @param {string} qs - * @return {Object} - */ -exports.parseQuery = function(qs) { - return qs - .replace('?', '') - .split('&') - .reduce(function(obj, pair) { - var i = pair.indexOf('='); - var key = pair.slice(0, i); - var val = pair.slice(++i); - - // Due to how the URLSearchParams API treats spaces - obj[key] = decodeURIComponent(val.replace(/\+/g, '%20')); - - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @private - * @param {string} js - * @return {string} - */ -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace( - /\bnew[ \t]+(\w+)/gm, - 'new $1' - ) - .replace( - /\b(function|new|throw|return|var|if|else)\b/gm, - '$1' - ); -} - -/** - * Highlight the contents of tag `name`. - * - * @private - * @param {string} name - */ -exports.highlightTags = function(name) { - var code = document.getElementById('mocha').getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - /** * If a value could have properties, and has none, this function is called, * which returns a string representation of the empty value. @@ -266,19 +128,21 @@ function emptyRepresentation(value, typeHint) { * @param {*} value The value to test. * @returns {string} Computed type * @example - * type({}) // 'object' - * type([]) // 'array' - * type(1) // 'number' - * type(false) // 'boolean' - * type(Infinity) // 'number' - * type(null) // 'null' - * type(new Date()) // 'date' - * type(/foo/) // 'regexp' - * type('type') // 'string' - * type(global) // 'global' - * type(new String('foo') // 'object' - */ -var type = (exports.type = function type(value) { + * canonicalType({}) // 'object' + * canonicalType([]) // 'array' + * canonicalType(1) // 'number' + * canonicalType(false) // 'boolean' + * canonicalType(Infinity) // 'number' + * canonicalType(null) // 'null' + * canonicalType(new Date()) // 'date' + * canonicalType(/foo/) // 'regexp' + * canonicalType('type') // 'string' + * canonicalType(global) // 'global' + * canonicalType(new String('foo') // 'object' + * canonicalType(async function() {}) // 'asyncfunction' + * canonicalType(await import(name)) // 'module' + */ +var canonicalType = (exports.canonicalType = function canonicalType(value) { if (value === undefined) { return 'undefined'; } else if (value === null) { @@ -292,6 +156,47 @@ var type = (exports.type = function type(value) { .toLowerCase(); }); +/** + * + * Returns a general type or data structure of a variable + * @private + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures + * @param {*} value The value to test. + * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object + * @example + * type({}) // 'object' + * type([]) // 'array' + * type(1) // 'number' + * type(false) // 'boolean' + * type(Infinity) // 'number' + * type(null) // 'null' + * type(new Date()) // 'object' + * type(/foo/) // 'object' + * type('type') // 'string' + * type(global) // 'object' + * type(new String('foo') // 'string' + */ +exports.type = function type(value) { + // Null is special + if (value === null) return 'null'; + const primitives = new Set([ + 'undefined', + 'boolean', + 'number', + 'string', + 'bigint', + 'symbol' + ]); + const _type = typeof value; + if (_type === 'function') return _type; + if (primitives.has(_type)) return _type; + if (value instanceof String) return 'string'; + if (value instanceof Error) return 'error'; + if (Array.isArray(value)) return 'array'; + + return _type; +}; + /** * Stringify `value`. Different behavior depending on type of value: * @@ -307,8 +212,8 @@ var type = (exports.type = function type(value) { * @param {*} value * @return {string} */ -exports.stringify = function(value) { - var typeHint = type(value); +exports.stringify = function (value) { + var typeHint = canonicalType(value); if (!~['object', 'array', 'function'].indexOf(typeHint)) { if (typeHint === 'buffer') { @@ -323,7 +228,7 @@ exports.stringify = function(value) { // IE7/IE8 has a bizarre String constructor; needs to be coerced // into an array and back to obj. if (typeHint === 'string' && typeof value === 'object') { - value = value.split('').reduce(function(acc, char, idx) { + value = value.split('').reduce(function (acc, char, idx) { acc[idx] = char; return acc; }, {}); @@ -374,7 +279,7 @@ function jsonStringify(object, spaces, depth) { } function _stringify(val) { - switch (type(val)) { + switch (canonicalType(val)) { case 'null': case 'undefined': val = '[' + val + ']'; @@ -392,6 +297,9 @@ function jsonStringify(object, spaces, depth) { ? '-0' : val.toString(); break; + case 'bigint': + val = val.toString() + 'n'; + break; case 'date': var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString(); val = '[Date: ' + sDate + ']'; @@ -455,7 +363,7 @@ exports.canonicalize = function canonicalize(value, stack, typeHint) { /* eslint-disable no-unused-vars */ var prop; /* eslint-enable no-unused-vars */ - typeHint = typeHint || type(value); + typeHint = typeHint || canonicalType(value); function withStack(value, fn) { stack.push(value); fn(); @@ -475,14 +383,14 @@ exports.canonicalize = function canonicalize(value, stack, typeHint) { canonicalizedObj = value; break; case 'array': - withStack(value, function() { - canonicalizedObj = value.map(function(item) { + withStack(value, function () { + canonicalizedObj = value.map(function (item) { return exports.canonicalize(item, stack); }); }); break; case 'function': - /* eslint-disable guard-for-in */ + /* eslint-disable-next-line no-unused-vars, no-unreachable-loop */ for (prop in value) { canonicalizedObj = {}; break; @@ -495,10 +403,10 @@ exports.canonicalize = function canonicalize(value, stack, typeHint) { /* falls through */ case 'object': canonicalizedObj = canonicalizedObj || {}; - withStack(value, function() { + withStack(value, function () { Object.keys(value) .sort() - .forEach(function(key) { + .forEach(function (key) { canonicalizedObj[key] = exports.canonicalize(value[key], stack); }); }); @@ -517,185 +425,6 @@ exports.canonicalize = function canonicalize(value, stack, typeHint) { return canonicalizedObj; }; -/** - * Determines if pathname has a matching file extension. - * - * @private - * @param {string} pathname - Pathname to check for match. - * @param {string[]} exts - List of file extensions (sans period). - * @return {boolean} whether file extension matches. - * @example - * hasMatchingExtname('foo.html', ['js', 'css']); // => false - */ -function hasMatchingExtname(pathname, exts) { - var suffix = path.extname(pathname).slice(1); - return exts.some(function(element) { - return suffix === element; - }); -} - -/** - * Determines if pathname would be a "hidden" file (or directory) on UN*X. - * - * @description - * On UN*X, pathnames beginning with a full stop (aka dot) are hidden during - * typical usage. Dotfiles, plain-text configuration files, are prime examples. - * - * @see {@link http://xahlee.info/UnixResource_dir/writ/unix_origin_of_dot_filename.html|Origin of Dot File Names} - * - * @private - * @param {string} pathname - Pathname to check for match. - * @return {boolean} whether pathname would be considered a hidden file. - * @example - * isHiddenOnUnix('.profile'); // => true - */ -function isHiddenOnUnix(pathname) { - return path.basename(pathname)[0] === '.'; -} - -/** - * Lookup file names at the given `path`. - * - * @description - * Filenames are returned in _traversal_ order by the OS/filesystem. - * **Make no assumption that the names will be sorted in any fashion.** - * - * @public - * @memberof Mocha.utils - * @param {string} filepath - Base path to start searching from. - * @param {string[]} [extensions=[]] - File extensions to look for. - * @param {boolean} [recursive=false] - Whether to recurse into subdirectories. - * @return {string[]} An array of paths. - * @throws {Error} if no files match pattern. - * @throws {TypeError} if `filepath` is directory and `extensions` not provided. - */ -exports.lookupFiles = function lookupFiles(filepath, extensions, recursive) { - extensions = extensions || []; - recursive = recursive || false; - var files = []; - var stat; - - if (!fs.existsSync(filepath)) { - var pattern; - if (glob.hasMagic(filepath)) { - // Handle glob as is without extensions - pattern = filepath; - } else { - // glob pattern e.g. 'filepath+(.js|.ts)' - var strExtensions = extensions - .map(function(v) { - return '.' + v; - }) - .join('|'); - pattern = filepath + '+(' + strExtensions + ')'; - } - files = glob.sync(pattern, {nodir: true}); - if (!files.length) { - throw createNoFilesMatchPatternError( - 'Cannot find any files matching pattern ' + exports.dQuote(filepath), - filepath - ); - } - return files; - } - - // Handle file - try { - stat = fs.statSync(filepath); - if (stat.isFile()) { - return filepath; - } - } catch (err) { - // ignore error - return; - } - - // Handle directory - fs.readdirSync(filepath).forEach(function(dirent) { - var pathname = path.join(filepath, dirent); - var stat; - - try { - stat = fs.statSync(pathname); - if (stat.isDirectory()) { - if (recursive) { - files = files.concat(lookupFiles(pathname, extensions, recursive)); - } - return; - } - } catch (err) { - // ignore error - return; - } - if (!extensions.length) { - throw createMissingArgumentError( - util.format( - 'Argument %s required when argument %s is a directory', - exports.sQuote('extensions'), - exports.sQuote('filepath') - ), - 'extensions', - 'array' - ); - } - - if ( - !stat.isFile() || - !hasMatchingExtname(pathname, extensions) || - isHiddenOnUnix(pathname) - ) { - return; - } - files.push(pathname); - }); - - return files; -}; - -/** - * process.emitWarning or a polyfill - * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options - * @ignore - */ -function emitWarning(msg, type) { - if (process.emitWarning) { - process.emitWarning(msg, type); - } else { - process.nextTick(function() { - console.warn(type + ': ' + msg); - }); - } -} - -/** - * Show a deprecation warning. Each distinct message is only displayed once. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ -exports.deprecate = function deprecate(msg) { - msg = String(msg); - if (msg && !deprecate.cache[msg]) { - deprecate.cache[msg] = true; - emitWarning(msg, 'DeprecationWarning'); - } -}; -exports.deprecate.cache = {}; - -/** - * Show a generic warning. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ -exports.warn = function warn(msg) { - if (msg) { - emitWarning(msg); - } -}; - /** * @summary * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) @@ -705,17 +434,16 @@ exports.warn = function warn(msg) { * (i.e: strip Mocha and internal node functions from stack trace). * @returns {Function} */ -exports.stackTraceFilter = function() { +exports.stackTraceFilter = function () { // TODO: Replace with `process.browser` var is = typeof document === 'undefined' ? {node: true} : {browser: true}; var slash = path.sep; var cwd; if (is.node) { - cwd = process.cwd() + slash; + cwd = exports.cwd() + slash; } else { - cwd = (typeof location === 'undefined' - ? window.location - : location + cwd = ( + typeof location === 'undefined' ? window.location : location ).href.replace(/\/[^/]*$/, '/'); slash = '/'; } @@ -739,10 +467,10 @@ exports.stackTraceFilter = function() { ); } - return function(stack) { + return function (stack) { stack = stack.split('\n'); - stack = stack.reduce(function(list, line) { + stack = stack.reduce(function (list, line) { if (isMochaInternal(line)) { return list; } @@ -782,88 +510,18 @@ exports.isPromise = function isPromise(value) { * Clamps a numeric value to an inclusive range. * * @param {number} value - Value to be clamped. - * @param {numer[]} range - Two element array specifying [min, max] range. + * @param {number[]} range - Two element array specifying [min, max] range. * @returns {number} clamped value */ exports.clamp = function clamp(value, range) { return Math.min(Math.max(value, range[0]), range[1]); }; -/** - * Single quote text by combining with undirectional ASCII quotation marks. - * - * @description - * Provides a simple means of markup for quoting text to be used in output. - * Use this to quote names of variables, methods, and packages. - * - * package 'foo' cannot be found - * - * @private - * @param {string} str - Value to be quoted. - * @returns {string} quoted value - * @example - * sQuote('n') // => 'n' - */ -exports.sQuote = function(str) { - return "'" + str + "'"; -}; - -/** - * Double quote text by combining with undirectional ASCII quotation marks. - * - * @description - * Provides a simple means of markup for quoting text to be used in output. - * Use this to quote names of datatypes, classes, pathnames, and strings. - * - * argument 'value' must be "string" or "number" - * - * @private - * @param {string} str - Value to be quoted. - * @returns {string} quoted value - * @example - * dQuote('number') // => "number" - */ -exports.dQuote = function(str) { - return '"' + str + '"'; -}; - -/** - * Provides simplistic message translation for dealing with plurality. - * - * @description - * Use this to create messages which need to be singular or plural. - * Some languages have several plural forms, so _complete_ message clauses - * are preferable to generating the message on the fly. - * - * @private - * @param {number} n - Non-negative integer - * @param {string} msg1 - Message to be used in English for `n = 1` - * @param {string} msg2 - Message to be used in English for `n = 0, 2, 3, ...` - * @returns {string} message corresponding to value of `n` - * @example - * var sprintf = require('util').format; - * var pkgs = ['one', 'two']; - * var msg = sprintf( - * ngettext( - * pkgs.length, - * 'cannot load package: %s', - * 'cannot load packages: %s' - * ), - * pkgs.map(sQuote).join(', ') - * ); - * console.log(msg); // => cannot load packages: 'one', 'two' - */ -exports.ngettext = function(n, msg1, msg2) { - if (typeof n === 'number' && n >= 0) { - return n === 1 ? msg1 : msg2; - } -}; - /** * It's a noop. * @public */ -exports.noop = function() {}; +exports.noop = function () {}; /** * Creates a map-like object. @@ -874,14 +532,14 @@ exports.noop = function() {}; * doesn't support it. Recommended for use in Mocha's public APIs. * * @public - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map|MDN:Map} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map} * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects} - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign|MDN:Object.assign} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign} * @param {...*} [obj] - Arguments to `Object.assign()`. * @returns {Object} An object with no prototype, having `...obj` properties */ -exports.createMap = function(obj) { - return assign.apply( +exports.createMap = function (obj) { + return Object.assign.apply( null, [Object.create(null)].concat(Array.prototype.slice.call(arguments)) ); @@ -899,9 +557,84 @@ exports.createMap = function(obj) { * @returns {Object} A frozen object with no prototype, having `...obj` properties * @throws {TypeError} if argument is not a non-empty object. */ -exports.defineConstants = function(obj) { - if (type(obj) !== 'object' || !Object.keys(obj).length) { +exports.defineConstants = function (obj) { + if (canonicalType(obj) !== 'object' || !Object.keys(obj).length) { throw new TypeError('Invalid argument; expected a non-empty object'); } return Object.freeze(exports.createMap(obj)); }; + +/** + * Returns current working directory + * + * Wrapper around `process.cwd()` for isolation + * @private + */ +exports.cwd = function cwd() { + return process.cwd(); +}; + +/** + * Returns `true` if Mocha is running in a browser. + * Checks for `process.browser`. + * @returns {boolean} + * @private + */ +exports.isBrowser = function isBrowser() { + return Boolean(process.browser); +}; + +/* + * Casts `value` to an array; useful for optionally accepting array parameters + * + * It follows these rules, depending on `value`. If `value` is... + * 1. `undefined`: return an empty Array + * 2. `null`: return an array with a single `null` element + * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable + * 4. otherwise: return an array with a single element, `value` + * @param {*} value - Something to cast to an Array + * @returns {Array<*>} + */ +exports.castArray = function castArray(value) { + if (value === undefined) { + return []; + } + if (value === null) { + return [null]; + } + if ( + typeof value === 'object' && + (typeof value[Symbol.iterator] === 'function' || value.length !== undefined) + ) { + return Array.from(value); + } + return [value]; +}; + +exports.constants = exports.defineConstants({ + MOCHA_ID_PROP_NAME +}); + +/** + * Creates a new unique identifier + * @returns {string} Unique identifier + */ +exports.uniqueID = () => nanoid(); + +exports.assignNewMochaID = obj => { + const id = exports.uniqueID(); + Object.defineProperty(obj, MOCHA_ID_PROP_NAME, { + get() { + return id; + } + }); + return obj; +}; + +/** + * Retrieves a Mocha ID from an object, if present. + * @param {*} [obj] - Object + * @returns {string|void} + */ +exports.getMochaID = obj => + obj && typeof obj === 'object' ? obj[MOCHA_ID_PROP_NAME] : undefined; diff --git a/node_modules/mocha/mocha.css b/node_modules/mocha/mocha.css index 4ca8fcb8..b4d7e5b2 100644 --- a/node_modules/mocha/mocha.css +++ b/node_modules/mocha/mocha.css @@ -1,7 +1,73 @@ @charset "utf-8"; +:root { + --mocha-color: #000; + --mocha-bg-color: #fff; + --mocha-pass-icon-color: #00d6b2; + --mocha-pass-color: #fff; + --mocha-pass-shadow-color: rgba(0,0,0,.2); + --mocha-pass-mediump-color: #c09853; + --mocha-pass-slow-color: #b94a48; + --mocha-test-pending-color: #0b97c4; + --mocha-test-pending-icon-color: #0b97c4; + --mocha-test-fail-color: #c00; + --mocha-test-fail-icon-color: #c00; + --mocha-test-fail-pre-color: #000; + --mocha-test-fail-pre-error-color: #c00; + --mocha-test-html-error-color: #000; + --mocha-box-shadow-color: #eee; + --mocha-box-bottom-color: #ddd; + --mocha-test-replay-color: #000; + --mocha-test-replay-bg-color: #eee; + --mocha-stats-color: #888; + --mocha-stats-em-color: #000; + --mocha-stats-hover-color: #eee; + --mocha-error-color: #c00; + + --mocha-code-comment: #ddd; + --mocha-code-init: #2f6fad; + --mocha-code-string: #5890ad; + --mocha-code-keyword: #8a6343; + --mocha-code-number: #2f6fad; +} + +@media (prefers-color-scheme: dark) { + :root { + --mocha-color: #fff; + --mocha-bg-color: #222; + --mocha-pass-icon-color: #00d6b2; + --mocha-pass-color: #222; + --mocha-pass-shadow-color: rgba(255,255,255,.2); + --mocha-pass-mediump-color: #f1be67; + --mocha-pass-slow-color: #f49896; + --mocha-test-pending-color: #0b97c4; + --mocha-test-pending-icon-color: #0b97c4; + --mocha-test-fail-color: #f44; + --mocha-test-fail-icon-color: #f44; + --mocha-test-fail-pre-color: #fff; + --mocha-test-fail-pre-error-color: #f44; + --mocha-test-html-error-color: #fff; + --mocha-box-shadow-color: #444; + --mocha-box-bottom-color: #555; + --mocha-test-replay-color: #fff; + --mocha-test-replay-bg-color: #444; + --mocha-stats-color: #aaa; + --mocha-stats-em-color: #fff; + --mocha-stats-hover-color: #444; + --mocha-error-color: #f44; + + --mocha-code-comment: #ddd; + --mocha-code-init: #9cc7f1; + --mocha-code-string: #80d4ff; + --mocha-code-keyword: #e3a470; + --mocha-code-number: #4ca7ff; + } +} + body { margin:0; + background-color: var(--mocha-bg-color); + color: var(--mocha-color); } #mocha { @@ -69,11 +135,11 @@ body { } #mocha .test.pass.medium .duration { - background: #c09853; + background: var(--mocha-pass-mediump-color); } #mocha .test.pass.slow .duration { - background: #b94a48; + background: var(--mocha-pass-slow-color); } #mocha .test.pass::before { @@ -82,17 +148,17 @@ body { display: block; float: left; margin-right: 5px; - color: #00d6b2; + color: var(--mocha-pass-icon-color); } #mocha .test.pass .duration { font-size: 9px; margin-left: 5px; padding: 2px 5px; - color: #fff; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - box-shadow: inset 0 1px 1px rgba(0,0,0,.2); + color: var(--mocha-pass-color); + -webkit-box-shadow: inset 0 1px 1px var(--mocha-pass-shadow-color); + -moz-box-shadow: inset 0 1px 1px var(--mocha-pass-shadow-color); + box-shadow: inset 0 1px 1px var(--mocha-pass-shadow-color); -webkit-border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; @@ -105,20 +171,20 @@ body { } #mocha .test.pending { - color: #0b97c4; + color: var(--mocha-test-pending-color); } #mocha .test.pending::before { content: '◦'; - color: #0b97c4; + color: var(--mocha-test-pending-icon-color); } #mocha .test.fail { - color: #c00; + color: var(--mocha-test-fail-color); } #mocha .test.fail pre { - color: black; + color: var(--mocha-test-fail-pre-color); } #mocha .test.fail::before { @@ -127,35 +193,35 @@ body { display: block; float: left; margin-right: 5px; - color: #c00; + color: var(--mocha-test-fail-icon-color); } #mocha .test pre.error { - color: #c00; + color: var(--mocha-test-fail-pre-error-color); max-height: 300px; overflow: auto; } #mocha .test .html-error { overflow: auto; - color: black; + color: var(--mocha-test-html-error-color); display: block; float: left; clear: left; font: 12px/1.5 monaco, monospace; margin: 5px; padding: 15px; - border: 1px solid #eee; + border: 1px solid var(--mocha-box-shadow-color); max-width: 85%; /*(1)*/ max-width: -webkit-calc(100% - 42px); max-width: -moz-calc(100% - 42px); max-width: calc(100% - 42px); /*(2)*/ max-height: 300px; word-wrap: break-word; - border-bottom-color: #ddd; - -webkit-box-shadow: 0 1px 3px #eee; - -moz-box-shadow: 0 1px 3px #eee; - box-shadow: 0 1px 3px #eee; + border-bottom-color: var(--mocha-box-bottom-color); + -webkit-box-shadow: 0 1px 3px var(--mocha-box-shadow-color); + -moz-box-shadow: 0 1px 3px var(--mocha-box-shadow-color); + box-shadow: 0 1px 3px var(--mocha-box-shadow-color); -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; @@ -187,16 +253,16 @@ body { font: 12px/1.5 monaco, monospace; margin: 5px; padding: 15px; - border: 1px solid #eee; + border: 1px solid var(--mocha-box-shadow-color); max-width: 85%; /*(1)*/ max-width: -webkit-calc(100% - 42px); max-width: -moz-calc(100% - 42px); max-width: calc(100% - 42px); /*(2)*/ word-wrap: break-word; - border-bottom-color: #ddd; - -webkit-box-shadow: 0 1px 3px #eee; - -moz-box-shadow: 0 1px 3px #eee; - box-shadow: 0 1px 3px #eee; + border-bottom-color: var(--mocha-box-bottom-color); + -webkit-box-shadow: 0 1px 3px var(--mocha-box-shadow-color); + -moz-box-shadow: 0 1px 3px var(--mocha-box-shadow-color); + box-shadow: 0 1px 3px var(--mocha-box-shadow-color); -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; @@ -217,7 +283,7 @@ body { height: 15px; line-height: 15px; text-align: center; - background: #eee; + background: var(--mocha-test-replay-bg-color); font-size: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; @@ -226,11 +292,12 @@ body { -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition: opacity 200ms; - opacity: 0.3; - color: #888; + opacity: 0.7; + color: var(--mocha-test-replay-color); } #mocha .test:hover a.replay { + box-shadow: 0 0 1px inset var(--mocha-test-replay-color); opacity: 1; } @@ -251,7 +318,7 @@ body { } #mocha-error { - color: #c00; + color: var(--mocha-error-color); font-size: 1.5em; font-weight: 100; letter-spacing: 1px; @@ -263,7 +330,7 @@ body { right: 10px; font-size: 12px; margin: 0; - color: #888; + color: var(--mocha-stats-color); z-index: 1; } @@ -284,7 +351,7 @@ body { } #mocha-stats em { - color: black; + color: var(--mocha-stats-em-color); } #mocha-stats a { @@ -293,7 +360,7 @@ body { } #mocha-stats a:hover { - border-bottom: 1px solid #eee; + border-bottom: 1px solid var(--mocha-stats-hover-color); } #mocha-stats li { @@ -308,11 +375,11 @@ body { height: 40px; } -#mocha code .comment { color: #ddd; } -#mocha code .init { color: #2f6fad; } -#mocha code .string { color: #5890ad; } -#mocha code .keyword { color: #8a6343; } -#mocha code .number { color: #2f6fad; } +#mocha code .comment { color: var(--mocha-code-comment); } +#mocha code .init { color: var(--mocha-code-init); } +#mocha code .string { color: var(--mocha-code-string); } +#mocha code .keyword { color: var(--mocha-code-keyword); } +#mocha code .number { color: var(--mocha-code-number); } @media screen and (max-device-width: 480px) { #mocha { diff --git a/node_modules/mocha/mocha.js b/node_modules/mocha/mocha.js index 7fb99d4e..aeb8c75f 100644 --- a/node_modules/mocha/mocha.js +++ b/node_modules/mocha/mocha.js @@ -1,18104 +1,20635 @@ -(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 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue$1.push(new Item$1(fun, args)); + if (queue$1.length === 1 && !draining$1) { + runTimeout$1(drainQueue$1); + } } - if (immediateQueue.length) { - immediateTimeout = setTimeout(timeslice, 0); - } else { - immediateTimeout = null; + // v8 likes predictible objects + function Item$1(fun, array) { + this.fun = fun; + this.array = array; } -} + Item$1.prototype.run = function () { + this.fun.apply(null, this.array); + }; + var title$1 = 'browser'; + var platform$1 = 'browser'; + var browser$4 = true; + var env$1 = {}; + var argv$1 = []; + var version$2 = ''; // empty string to avoid regexp issues + var versions$1 = {}; + var release$1 = {}; + var config$1 = {}; + + function noop$1() {} + + var on$1 = noop$1; + var addListener$1 = noop$1; + var once$1 = noop$1; + var off$1 = noop$1; + var removeListener$1 = noop$1; + var removeAllListeners$1 = noop$1; + var emit$1 = noop$1; + + function binding$1(name) { + throw new Error('process.binding is not supported'); + } + + function cwd$1 () { return '/' } + function chdir$1 (dir) { + throw new Error('process.chdir is not supported'); + }function umask$1() { return 0; } + + // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js + var performance$1 = global$1.performance || {}; + var performanceNow$1 = + performance$1.now || + performance$1.mozNow || + performance$1.msNow || + performance$1.oNow || + performance$1.webkitNow || + function(){ return (new Date()).getTime() }; + + // generate timestamp or delta + // see http://nodejs.org/api/process.html#process_process_hrtime + function hrtime$1(previousTimestamp){ + var clocktime = performanceNow$1.call(performance$1)*1e-3; + var seconds = Math.floor(clocktime); + var nanoseconds = Math.floor((clocktime%1)*1e9); + if (previousTimestamp) { + seconds = seconds - previousTimestamp[0]; + nanoseconds = nanoseconds - previousTimestamp[1]; + if (nanoseconds<0) { + seconds--; + nanoseconds += 1e9; + } + } + return [seconds,nanoseconds] + } + + var startTime$1 = new Date(); + function uptime$1() { + var currentTime = new Date(); + var dif = currentTime - startTime$1; + return dif / 1000; + } + + var process = { + nextTick: nextTick$1, + title: title$1, + browser: browser$4, + env: env$1, + argv: argv$1, + version: version$2, + versions: versions$1, + on: on$1, + addListener: addListener$1, + once: once$1, + off: off$1, + removeListener: removeListener$1, + removeAllListeners: removeAllListeners$1, + emit: emit$1, + binding: binding$1, + cwd: cwd$1, + chdir: chdir$1, + umask: umask$1, + hrtime: hrtime$1, + platform: platform$1, + release: release$1, + config: config$1, + uptime: uptime$1 + }; -/** - * High-performance override of Runner.immediately. - */ + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -Mocha.Runner.immediately = function(callback) { - immediateQueue.push(callback); - if (!immediateTimeout) { - immediateTimeout = setTimeout(timeslice, 0); + function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var a = Object.defineProperty({}, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; } -}; - -/** - * Function to allow assertion libraries to throw errors directly into mocha. - * This is useful when running tests in a browser because window.onerror will - * only receive the 'message' attribute of the Error. - */ -mocha.throwError = function(err) { - uncaughtExceptionHandlers.forEach(function(fn) { - fn(err); - }); - throw err; -}; -/** - * Override ui to ensure that the ui functions are initialized. - * Normally this would happen in Mocha.prototype.loadFiles. - */ + function commonjsRequire (path) { + throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); + } -mocha.ui = function(ui) { - Mocha.prototype.ui.call(this, ui); - this.suite.emit('pre-require', global, null, this); - return this; -}; + var domain; -/** - * Setup mocha with the given setting options. - */ + // This constructor is used to store event handlers. Instantiating this is + // faster than explicitly calling `Object.create(null)` to get a "clean" empty + // object (tested with v8 v4.9). + function EventHandlers() {} + EventHandlers.prototype = Object.create(null); -mocha.setup = function(opts) { - if (typeof opts === 'string') { - opts = {ui: opts}; + function EventEmitter$2() { + EventEmitter$2.init.call(this); } - for (var opt in opts) { - if (opts.hasOwnProperty(opt)) { - this[opt](opts[opt]); - } - } - return this; -}; -/** - * Run mocha, returning the Runner. - */ + // nodejs oddity + // require('events') === require('events').EventEmitter + EventEmitter$2.EventEmitter = EventEmitter$2; -mocha.run = function(fn) { - var options = mocha.options; - mocha.globals('location'); + EventEmitter$2.usingDomains = false; - var query = Mocha.utils.parseQuery(global.location.search || ''); - if (query.grep) { - mocha.grep(query.grep); - } - if (query.fgrep) { - mocha.fgrep(query.fgrep); - } - if (query.invert) { - mocha.invert(); - } + EventEmitter$2.prototype.domain = undefined; + EventEmitter$2.prototype._events = undefined; + EventEmitter$2.prototype._maxListeners = undefined; - return Mocha.prototype.run.call(mocha, function(err) { - // The DOM Document is not available in Web Workers. - var document = global.document; - if ( - document && - document.getElementById('mocha') && - options.noHighlighting !== true - ) { - Mocha.utils.highlightTags('code'); - } - if (fn) { - fn(err); + // By default EventEmitters will print a warning if more than 10 listeners are + // added to it. This is a useful default which helps finding memory leaks. + EventEmitter$2.defaultMaxListeners = 10; + + EventEmitter$2.init = function() { + this.domain = null; + if (EventEmitter$2.usingDomains) { + // if there is an active domain, then attach to it. + if (domain.active ) ; } - }); -}; - -/** - * Expose the process shim. - * https://github.com/mochajs/mocha/pull/916 - */ - -Mocha.process = process; - -/** - * Expose mocha. - */ - -global.Mocha = Mocha; -global.mocha = mocha; - -// this allows test/acceptance/required-tokens.js to pass; thus, -// you can now do `const describe = require('mocha').describe` in a -// browser context (assuming browserification). should fix #880 -module.exports = global; - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./lib/mocha":14,"_process":69,"browser-stdout":41}],2:[function(require,module,exports){ -(function (process,global){ -'use strict'; - -/** - * Web Notifications module. - * @module Growl - */ - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ -var Date = global.Date; -var setTimeout = global.setTimeout; -var EVENT_RUN_END = require('../runner').constants.EVENT_RUN_END; - -/** - * Checks if browser notification support exists. - * - * @public - * @see {@link https://caniuse.com/#feat=notifications|Browser support (notifications)} - * @see {@link https://caniuse.com/#feat=promises|Browser support (promises)} - * @see {@link Mocha#growl} - * @see {@link Mocha#isGrowlCapable} - * @return {boolean} whether browser notification support exists - */ -exports.isCapable = function() { - var hasNotificationSupport = 'Notification' in window; - var hasPromiseSupport = typeof Promise === 'function'; - return process.browser && hasNotificationSupport && hasPromiseSupport; -}; - -/** - * Implements browser notifications as a pseudo-reporter. - * - * @public - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/notification|Notification API} - * @see {@link https://developers.google.com/web/fundamentals/push-notifications/display-a-notification|Displaying a Notification} - * @see {@link Growl#isPermitted} - * @see {@link Mocha#_growl} - * @param {Runner} runner - Runner instance. - */ -exports.notify = function(runner) { - var promise = isPermitted(); - - /** - * Attempt notification. - */ - var sendNotification = function() { - // If user hasn't responded yet... "No notification for you!" (Seinfeld) - Promise.race([promise, Promise.resolve(undefined)]) - .then(canNotify) - .then(function() { - display(runner); - }) - .catch(notPermitted); - }; - - runner.once(EVENT_RUN_END, sendNotification); -}; - -/** - * Checks if browser notification is permitted by user. - * - * @private - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission|Notification.permission} - * @see {@link Mocha#growl} - * @see {@link Mocha#isGrowlPermitted} - * @returns {Promise} promise determining if browser notification - * permissible when fulfilled. - */ -function isPermitted() { - var permitted = { - granted: function allow() { - return Promise.resolve(true); - }, - denied: function deny() { - return Promise.resolve(false); - }, - default: function ask() { - return Notification.requestPermission().then(function(permission) { - return permission === 'granted'; - }); + + if (!this._events || this._events === Object.getPrototypeOf(this)._events) { + this._events = new EventHandlers(); + this._eventsCount = 0; } + + this._maxListeners = this._maxListeners || undefined; }; - return permitted[Notification.permission](); -} - -/** - * @summary - * Determines if notification should proceed. - * - * @description - * Notification shall not proceed unless `value` is true. - * - * `value` will equal one of: - *
      - *
    • true (from `isPermitted`)
    • - *
    • false (from `isPermitted`)
    • - *
    • undefined (from `Promise.race`)
    • - *
    - * - * @private - * @param {boolean|undefined} value - Determines if notification permissible. - * @returns {Promise} Notification can proceed - */ -function canNotify(value) { - if (!value) { - var why = value === false ? 'blocked' : 'unacknowledged'; - var reason = 'not permitted by user (' + why + ')'; - return Promise.reject(new Error(reason)); - } - return Promise.resolve(); -} - -/** - * Displays the notification. - * - * @private - * @param {Runner} runner - Runner instance. - */ -function display(runner) { - var stats = runner.stats; - var symbol = { - cross: '\u274C', - tick: '\u2705' - }; - var logo = require('../../package').notifyLogo; - var _message; - var message; - var title; - - if (stats.failures) { - _message = stats.failures + ' of ' + stats.tests + ' tests failed'; - message = symbol.cross + ' ' + _message; - title = 'Failed'; - } else { - _message = stats.passes + ' tests passed in ' + stats.duration + 'ms'; - message = symbol.tick + ' ' + _message; - title = 'Passed'; - } - - // Send notification - var options = { - badge: logo, - body: message, - dir: 'ltr', - icon: logo, - lang: 'en-US', - name: 'mocha', - requireInteraction: false, - timestamp: Date.now() - }; - var notification = new Notification(title, options); - - // Autoclose after brief delay (makes various browsers act same) - var FORCE_DURATION = 4000; - setTimeout(notification.close.bind(notification), FORCE_DURATION); -} - -/** - * As notifications are tangential to our purpose, just log the error. - * - * @private - * @param {Error} err - Why notification didn't happen. - */ -function notPermitted(err) { - console.error('notification error:', err.message); -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../../package":90,"../runner":34,"_process":69}],3:[function(require,module,exports){ -'use strict'; - -/** - * Expose `Progress`. - */ - -module.exports = Progress; - -/** - * Initialize a new `Progress` indicator. - */ -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} - -/** - * Set progress size to `size`. - * - * @public - * @param {number} size - * @return {Progress} Progress instance. - */ -Progress.prototype.size = function(size) { - this._size = size; - return this; -}; - -/** - * Set text to `text`. - * - * @public - * @param {string} text - * @return {Progress} Progress instance. - */ -Progress.prototype.text = function(text) { - this._text = text; - return this; -}; - -/** - * Set font size to `size`. - * - * @public - * @param {number} size - * @return {Progress} Progress instance. - */ -Progress.prototype.fontSize = function(size) { - this._fontSize = size; - return this; -}; - -/** - * Set font to `family`. - * - * @param {string} family - * @return {Progress} Progress instance. - */ -Progress.prototype.font = function(family) { - this._font = family; - return this; -}; - -/** - * Update percentage to `n`. - * - * @param {number} n - * @return {Progress} Progress instance. - */ -Progress.prototype.update = function(n) { - this.percent = n; - return this; -}; - -/** - * Draw on `ctx`. - * - * @param {CanvasRenderingContext2d} ctx - * @return {Progress} Progress instance. - */ -Progress.prototype.draw = function(ctx) { - try { - var percent = Math.min(this.percent, 100); - var size = this._size; - var half = size / 2; - var x = half; - var y = half; - var rad = half - 1; - var fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%'; - var w = ctx.measureText(text).width; - - ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1); - } catch (ignore) { - // don't fail if we can't render progress - } - return this; -}; - -},{}],4:[function(require,module,exports){ -(function (global){ -'use strict'; - -exports.isatty = function isatty() { - return true; -}; - -exports.getWindowSize = function getWindowSize() { - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } - // In a Web Worker, the DOM Window is not available. - return [640, 480]; -}; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],5:[function(require,module,exports){ -'use strict'; -/** - * @module Context - */ -/** - * Expose `Context`. - */ - -module.exports = Context; - -/** - * Initialize a new `Context`. - * - * @private - */ -function Context() {} - -/** - * Set or get the context `Runnable` to `runnable`. - * - * @private - * @param {Runnable} runnable - * @return {Context} context - */ -Context.prototype.runnable = function(runnable) { - if (!arguments.length) { - return this._runnable; - } - this.test = this._runnable = runnable; - return this; -}; - -/** - * Set or get test timeout `ms`. - * - * @private - * @param {number} ms - * @return {Context} self - */ -Context.prototype.timeout = function(ms) { - if (!arguments.length) { - return this.runnable().timeout(); - } - this.runnable().timeout(ms); - return this; -}; - -/** - * Set test timeout `enabled`. - * - * @private - * @param {boolean} enabled - * @return {Context} self - */ -Context.prototype.enableTimeouts = function(enabled) { - if (!arguments.length) { - return this.runnable().enableTimeouts(); - } - this.runnable().enableTimeouts(enabled); - return this; -}; - -/** - * Set or get test slowness threshold `ms`. - * - * @private - * @param {number} ms - * @return {Context} self - */ -Context.prototype.slow = function(ms) { - if (!arguments.length) { - return this.runnable().slow(); - } - this.runnable().slow(ms); - return this; -}; - -/** - * Mark a test as skipped. - * - * @private - * @throws Pending - */ -Context.prototype.skip = function() { - this.runnable().skip(); -}; - -/** - * Set or get a number of allowed retries on failed tests - * - * @private - * @param {number} n - * @return {Context} self - */ -Context.prototype.retries = function(n) { - if (!arguments.length) { - return this.runnable().retries(); - } - this.runnable().retries(n); - return this; -}; - -},{}],6:[function(require,module,exports){ -'use strict'; -/** - * @module Errors - */ -/** - * Factory functions to create throwable error objects - */ - -/** - * Creates an error object to be thrown when no files to be tested could be found using specified pattern. - * - * @public - * @param {string} message - Error message to be displayed. - * @param {string} pattern - User-specified argument value. - * @returns {Error} instance detailing the error condition - */ -function createNoFilesMatchPatternError(message, pattern) { - var err = new Error(message); - err.code = 'ERR_MOCHA_NO_FILES_MATCH_PATTERN'; - err.pattern = pattern; - return err; -} - -/** - * Creates an error object to be thrown when the reporter specified in the options was not found. - * - * @public - * @param {string} message - Error message to be displayed. - * @param {string} reporter - User-specified reporter value. - * @returns {Error} instance detailing the error condition - */ -function createInvalidReporterError(message, reporter) { - var err = new TypeError(message); - err.code = 'ERR_MOCHA_INVALID_REPORTER'; - err.reporter = reporter; - return err; -} - -/** - * Creates an error object to be thrown when the interface specified in the options was not found. - * - * @public - * @param {string} message - Error message to be displayed. - * @param {string} ui - User-specified interface value. - * @returns {Error} instance detailing the error condition - */ -function createInvalidInterfaceError(message, ui) { - var err = new Error(message); - err.code = 'ERR_MOCHA_INVALID_INTERFACE'; - err.interface = ui; - return err; -} - -/** - * Creates an error object to be thrown when a behavior, option, or parameter is unsupported. - * - * @public - * @param {string} message - Error message to be displayed. - * @returns {Error} instance detailing the error condition - */ -function createUnsupportedError(message) { - var err = new Error(message); - err.code = 'ERR_MOCHA_UNSUPPORTED'; - return err; -} - -/** - * Creates an error object to be thrown when an argument is missing. - * - * @public - * @param {string} message - Error message to be displayed. - * @param {string} argument - Argument name. - * @param {string} expected - Expected argument datatype. - * @returns {Error} instance detailing the error condition - */ -function createMissingArgumentError(message, argument, expected) { - return createInvalidArgumentTypeError(message, argument, expected); -} - -/** - * Creates an error object to be thrown when an argument did not use the supported type - * - * @public - * @param {string} message - Error message to be displayed. - * @param {string} argument - Argument name. - * @param {string} expected - Expected argument datatype. - * @returns {Error} instance detailing the error condition - */ -function createInvalidArgumentTypeError(message, argument, expected) { - var err = new TypeError(message); - err.code = 'ERR_MOCHA_INVALID_ARG_TYPE'; - err.argument = argument; - err.expected = expected; - err.actual = typeof argument; - return err; -} - -/** - * Creates an error object to be thrown when an argument did not use the supported value - * - * @public - * @param {string} message - Error message to be displayed. - * @param {string} argument - Argument name. - * @param {string} value - Argument value. - * @param {string} [reason] - Why value is invalid. - * @returns {Error} instance detailing the error condition - */ -function createInvalidArgumentValueError(message, argument, value, reason) { - var err = new TypeError(message); - err.code = 'ERR_MOCHA_INVALID_ARG_VALUE'; - err.argument = argument; - err.value = value; - err.reason = typeof reason !== 'undefined' ? reason : 'is invalid'; - return err; -} - -/** - * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined. - * - * @public - * @param {string} message - Error message to be displayed. - * @returns {Error} instance detailing the error condition - */ -function createInvalidExceptionError(message, value) { - var err = new Error(message); - err.code = 'ERR_MOCHA_INVALID_EXCEPTION'; - err.valueType = typeof value; - err.value = value; - return err; -} - -module.exports = { - createInvalidArgumentTypeError: createInvalidArgumentTypeError, - createInvalidArgumentValueError: createInvalidArgumentValueError, - createInvalidExceptionError: createInvalidExceptionError, - createInvalidInterfaceError: createInvalidInterfaceError, - createInvalidReporterError: createInvalidReporterError, - createMissingArgumentError: createMissingArgumentError, - createNoFilesMatchPatternError: createNoFilesMatchPatternError, - createUnsupportedError: createUnsupportedError -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -var Runnable = require('./runnable'); -var inherits = require('./utils').inherits; - -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn` - * - * @class - * @extends Runnable - * @param {String} title - * @param {Function} fn - */ -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} - -/** - * Inherit from `Runnable.prototype`. - */ -inherits(Hook, Runnable); - -/** - * Get or set the test `err`. - * - * @memberof Hook - * @public - * @param {Error} err - * @return {Error} - */ -Hook.prototype.error = function(err) { - if (!arguments.length) { - err = this._error; - this._error = null; - return err; + // Obviously not all Emitters should be limited to 10. This function allows + // that to be increased. Set to zero for unlimited. + EventEmitter$2.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || isNaN(n)) + throw new TypeError('"n" argument must be a positive number'); + this._maxListeners = n; + return this; + }; + + function $getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter$2.defaultMaxListeners; + return that._maxListeners; } - this._error = err; -}; - -},{"./runnable":33,"./utils":38}],8:[function(require,module,exports){ -'use strict'; - -var Test = require('../test'); -var EVENT_FILE_PRE_REQUIRE = require('../suite').constants - .EVENT_FILE_PRE_REQUIRE; - -/** - * BDD-style interface: - * - * describe('Array', function() { - * describe('#indexOf()', function() { - * it('should return -1 when not present', function() { - * // ... - * }); - * - * it('should return the index when present', function() { - * // ... - * }); - * }); - * }); - * - * @param {Suite} suite Root suite. - */ -module.exports = function bddInterface(suite) { - var suites = [suite]; - - suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) { - var common = require('./common')(suites, context, mocha); - - context.before = common.before; - context.after = common.after; - context.beforeEach = common.beforeEach; - context.afterEach = common.afterEach; - context.run = mocha.options.delay && common.runWithSuite(suite); - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ + EventEmitter$2.prototype.getMaxListeners = function getMaxListeners() { + return $getMaxListeners(this); + }; - context.describe = context.context = function(title, fn) { - return common.suite.create({ - title: title, - file: file, - fn: fn - }); - }; + // These standalone emit* functions are used to optimize calling of event + // handlers for fast cases because emit() itself often has a variable number of + // arguments and can be deoptimized because of that. These functions always have + // the same number of arguments and thus do not get deoptimized, so the code + // inside them can execute faster. + function emitNone(handler, isFn, self) { + if (isFn) + handler.call(self); + else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + listeners[i].call(self); + } + } + function emitOne(handler, isFn, self, arg1) { + if (isFn) + handler.call(self, arg1); + else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + listeners[i].call(self, arg1); + } + } + function emitTwo(handler, isFn, self, arg1, arg2) { + if (isFn) + handler.call(self, arg1, arg2); + else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + listeners[i].call(self, arg1, arg2); + } + } + function emitThree(handler, isFn, self, arg1, arg2, arg3) { + if (isFn) + handler.call(self, arg1, arg2, arg3); + else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + listeners[i].call(self, arg1, arg2, arg3); + } + } + + function emitMany(handler, isFn, self, args) { + if (isFn) + handler.apply(self, args); + else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + listeners[i].apply(self, args); + } + } + + EventEmitter$2.prototype.emit = function emit(type) { + var er, handler, len, args, i, events, domain; + var doError = (type === 'error'); + + events = this._events; + if (events) + doError = (doError && events.error == null); + else if (!doError) + return false; - /** - * Pending describe. - */ + domain = this.domain; - context.xdescribe = context.xcontext = context.describe.skip = function( - title, - fn - ) { - return common.suite.skip({ - title: title, - file: file, - fn: fn - }); - }; + // If there is no 'error' event listener then throw. + if (doError) { + er = arguments[1]; + if (domain) { + if (!er) + er = new Error('Uncaught, unspecified "error" event'); + er.domainEmitter = this; + er.domain = domain; + er.domainThrown = false; + domain.emit('error', er); + } else if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; + } + return false; + } - /** - * Exclusive suite. - */ + handler = events[type]; - context.describe.only = function(title, fn) { - return common.suite.only({ - title: title, - file: file, - fn: fn - }); - }; + if (!handler) + return false; - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ + var isFn = typeof handler === 'function'; + len = arguments.length; + switch (len) { + // fast cases + case 1: + emitNone(handler, isFn, this); + break; + case 2: + emitOne(handler, isFn, this, arguments[1]); + break; + case 3: + emitTwo(handler, isFn, this, arguments[1], arguments[2]); + break; + case 4: + emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]); + break; + // slower + default: + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; + emitMany(handler, isFn, this, args); + } - context.it = context.specify = function(title, fn) { - var suite = suites[0]; - if (suite.isPending()) { - fn = null; - } - var test = new Test(title, fn); - test.file = file; - suite.addTest(test); - return test; - }; + return true; + }; - /** - * Exclusive test-case. - */ + function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; - context.it.only = function(title, fn) { - return common.test.only(mocha, context.it(title, fn)); - }; + if (typeof listener !== 'function') + throw new TypeError('"listener" argument must be a function'); - /** - * Pending test case. - */ + events = target._events; + if (!events) { + events = target._events = new EventHandlers(); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } - context.xit = context.xspecify = context.it.skip = function(title) { - return context.it(title); - }; + if (!existing) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = prepend ? [listener, existing] : + [existing, listener]; + } else { + // If we've already got an array, just append. + if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + } - /** - * Number of attempts to retry. - */ - context.it.retries = function(n) { - context.retries(n); - }; - }); -}; + // Check for listener leak + if (!existing.warned) { + m = $getMaxListeners(target); + if (m && m > 0 && existing.length > m) { + existing.warned = true; + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + type + ' listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + emitWarning$1(w); + } + } + } -module.exports.description = 'BDD or RSpec style [default]'; + return target; + } + function emitWarning$1(e) { + typeof console.warn === 'function' ? console.warn(e) : console.log(e); + } + EventEmitter$2.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); + }; -},{"../suite":36,"../test":37,"./common":9}],9:[function(require,module,exports){ -'use strict'; + EventEmitter$2.prototype.on = EventEmitter$2.prototype.addListener; -var Suite = require('../suite'); -var errors = require('../errors'); -var createMissingArgumentError = errors.createMissingArgumentError; + EventEmitter$2.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; -/** - * Functions common to more than one interface. - * - * @param {Suite[]} suites - * @param {Context} context - * @param {Mocha} mocha - * @return {Object} An object containing common functions. - */ -module.exports = function(suites, context, mocha) { - /** - * Check if the suite should be tested. - * - * @private - * @param {Suite} suite - suite to check - * @returns {boolean} - */ - function shouldBeTested(suite) { - return ( - !mocha.options.grep || - (mocha.options.grep && - mocha.options.grep.test(suite.fullTitle()) && - !mocha.options.invert) - ); + function _onceWrap(target, type, listener) { + var fired = false; + function g() { + target.removeListener(type, g); + if (!fired) { + fired = true; + listener.apply(target, arguments); + } + } + g.listener = listener; + return g; } - return { - /** - * This is only present if flag --delay is passed into Mocha. It triggers - * root suite execution. - * - * @param {Suite} suite The root suite. - * @return {Function} A function which runs the root suite - */ - runWithSuite: function runWithSuite(suite) { - return function run() { - suite.run(); + EventEmitter$2.prototype.once = function once(type, listener) { + if (typeof listener !== 'function') + throw new TypeError('"listener" argument must be a function'); + this.on(type, _onceWrap(this, type, listener)); + return this; + }; + + EventEmitter$2.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + if (typeof listener !== 'function') + throw new TypeError('"listener" argument must be a function'); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; }; - }, - /** - * Execute before running tests. - * - * @param {string} name - * @param {Function} fn - */ - before: function(name, fn) { - suites[0].beforeAll(name, fn); - }, + // emits a 'removeListener' event iff the listener was removed + EventEmitter$2.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; - /** - * Execute after running tests. - * - * @param {string} name - * @param {Function} fn - */ - after: function(name, fn) { - suites[0].afterAll(name, fn); - }, + if (typeof listener !== 'function') + throw new TypeError('"listener" argument must be a function'); - /** - * Execute before each test case. - * - * @param {string} name - * @param {Function} fn - */ - beforeEach: function(name, fn) { - suites[0].beforeEach(name, fn); - }, + events = this._events; + if (!events) + return this; - /** - * Execute after each test case. - * - * @param {string} name - * @param {Function} fn - */ - afterEach: function(name, fn) { - suites[0].afterEach(name, fn); - }, + list = events[type]; + if (!list) + return this; - suite: { - /** - * Create an exclusive Suite; convenience function - * See docstring for create() below. - * - * @param {Object} opts - * @returns {Suite} - */ - only: function only(opts) { - opts.isOnly = true; - return this.create(opts); - }, + if (list === listener || (list.listener && list.listener === listener)) { + if (--this._eventsCount === 0) + this._events = new EventHandlers(); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + originalListener = list[i].listener; + position = i; + break; + } + } - /** - * Create a Suite, but skip it; convenience function - * See docstring for create() below. - * - * @param {Object} opts - * @returns {Suite} - */ - skip: function skip(opts) { - opts.pending = true; - return this.create(opts); - }, + if (position < 0) + return this; - /** - * Creates a suite. - * - * @param {Object} opts Options - * @param {string} opts.title Title of Suite - * @param {Function} [opts.fn] Suite Function (not always applicable) - * @param {boolean} [opts.pending] Is Suite pending? - * @param {string} [opts.file] Filepath where this Suite resides - * @param {boolean} [opts.isOnly] Is Suite exclusive? - * @returns {Suite} - */ - create: function create(opts) { - var suite = Suite.create(suites[0], opts.title); - suite.pending = Boolean(opts.pending); - suite.file = opts.file; - suites.unshift(suite); - if (opts.isOnly) { - if (mocha.options.forbidOnly && shouldBeTested(suite)) { - throw new Error('`.only` forbidden'); + if (list.length === 1) { + list[0] = undefined; + if (--this._eventsCount === 0) { + this._events = new EventHandlers(); + return this; + } else { + delete events[type]; + } + } else { + spliceOne(list, position); } - suite.parent.appendOnlySuite(suite); + if (events.removeListener) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + + // Alias for removeListener added in NodeJS 10.0 + // https://nodejs.org/api/events.html#events_emitter_off_eventname_listener + EventEmitter$2.prototype.off = function(type, listener){ + return this.removeListener(type, listener); + }; + + EventEmitter$2.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events; + + events = this._events; + if (!events) + return this; + + // not listening for removeListener, no need to emit + if (!events.removeListener) { + if (arguments.length === 0) { + this._events = new EventHandlers(); + this._eventsCount = 0; + } else if (events[type]) { + if (--this._eventsCount === 0) + this._events = new EventHandlers(); + else + delete events[type]; + } + return this; } - if (suite.pending) { - if (mocha.options.forbidPending && shouldBeTested(suite)) { - throw new Error('Pending test forbidden'); + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + for (var i = 0, key; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); } + this.removeAllListeners('removeListener'); + this._events = new EventHandlers(); + this._eventsCount = 0; + return this; } - if (typeof opts.fn === 'function') { - opts.fn.call(suite); - suites.shift(); - } else if (typeof opts.fn === 'undefined' && !suite.pending) { - throw createMissingArgumentError( - 'Suite "' + - suite.fullTitle() + - '" was defined but no callback was supplied. ' + - 'Supply a callback or explicitly skip the suite.', - 'callback', - 'function' - ); - } else if (!opts.fn && suite.pending) { - suites.shift(); + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners) { + // LIFO order + do { + this.removeListener(type, listeners[listeners.length - 1]); + } while (listeners[0]); } - return suite; - } - }, + return this; + }; - test: { - /** - * Exclusive test-case. - * - * @param {Object} mocha - * @param {Function} test - * @returns {*} - */ - only: function(mocha, test) { - test.parent.appendOnlyTest(test); - return test; - }, + EventEmitter$2.prototype.listeners = function listeners(type) { + var evlistener; + var ret; + var events = this._events; - /** - * Pending test case. - * - * @param {string} title - */ - skip: function(title) { - context.test(title); - }, + if (!events) + ret = []; + else { + evlistener = events[type]; + if (!evlistener) + ret = []; + else if (typeof evlistener === 'function') + ret = [evlistener.listener || evlistener]; + else + ret = unwrapListeners(evlistener); + } - /** - * Number of retry attempts - * - * @param {number} n - */ - retries: function(n) { - context.retries(n); - } - } - }; -}; - -},{"../errors":6,"../suite":36}],10:[function(require,module,exports){ -'use strict'; -var Suite = require('../suite'); -var Test = require('../test'); - -/** - * Exports-style (as Node.js module) interface: - * - * exports.Array = { - * '#indexOf()': { - * 'should return -1 when the value is not present': function() { - * - * }, - * - * 'should return the correct index when the value is present': function() { - * - * } - * } - * }; - * - * @param {Suite} suite Root suite. - */ -module.exports = function(suite) { - var suites = [suite]; - - suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit); - - function visit(obj, file) { - var suite; - for (var key in obj) { - if (typeof obj[key] === 'function') { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - var test = new Test(key, fn); - test.file = file; - suites[0].addTest(test); - } - } else { - suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key], file); - suites.shift(); - } - } - } -}; - -module.exports.description = 'Node.js module ("exports") style'; - -},{"../suite":36,"../test":37}],11:[function(require,module,exports){ -'use strict'; - -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); - -},{"./bdd":8,"./exports":10,"./qunit":12,"./tdd":13}],12:[function(require,module,exports){ -'use strict'; - -var Test = require('../test'); -var EVENT_FILE_PRE_REQUIRE = require('../suite').constants - .EVENT_FILE_PRE_REQUIRE; - -/** - * QUnit-style interface: - * - * suite('Array'); - * - * test('#length', function() { - * var arr = [1,2,3]; - * ok(arr.length == 3); - * }); - * - * test('#indexOf()', function() { - * var arr = [1,2,3]; - * ok(arr.indexOf(1) == 0); - * ok(arr.indexOf(2) == 1); - * ok(arr.indexOf(3) == 2); - * }); - * - * suite('String'); - * - * test('#length', function() { - * ok('foo'.length == 3); - * }); - * - * @param {Suite} suite Root suite. - */ -module.exports = function qUnitInterface(suite) { - var suites = [suite]; - - suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) { - var common = require('./common')(suites, context, mocha); - - context.before = common.before; - context.after = common.after; - context.beforeEach = common.beforeEach; - context.afterEach = common.afterEach; - context.run = mocha.options.delay && common.runWithSuite(suite); - /** - * Describe a "suite" with the given `title`. - */ + return ret; + }; - context.suite = function(title) { - if (suites.length > 1) { - suites.shift(); - } - return common.suite.create({ - title: title, - file: file, - fn: false - }); - }; + EventEmitter$2.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount$1.call(emitter, type); + } + }; - /** - * Exclusive Suite. - */ + EventEmitter$2.prototype.listenerCount = listenerCount$1; + function listenerCount$1(type) { + var events = this._events; + + if (events) { + var evlistener = events[type]; - context.suite.only = function(title) { - if (suites.length > 1) { - suites.shift(); + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener) { + return evlistener.length; } - return common.suite.only({ - title: title, - file: file, - fn: false - }); - }; + } - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ + return 0; + } - context.test = function(title, fn) { - var test = new Test(title, fn); - test.file = file; - suites[0].addTest(test); - return test; - }; + EventEmitter$2.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; + }; - /** - * Exclusive test-case. - */ + // About 1.5x faster than the two-arg version of Array#splice(). + function spliceOne(list, index) { + for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) + list[i] = list[k]; + list.pop(); + } - context.test.only = function(title, fn) { - return common.test.only(mocha, context.test(title, fn)); - }; + function arrayClone(arr, i) { + var copy = new Array(i); + while (i--) + copy[i] = arr[i]; + return copy; + } + + function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; + } - context.test.skip = common.test.skip; - context.test.retries = common.test.retries; + var _polyfillNode_events = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': EventEmitter$2, + EventEmitter: EventEmitter$2 }); -}; - -module.exports.description = 'QUnit style'; - -},{"../suite":36,"../test":37,"./common":9}],13:[function(require,module,exports){ -'use strict'; - -var Test = require('../test'); -var EVENT_FILE_PRE_REQUIRE = require('../suite').constants - .EVENT_FILE_PRE_REQUIRE; - -/** - * TDD-style interface: - * - * suite('Array', function() { - * suite('#indexOf()', function() { - * suiteSetup(function() { - * - * }); - * - * test('should return -1 when not present', function() { - * - * }); - * - * test('should return the index when present', function() { - * - * }); - * - * suiteTeardown(function() { - * - * }); - * }); - * }); - * - * @param {Suite} suite Root suite. - */ -module.exports = function(suite) { - var suites = [suite]; - - suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) { - var common = require('./common')(suites, context, mocha); - - context.setup = common.beforeEach; - context.teardown = common.afterEach; - context.suiteSetup = common.before; - context.suiteTeardown = common.after; - context.run = mocha.options.delay && common.runWithSuite(suite); - /** - * Describe a "suite" with the given `title` and callback `fn` containing - * nested suites and/or tests. - */ - context.suite = function(title, fn) { - return common.suite.create({ - title: title, - file: file, - fn: fn - }); - }; + var lookup$1 = []; + var revLookup$1 = []; + var Arr$1 = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; + var inited$1 = false; + function init$1 () { + inited$1 = true; + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + for (var i = 0, len = code.length; i < len; ++i) { + lookup$1[i] = code[i]; + revLookup$1[code.charCodeAt(i)] = i; + } - /** - * Pending suite. - */ - context.suite.skip = function(title, fn) { - return common.suite.skip({ - title: title, - file: file, - fn: fn - }); - }; + revLookup$1['-'.charCodeAt(0)] = 62; + revLookup$1['_'.charCodeAt(0)] = 63; + } - /** - * Exclusive test-case. - */ - context.suite.only = function(title, fn) { - return common.suite.only({ - title: title, - file: file, - fn: fn - }); - }; + function toByteArray$1 (b64) { + if (!inited$1) { + init$1(); + } + var i, j, l, tmp, placeHolders, arr; + var len = b64.length; - /** - * Describe a specification or test-case with the given `title` and - * callback `fn` acting as a thunk. - */ - context.test = function(title, fn) { - var suite = suites[0]; - if (suite.isPending()) { - fn = null; - } - var test = new Test(title, fn); - test.file = file; - suite.addTest(test); - return test; - }; + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } - /** - * Exclusive test-case. - */ + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; - context.test.only = function(title, fn) { - return common.test.only(mocha, context.test(title, fn)); - }; + // base64 is 4/3 + up to two characters of the original data + arr = new Arr$1(len * 3 / 4 - placeHolders); - context.test.skip = common.test.skip; - context.test.retries = common.test.retries; - }); -}; - -module.exports.description = - 'traditional "suite"/"test" instead of BDD\'s "describe"/"it"'; - -},{"../suite":36,"../test":37,"./common":9}],14:[function(require,module,exports){ -(function (process,global){ -'use strict'; - -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -var escapeRe = require('escape-string-regexp'); -var path = require('path'); -var builtinReporters = require('./reporters'); -var growl = require('./growl'); -var utils = require('./utils'); -var mocharc = require('./mocharc.json'); -var errors = require('./errors'); -var Suite = require('./suite'); -var createStatsCollector = require('./stats-collector'); -var createInvalidReporterError = errors.createInvalidReporterError; -var createInvalidInterfaceError = errors.createInvalidInterfaceError; -var EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE; -var EVENT_FILE_POST_REQUIRE = Suite.constants.EVENT_FILE_POST_REQUIRE; -var EVENT_FILE_REQUIRE = Suite.constants.EVENT_FILE_REQUIRE; -var sQuote = utils.sQuote; - -exports = module.exports = Mocha; - -/** - * To require local UIs and reporters when running in node. - */ - -if (!process.browser) { - var cwd = process.cwd(); - module.paths.push(cwd, path.join(cwd, 'node_modules')); -} - -/** - * Expose internals. - */ - -/** - * @public - * @class utils - * @memberof Mocha - */ -exports.utils = utils; -exports.interfaces = require('./interfaces'); -/** - * @public - * @memberof Mocha - */ -exports.reporters = builtinReporters; -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -/** - * - * @memberof Mocha - */ -exports.Runner = require('./runner'); -exports.Suite = Suite; -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Constructs a new Mocha instance with `options`. - * - * @public - * @class Mocha - * @param {Object} [options] - Settings object. - * @param {boolean} [options.allowUncaught] - Propagate uncaught errors? - * @param {boolean} [options.asyncOnly] - Force `done` callback or promise? - * @param {boolean} [options.bail] - Bail after first test failure? - * @param {boolean} [options.checkLeaks] - If true, check leaks. - * @param {boolean} [options.delay] - Delay root suite execution? - * @param {boolean} [options.enableTimeouts] - Enable timeouts? - * @param {string} [options.fgrep] - Test filter given string. - * @param {boolean} [options.forbidOnly] - Tests marked `only` fail the suite? - * @param {boolean} [options.forbidPending] - Pending tests fail the suite? - * @param {boolean} [options.fullStackTrace] - Full stacktrace upon failure? - * @param {string[]} [options.global] - Variables expected in global scope. - * @param {RegExp|string} [options.grep] - Test filter given regular expression. - * @param {boolean} [options.growl] - Enable desktop notifications? - * @param {boolean} [options.hideDiff] - Suppress diffs from failures? - * @param {boolean} [options.ignoreLeaks] - Ignore global leaks? - * @param {boolean} [options.invert] - Invert test filter matches? - * @param {boolean} [options.noHighlighting] - Disable syntax highlighting? - * @param {string} [options.reporter] - Reporter name. - * @param {Object} [options.reporterOption] - Reporter settings object. - * @param {number} [options.retries] - Number of times to retry failed tests. - * @param {number} [options.slow] - Slow threshold value. - * @param {number|string} [options.timeout] - Timeout threshold value. - * @param {string} [options.ui] - Interface name. - * @param {boolean} [options.color] - Color TTY output from reporter? - * @param {boolean} [options.useInlineDiffs] - Use inline diffs? - */ -function Mocha(options) { - options = utils.assign({}, mocharc, options || {}); - this.files = []; - this.options = options; - // root suite - this.suite = new exports.Suite('', new exports.Context(), true); - - if ('useColors' in options) { - utils.deprecate( - 'useColors is DEPRECATED and will be removed from a future version of Mocha. Instead, use the "color" option' - ); - options.color = 'color' in options ? options.color : options.useColors; - } - - // Globals are passed in as options.global, with options.globals for backward compatibility. - options.globals = options.global || options.globals || []; - delete options.global; - - this.grep(options.grep) - .fgrep(options.fgrep) - .ui(options.ui) - .bail(options.bail) - .reporter(options.reporter, options.reporterOptions) - .useColors(options.color) - .slow(options.slow) - .useInlineDiffs(options.inlineDiffs) - .globals(options.globals); - - if ('enableTimeouts' in options) { - utils.deprecate( - 'enableTimeouts is DEPRECATED and will be removed from a future version of Mocha. Instead, use "timeout: false" to disable timeouts.' - ); - if (options.enableTimeouts === false) { - this.timeout(0); + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len; + + var L = 0; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup$1[b64.charCodeAt(i)] << 18) | (revLookup$1[b64.charCodeAt(i + 1)] << 12) | (revLookup$1[b64.charCodeAt(i + 2)] << 6) | revLookup$1[b64.charCodeAt(i + 3)]; + arr[L++] = (tmp >> 16) & 0xFF; + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; } - } - // this guard exists because Suite#timeout does not consider `undefined` to be valid input - if (typeof options.timeout !== 'undefined') { - this.timeout(options.timeout === false ? 0 : options.timeout); + if (placeHolders === 2) { + tmp = (revLookup$1[b64.charCodeAt(i)] << 2) | (revLookup$1[b64.charCodeAt(i + 1)] >> 4); + arr[L++] = tmp & 0xFF; + } else if (placeHolders === 1) { + tmp = (revLookup$1[b64.charCodeAt(i)] << 10) | (revLookup$1[b64.charCodeAt(i + 1)] << 4) | (revLookup$1[b64.charCodeAt(i + 2)] >> 2); + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; + } + + return arr } - if ('retries' in options) { - this.retries(options.retries); + function tripletToBase64$1 (num) { + return lookup$1[num >> 18 & 0x3F] + lookup$1[num >> 12 & 0x3F] + lookup$1[num >> 6 & 0x3F] + lookup$1[num & 0x3F] } - if ('diff' in options) { - this.hideDiff(!options.diff); + function encodeChunk$1 (uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); + output.push(tripletToBase64$1(tmp)); + } + return output.join('') } - [ - 'allowUncaught', - 'asyncOnly', - 'checkLeaks', - 'delay', - 'forbidOnly', - 'forbidPending', - 'fullTrace', - 'growl', - 'invert' - ].forEach(function(opt) { - if (options[opt]) { - this[opt](); - } - }, this); -} - -/** - * Enables or disables bailing on the first failure. - * - * @public - * @see {@link https://mochajs.org/#-b---bail|CLI option} - * @param {boolean} [bail=true] - Whether to bail on first error. - * @returns {Mocha} this - * @chainable - */ -Mocha.prototype.bail = function(bail) { - if (!arguments.length) { - bail = true; - } - this.suite.bail(bail); - return this; -}; - -/** - * @summary - * Adds `file` to be loaded for execution. - * - * @description - * Useful for generic setup code that must be included within test suite. - * - * @public - * @see {@link https://mochajs.org/#--file-file|CLI option} - * @param {string} file - Pathname of file to be loaded. - * @returns {Mocha} this - * @chainable - */ -Mocha.prototype.addFile = function(file) { - this.files.push(file); - return this; -}; - -/** - * Sets reporter to `reporter`, defaults to "spec". - * - * @public - * @see {@link https://mochajs.org/#-r---reporter-name|CLI option} - * @see {@link https://mochajs.org/#reporters|Reporters} - * @param {String|Function} reporter - Reporter name or constructor. - * @param {Object} [reporterOptions] - Options used to configure the reporter. - * @returns {Mocha} this - * @chainable - * @throws {Error} if requested reporter cannot be loaded - * @example - * - * // Use XUnit reporter and direct its output to file - * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' }); - */ -Mocha.prototype.reporter = function(reporter, reporterOptions) { - if (typeof reporter === 'function') { - this._reporter = reporter; - } else { - reporter = reporter || 'spec'; - var _reporter; - // Try to load a built-in reporter. - if (builtinReporters[reporter]) { - _reporter = builtinReporters[reporter]; - } - // Try to load reporters from process.cwd() and node_modules - if (!_reporter) { - try { - _reporter = require(reporter); - } catch (err) { - if ( - err.code !== 'MODULE_NOT_FOUND' || - err.message.indexOf('Cannot find module') !== -1 - ) { - // Try to load reporters from a path (absolute or relative) - try { - _reporter = require(path.resolve(process.cwd(), reporter)); - } catch (_err) { - _err.code !== 'MODULE_NOT_FOUND' || - _err.message.indexOf('Cannot find module') !== -1 - ? console.warn(sQuote(reporter) + ' reporter not found') - : console.warn( - sQuote(reporter) + - ' reporter blew up with error:\n' + - err.stack - ); - } - } else { - console.warn( - sQuote(reporter) + ' reporter blew up with error:\n' + err.stack - ); - } - } + function fromByteArray$1 (uint8) { + if (!inited$1) { + init$1(); } - if (!_reporter) { - throw createInvalidReporterError( - 'invalid reporter ' + sQuote(reporter), - reporter - ); + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var output = ''; + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk$1(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); } - this._reporter = _reporter; - } - this.options.reporterOptions = reporterOptions; - return this; -}; - -/** - * Sets test UI `name`, defaults to "bdd". - * - * @public - * @see {@link https://mochajs.org/#-u---ui-name|CLI option} - * @see {@link https://mochajs.org/#interfaces|Interface DSLs} - * @param {string|Function} [ui=bdd] - Interface name or class. - * @returns {Mocha} this - * @chainable - * @throws {Error} if requested interface cannot be loaded - */ -Mocha.prototype.ui = function(ui) { - var bindInterface; - if (typeof ui === 'function') { - bindInterface = ui; - } else { - ui = ui || 'bdd'; - bindInterface = exports.interfaces[ui]; - if (!bindInterface) { - try { - bindInterface = require(ui); - } catch (err) { - throw createInvalidInterfaceError( - 'invalid interface ' + sQuote(ui), - ui - ); - } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + output += lookup$1[tmp >> 2]; + output += lookup$1[(tmp << 4) & 0x3F]; + output += '=='; + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); + output += lookup$1[tmp >> 10]; + output += lookup$1[(tmp >> 4) & 0x3F]; + output += lookup$1[(tmp << 2) & 0x3F]; + output += '='; } - } - bindInterface(this.suite); - - this.suite.on(EVENT_FILE_PRE_REQUIRE, function(context) { - exports.afterEach = context.afterEach || context.teardown; - exports.after = context.after || context.suiteTeardown; - exports.beforeEach = context.beforeEach || context.setup; - exports.before = context.before || context.suiteSetup; - exports.describe = context.describe || context.suite; - exports.it = context.it || context.test; - exports.xit = context.xit || (context.test && context.test.skip); - exports.setup = context.setup || context.beforeEach; - exports.suiteSetup = context.suiteSetup || context.before; - exports.suiteTeardown = context.suiteTeardown || context.after; - exports.suite = context.suite || context.describe; - exports.teardown = context.teardown || context.afterEach; - exports.test = context.test || context.it; - exports.run = context.run; - }); - return this; -}; - -/** - * Loads `files` prior to execution. - * - * @description - * The implementation relies on Node's `require` to execute - * the test interface functions and will be subject to its cache. - * - * @private - * @see {@link Mocha#addFile} - * @see {@link Mocha#run} - * @see {@link Mocha#unloadFiles} - * @param {Function} [fn] - Callback invoked upon completion. - */ -Mocha.prototype.loadFiles = function(fn) { - var self = this; - var suite = this.suite; - this.files.forEach(function(file) { - file = path.resolve(file); - suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self); - suite.emit(EVENT_FILE_REQUIRE, require(file), file, self); - suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self); - }); - fn && fn(); -}; - -/** - * Removes a previously loaded file from Node's `require` cache. - * - * @private - * @static - * @see {@link Mocha#unloadFiles} - * @param {string} file - Pathname of file to be unloaded. - */ -Mocha.unloadFile = function(file) { - delete require.cache[require.resolve(file)]; -}; - -/** - * Unloads `files` from Node's `require` cache. - * - * @description - * This allows files to be "freshly" reloaded, providing the ability - * to reuse a Mocha instance programmatically. - * - * Intended for consumers — not used internally - * - * @public - * @see {@link Mocha.unloadFile} - * @see {@link Mocha#loadFiles} - * @see {@link Mocha#run} - * @returns {Mocha} this - * @chainable - */ -Mocha.prototype.unloadFiles = function() { - this.files.forEach(Mocha.unloadFile); - return this; -}; - -/** - * Sets `grep` filter after escaping RegExp special characters. - * - * @public - * @see {@link Mocha#grep} - * @param {string} str - Value to be converted to a regexp. - * @returns {Mocha} this - * @chainable - * @example - * - * // Select tests whose full title begins with `"foo"` followed by a period - * mocha.fgrep('foo.'); - */ -Mocha.prototype.fgrep = function(str) { - if (!str) { - return this; + parts.push(output); + + return parts.join('') } - return this.grep(new RegExp(escapeRe(str))); -}; - -/** - * @summary - * Sets `grep` filter used to select specific tests for execution. - * - * @description - * If `re` is a regexp-like string, it will be converted to regexp. - * The regexp is tested against the full title of each test (i.e., the - * name of the test preceded by titles of each its ancestral suites). - * As such, using an exact-match fixed pattern against the - * test name itself will not yield any matches. - *
    - * Previous filter value will be overwritten on each call! - * - * @public - * @see {@link https://mochajs.org/#-g---grep-pattern|CLI option} - * @see {@link Mocha#fgrep} - * @see {@link Mocha#invert} - * @param {RegExp|String} re - Regular expression used to select tests. - * @return {Mocha} this - * @chainable - * @example - * - * // Select tests whose full title contains `"match"`, ignoring case - * mocha.grep(/match/i); - * @example - * - * // Same as above but with regexp-like string argument - * mocha.grep('/match/i'); - * @example - * - * // ## Anti-example - * // Given embedded test `it('only-this-test')`... - * mocha.grep('/^only-this-test$/'); // NO! Use `.only()` to do this! - */ -Mocha.prototype.grep = function(re) { - if (utils.isString(re)) { - // extract args if it's regex-like, i.e: [string, pattern, flag] - var arg = re.match(/^\/(.*)\/(g|i|)$|.*/); - this.options.grep = new RegExp(arg[1] || arg[0], arg[2]); - } else { - this.options.grep = re; - } - return this; -}; - -/** - * Inverts `grep` matches. - * - * @public - * @see {@link Mocha#grep} - * @return {Mocha} this - * @chainable - * @example - * - * // Select tests whose full title does *not* contain `"match"`, ignoring case - * mocha.grep(/match/i).invert(); - */ -Mocha.prototype.invert = function() { - this.options.invert = true; - return this; -}; - -/** - * Enables or disables ignoring global leaks. - * - * @public - * @see {@link Mocha#checkLeaks} - * @param {boolean} ignoreLeaks - Whether to ignore global leaks. - * @return {Mocha} this - * @chainable - * @example - * - * // Ignore global leaks - * mocha.ignoreLeaks(true); - */ -Mocha.prototype.ignoreLeaks = function(ignoreLeaks) { - this.options.ignoreLeaks = Boolean(ignoreLeaks); - return this; -}; - -/** - * Enables checking for global variables leaked while running tests. - * - * @public - * @see {@link https://mochajs.org/#--check-leaks|CLI option} - * @see {@link Mocha#ignoreLeaks} - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.checkLeaks = function() { - this.options.ignoreLeaks = false; - return this; -}; - -/** - * Displays full stack trace upon test failure. - * - * @public - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.fullTrace = function() { - this.options.fullStackTrace = true; - return this; -}; - -/** - * Enables desktop notification support if prerequisite software installed. - * - * @public - * @see {@link Mocha#isGrowlCapable} - * @see {@link Mocha#_growl} - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.growl = function() { - this.options.growl = this.isGrowlCapable(); - if (!this.options.growl) { - var detail = process.browser - ? 'notification support not available in this browser...' - : 'notification support prerequisites not installed...'; - console.error(detail + ' cannot enable!'); - } - return this; -}; - -/** - * @summary - * Determines if Growl support seems likely. - * - * @description - * Not available when run in browser. - * - * @private - * @see {@link Growl#isCapable} - * @see {@link Mocha#growl} - * @return {boolean} whether Growl support can be expected - */ -Mocha.prototype.isGrowlCapable = growl.isCapable; - -/** - * Implements desktop notifications using a pseudo-reporter. - * - * @private - * @see {@link Mocha#growl} - * @see {@link Growl#notify} - * @param {Runner} runner - Runner instance. - */ -Mocha.prototype._growl = growl.notify; - -/** - * Specifies whitelist of variable names to be expected in global scope. - * - * @public - * @see {@link https://mochajs.org/#-global-variable-name|CLI option} - * @see {@link Mocha#checkLeaks} - * @param {String[]|String} globals - Accepted global variable name(s). - * @return {Mocha} this - * @chainable - * @example - * - * // Specify variables to be expected in global scope - * mocha.globals(['jQuery', 'MyLib']); - */ -Mocha.prototype.globals = function(globals) { - this.options.globals = this.options.globals - .concat(globals) - .filter(Boolean) - .filter(function(elt, idx, arr) { - return arr.indexOf(elt) === idx; - }); - return this; -}; - -/** - * Enables or disables TTY color output by screen-oriented reporters. - * - * @public - * @param {boolean} colors - Whether to enable color output. - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.useColors = function(colors) { - if (colors !== undefined) { - this.options.useColors = colors; - } - return this; -}; - -/** - * Determines if reporter should use inline diffs (rather than +/-) - * in test failure output. - * - * @public - * @param {boolean} inlineDiffs - Whether to use inline diffs. - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.useInlineDiffs = function(inlineDiffs) { - this.options.useInlineDiffs = inlineDiffs !== undefined && inlineDiffs; - return this; -}; - -/** - * Determines if reporter should include diffs in test failure output. - * - * @public - * @param {boolean} hideDiff - Whether to hide diffs. - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.hideDiff = function(hideDiff) { - this.options.hideDiff = hideDiff !== undefined && hideDiff; - return this; -}; - -/** - * @summary - * Sets timeout threshold value. - * - * @description - * A string argument can use shorthand (such as "2s") and will be converted. - * If the value is `0`, timeouts will be disabled. - * - * @public - * @see {@link https://mochajs.org/#-t---timeout-ms|CLI option} - * @see {@link https://mochajs.org/#--no-timeouts|CLI option} - * @see {@link https://mochajs.org/#timeouts|Timeouts} - * @see {@link Mocha#enableTimeouts} - * @param {number|string} msecs - Timeout threshold value. - * @return {Mocha} this - * @chainable - * @example - * - * // Sets timeout to one second - * mocha.timeout(1000); - * @example - * - * // Same as above but using string argument - * mocha.timeout('1s'); - */ -Mocha.prototype.timeout = function(msecs) { - this.suite.timeout(msecs); - return this; -}; - -/** - * Sets the number of times to retry failed tests. - * - * @public - * @see {@link https://mochajs.org/#retry-tests|Retry Tests} - * @param {number} retry - Number of times to retry failed tests. - * @return {Mocha} this - * @chainable - * @example - * - * // Allow any failed test to retry one more time - * mocha.retries(1); - */ -Mocha.prototype.retries = function(n) { - this.suite.retries(n); - return this; -}; - -/** - * Sets slowness threshold value. - * - * @public - * @see {@link https://mochajs.org/#-s---slow-ms|CLI option} - * @param {number} msecs - Slowness threshold value. - * @return {Mocha} this - * @chainable - * @example - * - * // Sets "slow" threshold to half a second - * mocha.slow(500); - * @example - * - * // Same as above but using string argument - * mocha.slow('0.5s'); - */ -Mocha.prototype.slow = function(msecs) { - this.suite.slow(msecs); - return this; -}; - -/** - * Enables or disables timeouts. - * - * @public - * @see {@link https://mochajs.org/#-t---timeout-ms|CLI option} - * @see {@link https://mochajs.org/#--no-timeouts|CLI option} - * @param {boolean} enableTimeouts - Whether to enable timeouts. - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.enableTimeouts = function(enableTimeouts) { - this.suite.enableTimeouts( - arguments.length && enableTimeouts !== undefined ? enableTimeouts : true - ); - return this; -}; - -/** - * Forces all tests to either accept a `done` callback or return a promise. - * - * @public - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.asyncOnly = function() { - this.options.asyncOnly = true; - return this; -}; - -/** - * Disables syntax highlighting (in browser). - * - * @public - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.noHighlighting = function() { - this.options.noHighlighting = true; - return this; -}; - -/** - * Enables uncaught errors to propagate (in browser). - * - * @public - * @return {Mocha} this - * @chainable - */ -Mocha.prototype.allowUncaught = function() { - this.options.allowUncaught = true; - return this; -}; - -/** - * @summary - * Delays root suite execution. - * - * @description - * Used to perform asynch operations before any suites are run. - * - * @public - * @see {@link https://mochajs.org/#delayed-root-suite|delayed root suite} - * @returns {Mocha} this - * @chainable - */ -Mocha.prototype.delay = function delay() { - this.options.delay = true; - return this; -}; - -/** - * Causes tests marked `only` to fail the suite. - * - * @public - * @returns {Mocha} this - * @chainable - */ -Mocha.prototype.forbidOnly = function() { - this.options.forbidOnly = true; - return this; -}; - -/** - * Causes pending tests and tests marked `skip` to fail the suite. - * - * @public - * @returns {Mocha} this - * @chainable - */ -Mocha.prototype.forbidPending = function() { - this.options.forbidPending = true; - return this; -}; - -/** - * Mocha version as specified by "package.json". - * - * @name Mocha#version - * @type string - * @readonly - */ -Object.defineProperty(Mocha.prototype, 'version', { - value: require('../package.json').version, - configurable: false, - enumerable: true, - writable: false -}); - -/** - * Callback to be invoked when test execution is complete. - * - * @callback DoneCB - * @param {number} failures - Number of failures that occurred. - */ - -/** - * Runs root suite and invokes `fn()` when complete. - * - * @description - * To run tests multiple times (or to run tests in files that are - * already in the `require` cache), make sure to clear them from - * the cache first! - * - * @public - * @see {@link Mocha#loadFiles} - * @see {@link Mocha#unloadFiles} - * @see {@link Runner#run} - * @param {DoneCB} [fn] - Callback invoked when test execution completed. - * @return {Runner} runner instance - */ -Mocha.prototype.run = function(fn) { - if (this.files.length) { - this.loadFiles(); - } - var suite = this.suite; - var options = this.options; - options.files = this.files; - var runner = new exports.Runner(suite, options.delay); - createStatsCollector(runner); - var reporter = new this._reporter(runner, options); - runner.ignoreLeaks = options.ignoreLeaks !== false; - runner.fullStackTrace = options.fullStackTrace; - runner.asyncOnly = options.asyncOnly; - runner.allowUncaught = options.allowUncaught; - runner.forbidOnly = options.forbidOnly; - runner.forbidPending = options.forbidPending; - if (options.grep) { - runner.grep(options.grep, options.invert); - } - if (options.globals) { - runner.globals(options.globals); - } - if (options.growl) { - this._growl(runner); - } - if (options.useColors !== undefined) { - exports.reporters.Base.useColors = options.useColors; - } - exports.reporters.Base.inlineDiffs = options.useInlineDiffs; - exports.reporters.Base.hideDiff = options.hideDiff; - - function done(failures) { - fn = fn || utils.noop; - if (reporter.done) { - reporter.done(failures, fn); + + function read$1 (buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? (nBytes - 1) : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) } else { - fn(failures); + m = m + Math.pow(2, mLen); + e = e - eBias; } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } - return runner.run(done); -}; - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../package.json":90,"./context":5,"./errors":6,"./growl":2,"./hook":7,"./interfaces":11,"./mocharc.json":15,"./reporters":21,"./runnable":33,"./runner":34,"./stats-collector":35,"./suite":36,"./test":37,"./utils":38,"_process":69,"escape-string-regexp":49,"path":42}],15:[function(require,module,exports){ -module.exports={ - "diff": true, - "extension": ["js"], - "opts": "./test/mocha.opts", - "package": "./package.json", - "reporter": "spec", - "slow": 75, - "timeout": 2000, - "ui": "bdd" -} - -},{}],16:[function(require,module,exports){ -'use strict'; - -module.exports = Pending; - -/** - * Initialize a new `Pending` error with the given message. - * - * @param {string} message - */ -function Pending(message) { - this.message = message; -} - -},{}],17:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module Base - */ -/** - * Module dependencies. - */ - -var tty = require('tty'); -var diff = require('diff'); -var milliseconds = require('ms'); -var utils = require('../utils'); -var supportsColor = process.browser ? null : require('supports-color'); -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Save log references to avoid tests interfering (see GH-3604). - */ -var consoleLog = console.log; - -/** - * Enable coloring by default, except in the browser interface. - */ - -exports.useColors = - !process.browser && - (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined); - -/** - * Inline diffs instead of +/- - */ - -exports.inlineDiffs = false; - -/** - * Default color map. - */ - -exports.colors = { - pass: 90, - fail: 31, - 'bright pass': 92, - 'bright fail': 91, - 'bright yellow': 93, - pending: 36, - suite: 0, - 'error title': 0, - 'error message': 31, - 'error stack': 90, - checkmark: 32, - fast: 90, - medium: 33, - slow: 31, - green: 32, - light: 90, - 'diff gutter': 90, - 'diff added': 32, - 'diff removed': 31 -}; - -/** - * Default symbol map. - */ - -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․', - comma: ',', - bang: '!' -}; - -// With node.js on Windows: use symbols available in terminal default fonts -if (process.platform === 'win32') { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @private - * @param {string} type - * @param {string} str - * @return {string} - */ -var color = (exports.color = function(type, str) { - if (!exports.useColors) { - return String(str); - } - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}); - -/** - * Expose term window size, with some defaults for when stderr is not a tty. - */ - -exports.window = { - width: 75 -}; - -if (isatty) { - exports.window.width = process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1]; -} - -/** - * Expose some basic cursor interactions that are common among reporters. - */ - -exports.cursor = { - hide: function() { - isatty && process.stdout.write('\u001b[?25l'); - }, - - show: function() { - isatty && process.stdout.write('\u001b[?25h'); - }, - - deleteLine: function() { - isatty && process.stdout.write('\u001b[2K'); - }, - - beginningOfLine: function() { - isatty && process.stdout.write('\u001b[0G'); - }, - - CR: function() { - if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); + function write$1 (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); + var i = isLE ? 0 : (nBytes - 1); + var d = isLE ? 1 : -1; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; } else { - process.stdout.write('\r'); + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; } -}; -function showDiff(err) { - return ( - err && - err.showDiff !== false && - sameType(err.actual, err.expected) && - err.expected !== undefined - ); -} - -function stringifyDiffObjs(err) { - if (!utils.isString(err.actual) || !utils.isString(err.expected)) { - err.actual = utils.stringify(err.actual); - err.expected = utils.stringify(err.expected); - } -} - -/** - * Returns a diff between 2 strings with coloured ANSI output. - * - * @description - * The diff will be either inline or unified dependent on the value - * of `Base.inlineDiff`. - * - * @param {string} actual - * @param {string} expected - * @return {string} Diff - */ -var generateDiff = (exports.generateDiff = function(actual, expected) { - return exports.inlineDiffs - ? inlineDiff(actual, expected) - : unifiedDiff(actual, expected); -}); - -/** - * Outputs the given `failures` as a list. - * - * @public - * @memberof Mocha.reporters.Base - * @variation 1 - * @param {Object[]} failures - Each is Test instance with corresponding - * Error property - */ -exports.list = function(failures) { - Base.consoleLog(); - failures.forEach(function(test, i) { - // format - var fmt = - color('error title', ' %s) %s:\n') + - color('error message', ' %s') + - color('error stack', '\n%s\n'); - - // msg - var msg; - var err = test.err; - var message; - if (err.message && typeof err.message.toString === 'function') { - message = err.message + ''; - } else if (typeof err.inspect === 'function') { - message = err.inspect() + ''; - } else { - message = ''; - } - var stack = err.stack || message; - var index = message ? stack.indexOf(message) : -1; + var toString$2 = {}.toString; - if (index === -1) { - msg = message; - } else { - index += message.length; - msg = stack.slice(0, index); - // remove msg from stack - stack = stack.slice(index + 1); - } + var isArray$2 = Array.isArray || function (arr) { + return toString$2.call(arr) == '[object Array]'; + }; - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - // explicitly show diff - if (!exports.hideDiff && showDiff(err)) { - stringifyDiffObjs(err); - fmt = - color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); - var match = message.match(/^([^:]+): expected/); - msg = '\n ' + color('error message', match ? match[1] : msg); + /*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ - msg += generateDiff(err.actual, err.expected); - } + var INSPECT_MAX_BYTES$1 = 50; - // indent stack trace - stack = stack.replace(/^/gm, ' '); + /** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. - // indented test title - var testTitle = ''; - test.titlePath().forEach(function(str, index) { - if (index !== 0) { - testTitle += '\n '; - } - for (var i = 0; i < index; i++) { - testTitle += ' '; - } - testTitle += str; - }); + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ + Buffer$1.TYPED_ARRAY_SUPPORT = global$2.TYPED_ARRAY_SUPPORT !== undefined + ? global$2.TYPED_ARRAY_SUPPORT + : true; - Base.consoleLog(fmt, i + 1, testTitle, msg, stack); - }); -}; - -/** - * Constructs a new `Base` reporter instance. - * - * @description - * All other reporters generally inherit from this reporter. - * - * @public - * @class - * @memberof Mocha.reporters - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Base(runner, options) { - var failures = (this.failures = []); - - if (!runner) { - throw new TypeError('Missing runner argument'); - } - this.options = options || {}; - this.runner = runner; - this.stats = runner.stats; // assigned so Reporters keep a closer reference - - runner.on(EVENT_TEST_PASS, function(test) { - if (test.duration > test.slow()) { - test.speed = 'slow'; - } else if (test.duration > test.slow() / 2) { - test.speed = 'medium'; + function kMaxLength$1 () { + return Buffer$1.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff + } + + function createBuffer$1 (that, length) { + if (kMaxLength$1() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length); + that.__proto__ = Buffer$1.prototype; } else { - test.speed = 'fast'; + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer$1(length); + } + that.length = length; } - }); - runner.on(EVENT_TEST_FAIL, function(test, err) { - if (showDiff(err)) { - stringifyDiffObjs(err); + return that + } + + /** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + + function Buffer$1 (arg, encodingOrOffset, length) { + if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) { + return new Buffer$1(arg, encodingOrOffset, length) } - test.err = err; - failures.push(test); - }); -} -/** - * Outputs common epilogue used by many of the bundled reporters. - * - * @public - * @memberof Mocha.reporters.Base - */ -Base.prototype.epilogue = function() { - var stats = this.stats; - var fmt; + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe$1(this, arg) + } + return from$1(this, arg, encodingOrOffset, length) + } + + Buffer$1.poolSize = 8192; // not used by this implementation - Base.consoleLog(); + // TODO: Legacy, not needed anymore. Remove in next major version. + Buffer$1._augment = function (arr) { + arr.__proto__ = Buffer$1.prototype; + return arr + }; - // passes - fmt = - color('bright pass', ' ') + - color('green', ' %d passing') + - color('light', ' (%s)'); + function from$1 (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } - Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration)); + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer$1(that, value, encodingOrOffset, length) + } - // pending - if (stats.pending) { - fmt = color('pending', ' ') + color('pending', ' %d pending'); + if (typeof value === 'string') { + return fromString$1(that, value, encodingOrOffset) + } - Base.consoleLog(fmt, stats.pending); + return fromObject$1(that, value) } - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); + /** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ + Buffer$1.from = function (value, encodingOrOffset, length) { + return from$1(null, value, encodingOrOffset, length) + }; - Base.consoleLog(fmt, stats.failures); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + Buffer$1.prototype.__proto__ = Uint8Array.prototype; + Buffer$1.__proto__ = Uint8Array; + } - Base.list(this.failures); - Base.consoleLog(); + function assertSize$1 (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } } - Base.consoleLog(); -}; - -/** - * Pads the given `str` to `len`. - * - * @private - * @param {string} str - * @param {string} len - * @return {string} - */ -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - -/** - * Returns inline diff between 2 strings with coloured ANSI output. - * - * @private - * @param {String} actual - * @param {String} expected - * @return {string} Diff - */ -function inlineDiff(actual, expected) { - var msg = errorDiff(actual, expected); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines - .map(function(str, i) { - return pad(++i, width) + ' |' + ' ' + str; - }) - .join('\n'); + function alloc$1 (that, size, fill, encoding) { + assertSize$1(size); + if (size <= 0) { + return createBuffer$1(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer$1(that, size).fill(fill, encoding) + : createBuffer$1(that, size).fill(fill) + } + return createBuffer$1(that, size) } - // legend - msg = - '\n' + - color('diff removed', 'actual') + - ' ' + - color('diff added', 'expected') + - '\n\n' + - msg + - '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - return msg; -} - -/** - * Returns unified diff between two strings with coloured ANSI output. - * - * @private - * @param {String} actual - * @param {String} expected - * @return {string} The diff. - */ -function unifiedDiff(actual, expected) { - var indent = ' '; - function cleanUp(line) { - if (line[0] === '+') { - return indent + colorLines('diff added', line); - } - if (line[0] === '-') { - return indent + colorLines('diff removed', line); - } - if (line.match(/@@/)) { - return '--'; - } - if (line.match(/\\ No newline/)) { - return null; + /** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ + Buffer$1.alloc = function (size, fill, encoding) { + return alloc$1(null, size, fill, encoding) + }; + + function allocUnsafe$1 (that, size) { + assertSize$1(size); + that = createBuffer$1(that, size < 0 ? 0 : checked$1(size) | 0); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } } - return indent + line; - } - function notBlank(line) { - return typeof line !== 'undefined' && line !== null; - } - var msg = diff.createPatch('string', actual, expected); - var lines = msg.split('\n').splice(5); - return ( - '\n ' + - colorLines('diff added', '+ expected') + - ' ' + - colorLines('diff removed', '- actual') + - '\n\n' + - lines - .map(cleanUp) - .filter(notBlank) - .join('\n') - ); -} - -/** - * Returns character diff for `err`. - * - * @private - * @param {String} actual - * @param {String} expected - * @return {string} the diff - */ -function errorDiff(actual, expected) { - return diff - .diffWordsWithSpace(actual, expected) - .map(function(str) { - if (str.added) { - return colorLines('diff added', str.value); - } - if (str.removed) { - return colorLines('diff removed', str.value); - } - return str.value; - }) - .join(''); -} - -/** - * Colors lines for `str`, using the color `name`. - * - * @private - * @param {string} name - * @param {string} str - * @return {string} - */ -function colorLines(name, str) { - return str - .split('\n') - .map(function(str) { - return color(name, str); - }) - .join('\n'); -} - -/** - * Object#toString reference. - */ -var objToString = Object.prototype.toString; - -/** - * Checks that a / b have the same type. - * - * @private - * @param {Object} a - * @param {Object} b - * @return {boolean} - */ -function sameType(a, b) { - return objToString.call(a) === objToString.call(b); -} - -Base.consoleLog = consoleLog; - -Base.abstract = true; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"_process":69,"diff":48,"ms":60,"supports-color":42,"tty":4}],18:[function(require,module,exports){ -'use strict'; -/** - * @module Doc - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; -var EVENT_SUITE_END = constants.EVENT_SUITE_END; - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Constructs a new `Doc` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Doc(runner, options) { - Base.call(this, runner, options); - - var indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on(EVENT_SUITE_BEGIN, function(suite) { - if (suite.root) { - return; + return that + } + + /** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ + Buffer$1.allocUnsafe = function (size) { + return allocUnsafe$1(null, size) + }; + /** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ + Buffer$1.allocUnsafeSlow = function (size) { + return allocUnsafe$1(null, size) + }; + + function fromString$1 (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; } - ++indents; - Base.consoleLog('%s
    ', indent()); - ++indents; - Base.consoleLog('%s

    %s

    ', indent(), utils.escape(suite.title)); - Base.consoleLog('%s
    ', indent()); - }); - runner.on(EVENT_SUITE_END, function(suite) { - if (suite.root) { - return; + if (!Buffer$1.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') } - Base.consoleLog('%s
    ', indent()); - --indents; - Base.consoleLog('%s
    ', indent()); - --indents; - }); - runner.on(EVENT_TEST_PASS, function(test) { - Base.consoleLog('%s
    %s
    ', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.body)); - Base.consoleLog('%s
    %s
    ', indent(), code); - }); + var length = byteLength$1(string, encoding) | 0; + that = createBuffer$1(that, length); - runner.on(EVENT_TEST_FAIL, function(test, err) { - Base.consoleLog( - '%s
    %s
    ', - indent(), - utils.escape(test.title) - ); - var code = utils.escape(utils.clean(test.body)); - Base.consoleLog( - '%s
    %s
    ', - indent(), - code - ); - Base.consoleLog( - '%s
    %s
    ', - indent(), - utils.escape(err) - ); - }); -} - -Doc.description = 'HTML documentation'; - -},{"../runner":34,"../utils":38,"./base":17}],19:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module Dot - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var EVENT_RUN_END = constants.EVENT_RUN_END; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Constructs a new `Dot` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Dot(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.75) | 0; - var n = -1; - - runner.on(EVENT_RUN_BEGIN, function() { - process.stdout.write('\n'); - }); + var actual = that.write(string, encoding); - runner.on(EVENT_TEST_PENDING, function() { - if (++n % width === 0) { - process.stdout.write('\n '); + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual); } - process.stdout.write(Base.color('pending', Base.symbols.comma)); - }); - runner.on(EVENT_TEST_PASS, function(test) { - if (++n % width === 0) { - process.stdout.write('\n '); + return that + } + + function fromArrayLike$1 (that, array) { + var length = array.length < 0 ? 0 : checked$1(array.length) | 0; + that = createBuffer$1(that, length); + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; } - if (test.speed === 'slow') { - process.stdout.write(Base.color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(Base.color(test.speed, Base.symbols.dot)); + return that + } + + function fromArrayBuffer$1 (that, array, byteOffset, length) { + array.byteLength; // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') } - }); - runner.on(EVENT_TEST_FAIL, function() { - if (++n % width === 0) { - process.stdout.write('\n '); + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') } - process.stdout.write(Base.color('fail', Base.symbols.bang)); - }); - runner.once(EVENT_RUN_END, function() { - process.stdout.write('\n'); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Dot, Base); - -Dot.description = 'dot matrix representation'; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"./base":17,"_process":69}],20:[function(require,module,exports){ -(function (global){ -'use strict'; - -/* eslint-env browser */ -/** - * @module HTML - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); -var Progress = require('../browser/progress'); -var escapeRe = require('escape-string-regexp'); -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; -var EVENT_SUITE_END = constants.EVENT_SUITE_END; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date; - -/** - * Expose `HTML`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = - ''; - -var playIcon = '‣'; - -/** - * Constructs a new `HTML` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function HTML(runner, options) { - Base.call(this, runner, options); - - var self = this; - var stats = this.stats; - var stat = fragment(statsTemplate); - var items = stat.getElementsByTagName('li'); - var passes = items[1].getElementsByTagName('em')[0]; - var passesLink = items[1].getElementsByTagName('a')[0]; - var failures = items[2].getElementsByTagName('em')[0]; - var failuresLink = items[2].getElementsByTagName('a')[0]; - var duration = items[3].getElementsByTagName('em')[0]; - var canvas = stat.getElementsByTagName('canvas')[0]; - var report = fragment('
      '); - var stack = [report]; - var progress; - var ctx; - var root = document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress(); - } - - if (!root) { - return error('#mocha div missing, add it to your document'); - } - - // pass toggle - on(passesLink, 'click', function(evt) { - evt.preventDefault(); - unhide(); - var name = /pass/.test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) { - hideSuitesWithout('test pass'); + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); } - }); - // failure toggle - on(failuresLink, 'click', function(evt) { - evt.preventDefault(); - unhide(); - var name = /fail/.test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) { - hideSuitesWithout('test fail'); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array; + that.__proto__ = Buffer$1.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike$1(that, array); } - }); + return that + } - root.appendChild(stat); - root.appendChild(report); + function fromObject$1 (that, obj) { + if (internalIsBuffer$1(obj)) { + var len = checked$1(obj.length) | 0; + that = createBuffer$1(that, len); - if (progress) { - progress.size(40); - } + if (that.length === 0) { + return that + } - runner.on(EVENT_SUITE_BEGIN, function(suite) { - if (suite.root) { - return; + obj.copy(that, 0, 0, len); + return that } - // suite - var url = self.suiteURL(suite); - var el = fragment( - '
    • %s

    • ', - url, - escape(suite.title) - ); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan$1(obj.length)) { + return createBuffer$1(that, 0) + } + return fromArrayLike$1(that, obj) + } - runner.on(EVENT_SUITE_END, function(suite) { - if (suite.root) { - updateStats(); - return; + if (obj.type === 'Buffer' && isArray$2(obj.data)) { + return fromArrayLike$1(that, obj.data) + } } - stack.shift(); - }); - runner.on(EVENT_TEST_PASS, function(test) { - var url = self.testURL(test); - var markup = - '
    • %e%ems ' + - '' + - playIcon + - '

    • '; - var el = fragment(markup, test.speed, test.title, test.duration, url); - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') + } - runner.on(EVENT_TEST_FAIL, function(test) { - var el = fragment( - '
    • %e ' + - playIcon + - '

    • ', - test.title, - self.testURL(test) - ); - var stackString; // Note: Includes leading newline - var message = test.err.toString(); + function checked$1 (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength$1()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength$1().toString(16) + ' bytes') + } + return length | 0 + } + Buffer$1.isBuffer = isBuffer$2; + function internalIsBuffer$1 (b) { + return !!(b != null && b._isBuffer) + } - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if (message === '[object Error]') { - message = test.err.message; + Buffer$1.compare = function compare (a, b) { + if (!internalIsBuffer$1(a) || !internalIsBuffer$1(b)) { + throw new TypeError('Arguments must be Buffers') } - if (test.err.stack) { - var indexOfMessage = test.err.stack.indexOf(test.err.message); - if (indexOfMessage === -1) { - stackString = test.err.stack; - } else { - stackString = test.err.stack.substr( - test.err.message.length + indexOfMessage - ); + if (a === b) return 0 + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break } - } else if (test.err.sourceURL && test.err.line !== undefined) { - // Safari doesn't give you a stack. Let's at least provide a source line. - stackString = '\n(' + test.err.sourceURL + ':' + test.err.line + ')'; } - stackString = stackString || ''; + if (x < y) return -1 + if (y < x) return 1 + return 0 + }; - if (test.err.htmlMessage && stackString) { - el.appendChild( - fragment( - '
      %s\n
      %e
      ', - test.err.htmlMessage, - stackString - ) - ); - } else if (test.err.htmlMessage) { - el.appendChild( - fragment('
      %s
      ', test.err.htmlMessage) - ); - } else { - el.appendChild( - fragment('
      %e%e
      ', message, stackString) - ); + Buffer$1.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false } + }; - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); + Buffer$1.concat = function concat (list, length) { + if (!isArray$2(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } - runner.on(EVENT_TEST_PENDING, function(test) { - var el = fragment( - '
    • %e

    • ', - test.title - ); - appendToStack(el); - updateStats(); - }); + if (list.length === 0) { + return Buffer$1.alloc(0) + } - function appendToStack(el) { - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) { - stack[0].appendChild(el); + var i; + if (length === undefined) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } } - } - function updateStats() { - // TODO: add to stats - var percent = ((stats.tests / runner.total) * 100) | 0; - if (progress) { - progress.update(percent).draw(ctx); + var buffer = Buffer$1.allocUnsafe(length); + var pos = 0; + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + if (!internalIsBuffer$1(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos); + pos += buf.length; } + return buffer + }; - // update stats - var ms = new Date() - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); + function byteLength$1 (string, encoding) { + if (internalIsBuffer$1(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes$1(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes$1(string).length + default: + if (loweredCase) return utf8ToBytes$1(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } } -} + Buffer$1.byteLength = byteLength$1; -/** - * Makes a URL, preserving querystring ("search") parameters. - * - * @param {string} s - * @return {string} A new URL. - */ -function makeUrl(s) { - var search = window.location.search; + function slowToString$1 (encoding, start, end) { + var loweredCase = false; - // Remove previous grep query parameter if present - if (search) { - search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?'); - } + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. - return ( - window.location.pathname + - (search ? search + '&' : '?') + - 'grep=' + - encodeURIComponent(escapeRe(s)) - ); -} - -/** - * Provide suite URL. - * - * @param {Object} [suite] - */ -HTML.prototype.suiteURL = function(suite) { - return makeUrl(suite.fullTitle()); -}; - -/** - * Provide test URL. - * - * @param {Object} [test] - */ -HTML.prototype.testURL = function(test) { - return makeUrl(test.fullTitle()); -}; - -/** - * Adds code toggle functionality for the provided test's list element. - * - * @param {HTMLLIElement} el - * @param {string} contents - */ -HTML.prototype.addCodeToggle = function(el, contents) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function() { - pre.style.display = pre.style.display === 'none' ? 'block' : 'none'; - }); + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0; + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } - var pre = fragment('
      %e
      ', utils.clean(contents)); - el.appendChild(pre); - pre.style.display = 'none'; -}; - -/** - * Display error `msg`. - * - * @param {string} msg - */ -function error(msg) { - document.body.appendChild(fragment('
      %s
      ', msg)); -} - -/** - * Return a DOM fragment from `html`. - * - * @param {string} html - */ -function fragment(html) { - var args = arguments; - var div = document.createElement('div'); - var i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type) { - switch (type) { - case 's': - return String(args[i++]); - case 'e': - return escape(args[i++]); - // no default + if (end === undefined || end > this.length) { + end = this.length; } - }); - return div.firstChild; -} - -/** - * Check for suites that do not have elements - * with `classname`, and hide them. - * - * @param {text} classname - */ -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (!els.length) { - suites[i].className += ' hidden'; - } - } -} - -/** - * Unhide .hidden suites. - */ -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} - -/** - * Set an element's text contents. - * - * @param {HTMLElement} el - * @param {string} contents - */ -function text(el, contents) { - if (el.textContent) { - el.textContent = contents; - } else { - el.innerText = contents; - } -} + if (end <= 0) { + return '' + } -/** - * Listen on `event` with callback `fn`. - */ -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -HTML.browserOnly = true; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../browser/progress":3,"../runner":34,"../utils":38,"./base":17,"escape-string-regexp":49}],21:[function(require,module,exports){ -'use strict'; - -// Alias exports to a their normalized format Mocha#reporter to prevent a need -// for dynamic (try/catch) requires, which Browserify doesn't handle. -exports.Base = exports.base = require('./base'); -exports.Dot = exports.dot = require('./dot'); -exports.Doc = exports.doc = require('./doc'); -exports.TAP = exports.tap = require('./tap'); -exports.JSON = exports.json = require('./json'); -exports.HTML = exports.html = require('./html'); -exports.List = exports.list = require('./list'); -exports.Min = exports.min = require('./min'); -exports.Spec = exports.spec = require('./spec'); -exports.Nyan = exports.nyan = require('./nyan'); -exports.XUnit = exports.xunit = require('./xunit'); -exports.Markdown = exports.markdown = require('./markdown'); -exports.Progress = exports.progress = require('./progress'); -exports.Landing = exports.landing = require('./landing'); -exports.JSONStream = exports['json-stream'] = require('./json-stream'); - -},{"./base":17,"./doc":18,"./dot":19,"./html":20,"./json":23,"./json-stream":22,"./landing":24,"./list":25,"./markdown":26,"./min":27,"./nyan":28,"./progress":29,"./spec":30,"./tap":31,"./xunit":32}],22:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module JSONStream - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_RUN_END = constants.EVENT_RUN_END; - -/** - * Expose `JSONStream`. - */ - -exports = module.exports = JSONStream; - -/** - * Constructs a new `JSONStream` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function JSONStream(runner, options) { - Base.call(this, runner, options); - - var self = this; - var total = runner.total; - - runner.once(EVENT_RUN_BEGIN, function() { - writeEvent(['start', {total: total}]); - }); + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0; + start >>>= 0; - runner.on(EVENT_TEST_PASS, function(test) { - writeEvent(['pass', clean(test)]); - }); + if (end <= start) { + return '' + } - runner.on(EVENT_TEST_FAIL, function(test, err) { - test = clean(test); - test.err = err.message; - test.stack = err.stack || null; - writeEvent(['fail', test]); - }); + if (!encoding) encoding = 'utf8'; - runner.once(EVENT_RUN_END, function() { - writeEvent(['end', self.stats]); - }); -} - -/** - * Mocha event to be written to the output stream. - * @typedef {Array} JSONStream~MochaEvent - */ - -/** - * Writes Mocha event to reporter output stream. - * - * @private - * @param {JSONStream~MochaEvent} event - Mocha event to be output. - */ -function writeEvent(event) { - process.stdout.write(JSON.stringify(event) + '\n'); -} - -/** - * Returns an object literal representation of `test` - * free of cyclic properties, etc. - * - * @private - * @param {Test} test - Instance used as data source. - * @return {Object} object containing pared-down test instance data - */ -function clean(test) { - return { - title: test.title, - fullTitle: test.fullTitle(), - duration: test.duration, - currentRetry: test.currentRetry() - }; -} - -JSONStream.description = 'newline delimited JSON events'; - -}).call(this,require('_process')) -},{"../runner":34,"./base":17,"_process":69}],23:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module JSON - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_TEST_END = constants.EVENT_TEST_END; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Constructs a new `JSON` reporter instance. - * - * @public - * @class JSON - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function JSONReporter(runner, options) { - Base.call(this, runner, options); - - var self = this; - var tests = []; - var pending = []; - var failures = []; - var passes = []; - - runner.on(EVENT_TEST_END, function(test) { - tests.push(test); - }); + while (true) { + switch (encoding) { + case 'hex': + return hexSlice$1(this, start, end) - runner.on(EVENT_TEST_PASS, function(test) { - passes.push(test); - }); + case 'utf8': + case 'utf-8': + return utf8Slice$1(this, start, end) - runner.on(EVENT_TEST_FAIL, function(test) { - failures.push(test); - }); + case 'ascii': + return asciiSlice$1(this, start, end) - runner.on(EVENT_TEST_PENDING, function(test) { - pending.push(test); - }); + case 'latin1': + case 'binary': + return latin1Slice$1(this, start, end) - runner.once(EVENT_RUN_END, function() { - var obj = { - stats: self.stats, - tests: tests.map(clean), - pending: pending.map(clean), - failures: failures.map(clean), - passes: passes.map(clean) - }; + case 'base64': + return base64Slice$1(this, start, end) - runner.testResults = obj; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice$1(this, start, end) - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @private - * @param {Object} test - * @return {Object} - */ -function clean(test) { - var err = test.err || {}; - if (err instanceof Error) { - err = errorJSON(err); - } - - return { - title: test.title, - fullTitle: test.fullTitle(), - duration: test.duration, - currentRetry: test.currentRetry(), - err: cleanCycles(err) - }; -} - -/** - * Replaces any circular references inside `obj` with '[object Object]' - * - * @private - * @param {Object} obj - * @return {Object} - */ -function cleanCycles(obj) { - var cache = []; - return JSON.parse( - JSON.stringify(obj, function(key, value) { - if (typeof value === 'object' && value !== null) { - if (cache.indexOf(value) !== -1) { - // Instead of going in a circle, we'll print [object Object] - return '' + value; - } - cache.push(value); + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase(); + loweredCase = true; } + } + } - return value; - }) - ); -} - -/** - * Transform an Error object into a JSON object. - * - * @private - * @param {Error} err - * @return {Object} - */ -function errorJSON(err) { - var res = {}; - Object.getOwnPropertyNames(err).forEach(function(key) { - res[key] = err[key]; - }, err); - return res; -} - -JSONReporter.description = 'single JSON object'; - -}).call(this,require('_process')) -},{"../runner":34,"./base":17,"_process":69}],24:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module Landing - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var constants = require('../runner').constants; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_END = constants.EVENT_TEST_END; -var STATE_FAILED = require('../runnable').constants.STATE_FAILED; - -var cursor = Base.cursor; -var color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Constructs a new `Landing` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Landing(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.75) | 0; - var total = runner.total; - var stream = process.stdout; - var plane = color('plane', '✈'); - var crashed = -1; - var n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on(EVENT_RUN_BEGIN, function() { - stream.write('\n\n\n '); - cursor.hide(); - }); + // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect + // Buffer instances. + Buffer$1.prototype._isBuffer = true; - runner.on(EVENT_TEST_END, function(test) { - // check if the plane crashed - var col = crashed === -1 ? ((width * ++n) / total) | 0 : crashed; + function swap$1 (b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; + } - // show the crash - if (test.state === STATE_FAILED) { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b[' + (width + 1) + 'D\u001b[2A'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane); - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); + Buffer$1.prototype.swap16 = function swap16 () { + var len = this.length; + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap$1(this, i, i + 1); + } + return this + }; - runner.once(EVENT_RUN_END, function() { - cursor.show(); - process.stdout.write('\n'); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Landing, Base); - -Landing.description = 'Unicode landing strip'; - -}).call(this,require('_process')) -},{"../runnable":33,"../runner":34,"../utils":38,"./base":17,"_process":69}],25:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module List - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var constants = require('../runner').constants; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var color = Base.color; -var cursor = Base.cursor; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Constructs a new `List` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function List(runner, options) { - Base.call(this, runner, options); - - var self = this; - var n = 0; - - runner.on(EVENT_RUN_BEGIN, function() { - Base.consoleLog(); - }); + Buffer$1.prototype.swap32 = function swap32 () { + var len = this.length; + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap$1(this, i, i + 3); + swap$1(this, i + 1, i + 2); + } + return this + }; - runner.on(EVENT_TEST_BEGIN, function(test) { - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); + Buffer$1.prototype.swap64 = function swap64 () { + var len = this.length; + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap$1(this, i, i + 7); + swap$1(this, i + 1, i + 6); + swap$1(this, i + 2, i + 5); + swap$1(this, i + 3, i + 4); + } + return this + }; - runner.on(EVENT_TEST_PENDING, function(test) { - var fmt = color('checkmark', ' -') + color('pending', ' %s'); - Base.consoleLog(fmt, test.fullTitle()); - }); + Buffer$1.prototype.toString = function toString () { + var length = this.length | 0; + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice$1(this, 0, length) + return slowToString$1.apply(this, arguments) + }; - runner.on(EVENT_TEST_PASS, function(test) { - var fmt = - color('checkmark', ' ' + Base.symbols.ok) + - color('pass', ' %s: ') + - color(test.speed, '%dms'); - cursor.CR(); - Base.consoleLog(fmt, test.fullTitle(), test.duration); - }); + Buffer$1.prototype.equals = function equals (b) { + if (!internalIsBuffer$1(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer$1.compare(this, b) === 0 + }; - runner.on(EVENT_TEST_FAIL, function(test) { - cursor.CR(); - Base.consoleLog(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); + Buffer$1.prototype.inspect = function inspect () { + var str = ''; + var max = INSPECT_MAX_BYTES$1; + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + return '' + }; - runner.once(EVENT_RUN_END, self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(List, Base); - -List.description = 'like "spec" reporter but flat'; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"./base":17,"_process":69}],26:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module Markdown - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); -var constants = require('../runner').constants; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; -var EVENT_SUITE_END = constants.EVENT_SUITE_END; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - -/** - * Constants - */ - -var SUITE_PREFIX = '$'; - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Constructs a new `Markdown` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Markdown(runner, options) { - Base.call(this, runner, options); - - var level = 0; - var buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function mapTOC(suite, obj) { - var ret = obj; - var key = SUITE_PREFIX + suite.title; - - obj = obj[key] = obj[key] || {suite: suite}; - suite.suites.forEach(function(suite) { - mapTOC(suite, obj); - }); + Buffer$1.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!internalIsBuffer$1(target)) { + throw new TypeError('Argument must be a Buffer') + } - return ret; - } + if (start === undefined) { + start = 0; + } + if (end === undefined) { + end = target ? target.length : 0; + } + if (thisStart === undefined) { + thisStart = 0; + } + if (thisEnd === undefined) { + thisEnd = this.length; + } - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if (key === 'suite') { - continue; - } - if (key !== SUITE_PREFIX) { - link = ' - [' + key.substring(1) + ']'; - link += '(#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - buf += Array(level).join(' ') + link; - } - buf += stringifyTOC(obj[key], level); + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') } - return buf; - } - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } - generateTOC(runner.suite); + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; - runner.on(EVENT_SUITE_BEGIN, function(suite) { - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); + if (this === target) return 0 - runner.on(EVENT_SUITE_END, function() { - --level; - }); + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); - runner.on(EVENT_TEST_PASS, function(test) { - var code = utils.clean(test.body); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); - runner.once(EVENT_RUN_END, function() { - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} - -Markdown.description = 'GitHub Flavored Markdown'; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"./base":17,"_process":69}],27:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module Min - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var constants = require('../runner').constants; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Constructs a new `Min` reporter instance. - * - * @description - * This minimal test reporter is best used with '--watch'. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Min(runner, options) { - Base.call(this, runner, options); - - runner.on(EVENT_RUN_BEGIN, function() { - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break + } + } - runner.once(EVENT_RUN_END, this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Min, Base); - -Min.description = 'essentially just a summary'; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"./base":17,"_process":69}],28:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module Nyan - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var constants = require('../runner').constants; -var inherits = require('../utils').inherits; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Constructs a new `Nyan` reporter instance. - * - * @public - * @class Nyan - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function NyanCat(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.75) | 0; - var nyanCatWidth = (this.nyanCatWidth = 11); - - this.colorIndex = 0; - this.numberOfLines = 4; - this.rainbowColors = self.generateColors(); - this.scoreboardWidth = 5; - this.tick = 0; - this.trajectories = [[], [], [], []]; - this.trajectoryWidthMax = width - nyanCatWidth; - - runner.on(EVENT_RUN_BEGIN, function() { - Base.cursor.hide(); - self.draw(); - }); + if (x < y) return -1 + if (y < x) return 1 + return 0 + }; - runner.on(EVENT_TEST_PENDING, function() { - self.draw(); - }); + // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, + // OR the last index of `val` in `buffer` at offset <= `byteOffset`. + // + // Arguments: + // - buffer - a Buffer to search + // - val - a string, Buffer, or number + // - byteOffset - an index into `buffer`; will be clamped to an int32 + // - encoding - an optional encoding, relevant is val is a string + // - dir - true for indexOf, false for lastIndexOf + function bidirectionalIndexOf$1 (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + byteOffset = +byteOffset; // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1); + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0; + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer$1.from(val, encoding); + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (internalIsBuffer$1(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf$1(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF; // Search for a byte value [0-255] + if (Buffer$1.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf$1(buffer, [ val ], byteOffset, encoding, dir) + } - runner.on(EVENT_TEST_PASS, function() { - self.draw(); - }); + throw new TypeError('val must be string, number or Buffer') + } - runner.on(EVENT_TEST_FAIL, function() { - self.draw(); - }); + function arrayIndexOf$1 (arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; - runner.once(EVENT_RUN_END, function() { - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) { - write('\n'); + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } } - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(NyanCat, Base); - -/** - * Draw the nyan cat - * - * @private - */ - -NyanCat.prototype.draw = function() { - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; - -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @private - */ - -NyanCat.prototype.drawScoreboard = function() { - var stats = this.stats; - - function draw(type, n) { - write(' '); - write(Base.color(type, n)); - write('\n'); + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i; + if (dir) { + var foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + var found = true; + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break + } + } + if (found) return i + } + } + + return -1 } - draw('green', stats.passes); - draw('fail', stats.failures); - draw('pending', stats.pending); - write('\n'); + Buffer$1.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 + }; + + Buffer$1.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf$1(this, val, byteOffset, encoding, true) + }; - this.cursorUp(this.numberOfLines); -}; + Buffer$1.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf$1(this, val, byteOffset, encoding, false) + }; -/** - * Append the rainbow. - * - * @private - */ + function hexWrite$1 (buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } -NyanCat.prototype.appendRainbow = function() { - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); + // must be an even number of digits + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) { - trajectory.shift(); + if (length > strLen / 2) { + length = strLen / 2; + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i + buf[offset + i] = parsed; } - trajectory.push(rainbowified); + return i } -}; -/** - * Draw the rainbow. - * - * @private - */ - -NyanCat.prototype.drawRainbow = function() { - var self = this; + function utf8Write$1 (buf, string, offset, length) { + return blitBuffer$1(utf8ToBytes$1(string, buf.length - offset), buf, offset, length) + } - this.trajectories.forEach(function(line) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); + function asciiWrite$1 (buf, string, offset, length) { + return blitBuffer$1(asciiToBytes$1(string), buf, offset, length) + } - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw the nyan cat - * - * @private - */ -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var dist = '\u001b[' + startWidth + 'C'; - var padding = ''; - - write(dist); - write('_,------,'); - write('\n'); - - write(dist); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - - write(dist); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); - - write(dist); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw nyan cat face. - * - * @private - * @return {string} - */ - -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if (stats.passes) { - return '( ^ .^)'; - } - return '( - .-)'; -}; - -/** - * Move cursor up `n`. - * - * @private - * @param {number} n - */ - -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; - -/** - * Move cursor down `n`. - * - * @private - * @param {number} n - */ - -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; - -/** - * Generate rainbow colors. - * - * @private - * @return {Array} - */ -NyanCat.prototype.generateColors = function() { - var colors = []; - - for (var i = 0; i < 6 * 7; i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = i * (1.0 / 6); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } - - return colors; -}; - -/** - * Apply rainbow to the given `str`. - * - * @private - * @param {string} str - * @return {string} - */ -NyanCat.prototype.rainbowify = function(str) { - if (!Base.useColors) { - return str; + function latin1Write$1 (buf, string, offset, length) { + return asciiWrite$1(buf, string, offset, length) } - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; - -/** - * Stdout helper. - * - * @param {string} string A message to write to stdout. - */ -function write(string) { - process.stdout.write(string); -} - -NyanCat.description = '"nyan cat"'; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"./base":17,"_process":69}],29:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module Progress - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var constants = require('../runner').constants; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_TEST_END = constants.EVENT_TEST_END; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var inherits = require('../utils').inherits; -var color = Base.color; -var cursor = Base.cursor; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Constructs a new `Progress` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Progress(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.5) | 0; - var total = runner.total; - var complete = 0; - var lastN = -1; - - // default chars - options = options || {}; - var reporterOptions = options.reporterOptions || {}; - - options.open = reporterOptions.open || '['; - options.complete = reporterOptions.complete || '▬'; - options.incomplete = reporterOptions.incomplete || Base.symbols.dot; - options.close = reporterOptions.close || ']'; - options.verbose = reporterOptions.verbose || false; - - // tests started - runner.on(EVENT_RUN_BEGIN, function() { - process.stdout.write('\n'); - cursor.hide(); - }); - // tests complete - runner.on(EVENT_TEST_END, function() { - complete++; + function base64Write$1 (buf, string, offset, length) { + return blitBuffer$1(base64ToBytes$1(string), buf, offset, length) + } - var percent = complete / total; - var n = (width * percent) | 0; - var i = width - n; + function ucs2Write$1 (buf, string, offset, length) { + return blitBuffer$1(utf16leToBytes$1(string, buf.length - offset), buf, offset, length) + } - if (n === lastN && !options.verbose) { - // Don't re-render the line if it hasn't changed - return; + Buffer$1.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0; + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) } - lastN = n; - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') } - }); - // tests are complete, output some stats - // and the failures if any - runner.once(EVENT_RUN_END, function() { - cursor.show(); - process.stdout.write('\n'); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Progress, Base); - -Progress.description = 'a progress bar'; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"./base":17,"_process":69}],30:[function(require,module,exports){ -'use strict'; -/** - * @module Spec - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var constants = require('../runner').constants; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; -var EVENT_SUITE_END = constants.EVENT_SUITE_END; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var inherits = require('../utils').inherits; -var color = Base.color; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Constructs a new `Spec` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Spec(runner, options) { - Base.call(this, runner, options); - - var self = this; - var indents = 0; - var n = 0; - - function indent() { - return Array(indents).join(' '); - } - - runner.on(EVENT_RUN_BEGIN, function() { - Base.consoleLog(); - }); + if (!encoding) encoding = 'utf8'; - runner.on(EVENT_SUITE_BEGIN, function(suite) { - ++indents; - Base.consoleLog(color('suite', '%s%s'), indent(), suite.title); - }); + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite$1(this, string, offset, length) - runner.on(EVENT_SUITE_END, function() { - --indents; - if (indents === 1) { - Base.consoleLog(); - } - }); + case 'utf8': + case 'utf-8': + return utf8Write$1(this, string, offset, length) - runner.on(EVENT_TEST_PENDING, function(test) { - var fmt = indent() + color('pending', ' - %s'); - Base.consoleLog(fmt, test.title); - }); + case 'ascii': + return asciiWrite$1(this, string, offset, length) - runner.on(EVENT_TEST_PASS, function(test) { - var fmt; - if (test.speed === 'fast') { - fmt = - indent() + - color('checkmark', ' ' + Base.symbols.ok) + - color('pass', ' %s'); - Base.consoleLog(fmt, test.title); - } else { - fmt = - indent() + - color('checkmark', ' ' + Base.symbols.ok) + - color('pass', ' %s') + - color(test.speed, ' (%dms)'); - Base.consoleLog(fmt, test.title, test.duration); - } - }); + case 'latin1': + case 'binary': + return latin1Write$1(this, string, offset, length) - runner.on(EVENT_TEST_FAIL, function(test) { - Base.consoleLog(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write$1(this, string, offset, length) - runner.once(EVENT_RUN_END, self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Spec, Base); - -Spec.description = 'hierarchical & verbose [default]'; - -},{"../runner":34,"../utils":38,"./base":17}],31:[function(require,module,exports){ -(function (process){ -'use strict'; -/** - * @module TAP - */ -/** - * Module dependencies. - */ - -var util = require('util'); -var Base = require('./base'); -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var EVENT_TEST_END = constants.EVENT_TEST_END; -var inherits = require('../utils').inherits; -var sprintf = util.format; - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Constructs a new `TAP` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function TAP(runner, options) { - Base.call(this, runner, options); - - var self = this; - var n = 1; - - var tapVersion = '12'; - if (options && options.reporterOptions) { - if (options.reporterOptions.tapVersion) { - tapVersion = options.reporterOptions.tapVersion.toString(); - } - } - - this._producer = createProducer(tapVersion); - - runner.once(EVENT_RUN_BEGIN, function() { - var ntests = runner.grepTotal(runner.suite); - self._producer.writeVersion(); - self._producer.writePlan(ntests); - }); + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write$1(this, string, offset, length) - runner.on(EVENT_TEST_END, function() { - ++n; - }); + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } + }; - runner.on(EVENT_TEST_PENDING, function(test) { - self._producer.writePending(n, test); - }); + Buffer$1.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } + }; - runner.on(EVENT_TEST_PASS, function(test) { - self._producer.writePass(n, test); - }); + function base64Slice$1 (buf, start, end) { + if (start === 0 && end === buf.length) { + return fromByteArray$1(buf) + } else { + return fromByteArray$1(buf.slice(start, end)) + } + } - runner.on(EVENT_TEST_FAIL, function(test, err) { - self._producer.writeFail(n, test, err); - }); + function utf8Slice$1 (buf, start, end) { + end = Math.min(buf.length, end); + var res = []; - runner.once(EVENT_RUN_END, function() { - self._producer.writeEpilogue(runner.stats); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(TAP, Base); - -/** - * Returns a TAP-safe title of `test`. - * - * @private - * @param {Test} test - Test instance. - * @return {String} title with any hash character removed - */ -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} - -/** - * Writes newline-terminated formatted string to reporter output stream. - * - * @private - * @param {string} format - `printf`-like format string - * @param {...*} [varArgs] - Format string arguments - */ -function println(format, varArgs) { - var vargs = Array.from(arguments); - vargs[0] += '\n'; - process.stdout.write(sprintf.apply(null, vargs)); -} - -/** - * Returns a `tapVersion`-appropriate TAP producer instance, if possible. - * - * @private - * @param {string} tapVersion - Version of TAP specification to produce. - * @returns {TAPProducer} specification-appropriate instance - * @throws {Error} if specification version has no associated producer. - */ -function createProducer(tapVersion) { - var producers = { - '12': new TAP12Producer(), - '13': new TAP13Producer() - }; - var producer = producers[tapVersion]; - - if (!producer) { - throw new Error( - 'invalid or unsupported TAP version: ' + JSON.stringify(tapVersion) - ); - } + var i = start; + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1; - return producer; -} - -/** - * @summary - * Constructs a new TAPProducer. - * - * @description - * Only to be used as an abstract base class. - * - * @private - * @constructor - */ -function TAPProducer() {} - -/** - * Writes the TAP version to reporter output stream. - * - * @abstract - */ -TAPProducer.prototype.writeVersion = function() {}; - -/** - * Writes the plan to reporter output stream. - * - * @abstract - * @param {number} ntests - Number of tests that are planned to run. - */ -TAPProducer.prototype.writePlan = function(ntests) { - println('%d..%d', 1, ntests); -}; - -/** - * Writes that test passed to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that passed. - * @param {Test} test - Instance containing test information. - */ -TAPProducer.prototype.writePass = function(n, test) { - println('ok %d %s', n, title(test)); -}; - -/** - * Writes that test was skipped to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that was skipped. - * @param {Test} test - Instance containing test information. - */ -TAPProducer.prototype.writePending = function(n, test) { - println('ok %d %s # SKIP -', n, title(test)); -}; - -/** - * Writes that test failed to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that failed. - * @param {Test} test - Instance containing test information. - * @param {Error} err - Reason the test failed. - */ -TAPProducer.prototype.writeFail = function(n, test, err) { - println('not ok %d %s', n, title(test)); -}; - -/** - * Writes the summary epilogue to reporter output stream. - * - * @abstract - * @param {Object} stats - Object containing run statistics. - */ -TAPProducer.prototype.writeEpilogue = function(stats) { - // :TBD: Why is this not counting pending tests? - println('# tests ' + (stats.passes + stats.failures)); - println('# pass ' + stats.passes); - // :TBD: Why are we not showing pending results? - println('# fail ' + stats.failures); -}; - -/** - * @summary - * Constructs a new TAP12Producer. - * - * @description - * Produces output conforming to the TAP12 specification. - * - * @private - * @constructor - * @extends TAPProducer - * @see {@link https://testanything.org/tap-specification.html|Specification} - */ -function TAP12Producer() { - /** - * Writes that test failed to reporter output stream, with error formatting. - * @override - */ - this.writeFail = function(n, test, err) { - TAPProducer.prototype.writeFail.call(this, n, test, err); - if (err.message) { - println(err.message.replace(/^/gm, ' ')); - } - if (err.stack) { - println(err.stack.replace(/^/gm, ' ')); - } - }; -} - -/** - * Inherit from `TAPProducer.prototype`. - */ -inherits(TAP12Producer, TAPProducer); - -/** - * @summary - * Constructs a new TAP13Producer. - * - * @description - * Produces output conforming to the TAP13 specification. - * - * @private - * @constructor - * @extends TAPProducer - * @see {@link https://testanything.org/tap-version-13-specification.html|Specification} - */ -function TAP13Producer() { - /** - * Writes the TAP version to reporter output stream. - * @override - */ - this.writeVersion = function() { - println('TAP version 13'); - }; + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; - /** - * Writes that test failed to reporter output stream, with error formatting. - * @override - */ - this.writeFail = function(n, test, err) { - TAPProducer.prototype.writeFail.call(this, n, test, err); - var emitYamlBlock = err.message != null || err.stack != null; - if (emitYamlBlock) { - println(indent(1) + '---'); - if (err.message) { - println(indent(2) + 'message: |-'); - println(err.message.replace(/^/gm, indent(3))); + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + break + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint; + } + } + break + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint; + } + } + break + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + } } - if (err.stack) { - println(indent(2) + 'stack: |-'); - println(err.stack.replace(/^/gm, indent(3))); - } - println(indent(1) + '...'); - } - }; - - function indent(level) { - return Array(level + 1).join(' '); - } -} - -/** - * Inherit from `TAPProducer.prototype`. - */ -inherits(TAP13Producer, TAPProducer); - -TAP.description = 'TAP-compatible output'; - -}).call(this,require('_process')) -},{"../runner":34,"../utils":38,"./base":17,"_process":69,"util":89}],32:[function(require,module,exports){ -(function (process,global){ -'use strict'; -/** - * @module XUnit - */ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); -var fs = require('fs'); -var mkdirp = require('mkdirp'); -var path = require('path'); -var errors = require('../errors'); -var createUnsupportedError = errors.createUnsupportedError; -var constants = require('../runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var STATE_FAILED = require('../runnable').constants.STATE_FAILED; -var inherits = utils.inherits; -var escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ -var Date = global.Date; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Constructs a new `XUnit` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function XUnit(runner, options) { - Base.call(this, runner, options); - - var stats = this.stats; - var tests = []; - var self = this; - - // the name of the test suite, as it will appear in the resulting XML file - var suiteName; - - // the default name of the test suite if none is provided - var DEFAULT_SUITE_NAME = 'Mocha Tests'; - - if (options && options.reporterOptions) { - if (options.reporterOptions.output) { - if (!fs.createWriteStream) { - throw createUnsupportedError('file output not supported in browser'); + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD; + bytesPerSequence = 1; + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; } - mkdirp.sync(path.dirname(options.reporterOptions.output)); - self.fileStream = fs.createWriteStream(options.reporterOptions.output); + res.push(codePoint); + i += bytesPerSequence; } - // get the suite name from the reporter options (if provided) - suiteName = options.reporterOptions.suiteName; + return decodeCodePointsArray$1(res) } - // fall back to the default suite name - suiteName = suiteName || DEFAULT_SUITE_NAME; + // Based on http://stackoverflow.com/a/22747272/680742, the browser with + // the lowest limit is Chrome, with 0x10000 args. + // We go 1 magnitude less, for safety + var MAX_ARGUMENTS_LENGTH$1 = 0x1000; - runner.on(EVENT_TEST_PENDING, function(test) { - tests.push(test); - }); + function decodeCodePointsArray$1 (codePoints) { + var len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH$1) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } - runner.on(EVENT_TEST_PASS, function(test) { - tests.push(test); - }); + // Decode in chunks to avoid "call stack size exceeded". + var res = ''; + var i = 0; + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH$1) + ); + } + return res + } - runner.on(EVENT_TEST_FAIL, function(test) { - tests.push(test); - }); + function asciiSlice$1 (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); - runner.once(EVENT_RUN_END, function() { - self.write( - tag( - 'testsuite', - { - name: suiteName, - tests: stats.tests, - failures: 0, - errors: stats.failures, - skipped: stats.tests - stats.failures - stats.passes, - timestamp: new Date().toUTCString(), - time: stats.duration / 1000 || 0 - }, - false - ) - ); + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F); + } + return ret + } - tests.forEach(function(t) { - self.test(t); - }); + function latin1Slice$1 (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); - self.write(''); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(XUnit, Base); - -/** - * Override done to close the stream (if it's a file). - * - * @param failures - * @param {Function} fn - */ -XUnit.prototype.done = function(failures, fn) { - if (this.fileStream) { - this.fileStream.end(function() { - fn(failures); - }); - } else { - fn(failures); - } -}; - -/** - * Write out the given line. - * - * @param {string} line - */ -XUnit.prototype.write = function(line) { - if (this.fileStream) { - this.fileStream.write(line + '\n'); - } else if (typeof process === 'object' && process.stdout) { - process.stdout.write(line + '\n'); - } else { - Base.consoleLog(line); + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret } -}; -/** - * Output tag for the given `test.` - * - * @param {Test} test - */ -XUnit.prototype.test = function(test) { - Base.useColors = false; + function hexSlice$1 (buf, start, end) { + var len = buf.length; - var attrs = { - classname: test.parent.fullTitle(), - name: test.title, - time: test.duration / 1000 || 0 - }; + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; - if (test.state === STATE_FAILED) { - var err = test.err; - var diff = - Base.hideDiff || !err.actual || !err.expected - ? '' - : '\n' + Base.generateDiff(err.actual, err.expected); - this.write( - tag( - 'testcase', - attrs, - false, - tag( - 'failure', - {}, - false, - escape(err.message) + escape(diff) + '\n' + escape(err.stack) - ) - ) - ); - } else if (test.isPending()) { - this.write(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - this.write(tag('testcase', attrs, true)); - } -}; - -/** - * HTML tag helper. - * - * @param name - * @param attrs - * @param close - * @param content - * @return {string} - */ -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>'; - var pairs = []; - var tag; - - for (var key in attrs) { - if (Object.prototype.hasOwnProperty.call(attrs, key)) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) { - tag += content + '0, 2^31-1]. - * If clamped value matches either range endpoint, timeouts will be disabled. - * - * @private - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value} - * @param {number|string} ms - Timeout threshold value. - * @returns {Runnable} this - * @chainable - */ -Runnable.prototype.timeout = function(ms) { - if (!arguments.length) { - return this._timeout; - } - if (typeof ms === 'string') { - ms = milliseconds(ms); - } - - // Clamp to range - var INT_MAX = Math.pow(2, 31) - 1; - var range = [0, INT_MAX]; - ms = utils.clamp(ms, range); - - // see #1652 for reasoning - if (ms === range[0] || ms === range[1]) { - this._enableTimeouts = false; - } - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) { - this.resetTimeout(); - } - return this; -}; - -/** - * Set or get slow `ms`. - * - * @private - * @param {number|string} ms - * @return {Runnable|number} ms or Runnable instance. - */ -Runnable.prototype.slow = function(ms) { - if (!arguments.length || typeof ms === 'undefined') { - return this._slow; - } - if (typeof ms === 'string') { - ms = milliseconds(ms); - } - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Set and get whether timeout is `enabled`. - * - * @private - * @param {boolean} enabled - * @return {Runnable|boolean} enabled or Runnable instance. - */ -Runnable.prototype.enableTimeouts = function(enabled) { - if (!arguments.length) { - return this._enableTimeouts; - } - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Halt and mark as pending. - * - * @memberof Mocha.Runnable - * @public - */ -Runnable.prototype.skip = function() { - throw new Pending('sync skip'); -}; - -/** - * Check if this runnable or its parent suite is marked as pending. - * - * @private - */ -Runnable.prototype.isPending = function() { - return this.pending || (this.parent && this.parent.isPending()); -}; - -/** - * Return `true` if this Runnable has failed. - * @return {boolean} - * @private - */ -Runnable.prototype.isFailed = function() { - return !this.isPending() && this.state === constants.STATE_FAILED; -}; - -/** - * Return `true` if this Runnable has passed. - * @return {boolean} - * @private - */ -Runnable.prototype.isPassed = function() { - return !this.isPending() && this.state === constants.STATE_PASSED; -}; - -/** - * Set or get number of retries. - * - * @private - */ -Runnable.prototype.retries = function(n) { - if (!arguments.length) { - return this._retries; - } - this._retries = n; -}; - -/** - * Set or get current retry - * - * @private - */ -Runnable.prototype.currentRetry = function(n) { - if (!arguments.length) { - return this._currentRetry; - } - this._currentRetry = n; -}; - -/** - * Return the full title generated by recursively concatenating the parent's - * full title. - * - * @memberof Mocha.Runnable - * @public - * @return {string} - */ -Runnable.prototype.fullTitle = function() { - return this.titlePath().join(' '); -}; - -/** - * Return the title path generated by concatenating the parent's title path with the title. - * - * @memberof Mocha.Runnable - * @public - * @return {string} - */ -Runnable.prototype.titlePath = function() { - return this.parent.titlePath().concat([this.title]); -}; - -/** - * Clear the timeout. - * - * @private - */ -Runnable.prototype.clearTimeout = function() { - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @private - * @return {string} - */ -Runnable.prototype.inspect = function() { - return JSON.stringify( - this, - function(key, val) { - if (key[0] === '_') { - return; - } - if (key === 'parent') { - return '#'; - } - if (key === 'ctx') { - return '#'; - } - return val; - }, - 2 - ); -}; - -/** - * Reset the timeout. - * - * @private - */ -Runnable.prototype.resetTimeout = function() { - var self = this; - var ms = this.timeout() || 1e9; - - if (!this._enableTimeouts) { - return; - } - this.clearTimeout(); - this.timer = setTimeout(function() { - if (!self._enableTimeouts) { - return; - } - self.callback(self._timeoutError(ms)); - self.timedOut = true; - }, ms); -}; - -/** - * Set or get a list of whitelisted globals for this test run. - * - * @private - * @param {string[]} globals - */ -Runnable.prototype.globals = function(globals) { - if (!arguments.length) { - return this._allowedGlobals; - } - this._allowedGlobals = globals; -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @private - */ -Runnable.prototype.run = function(fn) { - var self = this; - var start = new Date(); - var ctx = this.ctx; - var finished; - var emitted; - - // Sometimes the ctx exists, but it is not runnable - if (ctx && ctx.runnable) { - ctx.runnable(this); - } - - // called multiple times - function multiple(err) { - if (emitted) { - return; + var out = ''; + for (var i = start; i < end; ++i) { + out += toHex$1(buf[i]); } - emitted = true; - var msg = 'done() called multiple times'; - if (err && err.message) { - err.message += " (and Mocha's " + msg + ')'; - self.emit('error', err); - } else { - self.emit('error', new Error(msg)); + return out + } + + function utf16leSlice$1 (buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); } + return res } - // finished - function done(err) { - var ms = self.timeout(); - if (self.timedOut) { - return; + Buffer$1.prototype.slice = function slice (start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; } - if (finished) { - return multiple(err); + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; } - self.clearTimeout(); - self.duration = new Date() - start; - finished = true; - if (!err && self.duration > ms && self._enableTimeouts) { - err = self._timeoutError(ms); + if (end < start) end = start; + + var newBuf; + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer$1.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer$1(sliceLen, undefined); + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } } - fn(err); - } - // for .resetTimeout() - this.callback = done; + return newBuf + }; - // explicit async with `done` argument - if (this.async) { - this.resetTimeout(); + /* + * Need to make sure that buffer isn't trying to write out of bounds. + */ + function checkOffset$1 (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') + } - // allows skip() to be used in an explicit async context - this.skip = function asyncSkip() { - done(new Pending('async skip call')); - // halt execution. the Runnable will be marked pending - // by the previous call, and the uncaught handler will ignore - // the failure. - throw new Pending('async skip; aborting execution'); - }; + Buffer$1.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset$1(offset, byteLength, this.length); - if (this.allowUncaught) { - return callFnAsync(this.fn); + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; } - try { - callFnAsync(this.fn); - } catch (err) { - emitted = true; - done(Runnable.toValueOrError(err)); + + return val + }; + + Buffer$1.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + checkOffset$1(offset, byteLength, this.length); } - return; - } - if (this.allowUncaught) { - if (this.isPending()) { - done(); - } else { - callFn(this.fn); + var val = this[offset + --byteLength]; + var mul = 1; + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; } - return; - } - // sync or promise-returning - try { - if (this.isPending()) { - done(); - } else { - callFn(this.fn); + return val + }; + + Buffer$1.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 1, this.length); + return this[offset] + }; + + Buffer$1.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 2, this.length); + return this[offset] | (this[offset + 1] << 8) + }; + + Buffer$1.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 2, this.length); + return (this[offset] << 8) | this[offset + 1] + }; + + Buffer$1.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 4, this.length); + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) + }; + + Buffer$1.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 4, this.length); + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) + }; + + Buffer$1.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset$1(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; } - } catch (err) { - emitted = true; - done(Runnable.toValueOrError(err)); - } - - function callFn(fn) { - var result = fn.call(ctx); - if (result && typeof result.then === 'function') { - self.resetTimeout(); - result.then( - function() { - done(); - // Return null so libraries like bluebird do not warn about - // subsequently constructed Promises. - return null; - }, - function(reason) { - done(reason || new Error('Promise rejected with no or falsy reason')); - } - ); - } else { - if (self.asyncOnly) { - return done( - new Error( - '--async-only option in use without declaring `done()` or returning a promise' - ) - ); - } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); - done(); + return val + }; + + Buffer$1.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset$1(offset, byteLength, this.length); + + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; } - } + mul *= 0x80; - function callFnAsync(fn) { - var result = fn.call(ctx, function(err) { - if (err instanceof Error || toString.call(err) === '[object Error]') { - return done(err); - } - if (err) { - if (Object.prototype.toString.call(err) === '[object Object]') { - return done( - new Error('done() invoked with non-Error: ' + JSON.stringify(err)) - ); - } - return done(new Error('done() invoked with non-Error: ' + err)); - } - if (result && utils.isPromise(result)) { - return done( - new Error( - 'Resolution method is overspecified. Specify a callback *or* return a Promise; not both.' - ) - ); - } + if (val >= mul) val -= Math.pow(2, 8 * byteLength); - done(); - }); - } -}; - -/** - * Instantiates a "timeout" error - * - * @param {number} ms - Timeout (in milliseconds) - * @returns {Error} a "timeout" error - * @private - */ -Runnable.prototype._timeoutError = function(ms) { - var msg = - 'Timeout of ' + - ms + - 'ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.'; - if (this.file) { - msg += ' (' + this.file + ')'; - } - return new Error(msg); -}; - -var constants = utils.defineConstants( - /** - * {@link Runnable}-related constants. - * @public - * @memberof Runnable - * @readonly - * @static - * @alias constants - * @enum {string} - */ - { - /** - * Value of `state` prop when a `Runnable` has failed - */ - STATE_FAILED: 'failed', - /** - * Value of `state` prop when a `Runnable` has passed - */ - STATE_PASSED: 'passed' - } -); - -/** - * Given `value`, return identity if truthy, otherwise create an "invalid exception" error and return that. - * @param {*} [value] - Value to return, if present - * @returns {*|Error} `value`, otherwise an `Error` - * @private - */ -Runnable.toValueOrError = function(value) { - return ( - value || - createInvalidExceptionError( - 'Runnable failed with falsy or undefined exception. Please throw an Error instead.', - value - ) - ); -}; - -Runnable.constants = constants; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./errors":6,"./pending":16,"./utils":38,"debug":45,"events":50,"ms":60}],34:[function(require,module,exports){ -(function (process,global){ -'use strict'; - -/** - * Module dependencies. - */ -var util = require('util'); -var EventEmitter = require('events').EventEmitter; -var Pending = require('./pending'); -var utils = require('./utils'); -var inherits = utils.inherits; -var debug = require('debug')('mocha:runner'); -var Runnable = require('./runnable'); -var Suite = require('./suite'); -var HOOK_TYPE_BEFORE_EACH = Suite.constants.HOOK_TYPE_BEFORE_EACH; -var HOOK_TYPE_AFTER_EACH = Suite.constants.HOOK_TYPE_AFTER_EACH; -var HOOK_TYPE_AFTER_ALL = Suite.constants.HOOK_TYPE_AFTER_ALL; -var HOOK_TYPE_BEFORE_ALL = Suite.constants.HOOK_TYPE_BEFORE_ALL; -var EVENT_ROOT_SUITE_RUN = Suite.constants.EVENT_ROOT_SUITE_RUN; -var STATE_FAILED = Runnable.constants.STATE_FAILED; -var STATE_PASSED = Runnable.constants.STATE_PASSED; -var dQuote = utils.dQuote; -var ngettext = utils.ngettext; -var sQuote = utils.sQuote; -var stackFilter = utils.stackTraceFilter(); -var stringify = utils.stringify; -var type = utils.type; -var createInvalidExceptionError = require('./errors') - .createInvalidExceptionError; - -/** - * Non-enumerable globals. - * @readonly - */ -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date', - 'setImmediate', - 'clearImmediate' -]; - -var constants = utils.defineConstants( - /** - * {@link Runner}-related constants. - * @public - * @memberof Runner - * @readonly - * @alias constants - * @static - * @enum {string} - */ - { - /** - * Emitted when {@link Hook} execution begins - */ - EVENT_HOOK_BEGIN: 'hook', - /** - * Emitted when {@link Hook} execution ends - */ - EVENT_HOOK_END: 'hook end', - /** - * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution) - */ - EVENT_RUN_BEGIN: 'start', - /** - * Emitted when Root {@link Suite} execution has been delayed via `delay` option - */ - EVENT_DELAY_BEGIN: 'waiting', - /** - * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()` - */ - EVENT_DELAY_END: 'ready', - /** - * Emitted when Root {@link Suite} execution ends - */ - EVENT_RUN_END: 'end', - /** - * Emitted when {@link Suite} execution begins - */ - EVENT_SUITE_BEGIN: 'suite', - /** - * Emitted when {@link Suite} execution ends - */ - EVENT_SUITE_END: 'suite end', - /** - * Emitted when {@link Test} execution begins - */ - EVENT_TEST_BEGIN: 'test', - /** - * Emitted when {@link Test} execution ends - */ - EVENT_TEST_END: 'test end', - /** - * Emitted when {@link Test} execution fails - */ - EVENT_TEST_FAIL: 'fail', - /** - * Emitted when {@link Test} execution succeeds - */ - EVENT_TEST_PASS: 'pass', - /** - * Emitted when {@link Test} becomes pending - */ - EVENT_TEST_PENDING: 'pending', - /** - * Emitted when {@link Test} execution has failed, but will retry - */ - EVENT_TEST_RETRY: 'retry' - } -); - -module.exports = Runner; - -/** - * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}. - * - * @extends external:EventEmitter - * @public - * @class - * @param {Suite} suite Root suite - * @param {boolean} [delay] Whether or not to delay execution of root suite - * until ready. - */ -function Runner(suite, delay) { - var self = this; - this._globals = []; - this._abort = false; - this._delay = delay; - this.suite = suite; - this.started = false; - this.total = suite.total(); - this.failures = 0; - this.on(constants.EVENT_TEST_END, function(test) { - self.checkGlobals(test); - }); - this.on(constants.EVENT_HOOK_END, function(hook) { - self.checkGlobals(hook); - }); - this._defaultGrep = /.*/; - this.grep(this._defaultGrep); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @private - */ -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ -inherits(Runner, EventEmitter); - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @public - * @memberof Runner - * @param {RegExp} re - * @param {boolean} invert - * @return {Runner} Runner instance. - */ -Runner.prototype.grep = function(re, invert) { - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @memberof Runner - * @public - * @param {Suite} suite - * @return {number} - */ -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test) { - var match = self._grep.test(test.fullTitle()); - if (self._invert) { - match = !match; - } - if (match) { - total++; - } - }); + return val + }; - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @private - */ -Runner.prototype.globalProps = function() { - var props = Object.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~props.indexOf(globals[i])) { - continue; - } - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @public - * @memberof Runner - * @param {Array} arr - * @return {Runner} Runner instance. - */ -Runner.prototype.globals = function(arr) { - if (!arguments.length) { - return this._globals; - } - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; - -/** - * Check for global variable leaks. - * - * @private - */ -Runner.prototype.checkGlobals = function(test) { - if (this.ignoreLeaks) { - return; - } - var ok = this._globals; - - var globals = this.globalProps(); - var leaks; - - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } - - if (this.prevGlobalsLength === globals.length) { - return; - } - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length) { - var format = ngettext( - leaks.length, - 'global leak detected: %s', - 'global leaks detected: %s' - ); - var error = new Error(util.format(format, leaks.map(sQuote).join(', '))); - this.fail(test, error); - } -}; - -/** - * Fail the given `test`. - * - * @private - * @param {Test} test - * @param {Error} err - */ -Runner.prototype.fail = function(test, err) { - if (test.isPending()) { - return; - } - - ++this.failures; - test.state = STATE_FAILED; - - if (!isError(err)) { - err = thrown2Error(err); - } - - try { - err.stack = - this.fullStackTrace || !err.stack ? err.stack : stackFilter(err.stack); - } catch (ignore) { - // some environments do not take kindly to monkeying with the stack - } - - this.emit(constants.EVENT_TEST_FAIL, test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, run corresponding `after each` and `after` hooks, - * then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @private - * @param {Hook} hook - * @param {Error} err - */ -Runner.prototype.failHook = function(hook, err) { - hook.originalTitle = hook.originalTitle || hook.title; - if (hook.ctx && hook.ctx.currentTest) { - hook.title = - hook.originalTitle + ' for ' + dQuote(hook.ctx.currentTest.title); - } else { - var parentTitle; - if (hook.parent.title) { - parentTitle = hook.parent.title; - } else { - parentTitle = hook.parent.root ? '{root}' : ''; - } - hook.title = hook.originalTitle + ' in ' + dQuote(parentTitle); - } + Buffer$1.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 1, this.length); + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) + }; - this.fail(hook, err); -}; + Buffer$1.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 2, this.length); + var val = this[offset] | (this[offset + 1] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val + }; -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @private - * @param {string} name - * @param {Function} fn - */ + Buffer$1.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 2, this.length); + var val = this[offset + 1] | (this[offset] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val + }; -Runner.prototype.hook = function(name, fn) { - var suite = this.suite; - var hooks = suite.getHooks(name); - var self = this; + Buffer$1.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 4, this.length); - function next(i) { - var hook = hooks[i]; - if (!hook) { - return fn(); + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) + }; + + Buffer$1.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 4, this.length); + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) + }; + + Buffer$1.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 4, this.length); + return read$1(this, offset, true, 23, 4) + }; + + Buffer$1.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 4, this.length); + return read$1(this, offset, false, 23, 4) + }; + + Buffer$1.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 8, this.length); + return read$1(this, offset, true, 52, 8) + }; + + Buffer$1.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset$1(offset, 8, this.length); + return read$1(this, offset, false, 52, 8) + }; + + function checkInt$1 (buf, value, offset, ext, max, min) { + if (!internalIsBuffer$1(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') + } + + Buffer$1.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt$1(this, value, offset, byteLength, maxBytes, 0); } - self.currentRunnable = hook; - if (name === HOOK_TYPE_BEFORE_ALL) { - hook.ctx.currentTest = hook.parent.tests[0]; - } else if (name === HOOK_TYPE_AFTER_ALL) { - hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1]; - } else { - hook.ctx.currentTest = self.test; + var mul = 1; + var i = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; } - hook.allowUncaught = self.allowUncaught; + return offset + byteLength + }; - self.emit(constants.EVENT_HOOK_BEGIN, hook); + Buffer$1.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt$1(this, value, offset, byteLength, maxBytes, 0); + } - if (!hook.listeners('error').length) { - hook.on('error', function(err) { - self.failHook(hook, err); - }); + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; } - hook.run(function(err) { - var testError = hook.error(); - if (testError) { - self.fail(self.test, testError); - } - if (err) { - if (err instanceof Pending) { - if (name === HOOK_TYPE_AFTER_ALL) { - utils.deprecate( - 'Skipping a test within an "after all" hook is DEPRECATED and will throw an exception in a future version of Mocha. ' + - 'Use a return statement or other means to abort hook execution.' - ); - } - if (name === HOOK_TYPE_BEFORE_EACH || name === HOOK_TYPE_AFTER_EACH) { - if (self.test) { - self.test.pending = true; - } - } else { - suite.tests.forEach(function(test) { - test.pending = true; - }); - suite.suites.forEach(function(suite) { - suite.pending = true; - }); - // a pending hook won't be executed twice. - hook.pending = true; - } - } else { - self.failHook(hook, err); + return offset + byteLength + }; - // stop executing hooks, notify callee of hook err - return fn(err); - } - } - self.emit(constants.EVENT_HOOK_END, hook); - delete hook.ctx.currentTest; - next(++i); - }); + Buffer$1.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 1, 0xff, 0); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = (value & 0xff); + return offset + 1 + }; + + function objectWriteUInt16$1 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8; + } } - Runner.immediately(function() { - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @private - * @param {string} name - * @param {Array} suites - * @param {Function} fn - */ -Runner.prototype.hooks = function(name, suites, fn) { - var self = this; - var orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); + Buffer$1.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 2, 0xffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16$1(this, value, offset, true); } + return offset + 2 + }; - self.hook(name, function(err) { - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } + Buffer$1.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 2, 0xffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16$1(this, value, offset, false); + } + return offset + 2 + }; - next(suites.pop()); - }); + function objectWriteUInt32$1 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; + } } - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @private - */ -Runner.prototype.hookUp = function(name, fn) { - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @private - */ -Runner.prototype.hookDown = function(name, fn) { - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @private - */ -Runner.prototype.parents = function() { - var suite = this.suite; - var suites = []; - while (suite.parent) { - suite = suite.parent; - suites.push(suite); - } - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @private - */ -Runner.prototype.runTest = function(fn) { - var self = this; - var test = this.test; - - if (!test) { - return; - } - - var suite = this.parents().reverse()[0] || this.suite; - if (this.forbidOnly && suite.hasOnly()) { - fn(new Error('`.only` forbidden')); - return; - } - if (this.asyncOnly) { - test.asyncOnly = true; - } - test.on('error', function(err) { - self.fail(test, err); - }); - if (this.allowUncaught) { - test.allowUncaught = true; - return test.run(fn); - } - try { - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke the callback `fn()` when complete. - * - * @private - * @param {Suite} suite - * @param {Function} fn - */ -Runner.prototype.runTests = function(suite, fn) { - var self = this; - var tests = suite.tests.slice(); - var test; - - function hookErr(_, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp(HOOK_TYPE_AFTER_EACH, function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) { - return hookErr(err2, errSuite2, true); - } - // report error suite - fn(errSuite); - }); + Buffer$1.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 4, 0xffffffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24); + this[offset + 2] = (value >>> 16); + this[offset + 1] = (value >>> 8); + this[offset] = (value & 0xff); } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); + objectWriteUInt32$1(this, value, offset, true); } - } + return offset + 4 + }; + + Buffer$1.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 4, 0xffffffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32$1(this, value, offset, false); + } + return offset + 4 + }; - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) { - tests = []; + Buffer$1.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt$1(this, value, offset, byteLength, limit - 1, -limit); } - if (self._abort) { - return fn(); + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; } - if (err) { - return hookErr(err, errSuite, true); + return offset + byteLength + }; + + Buffer$1.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt$1(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; } - // next test - test = tests.shift(); + return offset + byteLength + }; - // all done - if (!test) { - return fn(); + Buffer$1.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = (value & 0xff); + return offset + 1 + }; + + Buffer$1.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16$1(this, value, offset, true); } + return offset + 2 + }; - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) { - match = !match; + Buffer$1.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16$1(this, value, offset, false); } - if (!match) { - // Run immediately only if we have defined a grep. When we - // define a grep — It can cause maximum callstack error if - // the grep is doing a large recursive loop by neglecting - // all tests. The run immediately function also comes with - // a performance cost. So we don't want to run immediately - // if we run the whole test suite, because running the whole - // test suite don't do any immediate recursive loops. Thus, - // allowing a JS runtime to breathe. - if (self._grep !== self._defaultGrep) { - Runner.immediately(next); - } else { - next(); - } - return; + return offset + 2 + }; + + Buffer$1.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + this[offset + 2] = (value >>> 16); + this[offset + 3] = (value >>> 24); + } else { + objectWriteUInt32$1(this, value, offset, true); } + return offset + 4 + }; - if (test.isPending()) { - if (self.forbidPending) { - test.isPending = alwaysFalse; - self.fail(test, new Error('Pending test forbidden')); - delete test.isPending; - } else { - self.emit(constants.EVENT_TEST_PENDING, test); - } - self.emit(constants.EVENT_TEST_END, test); - return next(); + Buffer$1.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt$1(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32$1(this, value, offset, false); } + return offset + 4 + }; - // execute test and hook(s) - self.emit(constants.EVENT_TEST_BEGIN, (self.test = test)); - self.hookDown(HOOK_TYPE_BEFORE_EACH, function(err, errSuite) { - if (test.isPending()) { - if (self.forbidPending) { - test.isPending = alwaysFalse; - self.fail(test, new Error('Pending test forbidden')); - delete test.isPending; - } else { - self.emit(constants.EVENT_TEST_PENDING, test); - } - self.emit(constants.EVENT_TEST_END, test); - return next(); - } - if (err) { - return hookErr(err, errSuite, false); - } - self.currentRunnable = self.test; - self.runTest(function(err) { - test = self.test; - if (err) { - var retry = test.currentRetry(); - if (err instanceof Pending && self.forbidPending) { - self.fail(test, new Error('Pending test forbidden')); - } else if (err instanceof Pending) { - test.pending = true; - self.emit(constants.EVENT_TEST_PENDING, test); - } else if (retry < test.retries()) { - var clonedTest = test.clone(); - clonedTest.currentRetry(retry + 1); - tests.unshift(clonedTest); - - self.emit(constants.EVENT_TEST_RETRY, test, err); - - // Early return + hook trigger so that it doesn't - // increment the count wrong - return self.hookUp(HOOK_TYPE_AFTER_EACH, next); - } else { - self.fail(test, err); - } - self.emit(constants.EVENT_TEST_END, test); + function checkIEEE754$1 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') + } - if (err instanceof Pending) { - return next(); - } + function writeFloat$1 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754$1(buf, value, offset, 4); + } + write$1(buf, value, offset, littleEndian, 23, 4); + return offset + 4 + } - return self.hookUp(HOOK_TYPE_AFTER_EACH, next); - } + Buffer$1.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat$1(this, value, offset, true, noAssert) + }; - test.state = STATE_PASSED; - self.emit(constants.EVENT_TEST_PASS, test); - self.emit(constants.EVENT_TEST_END, test); - self.hookUp(HOOK_TYPE_AFTER_EACH, next); - }); - }); + Buffer$1.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat$1(this, value, offset, false, noAssert) + }; + + function writeDouble$1 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754$1(buf, value, offset, 8); + } + write$1(buf, value, offset, littleEndian, 52, 8); + return offset + 8 } - this.next = next; - this.hookErr = hookErr; - next(); -}; + Buffer$1.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble$1(this, value, offset, true, noAssert) + }; -function alwaysFalse() { - return false; -} + Buffer$1.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble$1(this, value, offset, false, noAssert) + }; -/** - * Run the given `suite` and invoke the callback `fn()` when complete. - * - * @private - * @param {Suite} suite - * @param {Function} fn - */ -Runner.prototype.runSuite = function(suite, fn) { - var i = 0; - var self = this; - var total = this.grepTotal(suite); - var afterAllHookCalled = false; + // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) + Buffer$1.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; - debug('run suite %s', suite.fullTitle()); + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 - if (!total || (self.failures && suite._bail)) { - return fn(); - } + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') - this.emit(constants.EVENT_SUITE_BEGIN, (this.suite = suite)); + // Are we oob? + if (end > this.length) end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite === suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; } - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ); } - if (self._abort) { - return done(); + return len + }; + + // Usage: + // buffer.fill(number[, offset[, end]]) + // buffer.fill(buffer[, offset[, end]]) + // buffer.fill(string[, offset[, end]][, encoding]) + Buffer$1.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if (code < 256) { + val = code; + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255; } - var curr = suite.suites[i++]; - if (!curr) { - return done(); + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') } - // Avoid grep neglecting large number of tests causing a - // huge recursive loop and thus a maximum call stack error. - // See comment in `this.runTests()` for more information. - if (self._grep !== self._defaultGrep) { - Runner.immediately(function() { - self.runSuite(curr, next); - }); - } else { - self.runSuite(curr, next); + if (end <= start) { + return this } - } - function done(errSuite) { - self.suite = suite; - self.nextSuite = next; + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + + if (!val) val = 0; - if (afterAllHookCalled) { - fn(errSuite); + var i; + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } } else { - // mark that the afterAll block has been called once - // and so can be skipped if there is an error in it. - afterAllHookCalled = true; + var bytes = internalIsBuffer$1(val) + ? val + : utf8ToBytes$1(new Buffer$1(val, encoding).toString()); + var len = bytes.length; + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } - // remove reference to test - delete self.test; + return this + }; - self.hook(HOOK_TYPE_AFTER_ALL, function() { - self.emit(constants.EVENT_SUITE_END, suite); - fn(errSuite); - }); - } - } + // HELPER FUNCTIONS + // ================ - this.nextSuite = next; + var INVALID_BASE64_RE$1 = /[^+\/0-9A-Za-z-_]/g; - this.hook(HOOK_TYPE_BEFORE_ALL, function(err) { - if (err) { - return done(); + function base64clean$1 (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim$1(str).replace(INVALID_BASE64_RE$1, ''); + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '='; } - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @private - */ -Runner.prototype.uncaught = function(err) { - if (err instanceof Pending) { - return; - } - if (err) { - debug('uncaught exception %O', err); - } else { - debug('uncaught undefined/falsy exception'); - err = createInvalidExceptionError( - 'Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger', - err - ); + return str } - if (!isError(err)) { - err = thrown2Error(err); + function stringtrim$1 (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') } - err.uncaught = true; - var runnable = this.currentRunnable; + function toHex$1 (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) + } - if (!runnable) { - runnable = new Runnable('Uncaught error outside test suite'); - runnable.parent = this.suite; + function utf8ToBytes$1 (string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; - if (this.started) { - this.fail(runnable, err); - } else { - // Can't recover from this failure - this.emit(constants.EVENT_RUN_BEGIN); - this.fail(runnable, err); - this.emit(constants.EVENT_RUN_END); - } + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); - return; - } + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } - runnable.clearTimeout(); + // valid lead + leadSurrogate = codePoint; - // Ignore errors if already failed or pending - // See #3226 - if (runnable.isFailed() || runnable.isPending()) { - return; - } - // we cannot recover gracefully if a Runnable has already passed - // then fails asynchronously - var alreadyPassed = runnable.isPassed(); - // this will change the state to "failed" regardless of the current value - this.fail(runnable, err); - if (!alreadyPassed) { - // recover from test - if (runnable.type === constants.EVENT_TEST_BEGIN) { - this.emit(constants.EVENT_TEST_END, runnable); - this.hookUp(HOOK_TYPE_AFTER_EACH, this.next); - return; - } - debug(runnable); + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + leadSurrogate = codePoint; + continue + } - // recover from hooks - var errSuite = this.suite; + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + } - // XXX how about a less awful way to determine this? - // if hook failure is in afterEach block - if (runnable.fullTitle().indexOf('after each') > -1) { - return this.hookErr(err, errSuite, true); + leadSurrogate = null; + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else { + throw new Error('Invalid code point') + } } - // if hook failure is in beforeEach block - if (runnable.fullTitle().indexOf('before each') > -1) { - return this.hookErr(err, errSuite, false); + + return bytes + } + + function asciiToBytes$1 (str) { + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF); } - // if hook failure is in after or before blocks - return this.nextSuite(errSuite); + return byteArray } - // bail - this.emit(constants.EVENT_RUN_END); -}; + function utf16leToBytes$1 (str, units) { + var c, hi, lo; + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @public - * @memberof Runner - * @param {Function} fn - * @return {Runner} Runner instance. - */ -Runner.prototype.run = function(fn) { - var self = this; - var rootSuite = this.suite; + return byteArray + } - fn = fn || function() {}; - function uncaught(err) { - self.uncaught(err); + function base64ToBytes$1 (str) { + return toByteArray$1(base64clean$1(str)) } - function start() { - // If there is an `only` filter - if (rootSuite.hasOnly()) { - rootSuite.filterOnly(); - } - self.started = true; - if (self._delay) { - self.emit(constants.EVENT_DELAY_END); + function blitBuffer$1 (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i]; } - self.emit(constants.EVENT_RUN_BEGIN); + return i + } - self.runSuite(rootSuite, function() { - debug('finished running'); - self.emit(constants.EVENT_RUN_END); - }); + function isnan$1 (val) { + return val !== val // eslint-disable-line no-self-compare } - debug(constants.EVENT_RUN_BEGIN); - // references cleanup to avoid memory leaks - this.on(constants.EVENT_SUITE_END, function(suite) { - suite.cleanReferences(); - }); - - // callback - this.on(constants.EVENT_RUN_END, function() { - debug(constants.EVENT_RUN_END); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - if (this._delay) { - // for reporters, I guess. - // might be nice to debounce some dots while we wait. - this.emit(constants.EVENT_DELAY_BEGIN, rootSuite); - rootSuite.once(EVENT_ROOT_SUITE_RUN, start); - } else { - start(); - } - - return this; -}; - -/** - * Cleanly abort execution. - * - * @memberof Runner - * @public - * @return {Runner} Runner instance. - */ -Runner.prototype.abort = function() { - debug('aborting'); - this._abort = true; - - return this; -}; - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @private - * @param {Array} ok - * @param {Array} globals - * @return {Array} - */ -function filterLeaks(ok, globals) { - return globals.filter(function(key) { - // Firefox and Chrome exposes iframes as index inside the window object - if (/^\d+/.test(key)) { - return false; - } - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method - // not init at first it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) { - return false; - } - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) { - return false; - } - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) { - return false; - } - - var matched = ok.filter(function(ok) { - if (~ok.indexOf('*')) { - return key.indexOf(ok.split('*')[0]) === 0; - } - return key === ok; - }); - return !matched.length && (!global.navigator || key !== 'onerror'); - }); -} - -/** - * Check if argument is an instance of Error object or a duck-typed equivalent. - * - * @private - * @param {Object} err - object to check - * @param {string} err.message - error message - * @returns {boolean} - */ -function isError(err) { - return err instanceof Error || (err && typeof err.message === 'string'); -} - -/** - * - * Converts thrown non-extensible type into proper Error. - * - * @private - * @param {*} thrown - Non-extensible type thrown by code - * @return {Error} - */ -function thrown2Error(err) { - return new Error( - 'the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)' - ); -} - -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @deprecated - * @todo remove; long since unsupported - * @private - */ -function extraGlobals() { - if (typeof process === 'object' && typeof process.version === 'string') { - var parts = process.version.split('.'); - var nodeVersion = parts.reduce(function(a, v) { - return (a << 8) | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - if (nodeVersion < 0x00090b) { - return ['errno']; - } - } - - return []; -} - -Runner.constants = constants; - -/** - * Node.js' `EventEmitter` - * @external EventEmitter - * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter} - */ - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./errors":6,"./pending":16,"./runnable":33,"./suite":36,"./utils":38,"_process":69,"debug":45,"events":50,"util":89}],35:[function(require,module,exports){ -(function (global){ -'use strict'; - -/** - * Provides a factory function for a {@link StatsCollector} object. - * @module - */ - -var constants = require('./runner').constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_END = constants.EVENT_TEST_END; - -/** - * Test statistics collector. - * - * @public - * @typedef {Object} StatsCollector - * @property {number} suites - integer count of suites run. - * @property {number} tests - integer count of tests run. - * @property {number} passes - integer count of passing tests. - * @property {number} pending - integer count of pending tests. - * @property {number} failures - integer count of failed tests. - * @property {Date} start - time when testing began. - * @property {Date} end - time when testing concluded. - * @property {number} duration - number of msecs that testing took. - */ - -var Date = global.Date; - -/** - * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`. - * - * @private - * @param {Runner} runner - Runner instance - * @throws {TypeError} If falsy `runner` - */ -function createStatsCollector(runner) { - /** - * @type StatsCollector - */ - var stats = { - suites: 0, - tests: 0, - passes: 0, - pending: 0, - failures: 0 - }; - - if (!runner) { - throw new TypeError('Missing runner argument'); - } - - runner.stats = stats; - - runner.once(EVENT_RUN_BEGIN, function() { - stats.start = new Date(); - }); - runner.on(EVENT_SUITE_BEGIN, function(suite) { - suite.root || stats.suites++; - }); - runner.on(EVENT_TEST_PASS, function() { - stats.passes++; - }); - runner.on(EVENT_TEST_FAIL, function() { - stats.failures++; - }); - runner.on(EVENT_TEST_PENDING, function() { - stats.pending++; - }); - runner.on(EVENT_TEST_END, function() { - stats.tests++; - }); - runner.once(EVENT_RUN_END, function() { - stats.end = new Date(); - stats.duration = stats.end - stats.start; - }); -} - -module.exports = createStatsCollector; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./runner":34}],36:[function(require,module,exports){ -'use strict'; - -/** - * Module dependencies. - */ -var EventEmitter = require('events').EventEmitter; -var Hook = require('./hook'); -var utils = require('./utils'); -var inherits = utils.inherits; -var debug = require('debug')('mocha:suite'); -var milliseconds = require('ms'); -var errors = require('./errors'); -var createInvalidArgumentTypeError = errors.createInvalidArgumentTypeError; - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` and parent `Suite`. - * - * @public - * @param {Suite} parent - Parent suite (required!) - * @param {string} title - Title - * @return {Suite} - */ -Suite.create = function(parent, title) { - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`. - * - * @public - * @class - * @extends EventEmitter - * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter} - * @param {string} title - Suite title. - * @param {Context} parentContext - Parent context instance. - * @param {boolean} [isRoot=false] - Whether this is the root suite. - */ -function Suite(title, parentContext, isRoot) { - if (!utils.isString(title)) { - throw createInvalidArgumentTypeError( - 'Suite argument "title" must be a string. Received type "' + - typeof title + - '"', - 'title', - 'string' - ); + // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence + // The _isBuffer check is for Safari 5-7 support, because it's missing + // Object.prototype.constructor. Remove this eventually + function isBuffer$2(obj) { + return obj != null && (!!obj._isBuffer || isFastBuffer$1(obj) || isSlowBuffer$1(obj)) } - this.title = title; - function Context() {} - Context.prototype = parentContext; - this.ctx = new Context(); - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = isRoot === true; - this._timeout = 2000; - this._enableTimeouts = true; - this._slow = 75; - this._bail = false; - this._retries = -1; - this._onlyTests = []; - this._onlySuites = []; - this.delayed = false; - - this.on('newListener', function(event) { - if (deprecatedEvents[event]) { - utils.deprecate( - 'Event "' + - event + - '" is deprecated. Please let the Mocha team know about your use case: https://git.io/v6Lwm' - ); - } - }); -} - -/** - * Inherit from `EventEmitter.prototype`. - */ -inherits(Suite, EventEmitter); - -/** - * Return a clone of this `Suite`. - * - * @private - * @return {Suite} - */ -Suite.prototype.clone = function() { - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.root = this.root; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set or get timeout `ms` or short-hand such as "2s". - * - * @private - * @todo Do not attempt to set value if `ms` is undefined - * @param {number|string} ms - * @return {Suite|number} for chaining - */ -Suite.prototype.timeout = function(ms) { - if (!arguments.length) { - return this._timeout; - } - if (ms.toString() === '0') { - this._enableTimeouts = false; - } - if (typeof ms === 'string') { - ms = milliseconds(ms); - } - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set or get number of times to retry a failed test. - * - * @private - * @param {number|string} n - * @return {Suite|number} for chaining - */ -Suite.prototype.retries = function(n) { - if (!arguments.length) { - return this._retries; - } - debug('retries %d', n); - this._retries = parseInt(n, 10) || 0; - return this; -}; - -/** - * Set or get timeout to `enabled`. - * - * @private - * @param {boolean} enabled - * @return {Suite|boolean} self or enabled - */ -Suite.prototype.enableTimeouts = function(enabled) { - if (!arguments.length) { - return this._enableTimeouts; - } - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Set or get slow `ms` or short-hand such as "2s". - * - * @private - * @param {number|string} ms - * @return {Suite|number} for chaining - */ -Suite.prototype.slow = function(ms) { - if (!arguments.length) { - return this._slow; - } - if (typeof ms === 'string') { - ms = milliseconds(ms); - } - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Set or get whether to bail after first error. - * - * @private - * @param {boolean} bail - * @return {Suite|number} for chaining - */ -Suite.prototype.bail = function(bail) { - if (!arguments.length) { - return this._bail; - } - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Check if this suite or its parent suite is marked as pending. - * - * @private - */ -Suite.prototype.isPending = function() { - return this.pending || (this.parent && this.parent.isPending()); -}; - -/** - * Generic hook-creator. - * @private - * @param {string} title - Title of hook - * @param {Function} fn - Hook callback - * @returns {Hook} A new hook - */ -Suite.prototype._createHook = function(title, fn) { - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.retries(this.retries()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - hook.file = this.file; - return hook; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.beforeAll = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"before all" hook' + (title ? ': ' + title : ''); - - var hook = this._createHook(title, fn); - this._beforeAll.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.afterAll = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"after all" hook' + (title ? ': ' + title : ''); - - var hook = this._createHook(title, fn); - this._afterAll.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.beforeEach = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"before each" hook' + (title ? ': ' + title : ''); - - var hook = this._createHook(title, fn); - this._beforeEach.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.afterEach = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"after each" hook' + (title ? ': ' + title : ''); - - var hook = this._createHook(title, fn); - this._afterEach.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @private - * @param {Suite} suite - * @return {Suite} for chaining - */ -Suite.prototype.addSuite = function(suite) { - suite.parent = this; - suite.root = false; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit(constants.EVENT_SUITE_ADD_SUITE, suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @private - * @param {Test} test - * @return {Suite} for chaining - */ -Suite.prototype.addTest = function(test) { - test.parent = this; - test.timeout(this.timeout()); - test.retries(this.retries()); - test.enableTimeouts(this.enableTimeouts()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit(constants.EVENT_SUITE_ADD_TEST, test); - return this; -}; - -/** - * Return the full title generated by recursively concatenating the parent's - * full title. - * - * @memberof Suite - * @public - * @return {string} - */ -Suite.prototype.fullTitle = function() { - return this.titlePath().join(' '); -}; - -/** - * Return the title path generated by recursively concatenating the parent's - * title path. - * - * @memberof Suite - * @public - * @return {string} - */ -Suite.prototype.titlePath = function() { - var result = []; - if (this.parent) { - result = result.concat(this.parent.titlePath()); - } - if (!this.root) { - result.push(this.title); - } - return result; -}; - -/** - * Return the total number of tests. - * - * @memberof Suite - * @public - * @return {number} - */ -Suite.prototype.total = function() { - return ( - this.suites.reduce(function(sum, suite) { - return sum + suite.total(); - }, 0) + this.tests.length - ); -}; - -/** - * Iterates through each suite recursively to find all tests. Applies a - * function in the format `fn(test)`. - * - * @private - * @param {Function} fn - * @return {Suite} - */ -Suite.prototype.eachTest = function(fn) { - this.tests.forEach(fn); - this.suites.forEach(function(suite) { - suite.eachTest(fn); - }); - return this; -}; - -/** - * This will run the root suite if we happen to be running in delayed mode. - * @private - */ -Suite.prototype.run = function run() { - if (this.root) { - this.emit(constants.EVENT_ROOT_SUITE_RUN); - } -}; - -/** - * Determines whether a suite has an `only` test or suite as a descendant. - * - * @private - * @returns {Boolean} - */ -Suite.prototype.hasOnly = function hasOnly() { - return ( - this._onlyTests.length > 0 || - this._onlySuites.length > 0 || - this.suites.some(function(suite) { - return suite.hasOnly(); - }) - ); -}; - -/** - * Filter suites based on `isOnly` logic. - * - * @private - * @returns {Boolean} - */ -Suite.prototype.filterOnly = function filterOnly() { - if (this._onlyTests.length) { - // If the suite contains `only` tests, run those and ignore any nested suites. - this.tests = this._onlyTests; - this.suites = []; - } else { - // Otherwise, do not run any of the tests in this suite. - this.tests = []; - this._onlySuites.forEach(function(onlySuite) { - // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite. - // Otherwise, all of the tests on this `only` suite should be run, so don't filter it. - if (onlySuite.hasOnly()) { - onlySuite.filterOnly(); - } - }); - // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants. - var onlySuites = this._onlySuites; - this.suites = this.suites.filter(function(childSuite) { - return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly(); - }); - } - // Keep the suite only if there is something to run - return this.tests.length > 0 || this.suites.length > 0; -}; - -/** - * Adds a suite to the list of subsuites marked `only`. - * - * @private - * @param {Suite} suite - */ -Suite.prototype.appendOnlySuite = function(suite) { - this._onlySuites.push(suite); -}; - -/** - * Adds a test to the list of tests marked `only`. - * - * @private - * @param {Test} test - */ -Suite.prototype.appendOnlyTest = function(test) { - this._onlyTests.push(test); -}; -/** - * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants. - * @private - */ -Suite.prototype.getHooks = function getHooks(name) { - return this['_' + name]; -}; - -/** - * Cleans up the references to all the deferred functions - * (before/after/beforeEach/afterEach) and tests of a Suite. - * These must be deleted otherwise a memory leak can happen, - * as those functions may reference variables from closures, - * thus those variables can never be garbage collected as long - * as the deferred functions exist. - * - * @private - */ -Suite.prototype.cleanReferences = function cleanReferences() { - function cleanArrReferences(arr) { - for (var i = 0; i < arr.length; i++) { - delete arr[i].fn; - } + function isFastBuffer$1 (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } - if (Array.isArray(this._beforeAll)) { - cleanArrReferences(this._beforeAll); + // For Node v0.10 support. Remove this eventually. + function isSlowBuffer$1 (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer$1(obj.slice(0, 0)) } - if (Array.isArray(this._beforeEach)) { - cleanArrReferences(this._beforeEach); - } + // shim for using process in browser + // based off https://github.com/defunctzombie/node-process/blob/master/browser.js - if (Array.isArray(this._afterAll)) { - cleanArrReferences(this._afterAll); + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); } - - if (Array.isArray(this._afterEach)) { - cleanArrReferences(this._afterEach); + function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); } - - for (var i = 0; i < this.tests.length; i++) { - delete this.tests[i].fn; + var cachedSetTimeout = defaultSetTimout; + var cachedClearTimeout = defaultClearTimeout; + if (typeof global$2.setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } + if (typeof global$2.clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; } -}; - -var constants = utils.defineConstants( - /** - * {@link Suite}-related constants. - * @public - * @memberof Suite - * @alias constants - * @readonly - * @static - * @enum {string} - */ - { - /** - * Event emitted after a test file has been loaded Not emitted in browser. - */ - EVENT_FILE_POST_REQUIRE: 'post-require', - /** - * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected. - */ - EVENT_FILE_PRE_REQUIRE: 'pre-require', - /** - * Event emitted immediately after a test file has been loaded. Not emitted in browser. - */ - EVENT_FILE_REQUIRE: 'require', - /** - * Event emitted when `global.run()` is called (use with `delay` option) - */ - EVENT_ROOT_SUITE_RUN: 'run', - /** - * Namespace for collection of a `Suite`'s "after all" hooks - */ - HOOK_TYPE_AFTER_ALL: 'afterAll', - /** - * Namespace for collection of a `Suite`'s "after each" hooks - */ - HOOK_TYPE_AFTER_EACH: 'afterEach', - /** - * Namespace for collection of a `Suite`'s "before all" hooks - */ - HOOK_TYPE_BEFORE_ALL: 'beforeAll', - /** - * Namespace for collection of a `Suite`'s "before all" hooks - */ - HOOK_TYPE_BEFORE_EACH: 'beforeEach', + 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); + } + } - // the following events are all deprecated - /** - * Emitted after an "after all" `Hook` has been added to a `Suite`. Deprecated - */ - EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll', - /** - * Emitted after an "after each" `Hook` has been added to a `Suite` Deprecated - */ - EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach', - /** - * Emitted after an "before all" `Hook` has been added to a `Suite` Deprecated - */ - EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll', - /** - * Emitted after an "before each" `Hook` has been added to a `Suite` Deprecated - */ - EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach', - /** - * Emitted after a child `Suite` has been added to a `Suite`. Deprecated - */ - EVENT_SUITE_ADD_SUITE: 'suite', - /** - * Emitted after a `Test` has been added to a `Suite`. Deprecated - */ - EVENT_SUITE_ADD_TEST: 'test' - } -); - -/** - * @summary There are no known use cases for these events. - * @desc This is a `Set`-like object having all keys being the constant's string value and the value being `true`. - * @todo Remove eventually - * @type {Object} - * @ignore - */ -var deprecatedEvents = Object.keys(constants) - .filter(function(constant) { - return constant.substring(0, 15) === 'EVENT_SUITE_ADD'; - }) - .reduce(function(acc, constant) { - acc[constants[constant]] = true; - return acc; - }, utils.createMap()); - -Suite.constants = constants; - -},{"./errors":6,"./hook":7,"./utils":38,"debug":45,"events":50,"ms":60}],37:[function(require,module,exports){ -'use strict'; -var Runnable = require('./runnable'); -var utils = require('./utils'); -var errors = require('./errors'); -var createInvalidArgumentTypeError = errors.createInvalidArgumentTypeError; -var isString = utils.isString; - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @public - * @class - * @extends Runnable - * @param {String} title - Test title (required) - * @param {Function} [fn] - Test callback. If omitted, the Test is considered "pending" - */ -function Test(title, fn) { - if (!isString(title)) { - throw createInvalidArgumentTypeError( - 'Test argument "title" should be a string. Received type "' + - typeof title + - '"', - 'title', - 'string' - ); } - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ -utils.inherits(Test, Runnable); - -Test.prototype.clone = function() { - var test = new Test(this.title, this.fn); - test.timeout(this.timeout()); - test.slow(this.slow()); - test.enableTimeouts(this.enableTimeouts()); - test.retries(this.retries()); - test.currentRetry(this.currentRetry()); - test.globals(this.globals()); - test.parent = this.parent; - test.file = this.file; - test.ctx = this.ctx; - return test; -}; - -},{"./errors":6,"./runnable":33,"./utils":38}],38:[function(require,module,exports){ -(function (process,Buffer){ -'use strict'; - -/** - * Various utility functions used throughout Mocha's codebase. - * @module utils - */ - -/** - * Module dependencies. - */ - -var fs = require('fs'); -var path = require('path'); -var util = require('util'); -var glob = require('glob'); -var he = require('he'); -var errors = require('./errors'); -var createNoFilesMatchPatternError = errors.createNoFilesMatchPatternError; -var createMissingArgumentError = errors.createMissingArgumentError; - -var assign = (exports.assign = require('object.assign').getPolyfill()); - -/** - * Inherit the prototype methods from one constructor into another. - * - * @param {function} ctor - Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor - Constructor function to inherit prototype from. - * @throws {TypeError} if either constructor is null, or if super constructor - * lacks a prototype. - */ -exports.inherits = util.inherits; - -/** - * Escape special characters in the given string of html. - * - * @private - * @param {string} html - * @return {string} - */ -exports.escape = function(html) { - return he.encode(String(html), {useNamedReferences: false}); -}; - -/** - * Test if the given obj is type of string. - * - * @private - * @param {Object} obj - * @return {boolean} - */ -exports.isString = function(obj) { - return typeof obj === 'string'; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @private - * @param {Array} files - * @param {Function} fn - */ -exports.watch = function(files, fn) { - var options = {interval: 100}; - var debug = require('debug')('mocha:watch'); - files.forEach(function(file) { - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev) { - if (prev.mtime < curr.mtime) { - fn(file); + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); } - }); - }); -}; - -/** - * Predicate to screen `pathname` for further consideration. - * - * @description - * Returns false for pathname referencing: - *
        - *
      • 'npm' package installation directory - *
      • 'git' version control directory - *
      - * - * @private - * @param {string} pathname - File or directory name to screen - * @return {boolean} whether pathname should be further considered - * @example - * ['node_modules', 'test.js'].filter(considerFurther); // => ['test.js'] - */ -function considerFurther(pathname) { - var ignore = ['node_modules', '.git']; - - return !~ignore.indexOf(pathname); -} - -/** - * Lookup files in the given `dir`. - * - * @description - * Filenames are returned in _traversal_ order by the OS/filesystem. - * **Make no assumption that the names will be sorted in any fashion.** - * - * @private - * @param {string} dir - * @param {string[]} [exts=['js']] - * @param {Array} [ret=[]] - * @return {Array} - */ -exports.files = function(dir, exts, ret) { - ret = ret || []; - exts = exts || ['js']; - - fs.readdirSync(dir) - .filter(considerFurther) - .forEach(function(dirent) { - var pathname = path.join(dir, dirent); - if (fs.lstatSync(pathname).isDirectory()) { - exports.files(pathname, exts, ret); - } else if (hasMatchingExtname(pathname, exts)) { - ret.push(pathname); + // 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); + } } - }); - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @private - * @param {string} str - * @return {string} - */ -exports.slug = function(str) { - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, and re-indent for pre whitespace. - * - * @param {string} str - * @return {string} - */ -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, '\n') - .replace(/^\uFEFF/, '') - // (traditional)-> space/name parameters body (lambda)-> parameters body multi-statement/single keep body content - .replace( - /^function(?:\s*|\s+[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\s*\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\s*\}|((?:.|\n)*))$/, - '$1$2$3' - ); - var spaces = str.match(/^\n?( *)/)[1].length; - var tabs = str.match(/^\n?(\t*)/)[1].length; - var re = new RegExp( - '^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs || spaces) + '}', - 'gm' - ); - str = str.replace(re, ''); - - return str.trim(); -}; - -/** - * Parse the given `qs`. - * - * @private - * @param {string} qs - * @return {Object} - */ -exports.parseQuery = function(qs) { - return qs - .replace('?', '') - .split('&') - .reduce(function(obj, pair) { - var i = pair.indexOf('='); - var key = pair.slice(0, i); - var val = pair.slice(++i); - - // Due to how the URLSearchParams API treats spaces - obj[key] = decodeURIComponent(val.replace(/\+/g, '%20')); - - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @private - * @param {string} js - * @return {string} - */ -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace( - /\bnew[ \t]+(\w+)/gm, - 'new $1' - ) - .replace( - /\b(function|new|throw|return|var|if|else)\b/gm, - '$1' - ); -} - -/** - * Highlight the contents of tag `name`. - * - * @private - * @param {string} name - */ -exports.highlightTags = function(name) { - var code = document.getElementById('mocha').getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - -/** - * If a value could have properties, and has none, this function is called, - * which returns a string representation of the empty value. - * - * Functions w/ no properties return `'[Function]'` - * Arrays w/ length === 0 return `'[]'` - * Objects w/ no properties return `'{}'` - * All else: return result of `value.toString()` - * - * @private - * @param {*} value The value to inspect. - * @param {string} typeHint The type of the value - * @returns {string} - */ -function emptyRepresentation(value, typeHint) { - switch (typeHint) { - case 'function': - return '[Function]'; - case 'object': - return '{}'; - case 'array': - return '[]'; - default: - return value.toString(); - } -} - -/** - * Takes some variable and asks `Object.prototype.toString()` what it thinks it - * is. - * - * @private - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString - * @param {*} value The value to test. - * @returns {string} Computed type - * @example - * type({}) // 'object' - * type([]) // 'array' - * type(1) // 'number' - * type(false) // 'boolean' - * type(Infinity) // 'number' - * type(null) // 'null' - * type(new Date()) // 'date' - * type(/foo/) // 'regexp' - * type('type') // 'string' - * type(global) // 'global' - * type(new String('foo') // 'object' - */ -var type = (exports.type = function type(value) { - if (value === undefined) { - return 'undefined'; - } else if (value === null) { - return 'null'; - } else if (Buffer.isBuffer(value)) { - return 'buffer'; - } - return Object.prototype.toString - .call(value) - .replace(/^\[.+\s(.+?)]$/, '$1') - .toLowerCase(); -}); - -/** - * Stringify `value`. Different behavior depending on type of value: - * - * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. - * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. - * - If `value` is an *empty* object, function, or array, return result of function - * {@link emptyRepresentation}. - * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of - * JSON.stringify(). - * - * @private - * @see exports.type - * @param {*} value - * @return {string} - */ -exports.stringify = function(value) { - var typeHint = type(value); - - if (!~['object', 'array', 'function'].indexOf(typeHint)) { - if (typeHint === 'buffer') { - var json = Buffer.prototype.toJSON.call(value); - // Based on the toJSON result - return jsonStringify( - json.data && json.type ? json.data : json, - 2 - ).replace(/,(\n|$)/g, '$1'); - } - - // IE7/IE8 has a bizarre String constructor; needs to be coerced - // into an array and back to obj. - if (typeHint === 'string' && typeof value === 'object') { - value = value.split('').reduce(function(acc, char, idx) { - acc[idx] = char; - return acc; - }, {}); - typeHint = 'object'; - } else { - return jsonStringify(value); - } } + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; - for (var prop in value) { - if (Object.prototype.hasOwnProperty.call(value, prop)) { - return jsonStringify( - exports.canonicalize(value, null, typeHint), - 2 - ).replace(/,(\n|$)/g, '$1'); - } + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } } - return emptyRepresentation(value, typeHint); -}; - -/** - * like JSON.stringify but more sense. - * - * @private - * @param {Object} object - * @param {number=} spaces - * @param {number=} depth - * @returns {*} - */ -function jsonStringify(object, spaces, depth) { - if (typeof spaces === 'undefined') { - // primitive types - return _stringify(object); + 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); + } + function nextTick(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); + } } - - depth = depth || 1; - var space = spaces * depth; - var str = Array.isArray(object) ? '[' : '{'; - var end = Array.isArray(object) ? ']' : '}'; - var length = - typeof object.length === 'number' - ? object.length - : Object.keys(object).length; - // `.repeat()` polyfill - function repeat(s, n) { - return new Array(n).join(s); + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; } - - function _stringify(val) { - switch (type(val)) { - case 'null': - case 'undefined': - val = '[' + val + ']'; - break; - case 'array': - case 'object': - val = jsonStringify(val, spaces, depth + 1); - break; - case 'boolean': - case 'regexp': - case 'symbol': - case 'number': - val = - val === 0 && 1 / val === -Infinity // `-0` - ? '-0' - : val.toString(); - break; - case 'date': - var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString(); - val = '[Date: ' + sDate + ']'; - break; - case 'buffer': - var json = val.toJSON(); - // Based on the toJSON result - json = json.data && json.type ? json.data : json; - val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']'; - break; - default: - val = - val === '[Function]' || val === '[Circular]' - ? val - : JSON.stringify(val); // string + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + var title = 'browser'; + var platform = 'browser'; + var browser$3 = true; + var env = {}; + var argv = []; + var version$1 = ''; // empty string to avoid regexp issues + var versions = {}; + var release = {}; + var config = {}; + + function noop() {} + + var on = noop; + var addListener = noop; + var once = noop; + var off = noop; + var removeListener = noop; + var removeAllListeners = noop; + var emit = noop; + + function binding(name) { + throw new Error('process.binding is not supported'); + } + + function cwd () { return '/' } + function chdir (dir) { + throw new Error('process.chdir is not supported'); + }function umask() { return 0; } + + // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js + var performance = global$2.performance || {}; + var performanceNow = + performance.now || + performance.mozNow || + performance.msNow || + performance.oNow || + performance.webkitNow || + function(){ return (new Date()).getTime() }; + + // generate timestamp or delta + // see http://nodejs.org/api/process.html#process_process_hrtime + function hrtime(previousTimestamp){ + var clocktime = performanceNow.call(performance)*1e-3; + var seconds = Math.floor(clocktime); + var nanoseconds = Math.floor((clocktime%1)*1e9); + if (previousTimestamp) { + seconds = seconds - previousTimestamp[0]; + nanoseconds = nanoseconds - previousTimestamp[1]; + if (nanoseconds<0) { + seconds--; + nanoseconds += 1e9; + } } - return val; - } + return [seconds,nanoseconds] + } + + var startTime = new Date(); + function uptime() { + var currentTime = new Date(); + var dif = currentTime - startTime; + return dif / 1000; + } + + var browser$1$1 = { + nextTick: nextTick, + title: title, + browser: browser$3, + env: env, + argv: argv, + version: version$1, + versions: versions, + on: on, + addListener: addListener, + once: once, + off: off, + removeListener: removeListener, + removeAllListeners: removeAllListeners, + emit: emit, + binding: binding, + cwd: cwd, + chdir: chdir, + umask: umask, + hrtime: hrtime, + platform: platform, + release: release, + config: config, + uptime: uptime + }; - for (var i in object) { - if (!Object.prototype.hasOwnProperty.call(object, i)) { - continue; // not my business - } - --length; - str += - '\n ' + - repeat(' ', space) + - (Array.isArray(object) ? '' : '"' + i + '": ') + // key - _stringify(object[i]) + // value - (length ? ',' : ''); // comma + var inherits$2; + if (typeof Object.create === 'function'){ + inherits$2 = function inherits(ctor, superCtor) { + // implementation from standard node.js 'util' module + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + inherits$2 = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; } + var inherits$3 = inherits$2; - return ( - str + - // [], {} - (str.length !== 1 ? '\n' + repeat(' ', --space) + end : end) - ); -} - -/** - * Return a new Thing that has the keys in sorted order. Recursive. - * - * If the Thing... - * - has already been seen, return string `'[Circular]'` - * - is `undefined`, return string `'[undefined]'` - * - is `null`, return value `null` - * - is some other primitive, return the value - * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method - * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. - * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` - * - * @private - * @see {@link exports.stringify} - * @param {*} value Thing to inspect. May or may not have properties. - * @param {Array} [stack=[]] Stack of seen values - * @param {string} [typeHint] Type hint - * @return {(Object|Array|Function|string|undefined)} - */ -exports.canonicalize = function canonicalize(value, stack, typeHint) { - var canonicalizedObj; - /* eslint-disable no-unused-vars */ - var prop; - /* eslint-enable no-unused-vars */ - typeHint = typeHint || type(value); - function withStack(value, fn) { - stack.push(value); - fn(); - stack.pop(); - } - - stack = stack || []; - - if (stack.indexOf(value) !== -1) { - return '[Circular]'; - } - - switch (typeHint) { - case 'undefined': - case 'buffer': - case 'null': - canonicalizedObj = value; - break; - case 'array': - withStack(value, function() { - canonicalizedObj = value.map(function(item) { - return exports.canonicalize(item, stack); - }); - }); - break; - case 'function': - /* eslint-disable guard-for-in */ - for (prop in value) { - canonicalizedObj = {}; - break; + var formatRegExp = /%[sdj%]/g; + function format$1(f) { + if (!isString$1(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); } - /* eslint-enable guard-for-in */ - if (!canonicalizedObj) { - canonicalizedObj = emptyRepresentation(value, typeHint); - break; + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); } - /* falls through */ - case 'object': - canonicalizedObj = canonicalizedObj || {}; - withStack(value, function() { - Object.keys(value) - .sort() - .forEach(function(key) { - canonicalizedObj[key] = exports.canonicalize(value[key], stack); - }); - }); - break; - case 'date': - case 'number': - case 'regexp': - case 'boolean': - case 'symbol': - canonicalizedObj = value; - break; - default: - canonicalizedObj = value + ''; - } - - return canonicalizedObj; -}; - -/** - * Determines if pathname has a matching file extension. - * - * @private - * @param {string} pathname - Pathname to check for match. - * @param {string[]} exts - List of file extensions (sans period). - * @return {boolean} whether file extension matches. - * @example - * hasMatchingExtname('foo.html', ['js', 'css']); // => false - */ -function hasMatchingExtname(pathname, exts) { - var suffix = path.extname(pathname).slice(1); - return exts.some(function(element) { - return suffix === element; - }); -} - -/** - * Determines if pathname would be a "hidden" file (or directory) on UN*X. - * - * @description - * On UN*X, pathnames beginning with a full stop (aka dot) are hidden during - * typical usage. Dotfiles, plain-text configuration files, are prime examples. - * - * @see {@link http://xahlee.info/UnixResource_dir/writ/unix_origin_of_dot_filename.html|Origin of Dot File Names} - * - * @private - * @param {string} pathname - Pathname to check for match. - * @return {boolean} whether pathname would be considered a hidden file. - * @example - * isHiddenOnUnix('.profile'); // => true - */ -function isHiddenOnUnix(pathname) { - return path.basename(pathname)[0] === '.'; -} - -/** - * Lookup file names at the given `path`. - * - * @description - * Filenames are returned in _traversal_ order by the OS/filesystem. - * **Make no assumption that the names will be sorted in any fashion.** - * - * @public - * @memberof Mocha.utils - * @param {string} filepath - Base path to start searching from. - * @param {string[]} [extensions=[]] - File extensions to look for. - * @param {boolean} [recursive=false] - Whether to recurse into subdirectories. - * @return {string[]} An array of paths. - * @throws {Error} if no files match pattern. - * @throws {TypeError} if `filepath` is directory and `extensions` not provided. - */ -exports.lookupFiles = function lookupFiles(filepath, extensions, recursive) { - extensions = extensions || []; - recursive = recursive || false; - var files = []; - var stat; - - if (!fs.existsSync(filepath)) { - var pattern; - if (glob.hasMagic(filepath)) { - // Handle glob as is without extensions - pattern = filepath; - } else { - // glob pattern e.g. 'filepath+(.js|.ts)' - var strExtensions = extensions - .map(function(v) { - return '.' + v; - }) - .join('|'); - pattern = filepath + '+(' + strExtensions + ')'; - } - files = glob.sync(pattern, {nodir: true}); - if (!files.length) { - throw createNoFilesMatchPatternError( - 'Cannot find any files matching pattern ' + exports.dQuote(filepath), - filepath - ); } - return files; + return str; } - // Handle file - try { - stat = fs.statSync(filepath); - if (stat.isFile()) { - return filepath; + // Mark that a method should not be used. + // Returns a modified function which warns once by default. + // If --no-deprecation is set, then it is a no-op. + function deprecate$1(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global$2.process)) { + return function() { + return deprecate$1(fn, msg).apply(this, arguments); + }; } - } catch (err) { - // ignore error - return; - } - // Handle directory - fs.readdirSync(filepath).forEach(function(dirent) { - var pathname = path.join(filepath, dirent); - var stat; + if (browser$1$1.noDeprecation === true) { + return fn; + } - try { - stat = fs.statSync(pathname); - if (stat.isDirectory()) { - if (recursive) { - files = files.concat(lookupFiles(pathname, extensions, recursive)); + var warned = false; + function deprecated() { + if (!warned) { + if (browser$1$1.throwDeprecation) { + throw new Error(msg); + } else if (browser$1$1.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); } - return; + warned = true; } - } catch (err) { - // ignore error - return; - } - if (!extensions.length) { - throw createMissingArgumentError( - util.format( - 'Argument %s required when argument %s is a directory', - exports.sQuote('extensions'), - exports.sQuote('filepath') - ), - 'extensions', - 'array' - ); - } - - if ( - !stat.isFile() || - !hasMatchingExtname(pathname, extensions) || - isHiddenOnUnix(pathname) - ) { - return; + return fn.apply(this, arguments); } - files.push(pathname); - }); - - return files; -}; - -/** - * process.emitWarning or a polyfill - * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options - * @ignore - */ -function emitWarning(msg, type) { - if (process.emitWarning) { - process.emitWarning(msg, type); - } else { - process.nextTick(function() { - console.warn(type + ': ' + msg); - }); - } -} - -/** - * Show a deprecation warning. Each distinct message is only displayed once. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ -exports.deprecate = function deprecate(msg) { - msg = String(msg); - if (msg && !deprecate.cache[msg]) { - deprecate.cache[msg] = true; - emitWarning(msg, 'DeprecationWarning'); - } -}; -exports.deprecate.cache = {}; - -/** - * Show a generic warning. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ -exports.warn = function warn(msg) { - if (msg) { - emitWarning(msg); - } -}; - -/** - * @summary - * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) - * @description - * When invoking this function you get a filter function that get the Error.stack as an input, - * and return a prettify output. - * (i.e: strip Mocha and internal node functions from stack trace). - * @returns {Function} - */ -exports.stackTraceFilter = function() { - // TODO: Replace with `process.browser` - var is = typeof document === 'undefined' ? {node: true} : {browser: true}; - var slash = path.sep; - var cwd; - if (is.node) { - cwd = process.cwd() + slash; - } else { - cwd = (typeof location === 'undefined' - ? window.location - : location - ).href.replace(/\/[^/]*$/, '/'); - slash = '/'; - } - - function isMochaInternal(line) { - return ( - ~line.indexOf('node_modules' + slash + 'mocha' + slash) || - ~line.indexOf(slash + 'mocha.js') || - ~line.indexOf(slash + 'mocha.min.js') - ); - } - function isNodeInternal(line) { - return ( - ~line.indexOf('(timers.js:') || - ~line.indexOf('(events.js:') || - ~line.indexOf('(node.js:') || - ~line.indexOf('(module.js:') || - ~line.indexOf('GeneratorFunctionPrototype.next (native)') || - false - ); + return deprecated; } - return function(stack) { - stack = stack.split('\n'); - - stack = stack.reduce(function(list, line) { - if (isMochaInternal(line)) { - return list; - } - - if (is.node && isNodeInternal(line)) { - return list; - } - - // Clean up cwd(absolute) - if (/:\d+:\d+\)?$/.test(line)) { - line = line.replace('(' + cwd, '('); + var debugs = {}; + var debugEnviron; + function debuglog(set) { + if (isUndefined(debugEnviron)) + debugEnviron = browser$1$1.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = 0; + debugs[set] = function() { + var msg = format$1.apply(null, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; } - - list.push(line); - return list; - }, []); - - return stack.join('\n'); - }; -}; - -/** - * Crude, but effective. - * @public - * @param {*} value - * @returns {boolean} Whether or not `value` is a Promise - */ -exports.isPromise = function isPromise(value) { - return ( - typeof value === 'object' && - value !== null && - typeof value.then === 'function' - ); -}; - -/** - * Clamps a numeric value to an inclusive range. - * - * @param {number} value - Value to be clamped. - * @param {numer[]} range - Two element array specifying [min, max] range. - * @returns {number} clamped value - */ -exports.clamp = function clamp(value, range) { - return Math.min(Math.max(value, range[0]), range[1]); -}; - -/** - * Single quote text by combining with undirectional ASCII quotation marks. - * - * @description - * Provides a simple means of markup for quoting text to be used in output. - * Use this to quote names of variables, methods, and packages. - * - * package 'foo' cannot be found - * - * @private - * @param {string} str - Value to be quoted. - * @returns {string} quoted value - * @example - * sQuote('n') // => 'n' - */ -exports.sQuote = function(str) { - return "'" + str + "'"; -}; - -/** - * Double quote text by combining with undirectional ASCII quotation marks. - * - * @description - * Provides a simple means of markup for quoting text to be used in output. - * Use this to quote names of datatypes, classes, pathnames, and strings. - * - * argument 'value' must be "string" or "number" - * - * @private - * @param {string} str - Value to be quoted. - * @returns {string} quoted value - * @example - * dQuote('number') // => "number" - */ -exports.dQuote = function(str) { - return '"' + str + '"'; -}; - -/** - * Provides simplistic message translation for dealing with plurality. - * - * @description - * Use this to create messages which need to be singular or plural. - * Some languages have several plural forms, so _complete_ message clauses - * are preferable to generating the message on the fly. - * - * @private - * @param {number} n - Non-negative integer - * @param {string} msg1 - Message to be used in English for `n = 1` - * @param {string} msg2 - Message to be used in English for `n = 0, 2, 3, ...` - * @returns {string} message corresponding to value of `n` - * @example - * var sprintf = require('util').format; - * var pkgs = ['one', 'two']; - * var msg = sprintf( - * ngettext( - * pkgs.length, - * 'cannot load package: %s', - * 'cannot load packages: %s' - * ), - * pkgs.map(sQuote).join(', ') - * ); - * console.log(msg); // => cannot load packages: 'one', 'two' - */ -exports.ngettext = function(n, msg1, msg2) { - if (typeof n === 'number' && n >= 0) { - return n === 1 ? msg1 : msg2; - } -}; - -/** - * It's a noop. - * @public - */ -exports.noop = function() {}; - -/** - * Creates a map-like object. - * - * @description - * A "map" is an object with no prototype, for our purposes. In some cases - * this would be more appropriate than a `Map`, especially if your environment - * doesn't support it. Recommended for use in Mocha's public APIs. - * - * @public - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map|MDN:Map} - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects} - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign|MDN:Object.assign} - * @param {...*} [obj] - Arguments to `Object.assign()`. - * @returns {Object} An object with no prototype, having `...obj` properties - */ -exports.createMap = function(obj) { - return assign.apply( - null, - [Object.create(null)].concat(Array.prototype.slice.call(arguments)) - ); -}; - -/** - * Creates a read-only map-like object. - * - * @description - * This differs from {@link module:utils.createMap createMap} only in that - * the argument must be non-empty, because the result is frozen. - * - * @see {@link module:utils.createMap createMap} - * @param {...*} [obj] - Arguments to `Object.assign()`. - * @returns {Object} A frozen object with no prototype, having `...obj` properties - * @throws {TypeError} if argument is not a non-empty object. - */ -exports.defineConstants = function(obj) { - if (type(obj) !== 'object' || !Object.keys(obj).length) { - throw new TypeError('Invalid argument; expected a non-empty object'); - } - return Object.freeze(exports.createMap(obj)); -}; - -}).call(this,require('_process'),require("buffer").Buffer) -},{"./errors":6,"_process":69,"buffer":43,"debug":45,"fs":42,"glob":42,"he":54,"object.assign":65,"path":42,"util":89}],39:[function(require,module,exports){ -'use strict' - -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} - -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function getLens (b64) { - var len = b64.length - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - for (var i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk( - uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) - )) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} - -},{}],40:[function(require,module,exports){ - -},{}],41:[function(require,module,exports){ -(function (process){ -var WritableStream = require('stream').Writable -var inherits = require('util').inherits - -module.exports = BrowserStdout - - -inherits(BrowserStdout, WritableStream) - -function BrowserStdout(opts) { - if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts) - - opts = opts || {} - WritableStream.call(this, opts) - this.label = (opts.label !== undefined) ? opts.label : 'stdout' -} - -BrowserStdout.prototype._write = function(chunks, encoding, cb) { - var output = chunks.toString ? chunks.toString() : chunks - if (this.label === false) { - console.log(output) - } else { - console.log(this.label+':', output) - } - process.nextTick(cb) -} - -}).call(this,require('_process')) -},{"_process":69,"stream":84,"util":89}],42:[function(require,module,exports){ -arguments[4][40][0].apply(exports,arguments) -},{"dup":40}],43:[function(require,module,exports){ -(function (Buffer){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -var K_MAX_LENGTH = 0x7fffffff -exports.kMaxLength = K_MAX_LENGTH - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Print warning and recommend using `buffer` v4.x which has an Object - * implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * We report that the browser does not support typed arrays if the are not subclassable - * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` - * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support - * for __proto__ and has a buggy typed array implementation. - */ -Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() - -if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && - typeof console.error === 'function') { - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by ' + - '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ) -} - -function typedArraySupport () { - // Can typed array instances can be augmented? - try { - var arr = new Uint8Array(1) - arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } - return arr.foo() === 42 - } catch (e) { - return false - } -} - -Object.defineProperty(Buffer.prototype, 'parent', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.buffer - } -}) - -Object.defineProperty(Buffer.prototype, 'offset', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.byteOffset - } -}) - -function createBuffer (length) { - if (length > K_MAX_LENGTH) { - throw new RangeError('The value "' + length + '" is invalid for option "size"') - } - // Return an augmented `Uint8Array` instance - var buf = new Uint8Array(length) - buf.__proto__ = Buffer.prototype - return buf -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new TypeError( - 'The "string" argument must be of type string. Received type number' - ) } - return allocUnsafe(arg) + return debugs[set]; } - return from(arg, encodingOrOffset, length) -} -// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 -if (typeof Symbol !== 'undefined' && Symbol.species != null && - Buffer[Symbol.species] === Buffer) { - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true, - enumerable: false, - writable: false - }) -} + /** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ + /* legacy: obj, showHidden, depth, colors*/ + function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + _extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); + } + + // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] + }; -Buffer.poolSize = 8192 // not used by this implementation + // Don't use 'blue' not visible on cmd.exe + inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' + }; -function from (value, encodingOrOffset, length) { - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - if (ArrayBuffer.isView(value)) { - return fromArrayLike(value) - } - - if (value == null) { - throw TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) - } - - if (isInstance(value, ArrayBuffer) || - (value && isInstance(value.buffer, ArrayBuffer))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'number') { - throw new TypeError( - 'The "value" argument must not be of type number. Received type number' - ) - } + function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; - var valueOf = value.valueOf && value.valueOf() - if (valueOf != null && valueOf !== value) { - return Buffer.from(valueOf, encodingOrOffset, length) + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } } - var b = fromObject(value) - if (b) return b - if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && - typeof value[Symbol.toPrimitive] === 'function') { - return Buffer.from( - value[Symbol.toPrimitive]('string'), encodingOrOffset, length - ) + function stylizeNoColor(str, styleType) { + return str; } - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) -} -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length) -} + function arrayToHash(array) { + var hash = {}; -// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -// https://github.com/feross/buffer/pull/148 -Buffer.prototype.__proto__ = Uint8Array.prototype -Buffer.__proto__ = Uint8Array - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be of type number') - } else if (size < 0) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } -} + array.forEach(function(val, idx) { + hash[val] = true; + }); -function alloc (size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(size).fill(fill, encoding) - : createBuffer(size).fill(fill) + return hash; } - return createBuffer(size) -} -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(size, fill, encoding) -} -function allocUnsafe (size) { - assertSize(size) - return createBuffer(size < 0 ? 0 : checked(size) | 0) -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(size) -} + function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString$1(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - - var length = byteLength(string, encoding) | 0 - var buf = createBuffer(length) - - var actual = buf.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - buf = buf.slice(0, actual) - } - - return buf -} - -function fromArrayLike (array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - var buf = createBuffer(length) - for (var i = 0; i < length; i += 1) { - buf[i] = array[i] & 255 - } - return buf -} - -function fromArrayBuffer (array, byteOffset, length) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('"offset" is outside of buffer bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('"length" is outside of buffer bounds') - } - - var buf - if (byteOffset === undefined && length === undefined) { - buf = new Uint8Array(array) - } else if (length === undefined) { - buf = new Uint8Array(array, byteOffset) - } else { - buf = new Uint8Array(array, byteOffset, length) - } + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); - // Return an augmented `Uint8Array` instance - buf.__proto__ = Buffer.prototype - return buf -} + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } -function fromObject (obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - var buf = createBuffer(len) + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError$1(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } - if (buf.length === 0) { - return buf + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError$1(value)) { + return formatError(value); + } } - obj.copy(buf, 0, 0, len) - return buf - } + var base = '', array = false, braces = ['{', '}']; - if (obj.length !== undefined) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { - return createBuffer(0) + // Make Array say that they are Array + if (isArray$1(value)) { + array = true; + braces = ['[', ']']; } - return fromArrayLike(obj) - } - if (obj.type === 'Buffer' && Array.isArray(obj.data)) { - return fromArrayLike(obj.data) - } -} + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } -function checked (length) { - // Note: cannot use `length < K_MAX_LENGTH` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= K_MAX_LENGTH) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') - } - return length | 0 -} + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } -Buffer.isBuffer = function isBuffer (b) { - return b != null && b._isBuffer === true && - b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -} + // Make error with message first say the error + if (isError$1(value)) { + base = ' ' + formatError(value); + } -Buffer.compare = function compare (a, b) { - if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) - if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError( - 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' - ) - } + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } - if (a === b) return 0 + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } - var x = a.length - var y = b.length + ctx.seen.push(value); - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} + ctx.seen.pop(); -Buffer.concat = function concat (list, length) { - if (!Array.isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') + return reduceToSingleString(output, base, braces); } - if (list.length === 0) { - return Buffer.alloc(0) - } - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length + function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString$1(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); } - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (isInstance(buf, Uint8Array)) { - buf = Buffer.from(buf) - } - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + - 'Received type ' + typeof string - ) + function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; } - var len = string.length - var mustMatch = (arguments.length > 2 && arguments[2] === true) - if (!mustMatch && len === 0) return 0 - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) { - return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 - } - encoding = ('' + encoding).toLowerCase() - loweredCase = true + function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; } -} -Buffer.byteLength = byteLength -function slowToString (encoding, start, end) { - var loweredCase = false - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. + function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' + return name + ': ' + str; } - if (end === undefined || end > this.length) { - end = this.length - } - if (end <= 0) { - return '' - } + function reduceToSingleString(output, base, braces) { + var length = output.reduce(function(prev, cur) { + if (cur.indexOf('\n') >= 0) ; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } - if (end <= start) { - return '' + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray$1(ar) { + return Array.isArray(ar); } -} - -// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -// to detect a Buffer instance. It's not possible to use `instanceof Buffer` -// reliably in a browserify context because there could be multiple different -// copies of the 'buffer' package in use. This method works even for Buffer -// instances that were created from another copy of the `buffer` package. -// See: https://github.com/feross/buffer/issues/154 -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') + function isBoolean(arg) { + return typeof arg === 'boolean'; } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) + function isNull(arg) { + return arg === null; } - return this -} -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') + function isNullOrUndefined(arg) { + return arg == null; } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} -Buffer.prototype.toLocaleString = Buffer.prototype.toString - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() - if (this.length > max) str += ' ... ' - return '' -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array)) { - target = Buffer.from(target, target.offset, target.byteLength) - } - if (!Buffer.isBuffer(target)) { - throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. ' + - 'Received type ' + (typeof target) - ) + function isNumber(arg) { + return typeof arg === 'number'; } - if (start === undefined) { - start = 0 + function isString$1(arg) { + return typeof arg === 'string'; } - if (end === undefined) { - end = target ? target.length : 0 + + function isSymbol(arg) { + return typeof arg === 'symbol'; } - if (thisStart === undefined) { - thisStart = 0 + + function isUndefined(arg) { + return arg === void 0; } - if (thisEnd === undefined) { - thisEnd = this.length + + function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; } - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') + function isObject(arg) { + return typeof arg === 'object' && arg !== null; } - if (thisStart >= thisEnd && start >= end) { - return 0 + function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; } - if (thisStart >= thisEnd) { - return -1 + + function isError$1(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); } - if (start >= end) { - return 1 + + function isFunction(arg) { + return typeof arg === 'function'; } - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 + function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; + } - if (this === target) return 0 + function isBuffer$1(maybeBuf) { + return Buffer$1.isBuffer(maybeBuf); + } - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) + function objectToString(o) { + return Object.prototype.toString.call(o); + } - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } + function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); } - if (x < y) return -1 - if (y < x) return 1 - return 0 -} -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 + var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) + // 26 Feb 16:19:34 + function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); } - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) + // log is just a thin wrapper to console.log that prepends a timestamp + function log() { + console.log('%s - %s', timestamp(), format$1.apply(null, arguments)); } - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } + function _extend(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + return origin; + } + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); } - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length + var _polyfillNode_util = { + inherits: inherits$3, + _extend: _extend, + log: log, + isBuffer: isBuffer$1, + isPrimitive: isPrimitive, + isFunction: isFunction, + isError: isError$1, + isDate: isDate, + isObject: isObject, + isRegExp: isRegExp, + isUndefined: isUndefined, + isSymbol: isSymbol, + isString: isString$1, + isNumber: isNumber, + isNullOrUndefined: isNullOrUndefined, + isNull: isNull, + isBoolean: isBoolean, + isArray: isArray$1, + inspect: inspect, + deprecate: deprecate$1, + format: format$1, + debuglog: debuglog + }; - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } + var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + format: format$1, + deprecate: deprecate$1, + debuglog: debuglog, + inspect: inspect, + isArray: isArray$1, + isBoolean: isBoolean, + isNull: isNull, + isNullOrUndefined: isNullOrUndefined, + isNumber: isNumber, + isString: isString$1, + isSymbol: isSymbol, + isUndefined: isUndefined, + isRegExp: isRegExp, + isObject: isObject, + isDate: isDate, + isError: isError$1, + isFunction: isFunction, + isPrimitive: isPrimitive, + isBuffer: isBuffer$1, + log: log, + inherits: inherits$3, + _extend: _extend, + 'default': _polyfillNode_util + }); - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } + function BufferList() { + this.head = null; + this.tail = null; + this.length = 0; } - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } + BufferList.prototype.push = function (v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; - return -1 -} + BufferList.prototype.unshift = function (v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} + BufferList.prototype.shift = function () { + 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; + }; -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} + BufferList.prototype.clear = function () { + this.head = this.tail = null; + this.length = 0; + }; -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} + BufferList.prototype.join = function (s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - var strLen = string.length - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset >>> 0 - if (isFinite(length)) { - length = length >>> 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined + BufferList.prototype.concat = function (n) { + if (this.length === 0) return Buffer$1.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer$1.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + p.data.copy(ret, i); + i += p.data.length; + p = p.next; } - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining + return ret; + }; - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } + // Copyright Joyent, Inc. and other Node contributors. + var isBufferEncoding = Buffer$1.isEncoding + || function(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; + } + }; - if (!encoding) encoding = 'utf8' - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) + function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } + } + // StringDecoder provides an interface for efficiently splitting a series of + // buffers into a series of JS strings without breaking apart multi-byte + // characters. CESU-8 is handled as part of the UTF-8 encoding. + // + // @TODO Handling all encodings inside a single object makes it very difficult + // to reason about this code, so it should be split up in the future. + // @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code + // points as used by CESU-8. + function StringDecoder(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; case 'ucs2': - case 'ucs-2': case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true + this.write = passThroughWrite; + return; } - } -} -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). + this.charBuffer = new Buffer$1(6); + // Number of bytes received for the current incomplete multi-byte character. + this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. + this.charLength = 0; } -} -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} + // write decodes the given buffer and returns it as JS string that is + // guaranteed to not contain any partial multi-byte characters. Any partial + // character found at the end of the buffer is buffered up, and will be + // returned when calling write again with the remaining bytes. + // + // Note: Converting a Buffer containing an orphan surrogate to a String + // currently works, but converting a String to a Buffer (via `new Buffer`, or + // Buffer#write) will replace incomplete surrogates with the unicode + // replacement character. See https://codereview.chromium.org/121173009/ . + StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var available = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; } + break; } - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; } - res.push(codePoint) - i += bytesPerSequence - } + charStr += buffer.toString(this.encoding, 0, end); - return decodeCodePointsArray(res) -} + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 + // or just emit the charStr + return charStr; + }; -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } + // detectIncompleteChar determines if there is an incomplete UTF-8 character at + // the end of the given buffer. If so, it sets this.charLength to the byte + // length that character, and sets this.charReceived to the number of bytes + // that are available for this character. + StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) + // See http://en.wikipedia.org/wiki/UTF-8#Description - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; + }; -function hexSlice (buf, start, end) { - var len = buf.length + StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} + return res; + }; -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + function passThroughWrite(buffer) { + return buffer.toString(this.encoding); } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len + function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len + function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } - if (end < start) end = start + Readable.ReadableState = ReadableState; - var newBuf = this.subarray(start, end) - // Return an augmented `Uint8Array` instance - newBuf.__proto__ = Buffer.prototype - return newBuf -} + var debug$2 = debuglog('stream'); + inherits$3(Readable, EventEmitter$2); -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} + 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); + } else { + // 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 (Array.isArray(emitter._events[event])) + emitter._events[event].unshift(fn); + else + emitter._events[event] = [fn, emitter._events[event]]; + } + } + function listenerCount (emitter, type) { + return emitter.listeners(type).length; + } + function ReadableState(options, stream) { -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) + options = options || {}; - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } + // 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; - return val -} + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } + // 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 defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; - return val -} + // 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; -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} + // 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; -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} + // 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; -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} + // 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'; -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('Index out of range') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - - if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { - // Use built-in when available, missing from IE11 - this.copyWithin(targetStart, start, end) - } else if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (var i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ) - } + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; - return len -} + // if true, a maybeReadMore has been scheduled + this.readingMore = false; -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) + this.decoder = null; + this.encoding = null; + if (options.encoding) { + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; } - if (val.length === 1) { - var code = val.charCodeAt(0) - if ((encoding === 'utf8' && code < 128) || - encoding === 'latin1') { - // Fast path: If `val` fits into a single byte, use that numeric value. - val = code - } - } - } else if (typeof val === 'number') { - val = val & 255 } + function Readable(options) { - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } + if (!(this instanceof Readable)) return new Readable(options); - if (end <= start) { - return this - } + this._readableState = new ReadableState(options, this); - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 + // legacy + this.readable = true; - if (!val) val = 0 + if (options && typeof options.read === 'function') this._read = options.read; - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : Buffer.from(val, encoding) - var len = bytes.length - if (len === 0) { - throw new TypeError('The value "' + val + - '" is invalid for argument "value"') - } - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node takes equal signs as end of the Base64 encoding - str = str.split('=')[0] - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint + EventEmitter$2.call(this); + } - continue - } + // 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; - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue + if (!state.objectMode && typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer$1.from(chunk, encoding); + encoding = ''; } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) } - leadSurrogate = null + return readableAddChunk(this, state, chunk, encoding, false); + }; - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -// the `instanceof` check but they should be treated as of that type. -// See: https://github.com/feross/buffer/issues/166 -function isInstance (obj, type) { - return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name != null && - obj.constructor.name === type.name) -} -function numberIsNaN (obj) { - // For IE11 support - return obj !== obj // eslint-disable-line no-self-compare -} - -}).call(this,require("buffer").Buffer) -},{"base64-js":39,"buffer":43,"ieee754":55}],44:[function(require,module,exports){ -(function (Buffer){ -// 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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -}).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":57}],45:[function(require,module,exports){ -(function (process){ -"use strict"; - -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); } - -/* 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. + // Unshift should *always* be something directly out of read() + Readable.prototype.unshift = function (chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); + }; + Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; + }; - 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 + function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var _e = new Error('stream.unshift() after end event'); + stream.emit('error', _e); + } else { + var skipAdd; + if (state.decoder && !addToFront && !encoding) { + chunk = state.decoder.write(chunk); + skipAdd = !state.objectMode && chunk.length === 0; + } + if (!addToFront) state.reading = false; - 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 - */ + // Don't add to the buffer if we've decoded to an empty string chunk and + // we're not in object mode + if (!skipAdd) { + // if we want the data now, just emit it. + 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); + } + } else if (!addToFront) { + state.reading = false; + } -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); + return needMoreData(state); + } - if (!this.useColors) { - return; + // 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); } - 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 + // backwards compatibility. + Readable.prototype.setEncoding = function (enc) { + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; + }; - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function (match) { - if (match === '%%') { - return; + // 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$2('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$2('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; } - index++; + n = howMuchToRead(n, state); - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; + // 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; } - }); - 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); + + // 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$2('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$2('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$2('reading or ended', doRead); + } else if (doRead) { + debug$2('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 { - 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":46,"_process":69}],46:[function(require,module,exports){ -"use strict"; - -/** - * 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. - */ + state.length -= n; + } - createDebug.instances = []; - /** - * The currently active debug mode names, and names to skip. - */ + 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; - 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". - */ + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } - 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 - */ + if (ret !== null) this.emit('data', ret); - function selectColor(namespace) { - var hash = 0; + return ret; + }; - for (var i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer + function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer$1.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + return er; } - createDebug.selectColor = selectColor; - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ + 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; - function createDebug(namespace) { - var prevTime; + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); + } - function debug() { - // Disabled? - if (!debug.enabled) { - return; - } + // 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$2('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream); + } + } - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + function emitReadable_(stream) { + debug$2('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; + nextTick(maybeReadMore_, stream, state); + } + } - var self = debug; // Set `diff` timestamp + function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug$2('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; + } - 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]); + // 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('not implemented')); + }; - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } // Apply any `formatters` transformations + 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$2('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - 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; - } + var doEnd = (!pipeOpts || pipeOpts.end !== false); - index++; - var formatter = createDebug.formatters[format]; + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) nextTick(endFn);else src.once('end', endFn); - 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` + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug$2('onunpipe'); + if (readable === src) { + cleanup(); + } + } - args.splice(index, 1); - index--; + function onend() { + debug$2('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$2('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', cleanup); + 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$2('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$2('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; } + src.pause(); + } + } - return match; - }); // Apply env-specific formatting (colors, etc.) - - createDebug.formatArgs.call(self, args); - var logFn = self.log || createDebug.log; - logFn.apply(self, args); + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug$2('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (listenerCount(dest, 'error') === 0) dest.emit('error', er); } - 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 + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); - if (typeof createDebug.init === 'function') { - createDebug.init(debug); + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); } + dest.once('close', onclose); + function onfinish() { + debug$2('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); - createDebug.instances.push(debug); - return debug; - } + function unpipe() { + debug$2('unpipe'); + src.unpipe(dest); + } - function destroy() { - var index = createDebug.instances.indexOf(this); + // tell the dest that it's being piped to + dest.emit('pipe', src); - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug$2('pipe resume'); + src.resume(); } - return false; - } + return dest; + }; - function extend(namespace, delimiter) { - return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug$2('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && src.listeners('data').length) { + state.flowing = true; + flow(src); + } + }; } - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ + Readable.prototype.unpipe = function (dest) { + var state = this._readableState; - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.names = []; - createDebug.skips = []; - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } + // 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; - namespaces = split[i].replace(/\*/g, '.*?'); + if (!dest) dest = state.pipes; - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this); + return this; } - for (i = 0; i < createDebug.instances.length; i++) { - var instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - /** - * Disable debug output. - * - * @api public - */ + // 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; - function disable() { - createDebug.enable(''); - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ + for (var _i = 0; _i < len; _i++) { + dests[_i].emit('unpipe', this); + }return this; + } + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) return this; - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; - var i; - var len; + dest.emit('unpipe', this); - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } + return this; + }; - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; + // set up data events if they are asked for + // Ensure readable listeners eventually get something + Readable.prototype.on = function (ev, fn) { + var res = EventEmitter$2.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) { + nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } } } - return false; - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + function nReadingNextTick(self) { + debug$2('readable nexttick read 0'); + self.read(0); + } - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; + // 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$2('resume'); + state.flowing = true; + resume(this, state); } + return this; + }; - return val; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + nextTick(resume_, stream, state); + } } - createDebug.enable(createDebug.load()); - return createDebug; -} - -module.exports = setup; - - -},{"ms":60}],47:[function(require,module,exports){ -'use strict'; - -var keys = require('object-keys'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -var toStr = Object.prototype.toString; -var concat = Array.prototype.concat; -var origDefineProperty = Object.defineProperty; - -var isFunction = function (fn) { - return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; -}; - -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); - -var defineProperty = function (object, name, value, predicate) { - if (name in object && (!isFunction(predicate) || !predicate())) { - return; - } - if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); - } else { - object[name] = value; - } -}; - -var defineProperties = function (object, map) { - var predicates = arguments.length > 2 ? arguments[2] : {}; - var props = keys(map); - if (hasSymbols) { - props = concat.call(props, Object.getOwnPropertySymbols(map)); - } - for (var i = 0; i < props.length; i += 1) { - defineProperty(object, props[i], map[props[i]], predicates[props[i]]); - } -}; - -defineProperties.supportsDescriptors = !!supportsDescriptors; - -module.exports = defineProperties; - -},{"object-keys":62}],48:[function(require,module,exports){ -/*! - - diff v3.5.0 - -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software 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. + function resume_(stream, state) { + if (!state.reading) { + debug$2('resume read 0'); + stream.read(0); + } -* 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. + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); + } -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. + Readable.prototype.pause = function () { + debug$2('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug$2('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; + }; -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 OWNER 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. -@license -*/ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(false) - define([], factory); - else if(typeof exports === 'object') - exports["JsDiff"] = factory(); - else - root["JsDiff"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; + function flow(stream) { + var state = stream._readableState; + debug$2('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} + } -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; + // 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 state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function () { + debug$2('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) self.push(chunk); + } -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; + self.push(null); + }); -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { + stream.on('data', function (chunk) { + debug$2('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); - /*istanbul ignore start*/'use strict'; + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - exports.__esModule = true; - exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.merge = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.diffArrays = exports.diffJson = exports.diffCss = exports.diffSentences = exports.diffTrimmedLines = exports.diffLines = exports.diffWordsWithSpace = exports.diffWords = exports.diffChars = exports.Diff = undefined; + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); - /*istanbul ignore end*/var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; - - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); - - /*istanbul ignore end*/var /*istanbul ignore start*/_character = __webpack_require__(2) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_word = __webpack_require__(3) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_line = __webpack_require__(5) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_sentence = __webpack_require__(6) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_css = __webpack_require__(7) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_json = __webpack_require__(8) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_array = __webpack_require__(9) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_apply = __webpack_require__(10) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_parse = __webpack_require__(11) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_merge = __webpack_require__(13) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_create = __webpack_require__(14) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_dmp = __webpack_require__(16) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_xml = __webpack_require__(17) /*istanbul ignore end*/; - - /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - /* See LICENSE file for terms of use */ - - /* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ - exports. /*istanbul ignore end*/Diff = _base2['default']; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffChars = _character.diffChars; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffWords = _word.diffWords; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffWordsWithSpace = _word.diffWordsWithSpace; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffLines = _line.diffLines; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffTrimmedLines = _line.diffTrimmedLines; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffSentences = _sentence.diffSentences; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffCss = _css.diffCss; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffJson = _json.diffJson; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffArrays = _array.diffArrays; - /*istanbul ignore start*/exports. /*istanbul ignore end*/structuredPatch = _create.structuredPatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/createTwoFilesPatch = _create.createTwoFilesPatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/createPatch = _create.createPatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatch = _apply.applyPatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatches = _apply.applyPatches; - /*istanbul ignore start*/exports. /*istanbul ignore end*/parsePatch = _parse.parsePatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/merge = _merge.merge; - /*istanbul ignore start*/exports. /*istanbul ignore end*/convertChangesToDMP = _dmp.convertChangesToDMP; - /*istanbul ignore start*/exports. /*istanbul ignore end*/convertChangesToXML = _xml.convertChangesToXML; - /*istanbul ignore start*/exports. /*istanbul ignore end*/canonicalize = _json.canonicalize; - - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports['default'] = /*istanbul ignore end*/Diff; - function Diff() {} - - Diff.prototype = { - /*istanbul ignore start*/ /*istanbul ignore end*/diff: function diff(oldString, newString) { - /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var callback = options.callback; - if (typeof options === 'function') { - callback = options; - options = {}; - } - this.options = options; - - var self = this; - - function done(value) { - if (callback) { - setTimeout(function () { - callback(undefined, value); - }, 0); - return true; - } else { - return value; - } - } - - // Allow subclasses to massage the input prior to running - oldString = this.castInput(oldString); - newString = this.castInput(newString); - - oldString = this.removeEmpty(this.tokenize(oldString)); - newString = this.removeEmpty(this.tokenize(newString)); - - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0, i.e. the content starts with the same values - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - // Identity per the equality and tokenizer - return done([{ value: this.join(newString), count: newString.length }]); - } - - // Main worker method. checks all permutations of a given edit length for acceptance. - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; - var addPath = bestPath[diagonalPath - 1], - removePath = bestPath[diagonalPath + 1], - _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - - var canAdd = addPath && addPath.newPos + 1 < newLen, - canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, undefined, true); - } else { - basePath = addPath; // No need to clone, we've pulled it from the list - basePath.newPos++; - self.pushComponent(basePath.components, true, undefined); - } - - _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); - - // If we have hit the end of both strings, then we are done - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); - } else { - // Otherwise track this path as a potential candidate and continue. - bestPath[diagonalPath] = basePath; - } - } - - editLength++; - } - - // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced. - if (callback) { - (function exec() { - setTimeout(function () { - // This should not happen, but we want to be safe. - /* istanbul ignore next */ - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - /*istanbul ignore start*/ /*istanbul ignore end*/pushComponent: function pushComponent(components, added, removed) { - var last = components[components.length - 1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length - 1] = { count: last.count + 1, added: added, removed: removed }; - } else { - components.push({ count: 1, added: added, removed: removed }); - } - }, - /*istanbul ignore start*/ /*istanbul ignore end*/extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath, - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - - if (commonCount) { - basePath.components.push({ count: commonCount }); - } - - basePath.newPos = newPos; - return oldPos; - }, - /*istanbul ignore start*/ /*istanbul ignore end*/equals: function equals(left, right) { - if (this.options.comparator) { - return this.options.comparator(left, right); - } else { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - /*istanbul ignore start*/ /*istanbul ignore end*/removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - }, - /*istanbul ignore start*/ /*istanbul ignore end*/castInput: function castInput(value) { - return value; - }, - /*istanbul ignore start*/ /*istanbul ignore end*/tokenize: function tokenize(value) { - return value.split(''); - }, - /*istanbul ignore start*/ /*istanbul ignore end*/join: function join(chars) { - return chars.join(''); - } - }; - - function buildValues(diff, components, newString, oldString, useLongestToken) { - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - - // Common case - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; - - // Reverse add and remove so removes are output first to match common convention - // The diffing algorithm is tied to add then remove output and this is the simplest - // route to get the desired output with minimal overhead. - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } - - // Special case handle for when one terminal is ignored (i.e. whitespace). - // For this case we merge the terminal into the prior string and drop the change. - // This is only available for string mode. - var lastComponent = components[componentLen - 1]; - if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; - components.pop(); - } - - return components; - } - - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports.characterDiff = undefined; - exports. /*istanbul ignore end*/diffChars = diffChars; - - var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; - - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - /*istanbul ignore end*/var characterDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/characterDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); - } - - - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports.wordDiff = undefined; - exports. /*istanbul ignore end*/diffWords = diffWords; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffWordsWithSpace = diffWordsWithSpace; - - var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; - - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); - - /*istanbul ignore end*/var /*istanbul ignore start*/_params = __webpack_require__(4) /*istanbul ignore end*/; - - /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - /*istanbul ignore end*/ // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode - // - // Ranges and exceptions: - // Latin-1 Supplement, 0080–00FF - // - U+00D7 × Multiplication sign - // - U+00F7 ÷ Division sign - // Latin Extended-A, 0100–017F - // Latin Extended-B, 0180–024F - // IPA Extensions, 0250–02AF - // Spacing Modifier Letters, 02B0–02FF - // - U+02C7 ˇ ˇ Caron - // - U+02D8 ˘ ˘ Breve - // - U+02D9 ˙ ˙ Dot Above - // - U+02DA ˚ ˚ Ring Above - // - U+02DB ˛ ˛ Ogonek - // - U+02DC ˜ ˜ Small Tilde - // - U+02DD ˝ ˝ Double Acute Accent - // Latin Extended Additional, 1E00–1EFF - var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; - - var reWhitespace = /\S/; - - var wordDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/wordDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - wordDiff.equals = function (left, right) { - if (this.options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); - }; - wordDiff.tokenize = function (value) { - var tokens = value.split(/(\s+|\b)/); - - // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. - for (var i = 0; i < tokens.length - 1; i++) { - // If we have an empty string in the next field and we have only word chars before and after, merge - if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { - tokens[i] += tokens[i + 2]; - tokens.splice(i + 1, 2); - i--; - } - } + // 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); + } + } - return tokens; - }; + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function (ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); - function diffWords(oldStr, newStr, options) { - options = /*istanbul ignore start*/(0, _params.generateOptions) /*istanbul ignore end*/(options, { ignoreWhitespace: true }); - return wordDiff.diff(oldStr, newStr, options); - } + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function (n) { + debug$2('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; - function diffWordsWithSpace(oldStr, newStr, options) { - return wordDiff.diff(oldStr, newStr, options); - } + return self; + }; + // 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; + } -/***/ }), -/* 4 */ -/***/ (function(module, exports) { + // 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; + } - /*istanbul ignore start*/'use strict'; + // 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; + } - exports.__esModule = true; - exports. /*istanbul ignore end*/generateOptions = generateOptions; - function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - return defaults; - } + // 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$1.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'); -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { + if (!state.endEmitted) { + state.ended = true; + nextTick(endReadableNT, state, stream); + } + } - /*istanbul ignore start*/'use strict'; + 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'); + } + } - exports.__esModule = true; - exports.lineDiff = undefined; - exports. /*istanbul ignore end*/diffLines = diffLines; - /*istanbul ignore start*/exports. /*istanbul ignore end*/diffTrimmedLines = diffTrimmedLines; + function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } + } - var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; + function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; + } - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); + // A bit simpler than readable streams. + Writable.WritableState = WritableState; + inherits$3(Writable, EventEmitter$2); - /*istanbul ignore end*/var /*istanbul ignore start*/_params = __webpack_require__(4) /*istanbul ignore end*/; + function nop() {} - /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; + } - /*istanbul ignore end*/var lineDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/lineDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - lineDiff.tokenize = function (value) { - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); + function WritableState(options, stream) { + Object.defineProperty(this, 'buffer', { + get: deprecate$1(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }); + options = options || {}; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) 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 defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; + + 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; + + // 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; - // Ignore the final empty token that occurs if the string ends with a new line - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } + // a flag to see when we're in the middle of a write. + this.writing = false; - // Merge the content and line separators into single tokens - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; + // when true all writes will be buffered until .uncork() call + this.corked = 0; - if (i % 2 && !this.options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - if (this.options.ignoreWhitespace) { - line = line.trim(); - } - retLines.push(line); - } - } + // 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; - return retLines; - }; + // 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; - function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); - } - function diffTrimmedLines(oldStr, newStr, callback) { - var options = /*istanbul ignore start*/(0, _params.generateOptions) /*istanbul ignore end*/(callback, { ignoreWhitespace: true }); - return lineDiff.diff(oldStr, newStr, options); - } + // 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; -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { + this.bufferedRequest = null; + this.lastBufferedRequest = null; - /*istanbul ignore start*/'use strict'; + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; - exports.__esModule = true; - exports.sentenceDiff = undefined; - exports. /*istanbul ignore end*/diffSentences = diffSentences; + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; - var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); + // count buffered requests + this.bufferedRequestCount = 0; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); + } - /*istanbul ignore end*/var sentenceDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/sentenceDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); - }; + WritableState.prototype.getBuffer = function writableStateGetBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + function Writable(options) { - function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); - } + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); + this._writableState = new WritableState(options, this); + // legacy. + this.writable = true; -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { + if (options) { + if (typeof options.write === 'function') this._write = options.write; - /*istanbul ignore start*/'use strict'; + if (typeof options.writev === 'function') this._writev = options.writev; + } - exports.__esModule = true; - exports.cssDiff = undefined; - exports. /*istanbul ignore end*/diffCss = diffCss; + EventEmitter$2.call(this); + } - var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; + // Otherwise people can pipe Writable streams, which is just wrong. + Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); + }; - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); + 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); + nextTick(cb, er); + } + + // If we get something that is not a buffer, string, null, or undefined, + // and we're not in objectMode, then that's an error. + // Otherwise stream chunks are all considered to be of length=1, and the + // watermarks determine how many objects to keep in the buffer, rather than + // how many bytes or characters. + function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + // Always throw error if a null is written + // if we are not in object mode then throw + // if it is not a buffer, string, or undefined. + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (!Buffer$1.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + nextTick(cb, er); + valid = false; + } + return valid; + } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; - /*istanbul ignore end*/var cssDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/cssDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); - }; + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } - function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); - } + if (Buffer$1.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== 'function') cb = nop; + if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, chunk, encoding, cb); + } -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { + return ret; + }; - /*istanbul ignore start*/'use strict'; + Writable.prototype.cork = function () { + var state = this._writableState; - exports.__esModule = true; - exports.jsonDiff = undefined; + state.corked++; + }; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Writable.prototype.uncork = function () { + var state = this._writableState; - exports. /*istanbul ignore end*/diffJson = diffJson; - /*istanbul ignore start*/exports. /*istanbul ignore end*/canonicalize = canonicalize; + if (state.corked) { + state.corked--; - var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } + }; - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); + 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; + }; - /*istanbul ignore end*/var /*istanbul ignore start*/_line = __webpack_require__(5) /*istanbul ignore end*/; + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer$1.from(chunk, encoding); + } + return chunk; + } - /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + // 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, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); - /*istanbul ignore end*/var objectPrototypeToString = Object.prototype.toString; + if (Buffer$1.isBuffer(chunk)) encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; - var jsonDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/jsonDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a - // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - jsonDiff.useLongestToken = true; + state.length += len; - jsonDiff.tokenize = /*istanbul ignore start*/_line.lineDiff /*istanbul ignore end*/.tokenize; - jsonDiff.castInput = function (value) { - /*istanbul ignore start*/var _options = /*istanbul ignore end*/this.options, - undefinedReplacement = _options.undefinedReplacement, - _options$stringifyRep = _options.stringifyReplacer, - stringifyReplacer = _options$stringifyRep === undefined ? function (k, v) /*istanbul ignore start*/{ - return (/*istanbul ignore end*/typeof v === 'undefined' ? undefinedReplacement : v - ); - } : _options$stringifyRep; + 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 = new WriteReq(chunk, encoding, cb); + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); - }; - jsonDiff.equals = function (left, right) { - return (/*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) - ); - }; + return ret; + } - function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); - } + 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; + } - // This function handles the presence of circular references by bailing out when encountering an - // object that is already on the "stack" of items being processed. Accepts an optional replacer - function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) nextTick(cb, er);else cb(er); - if (replacer) { - obj = replacer(key, obj); - } + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } - var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; - var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; + onwriteStateUpdate(state); - if ('[object Array]' === objectPrototypeToString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } + 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 (obj && obj.toJSON) { - obj = obj.toJSON(); - } + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } - if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; - for (_key in obj) { - /* istanbul ignore else */ - if (obj.hasOwnProperty(_key)) { - sortedKeys.push(_key); - } - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - return canonicalizedObj; - } - - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports.arrayDiff = undefined; - exports. /*istanbul ignore end*/diffArrays = diffArrays; - - var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/; - - /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - /*istanbul ignore end*/var arrayDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/arrayDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - arrayDiff.tokenize = function (value) { - return value.slice(); - }; - arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; - }; - - function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); - } - - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports. /*istanbul ignore end*/applyPatch = applyPatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatches = applyPatches; - - var /*istanbul ignore start*/_parse = __webpack_require__(11) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_distanceIterator = __webpack_require__(12) /*istanbul ignore end*/; - - /*istanbul ignore start*/var _distanceIterator2 = _interopRequireDefault(_distanceIterator); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - /*istanbul ignore end*/function applyPatch(source, uniDiff) { - /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (typeof uniDiff === 'string') { - uniDiff = /*istanbul ignore start*/(0, _parse.parsePatch) /*istanbul ignore end*/(uniDiff); - } - - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - - uniDiff = uniDiff[0]; - } - - // Apply the diff to the input - var lines = source.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) /*istanbul ignore start*/{ - return (/*istanbul ignore end*/line === patchContent - ); - }, - errorCount = 0, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0, - offset = 0, - removeEOFNL = /*istanbul ignore start*/void 0 /*istanbul ignore end*/, - addEOFNL = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; - - /** - * Checks if the hunk exactly fits on the provided location - */ - function hunkFits(hunk, toPos) { - for (var j = 0; j < hunk.lines.length; j++) { - var line = hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line; - - if (operation === ' ' || operation === '-') { - // Context sanity check - if (!compareLine(toPos + 1, lines[toPos], operation, content)) { - errorCount++; - - if (errorCount > fuzzFactor) { - return false; - } - } - toPos++; - } - } - - return true; - } - - // Search best fit offsets for each hunk based on the previous ones - for (var i = 0; i < hunks.length; i++) { - var hunk = hunks[i], - maxLine = lines.length - hunk.oldLines, - localOffset = 0, - toPos = offset + hunk.oldStart - 1; - - var iterator = /*istanbul ignore start*/(0, _distanceIterator2['default']) /*istanbul ignore end*/(toPos, minLine, maxLine); - - for (; localOffset !== undefined; localOffset = iterator()) { - if (hunkFits(hunk, toPos + localOffset)) { - hunk.offset = offset += localOffset; - break; - } - } - - if (localOffset === undefined) { - return false; - } - - // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - minLine = hunk.offset + hunk.oldStart + hunk.oldLines; - } - - // Apply patch hunks - var diffOffset = 0; - for (var _i = 0; _i < hunks.length; _i++) { - var _hunk = hunks[_i], - _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; - diffOffset += _hunk.newLines - _hunk.oldLines; - - if (_toPos < 0) { - // Creating a new file - _toPos = 0; - } - - for (var j = 0; j < _hunk.lines.length; j++) { - var line = _hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line, - delimiter = _hunk.linedelimiters[j]; - - if (operation === ' ') { - _toPos++; - } else if (operation === '-') { - lines.splice(_toPos, 1); - delimiters.splice(_toPos, 1); - /* istanbul ignore else */ - } else if (operation === '+') { - lines.splice(_toPos, 0, content); - delimiters.splice(_toPos, 0, delimiter); - _toPos++; - } else if (operation === '\\') { - var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; - if (previousOperation === '+') { - removeEOFNL = true; - } else if (previousOperation === '-') { - addEOFNL = true; - } - } - } - } - - // Handle EOFNL insertion/removal - if (removeEOFNL) { - while (!lines[lines.length - 1]) { - lines.pop(); - delimiters.pop(); - } - } else if (addEOFNL) { - lines.push(''); - delimiters.push('\n'); - } - for (var _k = 0; _k < lines.length - 1; _k++) { - lines[_k] = lines[_k] + delimiters[_k]; - } - return lines.join(''); - } - - // Wrapper that supports multiple file patches via callbacks. - function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = /*istanbul ignore start*/(0, _parse.parsePatch) /*istanbul ignore end*/(uniDiff); - } - - var currentIndex = 0; - function processIndex() { - var index = uniDiff[currentIndex++]; - if (!index) { - return options.complete(); - } - - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - - processIndex(); - }); - }); - } - processIndex(); - } - - - -/***/ }), -/* 11 */ -/***/ (function(module, exports) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports. /*istanbul ignore end*/parsePatch = parsePatch; - function parsePatch(uniDiff) { - /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], - list = [], - i = 0; - - function parseIndex() { - var index = {}; - list.push(index); - - // Parse diff metadata - while (i < diffstr.length) { - var line = diffstr[i]; - - // File header found, end parsing diff metadata - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } - - // Diff index - var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); - if (header) { - index.index = header[1]; - } - - i++; - } - - // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - parseFileHeader(index); - parseFileHeader(index); - - // Parse hunks - index.hunks = []; - - while (i < diffstr.length) { - var _line = diffstr[i]; - - if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line && options.strict) { - // Ignore unexpected content unless in strict mode - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } - - // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - function parseFileHeader(index) { - var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]); - if (fileHeader) { - var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var data = fileHeader[2].split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - if (/^".*"$/.test(fileName)) { - fileName = fileName.substr(1, fileName.length - 2); - } - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - - i++; - } - } - - // Parses a hunk - // This assumes that we are at the start of a hunk. - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - - var hunk = { - oldStart: +chunkHeader[1], - oldLines: +chunkHeader[2] || 1, - newStart: +chunkHeader[3], - newLines: +chunkHeader[4] || 1, - lines: [], - linedelimiters: [] - }; - - var addCount = 0, - removeCount = 0; - for (; i < diffstr.length; i++) { - // Lines starting with '---' could be mistaken for the "remove line" operation - // But they could be the header for the next file. Therefore prune such cases out. - if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { - break; - } - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - hunk.linedelimiters.push(delimiters[i] || '\n'); - - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - break; - } - } - - // Handle the empty block count case - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } - - // Perform optional sanity checking - if (options.strict) { - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - } - - return hunk; - } - - while (i < diffstr.length) { - parseIndex(); - } - - return list; - } - - - -/***/ }), -/* 12 */ -/***/ (function(module, exports) { - - /*istanbul ignore start*/"use strict"; - - exports.__esModule = true; - - exports["default"] = /*istanbul ignore end*/function (start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } - - // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - if (start + localOffset <= maxLine) { - return localOffset; - } - - forwardExhausted = true; - } - - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } - - // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - if (minLine <= start - localOffset) { - return -localOffset++; - } - - backwardExhausted = true; - return iterator(); - } - - // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - }; - }; - - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports. /*istanbul ignore end*/calcLineCount = calcLineCount; - /*istanbul ignore start*/exports. /*istanbul ignore end*/merge = merge; - - var /*istanbul ignore start*/_create = __webpack_require__(14) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_parse = __webpack_require__(11) /*istanbul ignore end*/; - - var /*istanbul ignore start*/_array = __webpack_require__(15) /*istanbul ignore end*/; - - /*istanbul ignore start*/function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - /*istanbul ignore end*/function calcLineCount(hunk) { - /*istanbul ignore start*/var _calcOldNewLineCount = /*istanbul ignore end*/calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } - } - - function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - - var ret = {}; - - // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - - ret.hunks = []; - - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { oldStart: Infinity }, - theirsCurrent = theirs.hunks[theirsIndex] || { oldStart: Infinity }; - - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - - ret.hunks.push(mergedHunk); - } - } - - return ret; - } - - function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return (/*istanbul ignore start*/(0, _parse.parsePatch) /*istanbul ignore end*/(param)[0] - ); - } - - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - return (/*istanbul ignore start*/(0, _create.structuredPatch) /*istanbul ignore end*/(undefined, undefined, base, param) - ); - } - - return param; - } - - function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; - } - - function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { mine: mine, theirs: theirs }; - } - } - - function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; - } - - function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, newLines: hunk.newLines, - lines: hunk.lines - }; - } - - function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { offset: mineOffset, lines: mineLines, index: 0 }, - their = { offset: theirOffset, lines: theirLines, index: 0 }; - - // Handle any leading content - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); - - // Now in the overlap content. Scan through and select the best changes from each. - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - /*istanbul ignore start*/var _hunk$lines; - - /*istanbul ignore end*/ // Mine inserted - /*istanbul ignore start*/(_hunk$lines = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - /*istanbul ignore start*/var _hunk$lines2; - - /*istanbul ignore end*/ // Theirs inserted - /*istanbul ignore start*/(_hunk$lines2 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines2 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } - - // Now push anything that may be remaining - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - - calcLineCount(hunk); - } - - function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if ( /*istanbul ignore start*/(0, _array.arrayStartsWith) /*istanbul ignore end*/(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - /*istanbul ignore start*/var _hunk$lines3; - - /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines3 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines3 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/myChanges)); - return; - } else if ( /*istanbul ignore start*/(0, _array.arrayStartsWith) /*istanbul ignore end*/(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - /*istanbul ignore start*/var _hunk$lines4; - - /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines4 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines4 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/theirChanges)); - return; - } - } else if ( /*istanbul ignore start*/(0, _array.arrayEqual) /*istanbul ignore end*/(myChanges, theirChanges)) { - /*istanbul ignore start*/var _hunk$lines5; - - /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines5 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines5 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/myChanges)); - return; - } - - conflict(hunk, myChanges, theirChanges); - } - - function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - if (theirChanges.merged) { - /*istanbul ignore start*/var _hunk$lines6; - - /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines6 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines6 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } - } - - function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); - } - - function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } - } - function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } - } - - function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - while (state.index < state.lines.length) { - var line = state.lines[state.index]; - - // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - - return ret; - } - function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; - - // Once we've hit our add, then we are done - if (match[0] === '+') { - break; - } - - contextChanges = contextChanges || change[0] !== ' '; - - merged.push(match); - matchIndex++; - - // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - if (change[0] === '+') { - conflicted = true; - - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - - if (conflicted) { - return changes; - } - - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - - return { - merged: merged, - changes: changes - }; - } - - function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); - } - function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - - state.index += delta; - return true; - } - - function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - - return { oldLines: oldLines, newLines: newLines }; - } - - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports. /*istanbul ignore end*/structuredPatch = structuredPatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/createTwoFilesPatch = createTwoFilesPatch; - /*istanbul ignore start*/exports. /*istanbul ignore end*/createPatch = createPatch; - - var /*istanbul ignore start*/_line = __webpack_require__(5) /*istanbul ignore end*/; - - /*istanbul ignore start*/function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - /*istanbul ignore end*/function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - if (typeof options.context === 'undefined') { - options.context = 4; - } - - var diff = /*istanbul ignore start*/(0, _line.diffLines) /*istanbul ignore end*/(oldStr, newStr, options); - diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - - /*istanbul ignore start*/var _loop = function _loop( /*istanbul ignore end*/i) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - /*istanbul ignore start*/var _curRange; - - /*istanbul ignore end*/ // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - - // Output our changes - /*istanbul ignore start*/(_curRange = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); - - // Track the updated file position - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - /*istanbul ignore start*/var _curRange2; - - /*istanbul ignore end*/ // Overlapping - /*istanbul ignore start*/(_curRange2 = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange2 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/contextLines(lines))); - } else { - /*istanbul ignore start*/var _curRange3; - - /*istanbul ignore end*/ // end the range and output - var contextSize = Math.min(lines.length, options.context); - /*istanbul ignore start*/(_curRange3 = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange3 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/contextLines(lines.slice(0, contextSize)))); - - var hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - if (i >= diff.length - 2 && lines.length <= options.context) { - // EOF is inside this hunk - var oldEOFNewline = /\n$/.test(oldStr); - var newEOFNewline = /\n$/.test(newStr); - if (lines.length == 0 && !oldEOFNewline) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); - } else if (!oldEOFNewline || !newEOFNewline) { - curRange.push('\\ No newline at end of file'); - } - } - hunks.push(hunk); - - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - }; - - for (var i = 0; i < diff.length; i++) { - /*istanbul ignore start*/_loop( /*istanbul ignore end*/i); - } - - return { - oldFileName: oldFileName, newFileName: newFileName, - oldHeader: oldHeader, newHeader: newHeader, - hunks: hunks - }; - } - - function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - - var ret = []; - if (oldFileName == newFileName) { - ret.push('Index: ' + oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; - } - - function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); - } - - - -/***/ }), -/* 15 */ -/***/ (function(module, exports) { - - /*istanbul ignore start*/"use strict"; - - exports.__esModule = true; - exports. /*istanbul ignore end*/arrayEqual = arrayEqual; - /*istanbul ignore start*/exports. /*istanbul ignore end*/arrayStartsWith = arrayStartsWith; - function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - - return arrayStartsWith(a, b); - } - - function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - - return true; - } - - - -/***/ }), -/* 16 */ -/***/ (function(module, exports) { - - /*istanbul ignore start*/"use strict"; - - exports.__esModule = true; - exports. /*istanbul ignore end*/convertChangesToDMP = convertChangesToDMP; - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - function convertChangesToDMP(changes) { - var ret = [], - change = /*istanbul ignore start*/void 0 /*istanbul ignore end*/, - operation = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - - ret.push([operation, change.value]); - } - return ret; - } - - - -/***/ }), -/* 17 */ -/***/ (function(module, exports) { - - /*istanbul ignore start*/'use strict'; - - exports.__esModule = true; - exports. /*istanbul ignore end*/convertChangesToXML = convertChangesToXML; - function convertChangesToXML(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - } - - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - - -/***/ }) -/******/ ]) -}); -; -},{}],49:[function(require,module,exports){ -'use strict'; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; - -},{}],50:[function(require,module,exports){ -// 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. - -var objectCreate = Object.create || objectCreatePolyfill -var objectKeys = Object.keys || objectKeysPolyfill -var bind = Function.prototype.bind || functionBindPolyfill - -function EventEmitter() { - if (!this._events || !Object.prototype.hasOwnProperty.call(this, '_events')) { - this._events = objectCreate(null); - this._eventsCount = 0; - } - - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; - -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; - -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -var defaultMaxListeners = 10; - -var hasDefineProperty; -try { - var o = {}; - if (Object.defineProperty) Object.defineProperty(o, 'x', { value: 0 }); - hasDefineProperty = o.x === 0; -} catch (err) { hasDefineProperty = false } -if (hasDefineProperty) { - Object.defineProperty(EventEmitter, 'defaultMaxListeners', { - enumerable: true, - get: function() { - return defaultMaxListeners; - }, - set: function(arg) { - // check whether the input is a positive number (whose value is zero or - // greater and not a NaN). - if (typeof arg !== 'number' || arg < 0 || arg !== arg) - throw new TypeError('"defaultMaxListeners" must be a positive number'); - defaultMaxListeners = arg; + if (sync) { + /**/ + nextTick(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } } - }); -} else { - EventEmitter.defaultMaxListeners = defaultMaxListeners; -} - -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { - if (typeof n !== 'number' || n < 0 || isNaN(n)) - throw new TypeError('"n" argument must be a positive number'); - this._maxListeners = n; - return this; -}; - -function $getMaxListeners(that) { - if (that._maxListeners === undefined) - return EventEmitter.defaultMaxListeners; - return that._maxListeners; -} - -EventEmitter.prototype.getMaxListeners = function getMaxListeners() { - return $getMaxListeners(this); -}; - -// These standalone emit* functions are used to optimize calling of event -// handlers for fast cases because emit() itself often has a variable number of -// arguments and can be deoptimized because of that. These functions always have -// the same number of arguments and thus do not get deoptimized, so the code -// inside them can execute faster. -function emitNone(handler, isFn, self) { - if (isFn) - handler.call(self); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self); - } -} -function emitOne(handler, isFn, self, arg1) { - if (isFn) - handler.call(self, arg1); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1); - } -} -function emitTwo(handler, isFn, self, arg1, arg2) { - if (isFn) - handler.call(self, arg1, arg2); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1, arg2); - } -} -function emitThree(handler, isFn, self, arg1, arg2, arg3) { - if (isFn) - handler.call(self, arg1, arg2, arg3); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1, arg2, arg3); - } -} - -function emitMany(handler, isFn, self, args) { - if (isFn) - handler.apply(self, args); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].apply(self, args); - } -} - -EventEmitter.prototype.emit = function emit(type) { - var er, handler, len, args, i, events; - var doError = (type === 'error'); - - events = this._events; - if (events) - doError = (doError && events.error == null); - else if (!doError) - return false; + } - // If there is no 'error' event listener then throw. - if (doError) { - if (arguments.length > 1) - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } else { - // At least give some kind of context to the user - var err = new Error('Unhandled "error" event. (' + er + ')'); - err.context = er; - throw err; + 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'); } - return false; } - handler = events[type]; + // if there's something in the buffer waiting, then process it + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; - if (!handler) - return false; + 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 isFn = typeof handler === 'function'; - len = arguments.length; - switch (len) { - // fast cases - case 1: - emitNone(handler, isFn, this); - break; - case 2: - emitOne(handler, isFn, this, arguments[1]); - break; - case 3: - emitTwo(handler, isFn, this, arguments[1], arguments[2]); - break; - case 4: - emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]); - break; - // slower - default: - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - emitMany(handler, isFn, this, args); + var count = 0; + while (entry) { + buffer[count] = entry; + entry = entry.next; + count += 1; + } + + 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); + } + } 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; + // 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.bufferedRequestCount = 0; + state.bufferedRequest = entry; + state.bufferProcessing = false; } - return true; -}; + Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('not implemented')); + }; -function _addListener(target, type, listener, prepend) { - var m; - var events; - var existing; + Writable.prototype._writev = null; - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); + Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; - events = target._events; - if (!events) { - events = target._events = objectCreate(null); - target._eventsCount = 0; - } else { - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (events.newListener) { - target.emit('newListener', type, - listener.listener ? listener.listener : listener); + 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; + } - // Re-assign `events` because a newListener handler could have caused the - // this._events to be assigned to a new object - events = target._events; + function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); } - existing = events[type]; } - if (!existing) { - // Optimize the case of one listener. Don't need the extra array object. - existing = events[type] = listener; - ++target._eventsCount; - } else { - if (typeof existing === 'function') { - // Adding the second element, need to change to array. - existing = events[type] = - prepend ? [listener, existing] : [existing, listener]; - } else { - // If we've already got an array, just append. - if (prepend) { - existing.unshift(listener); + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); } else { - existing.push(listener); - } - } - - // Check for listener leak - if (!existing.warned) { - m = $getMaxListeners(target); - if (m && m > 0 && existing.length > m) { - existing.warned = true; - var w = new Error('Possible EventEmitter memory leak detected. ' + - existing.length + ' "' + String(type) + '" listeners ' + - 'added. Use emitter.setMaxListeners() to ' + - 'increase limit.'); - w.name = 'MaxListenersExceededWarning'; - w.emitter = target; - w.type = type; - w.count = existing.length; - if (typeof console === 'object' && console.warn) { - console.warn('%s: %s', w.name, w.message); - } + prefinish(stream, state); } } + return need; } - return target; -} + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; + } -EventEmitter.prototype.addListener = function addListener(type, listener) { - return _addListener(this, type, listener, false); -}; + // 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; -EventEmitter.prototype.on = EventEmitter.prototype.addListener; + this.next = null; + this.entry = null; -EventEmitter.prototype.prependListener = - function prependListener(type, listener) { - return _addListener(this, type, listener, true); + this.finish = function (err) { + var entry = _this.entry; + _this.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = _this; + } else { + state.corkedRequestsFree = _this; + } }; + } -function onceWrapper() { - if (!this.fired) { - this.target.removeListener(this.type, this.wrapFn); - this.fired = true; - switch (arguments.length) { - case 0: - return this.listener.call(this.target); - case 1: - return this.listener.call(this.target, arguments[0]); - case 2: - return this.listener.call(this.target, arguments[0], arguments[1]); - case 3: - return this.listener.call(this.target, arguments[0], arguments[1], - arguments[2]); - default: - var args = new Array(arguments.length); - for (var i = 0; i < args.length; ++i) - args[i] = arguments[i]; - this.listener.apply(this.target, args); - } - } -} - -function _onceWrap(target, type, listener) { - var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; - var wrapped = bind.call(onceWrapper, state); - wrapped.listener = listener; - state.wrapFn = wrapped; - return wrapped; -} - -EventEmitter.prototype.once = function once(type, listener) { - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - this.on(type, _onceWrap(this, type, listener)); - return this; -}; - -EventEmitter.prototype.prependOnceListener = - function prependOnceListener(type, listener) { - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - this.prependListener(type, _onceWrap(this, type, listener)); - return this; - }; + inherits$3(Duplex, Readable); -// Emits a 'removeListener' event if and only if the listener was removed. -EventEmitter.prototype.removeListener = - function removeListener(type, listener) { - var list, events, position, i, originalListener; + var keys = Object.keys(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); - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); + Readable.call(this, options); + Writable.call(this, options); - events = this._events; - if (!events) - return this; + if (options && options.readable === false) this.readable = false; - list = events[type]; - if (!list) - return this; + if (options && options.writable === false) this.writable = false; - if (list === listener || list.listener === listener) { - if (--this._eventsCount === 0) - this._events = objectCreate(null); - else { - delete events[type]; - if (events.removeListener) - this.emit('removeListener', type, list.listener || listener); - } - } else if (typeof list !== 'function') { - position = -1; - - for (i = list.length - 1; i >= 0; i--) { - if (list[i] === listener || list[i].listener === listener) { - originalListener = list[i].listener; - position = i; - break; - } - } + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - if (position < 0) - return this; + this.once('end', onend); + } - if (position === 0) - list.shift(); - else - spliceOne(list, position); + // 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; - if (list.length === 1) - events[type] = list[0]; + // no more data can be written. + // But allow more writes to happen in this tick. + nextTick(onEndNT, this); + } - if (events.removeListener) - this.emit('removeListener', type, originalListener || listener); - } + function onEndNT(self) { + self.end(); + } - return this; - }; + // a transform stream is a readable/writable stream where you do + inherits$3(Transform, Duplex); -EventEmitter.prototype.removeAllListeners = - function removeAllListeners(type) { - var listeners, events, i; + function TransformState(stream) { + this.afterTransform = function (er, data) { + return afterTransform(stream, er, data); + }; - events = this._events; - if (!events) - return this; + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; + this.writeencoding = null; + } - // not listening for removeListener, no need to emit - if (!events.removeListener) { - if (arguments.length === 0) { - this._events = objectCreate(null); - this._eventsCount = 0; - } else if (events[type]) { - if (--this._eventsCount === 0) - this._events = objectCreate(null); - else - delete events[type]; - } - return this; - } + function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - var keys = objectKeys(events); - var key; - for (i = 0; i < keys.length; ++i) { - key = keys[i]; - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = objectCreate(null); - this._eventsCount = 0; - return this; - } + var cb = ts.writecb; - listeners = events[type]; + if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - if (typeof listeners === 'function') { - this.removeListener(type, listeners); - } else if (listeners) { - // LIFO order - for (i = listeners.length - 1; i >= 0; i--) { - this.removeListener(type, listeners[i]); - } - } + ts.writechunk = null; + ts.writecb = null; - return this; - }; + if (data !== null && data !== undefined) stream.push(data); -function _listeners(target, type, unwrap) { - var events = target._events; + cb(er); - if (!events) - return []; + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); - var evlistener = events[type]; - if (!evlistener) - return []; + Duplex.call(this, options); - if (typeof evlistener === 'function') - return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + this._transformState = new TransformState(this); - return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); -} + // when the writable side finishes, then flush out anything remaining. + var stream = this; -EventEmitter.prototype.listeners = function listeners(type) { - return _listeners(this, type, true); -}; + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; -EventEmitter.prototype.rawListeners = function rawListeners(type) { - return _listeners(this, type, false); -}; + // 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; -EventEmitter.listenerCount = function(emitter, type) { - if (typeof emitter.listenerCount === 'function') { - return emitter.listenerCount(type); - } else { - return listenerCount.call(emitter, type); - } -}; - -EventEmitter.prototype.listenerCount = listenerCount; -function listenerCount(type) { - var events = this._events; - - if (events) { - var evlistener = events[type]; - - if (typeof evlistener === 'function') { - return 1; - } else if (evlistener) { - return evlistener.length; - } - } - - return 0; -} - -EventEmitter.prototype.eventNames = function eventNames() { - return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; -}; - -// About 1.5x faster than the two-arg version of Array#splice(). -function spliceOne(list, index) { - for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) - list[i] = list[k]; - list.pop(); -} - -function arrayClone(arr, n) { - var copy = new Array(n); - for (var i = 0; i < n; ++i) - copy[i] = arr[i]; - return copy; -} - -function unwrapListeners(arr) { - var ret = new Array(arr.length); - for (var i = 0; i < ret.length; ++i) { - ret[i] = arr[i].listener || arr[i]; - } - return ret; -} - -function objectCreatePolyfill(proto) { - var F = function() {}; - F.prototype = proto; - return new F; -} -function objectKeysPolyfill(obj) { - var keys = []; - for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k)) { - keys.push(k); - } - return k; -} -function functionBindPolyfill(context) { - var fn = this; - return function () { - return fn.apply(context, arguments); - }; -} - -},{}],51:[function(require,module,exports){ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); + if (typeof options.flush === 'function') this._flush = options.flush; } - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + this.once('prefinish', function () { + if (typeof this._flush === 'function') this._flush(function (er) { + done(stream, er); + });else done(stream); + }); + } - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } + Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; - return bound; -}; + // 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('Not implemented'); + }; -},{}],52:[function(require,module,exports){ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; - -},{"./implementation":51}],53:[function(require,module,exports){ -'use strict'; - -/* eslint complexity: [2, 17], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - -},{}],54:[function(require,module,exports){ -(function (global){ -/*! https://mths.be/he v1.2.0 by @mathias | MIT license */ -;(function(root) { - - // Detect free variables `exports`. - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module`. - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - // All astral symbols. - var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; - // All ASCII symbols (not just printable ASCII) except those listed in the - // first column of the overrides table. - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides - var regexAsciiWhitelist = /[\x01-\x7F]/g; - // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or - // code points listed in the first column of the overrides table on - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides. - var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g; - - var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g; - var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'}; - - var regexEscape = /["&'<>`]/g; - var escapeMap = { - '"': '"', - '&': '&', - '\'': ''', - '<': '<', - // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the - // following is not strictly necessary unless it’s part of a tag or an - // unquoted attribute value. We’re only escaping it to support those - // situations, and for XML support. - '>': '>', - // In Internet Explorer ≤ 8, the backtick character can be used - // to break out of (un)quoted attribute values or HTML comments. - // See http://html5sec.org/#102, http://html5sec.org/#108, and - // http://html5sec.org/#133. - '`': '`' - }; - - var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/; - var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g; - var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'}; - var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'}; - var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'}; - var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]; - - /*--------------------------------------------------------------------------*/ - - var stringFromCharCode = String.fromCharCode; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var has = function(object, propertyName) { - return hasOwnProperty.call(object, propertyName); - }; - - var contains = function(array, value) { - var index = -1; - var length = array.length; - while (++index < length) { - if (array[index] == value) { - return true; - } - } - return false; - }; - - var merge = function(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - var key; - for (key in defaults) { - // A `hasOwnProperty` check is not needed here, since only recognized - // option names are used anyway. Any others are ignored. - result[key] = has(options, key) ? options[key] : defaults[key]; - } - return result; - }; - - // Modified version of `ucs2encode`; see https://mths.be/punycode. - var codePointToSymbol = function(codePoint, strict) { - var output = ''; - if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) { - // See issue #4: - // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is - // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD - // REPLACEMENT CHARACTER.” - if (strict) { - parseError('character reference outside the permissible Unicode range'); - } - return '\uFFFD'; - } - if (has(decodeMapNumeric, codePoint)) { - if (strict) { - parseError('disallowed character reference'); - } - return decodeMapNumeric[codePoint]; - } - if (strict && contains(invalidReferenceCodePoints, codePoint)) { - parseError('disallowed character reference'); - } - if (codePoint > 0xFFFF) { - codePoint -= 0x10000; - output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - output += stringFromCharCode(codePoint); - return output; - }; - - var hexEscape = function(codePoint) { - return '&#x' + codePoint.toString(16).toUpperCase() + ';'; - }; - - var decEscape = function(codePoint) { - return '&#' + codePoint + ';'; - }; - - var parseError = function(message) { - throw Error('Parse error: ' + message); - }; - - /*--------------------------------------------------------------------------*/ - - var encode = function(string, options) { - options = merge(options, encode.options); - var strict = options.strict; - if (strict && regexInvalidRawCodePoint.test(string)) { - parseError('forbidden code point'); - } - var encodeEverything = options.encodeEverything; - var useNamedReferences = options.useNamedReferences; - var allowUnsafeSymbols = options.allowUnsafeSymbols; - var escapeCodePoint = options.decimal ? decEscape : hexEscape; - - var escapeBmpSymbol = function(symbol) { - return escapeCodePoint(symbol.charCodeAt(0)); - }; - - if (encodeEverything) { - // Encode ASCII symbols. - string = string.replace(regexAsciiWhitelist, function(symbol) { - // Use named references if requested & possible. - if (useNamedReferences && has(encodeMap, symbol)) { - return '&' + encodeMap[symbol] + ';'; - } - return escapeBmpSymbol(symbol); - }); - // Shorten a few escapes that represent two symbols, of which at least one - // is within the ASCII range. - if (useNamedReferences) { - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒') - .replace(/fj/g, 'fj'); - } - // Encode non-ASCII symbols. - if (useNamedReferences) { - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } - // Note: any remaining non-ASCII symbols are handled outside of the `if`. - } else if (useNamedReferences) { - // Apply named character references. - // Encode `<>"'&` using named character references. - if (!allowUnsafeSymbols) { - string = string.replace(regexEscape, function(string) { - return '&' + encodeMap[string] + ';'; // no need to check `has()` here - }); - } - // Shorten escapes that represent two symbols, of which at least one is - // `<>"'&`. - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒'); - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } else if (!allowUnsafeSymbols) { - // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled - // using named character references. - string = string.replace(regexEscape, escapeBmpSymbol); - } - return string - // Encode astral symbols. - .replace(regexAstralSymbols, function($0) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var high = $0.charCodeAt(0); - var low = $0.charCodeAt(1); - var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000; - return escapeCodePoint(codePoint); - }) - // Encode any remaining BMP symbols that are not printable ASCII symbols - // using a hexadecimal escape. - .replace(regexBmpWhitelist, escapeBmpSymbol); - }; - // Expose default options (so they can be overridden globally). - encode.options = { - 'allowUnsafeSymbols': false, - 'encodeEverything': false, - 'strict': false, - 'useNamedReferences': false, - 'decimal' : false - }; - - var decode = function(html, options) { - options = merge(options, decode.options); - var strict = options.strict; - if (strict && regexInvalidEntity.test(html)) { - parseError('malformed character reference'); - } - return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) { - var codePoint; - var semicolon; - var decDigits; - var hexDigits; - var reference; - var next; - - if ($1) { - reference = $1; - // Note: there is no need to check `has(decodeMap, reference)`. - return decodeMap[reference]; - } - - if ($2) { - // Decode named character references without trailing `;`, e.g. `&`. - // This is only a parse error if it gets converted to `&`, or if it is - // followed by `=` in an attribute context. - reference = $2; - next = $3; - if (next && options.isAttributeValue) { - if (strict && next == '=') { - parseError('`&` did not start a character reference'); - } - return $0; - } else { - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - // Note: there is no need to check `has(decodeMapLegacy, reference)`. - return decodeMapLegacy[reference] + (next || ''); - } - } - - if ($4) { - // Decode decimal escapes, e.g. `𝌆`. - decDigits = $4; - semicolon = $5; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(decDigits, 10); - return codePointToSymbol(codePoint, strict); - } - - if ($6) { - // Decode hexadecimal escapes, e.g. `𝌆`. - hexDigits = $6; - semicolon = $7; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(hexDigits, 16); - return codePointToSymbol(codePoint, strict); - } - - // If we’re still here, `if ($7)` is implied; it’s an ambiguous - // ampersand for sure. https://mths.be/notes/ambiguous-ampersands - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - return $0; - }); - }; - // Expose default options (so they can be overridden globally). - decode.options = { - 'isAttributeValue': false, - 'strict': false - }; - - var escape = function(string) { - return string.replace(regexEscape, function($0) { - // Note: there is no need to check `has(escapeMap, $0)` here. - return escapeMap[$0]; - }); - }; - - /*--------------------------------------------------------------------------*/ - - var he = { - 'version': '1.2.0', - 'encode': encode, - 'decode': decode, - 'escape': escape, - 'unescape': decode - }; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - false - ) { - define(function() { - return he; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = he; - } else { // in Narwhal or RingoJS v0.7.0- - for (var key in he) { - has(he, key) && (freeExports[key] = he[key]); - } - } - } else { // in Rhino or a web browser - root.he = he; - } - -}(this)); - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],55:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 + 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 (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 + // 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; } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + }; - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + function done(stream, er) { + if (er) return stream.emit('error', er); - buffer[offset + i - d] |= s * 128 -} + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; -},{}],56:[function(require,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],57:[function(require,module,exports){ -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -module.exports = function (obj) { - return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) -} - -function isBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} - -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) -} - -},{}],58:[function(require,module,exports){ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; - -},{}],59:[function(require,module,exports){ -(function (process){ -var path = require('path'); -var fs = require('fs'); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} + if (ws.length) throw new Error('Calling transform done when ws.length != 0'); -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; + if (ts.transforming) throw new Error('Calling transform done when still transforming'); - p = path.resolve(p); + return stream.push(null); + } - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } + inherits$3(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); - return made; -}; - -}).call(this,require('_process')) -},{"_process":69,"fs":42,"path":42}],60:[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' : ''); -} - -},{}],61:[function(require,module,exports){ -'use strict'; - -var keysShim; -if (!Object.keys) { - // modified from https://github.com/es-shims/es5-shim - var has = Object.prototype.hasOwnProperty; - var toStr = Object.prototype.toString; - var isArgs = require('./isArguments'); // eslint-disable-line global-require - var isEnumerable = Object.prototype.propertyIsEnumerable; - var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); - var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); - var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; - }; - var excludedKeys = { - $applicationCache: true, - $console: true, - $external: true, - $frame: true, - $frameElement: true, - $frames: true, - $innerHeight: true, - $innerWidth: true, - $outerHeight: true, - $outerWidth: true, - $pageXOffset: true, - $pageYOffset: true, - $parent: true, - $scrollLeft: true, - $scrollTop: true, - $scrollX: true, - $scrollY: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true - }; - var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; - }()); - var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } - }; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } - - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } - - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; - }; -} -module.exports = keysShim; - -},{"./isArguments":63}],62:[function(require,module,exports){ -'use strict'; - -var slice = Array.prototype.slice; -var isArgs = require('./isArguments'); - -var origKeys = Object.keys; -var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); - -var originalKeys = Object.keys; - -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - var args = Object.keys(arguments); - return args && args.length === arguments.length; - }(1, 2)); - if (!keysWorksWithArguments) { - Object.keys = function keys(object) { // eslint-disable-line func-name-matching - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } - return originalKeys(object); - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; - -module.exports = keysShim; - -},{"./implementation":61,"./isArguments":63}],63:[function(require,module,exports){ -'use strict'; - -var toStr = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; - -},{}],64:[function(require,module,exports){ -'use strict'; - -// modified from https://github.com/es-shims/es6-shim -var keys = require('object-keys'); -var bind = require('function-bind'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; -var hasSymbols = require('has-symbols/shams')(); -var toObject = Object; -var push = bind.call(Function.call, Array.prototype.push); -var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable); -var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; - -module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); - var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); - if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if (propIsEnumerable(source, key)) { - push(props, key); - } - } - } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if (propIsEnumerable(source, key)) { - objTarget[key] = value; - } - } - } - return objTarget; -}; - -},{"function-bind":52,"has-symbols/shams":53,"object-keys":62}],65:[function(require,module,exports){ -'use strict'; - -var defineProperties = require('define-properties'); - -var implementation = require('./implementation'); -var getPolyfill = require('./polyfill'); -var shim = require('./shim'); - -var polyfill = getPolyfill(); - -defineProperties(polyfill, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = polyfill; - -},{"./implementation":64,"./polyfill":66,"./shim":67,"define-properties":47}],66:[function(require,module,exports){ -'use strict'; - -var implementation = require('./implementation'); - -var lacksProperEnumerationOrder = function () { - if (!Object.assign) { - return false; - } - // v8, specifically in node 4.x, has a bug with incorrect property enumeration order - // note: this does not detect the bug unless there's 20 characters - var str = 'abcdefghijklmnopqrst'; - var letters = str.split(''); - var map = {}; - for (var i = 0; i < letters.length; ++i) { - map[letters[i]] = letters[i]; - } - var obj = Object.assign({}, map); - var actual = ''; - for (var k in obj) { - actual += k; - } - return str !== actual; -}; - -var assignHasPendingExceptions = function () { - if (!Object.assign || !Object.preventExtensions) { - return false; - } - // Firefox 37 still has "pending exception" logic in its Object.assign implementation, - // which is 72% slower than our shim, and Firefox 40's native implementation. - var thrower = Object.preventExtensions({ 1: 2 }); - try { - Object.assign(thrower, 'xy'); - } catch (e) { - return thrower[1] === 'y'; - } - return false; -}; - -module.exports = function getPolyfill() { - if (!Object.assign) { - return implementation; - } - if (lacksProperEnumerationOrder()) { - return implementation; - } - if (assignHasPendingExceptions()) { - return implementation; - } - return Object.assign; -}; - -},{"./implementation":64}],67:[function(require,module,exports){ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimAssign() { - var polyfill = getPolyfill(); - define( - Object, - { assign: polyfill }, - { assign: function () { return Object.assign !== polyfill; } } - ); - return polyfill; -}; - -},{"./polyfill":66,"define-properties":47}],68:[function(require,module,exports){ -(function (process){ -'use strict'; - -if (!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); - }); + Transform.call(this, options); } -} + PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); + }; -}).call(this,require('_process')) -},{"_process":69}],69:[function(require,module,exports){ -// shim for using process in browser -var process = module.exports = {}; + inherits$3(Stream, EventEmitter$2); + Stream.Readable = Readable; + Stream.Writable = Writable; + Stream.Duplex = Duplex; + Stream.Transform = Transform; + Stream.PassThrough = PassThrough; -// 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. + // Backwards-compat with node 0.4.x + Stream.Stream = Stream; -var cachedSetTimeout; -var cachedClearTimeout; + // old-style streams. Note that the pipe method (the only relevant + // part of this class) is overridden in the Readable class. -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; + function Stream() { + EventEmitter$2.call(this); + } + + Stream.prototype.pipe = function(dest, options) { + var source = this; + + function ondata(chunk) { + if (dest.writable) { + if (false === dest.write(chunk) && source.pause) { + source.pause(); } - } 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); + + source.on('data', ondata); + + function ondrain() { + if (source.readable && source.resume) { + source.resume(); + } } - 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); - } + + dest.on('drain', ondrain); + + // If the 'end' option is not supplied, dest.end() will be called when + // source gets the 'end' or 'close' events. Only dest.end() once. + if (!dest._isStdio && (!options || options.end !== false)) { + source.on('end', onend); + source.on('close', onclose); } + var didOnEnd = false; + function onend() { + if (didOnEnd) return; + didOnEnd = true; -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); + dest.end(); } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); + + + function onclose() { + if (didOnEnd) return; + didOnEnd = true; + + if (typeof dest.destroy === 'function') dest.destroy(); } - 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); - } + + // don't leave dangling pipes when there are errors. + function onerror(er) { + cleanup(); + if (EventEmitter$2.listenerCount(this, 'error') === 0) { + throw er; // Unhandled stream error in pipe. + } } + source.on('error', onerror); + dest.on('error', onerror); + // remove all the event listeners that were added. + function cleanup() { + source.removeListener('data', ondata); + dest.removeListener('drain', ondrain); -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; + source.removeListener('end', onend); + source.removeListener('close', onclose); -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} + source.removeListener('error', onerror); + dest.removeListener('error', onerror); -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; + source.removeListener('end', cleanup); + source.removeListener('close', cleanup); - 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]; - } + dest.removeListener('close', cleanup); } - 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; }; - -},{}],70:[function(require,module,exports){ -module.exports = require('./lib/_stream_duplex.js'); - -},{"./lib/_stream_duplex.js":71}],71:[function(require,module,exports){ -// 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); + source.on('end', cleanup); + source.on('close', cleanup); + + dest.on('close', cleanup); - Readable.call(this, options); - Writable.call(this, options); + dest.emit('pipe', source); - if (options && options.readable === false) this.readable = false; + // Allow for unix-like usage: A.pipe(B).pipe(C) + return dest; + }; - if (options && options.writable === false) this.writable = false; + var _polyfillNode_stream = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': Stream, + Readable: Readable, + Writable: Writable, + Duplex: Duplex, + Transform: Transform, + PassThrough: PassThrough, + Stream: Stream + }); - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + var require$$0$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_stream); - this.once('end', onend); -} + var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_util$1); -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; - } -}); + var WritableStream = require$$0$2.Writable; + var inherits$1 = require$$0$1.inherits; -// 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; + var browserStdout = BrowserStdout; - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} -function onEndNT(self) { - self.end(); -} + inherits$1(BrowserStdout, WritableStream); -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; + function BrowserStdout(opts) { + if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts) + + opts = opts || {}; + WritableStream.call(this, opts); + this.label = (opts.label !== undefined) ? opts.label : 'stdout'; + } + + BrowserStdout.prototype._write = function(chunks, encoding, cb) { + var output = chunks.toString ? chunks.toString() : chunks; + if (this.label === false) { + console.log(output); + } else { + console.log(this.label+':', output); } + nextTick$1(cb); + }; + + /** + * Parse the given `qs`. + * + * @private + * @param {string} qs + * @return {Object} + */ + var parseQuery$1 = function parseQuery(qs) { + return qs + .replace('?', '') + .split('&') + .reduce(function (obj, pair) { + var i = pair.indexOf('='); + var key = pair.slice(0, i); + var val = pair.slice(++i); + + // Due to how the URLSearchParams API treats spaces + obj[key] = decodeURIComponent(val.replace(/\+/g, '%20')); + + return obj; + }, {}); + }; - // 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); -}; -},{"./_stream_readable":73,"./_stream_writable":75,"core-util-is":44,"inherits":56,"process-nextick-args":68}],72:[function(require,module,exports){ -// 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); -}; -},{"./_stream_transform":74,"core-util-is":44,"inherits":56}],73:[function(require,module,exports){ -(function (process,global){ -// 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; + /** + * Highlight the given string of `js`. + * + * @private + * @param {string} js + * @return {string} + */ + function highlight(js) { + return js + .replace(//g, '>') + .replace(/\/\/(.*)/gm, '//$1') + .replace(/('.*?')/gm, '$1') + .replace(/(\d+\.\d+)/gm, '$1') + .replace(/(\d+)/gm, '$1') + .replace( + /\bnew[ \t]+(\w+)/gm, + 'new $1' + ) + .replace( + /\b(function|new|throw|return|var|if|else)\b/gm, + '$1' + ); + } - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + /** + * Highlight the contents of tag `name`. + * + * @private + * @param {string} name + */ + var highlightTags$1 = function highlightTags(name) { + var code = document.getElementById('mocha').getElementsByTagName(name); + for (var i = 0, len = code.length; i < len; ++i) { + code[i].innerHTML = highlight(code[i].innerHTML); + } + }; - // 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; + var mocha$1 = {exports: {}}; - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + var escapeStringRegexp = string => { + if (typeof string !== 'string') { + throw new TypeError('Expected a string'); + } - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); + // Escape characters with special meaning either inside or outside character sets. + // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. + return string + .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') + .replace(/-/g, '\\x2d'); + }; - // 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'; + // 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. + + // resolves . and .. elements in a path array with directory names there + // must be no slashes, empty elements, or device names (c:\) in the array + // (so also no leading and trailing slashes - it does not distinguish + // relative and absolute paths) + function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } - // 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; + return parts; } -} -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); + // Split a filename into [root, dir, basename, ext], unix version + // 'root' is just a slash, or nothing. + var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); + }; + + // path.resolve([from ...], to) + // posix version + function resolve() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : '/'; - if (!(this instanceof Readable)) return new Readable(options); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } - this._readableState = new ReadableState(options, this); + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } - // legacy - this.readable = true; + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) - if (options) { - if (typeof options.read === 'function') this._read = options.read; + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); - if (typeof options.destroy === 'function') this._destroy = options.destroy; + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; } + // path.normalize(path) + // posix version + function normalize(path) { + var isPathAbsolute = isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; - Stream.call(this); -} + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isPathAbsolute).join('/'); -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; + if (!path && !isPathAbsolute) { + path = '.'; } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; + if (path && trailingSlash) { + path += '/'; } - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; + return (isPathAbsolute ? '/' : '') + path; + } + // posix version + function isAbsolute(path) { + return path.charAt(0) === '/'; } -}); - -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 = ''; + // posix version + function join() { + var paths = Array.prototype.slice.call(arguments, 0); + return normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; + return p; + }).join('/')); } - 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); -}; + // path.relative(from, to) + // posix version + function relative(from, to) { + from = resolve(from).substr(1); + to = resolve(to).substr(1); -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); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; } - 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); - } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; } - } else if (!addToFront) { - state.reading = false; + + if (start > end) return []; + return arr.slice(start, end - start + 1); } - } - return needMoreData(state); -} + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); -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; -} + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } -// 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; + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } - if (n !== 0) state.emittedReadable = false; + outputParts = outputParts.concat(toParts.slice(samePartsLength)); - // 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; + return outputParts.join('/'); } - n = howMuchToRead(n, state); + var sep = '/'; + var delimiter = ':'; + + function dirname(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } - // 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; + return root + dir; } - // 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); + function basename(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; } - 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; + function extname(path) { + return splitPath(path)[3]; } - 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(); + var _polyfillNode_path = { + extname: extname, + basename: basename, + dirname: dirname, + sep: sep, + delimiter: delimiter, + relative: relative, + join: join, + isAbsolute: isAbsolute, + normalize: normalize, + resolve: resolve + }; + function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); } - } + return res; } - 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); - } - }; -} + // String.prototype.substr - negative index don't work in IE8 + var substr = 'ab'.substr(-1) === 'b' ? + function (str, start, len) { return str.substr(start, len) } : + function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } + ; + + var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + resolve: resolve, + normalize: normalize, + isAbsolute: isAbsolute, + join: join, + relative: relative, + sep: sep, + delimiter: delimiter, + dirname: dirname, + basename: basename, + extname: extname, + 'default': _polyfillNode_path + }); -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; + var require$$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path$1); - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; + var reporters = {}; - // 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; + var base$1 = {exports: {}}; - if (!dest) dest = state.pipes; + var lib = {}; - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } + var base = {}; - // slow case. multiple pipe destinations. + /*istanbul ignore start*/ - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; + (function (exports) { - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports["default"] = Diff; - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; + /*istanbul ignore end*/ + function Diff() {} - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; + Diff.prototype = { + /*istanbul ignore start*/ - dest.emit('unpipe', this, unpipeInfo); + /*istanbul ignore end*/ + diff: function diff(oldString, newString) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var callback = options.callback; - return this; -}; + if (typeof options === 'function') { + callback = options; + options = {}; + } -// 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); + this.options = options; + var self = this; - 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); - } + function done(value) { + if (callback) { + setTimeout(function () { + callback(undefined, value); + }, 0); + return true; + } else { + return value; + } + } // Allow subclasses to massage the input prior to running + + + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, + oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + // Identity per the equality and tokenizer + return done([{ + value: this.join(newString), + count: newString.length + }]); + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + ; + + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1], + _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } - _this.push(null); - }); + var canAdd = addPath && addPath.newPos + 1 < newLen, + canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph - // 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(); - } - }); + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list - // 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); - } - } + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done - // 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(); - } - }; + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } - return this; -}; + editLength++; + } // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced. -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; + if (callback) { + (function exec() { + setTimeout(function () { + // This should not happen, but we want to be safe. -// 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; + /* istanbul ignore next */ + if (editLength > maxEditLength) { + return callback(); + } - 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; + if (!execEditLength()) { + exec(); + } + }, 0); + })(); } else { - list.head = p; - p.data = str.slice(nb); + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } } - 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; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; } else { - list.head = p; - p.data = buf.slice(nb); + components.push({ + count: 1, + added: added, + removed: removed + }); } - break; - } - ++c; - } - list.length -= c; - return ret; -} + }, -function endReadable(stream) { - var state = stream._readableState; + /*istanbul ignore start*/ - // 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'); + /*istanbul ignore end*/ + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath, + commonCount = 0; - 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; -} -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":71,"./internal/streams/BufferList":76,"./internal/streams/destroy":77,"./internal/streams/stream":78,"_process":69,"core-util-is":44,"events":50,"inherits":56,"isarray":58,"process-nextick-args":68,"safe-buffer":83,"string_decoder/":85,"util":40}],74:[function(require,module,exports){ -// 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); -} + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } -function prefinish() { - var _this = this; + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } - 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; - } -}; + basePath.newPos = newPos; + return oldPos; + }, -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; + /*istanbul ignore start*/ - 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); -} -},{"./_stream_duplex":71,"core-util-is":44,"inherits":56}],75:[function(require,module,exports){ -(function (process,global,setImmediate){ -// 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; + /*istanbul ignore end*/ + equals: function equals(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; + /*istanbul ignore start*/ - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + /*istanbul ignore end*/ + removeEmpty: function removeEmpty(array) { + var ret = []; - // 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; + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + return ret; + }, - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); + /*istanbul ignore start*/ - // if _final has been called - this.finalCalled = false; + /*istanbul ignore end*/ + castInput: function castInput(value) { + return value; + }, - // 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; + /*istanbul ignore start*/ - // has it been destroyed - this.destroyed = false; + /*istanbul ignore end*/ + tokenize: function tokenize(value) { + return value.split(''); + }, - // 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; + /*istanbul ignore start*/ - // 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'; + /*istanbul ignore end*/ + join: function join(chars) { + return chars.join(''); + } + }; - // 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; + function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, + componentLen = components.length, + newPos = 0, + oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } - // a flag to see when we're in the middle of a write. - this.writing = false; + newPos += component.count; // Common case - // when true all writes will be buffered until .uncork() call - this.corked = 0; + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; // Reverse add and remove so removes are output first to match common convention + // The diffing algorithm is tied to add then remove output and this is the simplest + // route to get the desired output with minimal overhead. + + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } // Special case handle for when one terminal is ignored (i.e. whitespace). + // For this case we merge the terminal into the prior string and drop the change. + // This is only available for string mode. - // 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; + var lastComponent = components[componentLen - 1]; - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; + if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; + return components; + } - // the amount that is being written when _write is called. - this.writelen = 0; + function clonePath(path) { + return { + newPos: path.newPos, + components: path.components.slice(0) + }; + } - this.bufferedRequest = null; - this.lastBufferedRequest = null; + }(base)); - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; + var character = {}; - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; + /*istanbul ignore start*/ - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; + Object.defineProperty(character, "__esModule", { + value: true + }); + character.diffChars = diffChars; + character.characterDiff = void 0; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base$6 = _interopRequireDefault$7(base) + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault$7(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + var characterDiff = new + /*istanbul ignore start*/ + _base$6 + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); - // 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); -} + /*istanbul ignore start*/ + character.characterDiff = characterDiff; -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 (_) {} -})(); + /*istanbul ignore end*/ + function diffChars(oldStr, newStr, options) { + return characterDiff.diff(oldStr, newStr, options); + } + + var word = {}; -// 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; + var params = {}; - return object && object._writableState instanceof WritableState; + /*istanbul ignore start*/ + + Object.defineProperty(params, "__esModule", { + value: true + }); + params.generateOptions = generateOptions; + + /*istanbul ignore end*/ + function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } else if (options) { + for (var name in options) { + /* istanbul ignore else */ + if (options.hasOwnProperty(name)) { + defaults[name] = options[name]; + } + } } + + return defaults; + } + + /*istanbul ignore start*/ + + Object.defineProperty(word, "__esModule", { + value: true }); -} else { - realHasInstance = function (object) { - return object instanceof this; + word.diffWords = diffWords; + word.diffWordsWithSpace = diffWordsWithSpace; + word.wordDiff = void 0; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base$5 = _interopRequireDefault$6(base) + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _params$1 = params + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault$6(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode + // + // Ranges and exceptions: + // Latin-1 Supplement, 0080–00FF + // - U+00D7 × Multiplication sign + // - U+00F7 ÷ Division sign + // Latin Extended-A, 0100–017F + // Latin Extended-B, 0180–024F + // IPA Extensions, 0250–02AF + // Spacing Modifier Letters, 02B0–02FF + // - U+02C7 ˇ ˇ Caron + // - U+02D8 ˘ ˘ Breve + // - U+02D9 ˙ ˙ Dot Above + // - U+02DA ˚ ˚ Ring Above + // - U+02DB ˛ ˛ Ogonek + // - U+02DC ˜ ˜ Small Tilde + // - U+02DD ˝ ˝ Double Acute Accent + // Latin Extended Additional, 1E00–1EFF + var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; + var reWhitespace = /\S/; + var wordDiff = new + /*istanbul ignore start*/ + _base$5 + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); + + /*istanbul ignore start*/ + word.wordDiff = wordDiff; + + /*istanbul ignore end*/ + wordDiff.equals = function (left, right) { + if (this.options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); }; -} -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); + wordDiff.tokenize = function (value) { + // All whitespace symbols except newline group into one token, each newline - in separate token + var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. + for (var i = 0; i < tokens.length - 1; i++) { + // If we have an empty string in the next field and we have only word chars before and after, merge + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + + return tokens; + }; - // 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); + function diffWords(oldStr, newStr, options) { + options = + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _params$1 + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + generateOptions) + /*istanbul ignore end*/ + (options, { + ignoreWhitespace: true + }); + return wordDiff.diff(oldStr, newStr, options); + } + + function diffWordsWithSpace(oldStr, newStr, options) { + return wordDiff.diff(oldStr, newStr, options); } - this._writableState = new WritableState(options, this); + var line = {}; + + /*istanbul ignore start*/ - // legacy. - this.writable = true; + Object.defineProperty(line, "__esModule", { + value: true + }); + line.diffLines = diffLines; + line.diffTrimmedLines = diffTrimmedLines; + line.lineDiff = void 0; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base$4 = _interopRequireDefault$5(base) + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _params = params + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + var lineDiff = new + /*istanbul ignore start*/ + _base$4 + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); - if (options) { - if (typeof options.write === 'function') this._write = options.write; + /*istanbul ignore start*/ + line.lineDiff = lineDiff; - if (typeof options.writev === 'function') this._writev = options.writev; + /*istanbul ignore end*/ + lineDiff.tokenize = function (value) { + var retLines = [], + linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line - if (typeof options.destroy === 'function') this._destroy = options.destroy; + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } // Merge the content and line separators into single tokens - if (typeof options.final === 'function') this._final = options.final; - } - Stream.call(this); -} + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } -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); -} + retLines.push(line); + } + } -// 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; + return retLines; + }; - 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'); + function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); } - 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); + function diffTrimmedLines(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (/*istanbul ignore end*/ - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); + /*istanbul ignore start*/ + 0, _params + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + generateOptions) + /*istanbul ignore end*/ + (callback, { + ignoreWhitespace: true + }); + return lineDiff.diff(oldStr, newStr, options); } - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } + var sentence = {}; + + /*istanbul ignore start*/ + + Object.defineProperty(sentence, "__esModule", { + value: true + }); + sentence.diffSentences = diffSentences; + sentence.sentenceDiff = void 0; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base$3 = _interopRequireDefault$4(base) + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + var sentenceDiff = new + /*istanbul ignore start*/ + _base$3 + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + /*istanbul ignore start*/ + sentence.sentenceDiff = sentenceDiff; - if (typeof cb !== 'function') cb = nop; + /*istanbul ignore end*/ + sentenceDiff.tokenize = function (value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); + }; - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + function diffSentences(oldStr, newStr, callback) { + return sentenceDiff.diff(oldStr, newStr, callback); } - return ret; -}; + var css = {}; -Writable.prototype.cork = function () { - var state = this._writableState; + /*istanbul ignore start*/ - state.corked++; -}; + Object.defineProperty(css, "__esModule", { + value: true + }); + css.diffCss = diffCss; + css.cssDiff = void 0; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base$2 = _interopRequireDefault$3(base) + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + var cssDiff = new + /*istanbul ignore start*/ + _base$2 + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); -Writable.prototype.uncork = function () { - var state = this._writableState; + /*istanbul ignore start*/ + css.cssDiff = cssDiff; - if (state.corked) { - state.corked--; + /*istanbul ignore end*/ + cssDiff.tokenize = function (value) { + return value.split(/([{}:;,]|\s+)/); + }; - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + function diffCss(oldStr, newStr, callback) { + return cssDiff.diff(oldStr, newStr, callback); } -}; -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; -}; + var json$1 = {}; -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} + /*istanbul ignore start*/ -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; - } -}); + Object.defineProperty(json$1, "__esModule", { + value: true + }); + json$1.diffJson = diffJson; + json$1.canonicalize = canonicalize; + json$1.jsonDiff = void 0; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base$1 = _interopRequireDefault$2(base) + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _line$1 = line + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + function _typeof(obj) { "@babel/helpers - typeof"; 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); } + + /*istanbul ignore end*/ + var objectPrototypeToString = Object.prototype.toString; + var jsonDiff = new + /*istanbul ignore start*/ + _base$1 + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + + /*istanbul ignore start*/ + json$1.jsonDiff = jsonDiff; + + /*istanbul ignore end*/ + jsonDiff.useLongestToken = true; + jsonDiff.tokenize = + /*istanbul ignore start*/ + _line$1 + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + lineDiff + /*istanbul ignore end*/ + .tokenize; + + jsonDiff.castInput = function (value) { + /*istanbul ignore start*/ + var _this$options = + /*istanbul ignore end*/ + this.options, + undefinedReplacement = _this$options.undefinedReplacement, + _this$options$stringi = _this$options.stringifyReplacer, + stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) + /*istanbul ignore start*/ + { + return ( + /*istanbul ignore end*/ + typeof v === 'undefined' ? undefinedReplacement : v + ); + } : _this$options$stringi; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); + }; -// 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; + jsonDiff.equals = function (left, right) { + return ( + /*istanbul ignore start*/ + _base$1 + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ].prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) + ); + }; - state.length += len; + function diffJson(oldObj, newObj, options) { + return jsonDiff.diff(oldObj, newObj, options); + } // This function handles the presence of circular references by bailing out when encountering an + // object that is already on the "stack" of items being processed. Accepts an optional replacer - 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; + function canonicalize(obj, stack, replacementStack, replacer, key) { + stack = stack || []; + replacementStack = replacementStack || []; + + if (replacer) { + obj = replacer(key, obj); } - 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; -} + var i; + + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; + var canonicalizedObj; - onwriteStateUpdate(state); + if ('[object Array]' === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); - 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); + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); + } - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; } - 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); + if (obj && obj.toJSON) { + obj = obj.toJSON(); } - 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 ( + /*istanbul ignore start*/ + _typeof( + /*istanbul ignore end*/ + obj) === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + + var sortedKeys = [], + _key; + + for (_key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); + } } + + sortedKeys.sort(); + + for (i = 0; i < sortedKeys.length; i += 1) { + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); + } + + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; } - if (entry === null) state.lastBufferedRequest = null; + return canonicalizedObj; } - state.bufferedRequest = entry; - state.bufferProcessing = false; -} + var array$1 = {}; -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; + /*istanbul ignore start*/ -Writable.prototype._writev = null; + Object.defineProperty(array$1, "__esModule", { + value: true + }); + array$1.diffArrays = diffArrays; + array$1.arrayDiff = void 0; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base = _interopRequireDefault$1(base) + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + var arrayDiff = new + /*istanbul ignore start*/ + _base + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; + /*istanbul ignore start*/ + array$1.arrayDiff = arrayDiff; - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } + /*istanbul ignore end*/ + arrayDiff.tokenize = function (value) { + return value.slice(); + }; - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + arrayDiff.join = arrayDiff.removeEmpty = function (value) { + return value; + }; - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); + function diffArrays(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); } - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; + var apply = {}; -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); + var parse$2 = {}; + + /*istanbul ignore start*/ + + Object.defineProperty(parse$2, "__esModule", { + value: true }); -} -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'); - } - } -} + parse$2.parsePatch = parsePatch; -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; -} + /*istanbul ignore end*/ + function parsePatch(uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], + list = [], + i = 0; -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 parseIndex() { + var index = {}; + list.push(index); // Parse diff metadata -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; - } -} + while (i < diffstr.length) { + var line = diffstr[i]; // File header found, end parsing diff metadata -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; - } + if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { + break; + } // Diff index - // 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); -}; -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) -},{"./_stream_duplex":71,"./internal/streams/destroy":77,"./internal/streams/stream":78,"_process":69,"core-util-is":44,"inherits":56,"process-nextick-args":68,"safe-buffer":83,"timers":86,"util-deprecate":87}],76:[function(require,module,exports){ -'use strict'; + var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + if (header) { + index.index = header[1]; + } -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); + i++; + } // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); + parseFileHeader(index); + parseFileHeader(index); // Parse hunks - this.head = null; - this.tail = null; - this.length = 0; - } + index.hunks = []; - 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; - }; + while (i < diffstr.length) { + var _line = diffstr[i]; - 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; - }; + if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { + break; + } else if (/^@@/.test(_line)) { + index.hunks.push(parseHunk()); + } else if (_line && options.strict) { + // Ignore unexpected content unless in strict mode + throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); + } else { + i++; + } + } + } // Parses the --- and +++ headers, if none are found, no lines + // are consumed. - 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; - }; + function parseFileHeader(index) { + var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]); - 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; - }; + if (fileHeader) { + var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; + var data = fileHeader[2].split('\t', 2); + var fileName = data[0].replace(/\\\\/g, '\\'); - 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; - }; + if (/^".*"$/.test(fileName)) { + fileName = fileName.substr(1, fileName.length - 2); + } - return BufferList; -}(); + index[keyPrefix + 'FileName'] = fileName; + index[keyPrefix + 'Header'] = (data[1] || '').trim(); + i++; + } + } // Parses a hunk + // This assumes that we are at the start of a hunk. + + + function parseHunk() { + var chunkHeaderIndex = i, + chunkHeaderLine = diffstr[i++], + chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + var hunk = { + oldStart: +chunkHeader[1], + oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], + newStart: +chunkHeader[3], + newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], + lines: [], + linedelimiters: [] + }; // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + + if (hunk.oldLines === 0) { + hunk.oldStart += 1; + } -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; - }; -} -},{"safe-buffer":83,"util":40}],77:[function(require,module,exports){ -'use strict'; + if (hunk.newLines === 0) { + hunk.newStart += 1; + } -/**/ + var addCount = 0, + removeCount = 0; -var pna = require('process-nextick-args'); -/**/ + for (; i < diffstr.length; i++) { + // Lines starting with '---' could be mistaken for the "remove line" operation + // But they could be the header for the next file. Therefore prune such cases out. + if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { + break; + } -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; + var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + hunk.linedelimiters.push(delimiters[i] || '\n'); - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } + if (operation === '+') { + addCount++; + } else if (operation === '-') { + removeCount++; + } else if (operation === ' ') { + addCount++; + removeCount++; + } + } else { + break; + } + } // Handle the empty block count case - // 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 (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } // Perform optional sanity checking + + + if (options.strict) { + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } } - } else if (cb) { - cb(err); + + return hunk; } - }); - 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 -}; -},{"process-nextick-args":68}],78:[function(require,module,exports){ -module.exports = require('events').EventEmitter; - -},{"events":50}],79:[function(require,module,exports){ -module.exports = require('./readable').PassThrough - -},{"./readable":80}],80:[function(require,module,exports){ -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'); - -},{"./lib/_stream_duplex.js":71,"./lib/_stream_passthrough.js":72,"./lib/_stream_readable.js":73,"./lib/_stream_transform.js":74,"./lib/_stream_writable.js":75}],81:[function(require,module,exports){ -module.exports = require('./readable').Transform - -},{"./readable":80}],82:[function(require,module,exports){ -module.exports = require('./lib/_stream_writable.js'); - -},{"./lib/_stream_writable.js":75}],83:[function(require,module,exports){ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) + while (i < diffstr.length) { + parseIndex(); } - } else { - buf.fill(0) - } - return buf -} -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') + return list; } - return Buffer(size) -} -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} + var distanceIterator = {}; -},{"buffer":43}],84:[function(require,module,exports){ -// 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. + /*istanbul ignore start*/ -module.exports = Stream; + (function (exports) { -var EE = require('events').EventEmitter; -var inherits = require('inherits'); + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports["default"] = _default; + + /*istanbul ignore end*/ + // Iterator that traverses in the range of [min, max], stepping + // by distance from a given start position. I.e. for [0, 4], with + // start of 2, this will iterate 2, 3, 1, 4, 0. + function + /*istanbul ignore start*/ + _default + /*istanbul ignore end*/ + (start, minLine, maxLine) { + var wantForward = true, + backwardExhausted = false, + forwardExhausted = false, + localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } else { + wantForward = false; + } // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) -inherits(Stream, EE); -Stream.Readable = require('readable-stream/readable.js'); -Stream.Writable = require('readable-stream/writable.js'); -Stream.Duplex = require('readable-stream/duplex.js'); -Stream.Transform = require('readable-stream/transform.js'); -Stream.PassThrough = require('readable-stream/passthrough.js'); -// Backwards-compat with node 0.4.x -Stream.Stream = Stream; + if (start + localOffset <= maxLine) { + return localOffset; + } + forwardExhausted = true; + } + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } // Check if trying to fit before text beginning, and if not, check it fits + // before offset location -// old-style streams. Note that the pipe method (the only relevant -// part of this class) is overridden in the Readable class. -function Stream() { - EE.call(this); -} + if (minLine <= start - localOffset) { + return -localOffset++; + } -Stream.prototype.pipe = function(dest, options) { - var source = this; + backwardExhausted = true; + return iterator(); + } // We tried to fit hunk before text beginning and beyond text length, then + // hunk can't fit on the text. Return undefined - function ondata(chunk) { - if (dest.writable) { - if (false === dest.write(chunk) && source.pause) { - source.pause(); - } - } + }; } - source.on('data', ondata); + }(distanceIterator)); - function ondrain() { - if (source.readable && source.resume) { - source.resume(); - } - } + /*istanbul ignore start*/ - dest.on('drain', ondrain); + Object.defineProperty(apply, "__esModule", { + value: true + }); + apply.applyPatch = applyPatch; + apply.applyPatches = applyPatches; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _parse$1 = parse$2 + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _distanceIterator = _interopRequireDefault(distanceIterator) + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + function applyPatch(source, uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _parse$1 + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + parsePatch) + /*istanbul ignore end*/ + (uniDiff); + } + + if (Array.isArray(uniDiff)) { + if (uniDiff.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } - // If the 'end' option is not supplied, dest.end() will be called when - // source gets the 'end' or 'close' events. Only dest.end() once. - if (!dest._isStdio && (!options || options.end !== false)) { - source.on('end', onend); - source.on('close', onclose); - } + uniDiff = uniDiff[0]; + } // Apply the diff to the input - var didOnEnd = false; - function onend() { - if (didOnEnd) return; - didOnEnd = true; - dest.end(); - } + var lines = source.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], + hunks = uniDiff.hunks, + compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) + /*istanbul ignore start*/ + { + return ( + /*istanbul ignore end*/ + line === patchContent + ); + }, + errorCount = 0, + fuzzFactor = options.fuzzFactor || 0, + minLine = 0, + offset = 0, + removeEOFNL, + addEOFNL; + /** + * Checks if the hunk exactly fits on the provided location + */ - function onclose() { - if (didOnEnd) return; - didOnEnd = true; + function hunkFits(hunk, toPos) { + for (var j = 0; j < hunk.lines.length; j++) { + var line = hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line; - if (typeof dest.destroy === 'function') dest.destroy(); - } + if (operation === ' ' || operation === '-') { + // Context sanity check + if (!compareLine(toPos + 1, lines[toPos], operation, content)) { + errorCount++; - // don't leave dangling pipes when there are errors. - function onerror(er) { - cleanup(); - if (EE.listenerCount(this, 'error') === 0) { - throw er; // Unhandled stream error in pipe. - } - } + if (errorCount > fuzzFactor) { + return false; + } + } - source.on('error', onerror); - dest.on('error', onerror); + toPos++; + } + } + + return true; + } // Search best fit offsets for each hunk based on the previous ones + + + for (var i = 0; i < hunks.length; i++) { + var hunk = hunks[i], + maxLine = lines.length - hunk.oldLines, + localOffset = 0, + toPos = offset + hunk.oldStart - 1; + var iterator = + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _distanceIterator + /*istanbul ignore end*/ + [ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ])(toPos, minLine, maxLine); + + for (; localOffset !== undefined; localOffset = iterator()) { + if (hunkFits(hunk, toPos + localOffset)) { + hunk.offset = offset += localOffset; + break; + } + } - // remove all the event listeners that were added. - function cleanup() { - source.removeListener('data', ondata); - dest.removeListener('drain', ondrain); + if (localOffset === undefined) { + return false; + } // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text - source.removeListener('end', onend); - source.removeListener('close', onclose); - source.removeListener('error', onerror); - dest.removeListener('error', onerror); + minLine = hunk.offset + hunk.oldStart + hunk.oldLines; + } // Apply patch hunks - source.removeListener('end', cleanup); - source.removeListener('close', cleanup); - dest.removeListener('close', cleanup); - } + var diffOffset = 0; - source.on('end', cleanup); - source.on('close', cleanup); + for (var _i = 0; _i < hunks.length; _i++) { + var _hunk = hunks[_i], + _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; - dest.on('close', cleanup); + diffOffset += _hunk.newLines - _hunk.oldLines; - dest.emit('pipe', source); + for (var j = 0; j < _hunk.lines.length; j++) { + var line = _hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line, + delimiter = _hunk.linedelimiters[j]; - // Allow for unix-like usage: A.pipe(B).pipe(C) - return dest; -}; + if (operation === ' ') { + _toPos++; + } else if (operation === '-') { + lines.splice(_toPos, 1); + delimiters.splice(_toPos, 1); + /* istanbul ignore else */ + } else if (operation === '+') { + lines.splice(_toPos, 0, content); + delimiters.splice(_toPos, 0, delimiter); + _toPos++; + } else if (operation === '\\') { + var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; -},{"events":50,"inherits":56,"readable-stream/duplex.js":70,"readable-stream/passthrough.js":79,"readable-stream/readable.js":80,"readable-stream/transform.js":81,"readable-stream/writable.js":82}],85:[function(require,module,exports){ -// 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. + if (previousOperation === '+') { + removeEOFNL = true; + } else if (previousOperation === '-') { + addEOFNL = true; + } + } + } + } // Handle EOFNL insertion/removal -'use strict'; -/**/ + if (removeEOFNL) { + while (!lines[lines.length - 1]) { + lines.pop(); + delimiters.pop(); + } + } else if (addEOFNL) { + lines.push(''); + delimiters.push('\n'); + } -var Buffer = require('safe-buffer').Buffer; -/**/ + for (var _k = 0; _k < lines.length - 1; _k++) { + lines[_k] = lines[_k] + delimiters[_k]; + } -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; - } -}; + return lines.join(''); + } // Wrapper that supports multiple file patches via callbacks. -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) : ''; -} -},{"safe-buffer":83}],86:[function(require,module,exports){ -(function (setImmediate,clearImmediate){ -var nextTick = require('process/browser.js').nextTick; -var apply = Function.prototype.apply; -var slice = Array.prototype.slice; -var immediateIds = {}; -var nextImmediateId = 0; - -// DOM APIs, for completeness - -exports.setTimeout = function() { - return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout); -}; -exports.setInterval = function() { - return new Timeout(apply.call(setInterval, window, arguments), clearInterval); -}; -exports.clearTimeout = -exports.clearInterval = function(timeout) { timeout.close(); }; - -function Timeout(id, clearFn) { - this._id = id; - this._clearFn = clearFn; -} -Timeout.prototype.unref = Timeout.prototype.ref = function() {}; -Timeout.prototype.close = function() { - this._clearFn.call(window, this._id); -}; - -// Does not start the time, just sets up the members needed. -exports.enroll = function(item, msecs) { - clearTimeout(item._idleTimeoutId); - item._idleTimeout = msecs; -}; - -exports.unenroll = function(item) { - clearTimeout(item._idleTimeoutId); - item._idleTimeout = -1; -}; - -exports._unrefActive = exports.active = function(item) { - clearTimeout(item._idleTimeoutId); - - var msecs = item._idleTimeout; - if (msecs >= 0) { - item._idleTimeoutId = setTimeout(function onTimeout() { - if (item._onTimeout) - item._onTimeout(); - }, msecs); - } -}; - -// That's not how node.js implements it but the exposed api is the same. -exports.setImmediate = typeof setImmediate === "function" ? setImmediate : function(fn) { - var id = nextImmediateId++; - var args = arguments.length < 2 ? false : slice.call(arguments, 1); - - immediateIds[id] = true; - - nextTick(function onNextTick() { - if (immediateIds[id]) { - // fn.call() is faster so we optimize for the common use-case - // @see http://jsperf.com/call-apply-segu - if (args) { - fn.apply(null, args); - } else { - fn.call(null); - } - // Prevent ids from leaking - exports.clearImmediate(id); + + function applyPatches(uniDiff, options) { + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _parse$1 + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + parsePatch) + /*istanbul ignore end*/ + (uniDiff); } - }); - return id; -}; - -exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) { - delete immediateIds[id]; -}; -}).call(this,require("timers").setImmediate,require("timers").clearImmediate) -},{"process/browser.js":69,"timers":86}],87:[function(require,module,exports){ -(function (global){ - -/** - * 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); + var currentIndex = 0; + + function processIndex() { + var index = uniDiff[currentIndex++]; + + if (!index) { + return options.complete(); } - warned = true; + + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + + var updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + + processIndex(); + }); + }); } - return fn.apply(this, arguments); + + processIndex(); } - return deprecated; -} + var merge$1 = {}; -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ + var create = {}; -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'; -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],88:[function(require,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],89:[function(require,module,exports){ -(function (process,global){ -// 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. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } + /*istanbul ignore start*/ + + Object.defineProperty(create, "__esModule", { + value: true }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); + create.structuredPatch = structuredPatch; + create.formatPatch = formatPatch; + create.createTwoFilesPatch = createTwoFilesPatch; + create.createPatch = createPatch; + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _line = line + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _toConsumableArray$1(arr) { return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1(); } + + function _nonIterableSpread$1() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + + function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(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$1(o, minLen); } + + function _iterableToArray$1(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } + + function _arrayWithoutHoles$1(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); } + + function _arrayLikeToArray$1(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; } + + /*istanbul ignore end*/ + function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; } - } - return str; -}; + if (typeof options.context === 'undefined') { + options.context = 4; + } -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } + var diff = + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _line + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + diffLines) + /*istanbul ignore end*/ + (oldStr, newStr, options); + diff.push({ + value: '', + lines: [] + }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { + return ' ' + entry; + }); + } - if (process.noDeprecation === true) { - return fn; - } + var hunks = []; + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + + /*istanbul ignore start*/ + var _loop = function _loop( + /*istanbul ignore end*/ + i) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + /*istanbul ignore start*/ + var _curRange; + + /*istanbul ignore end*/ + // If we have previous context, start with that + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } // Output our changes + + + /*istanbul ignore start*/ - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_curRange = + /*istanbul ignore end*/ + curRange).push.apply( + /*istanbul ignore start*/ + _curRange + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray$1( + /*istanbul ignore end*/ + lines.map(function (entry) { + return (current.added ? '+' : '-') + entry; + }))); // Track the updated file position + + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } } else { - console.error(msg); + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= options.context * 2 && i < diff.length - 2) { + /*istanbul ignore start*/ + var _curRange2; + + /*istanbul ignore end*/ + // Overlapping + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_curRange2 = + /*istanbul ignore end*/ + curRange).push.apply( + /*istanbul ignore start*/ + _curRange2 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray$1( + /*istanbul ignore end*/ + contextLines(lines))); + } else { + /*istanbul ignore start*/ + var _curRange3; + + /*istanbul ignore end*/ + // end the range and output + var contextSize = Math.min(lines.length, options.context); + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_curRange3 = + /*istanbul ignore end*/ + curRange).push.apply( + /*istanbul ignore start*/ + _curRange3 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray$1( + /*istanbul ignore end*/ + contextLines(lines.slice(0, contextSize)))); + + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + + if (i >= diff.length - 2 && lines.length <= options.context) { + // EOF is inside this hunk + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; + + if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) { + // special case: old has no eol and no trailing context; no-nl can end up before adds + // however, if the old file is empty, do not output the no-nl line + curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); + } + + if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { + curRange.push('\\ No newline at end of file'); + } + } + + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + + oldLine += lines.length; + newLine += lines.length; } - warned = true; + }; + + for (var i = 0; i < diff.length; i++) { + /*istanbul ignore start*/ + _loop( + /*istanbul ignore end*/ + i); } - return fn.apply(this, arguments); + + return { + oldFileName: oldFileName, + newFileName: newFileName, + oldHeader: oldHeader, + newHeader: newHeader, + hunks: hunks + }; } - return deprecated; -}; + function formatPatch(diff) { + var ret = []; + + if (diff.oldFileName == diff.newFileName) { + ret.push('Index: ' + diff.oldFileName); + } + ret.push('==================================================================='); + ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); + ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; + for (var i = 0; i < diff.hunks.length; i++) { + var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + + if (hunk.oldLines === 0) { + hunk.oldStart -= 1; + } + + if (hunk.newLines === 0) { + hunk.newStart -= 1; + } + + ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); + ret.push.apply(ret, hunk.lines); + } + + return ret.join('\n') + '\n'; } -} + function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options)); + } -function stylizeNoColor(str, styleType) { - return str; -} + function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); + } + var array = {}; -function arrayToHash(array) { - var hash = {}; + /*istanbul ignore start*/ - array.forEach(function(val, idx) { - hash[val] = true; + Object.defineProperty(array, "__esModule", { + value: true }); + array.arrayEqual = arrayEqual; + array.arrayStartsWith = arrayStartsWith; - return hash; -} + /*istanbul ignore end*/ + function arrayEqual(a, b) { + if (a.length !== b.length) { + return false; + } + return arrayStartsWith(a, b); + } -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); + function arrayStartsWith(array, start) { + if (start.length > array.length) { + return false; + } + + for (var i = 0; i < start.length; i++) { + if (start[i] !== array[i]) { + return false; + } } - return ret; - } - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; + return true; } - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); + /*istanbul ignore start*/ - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } + Object.defineProperty(merge$1, "__esModule", { + value: true + }); + merge$1.calcLineCount = calcLineCount; + merge$1.merge = merge; - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _create = create + /*istanbul ignore end*/ + ; - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); + var + /*istanbul ignore start*/ + _parse = parse$2 + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _array = array + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + + function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + + 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); } + + function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } + + function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + + 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; } + + /*istanbul ignore end*/ + function calcLineCount(hunk) { + /*istanbul ignore start*/ + var _calcOldNewLineCount = + /*istanbul ignore end*/ + calcOldNewLineCount(hunk.lines), + oldLines = _calcOldNewLineCount.oldLines, + newLines = _calcOldNewLineCount.newLines; + + if (oldLines !== undefined) { + hunk.oldLines = oldLines; + } else { + delete hunk.oldLines; } - if (isError(value)) { - return formatError(value); + + if (newLines !== undefined) { + hunk.newLines = newLines; + } else { + delete hunk.newLines; + } + } + + function merge(mine, theirs, base) { + mine = loadPatch(mine, base); + theirs = loadPatch(theirs, base); + var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. + // Leaving sanity checks on this to the API consumer that may know more about the + // meaning in their own context. + + if (mine.index || theirs.index) { + ret.index = mine.index || theirs.index; + } + + if (mine.newFileName || theirs.newFileName) { + if (!fileNameChanged(mine)) { + // No header or no change in ours, use theirs (and ours if theirs does not exist) + ret.oldFileName = theirs.oldFileName || mine.oldFileName; + ret.newFileName = theirs.newFileName || mine.newFileName; + ret.oldHeader = theirs.oldHeader || mine.oldHeader; + ret.newHeader = theirs.newHeader || mine.newHeader; + } else if (!fileNameChanged(theirs)) { + // No header or no change in theirs, use ours + ret.oldFileName = mine.oldFileName; + ret.newFileName = mine.newFileName; + ret.oldHeader = mine.oldHeader; + ret.newHeader = mine.newHeader; + } else { + // Both changed... figure it out + ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); + ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); + ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); + ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); + } } - } - var base = '', array = false, braces = ['{', '}']; + ret.hunks = []; + var mineIndex = 0, + theirsIndex = 0, + mineOffset = 0, + theirsOffset = 0; - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } + while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { + var mineCurrent = mine.hunks[mineIndex] || { + oldStart: Infinity + }, + theirsCurrent = theirs.hunks[theirsIndex] || { + oldStart: Infinity + }; - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } + if (hunkBefore(mineCurrent, theirsCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); + mineIndex++; + theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; + } else if (hunkBefore(theirsCurrent, mineCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); + theirsIndex++; + mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; + } else { + // Overlap, merge as best we can + var mergedHunk = { + oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), + oldLines: 0, + newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), + newLines: 0, + lines: [] + }; + mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); + theirsIndex++; + mineIndex++; + ret.hunks.push(mergedHunk); + } + } - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); + return ret; } - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } + function loadPatch(param, base) { + if (typeof param === 'string') { + if (/^@@/m.test(param) || /^Index:/m.test(param)) { + return ( + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _parse + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + parsePatch) + /*istanbul ignore end*/ + (param)[0] + ); + } + + if (!base) { + throw new Error('Must provide a base reference or pass in a patch'); + } - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); + return ( + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _create + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + structuredPatch) + /*istanbul ignore end*/ + (undefined, undefined, base, param) + ); + } + + return param; } - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; + function fileNameChanged(patch) { + return patch.newFileName && patch.newFileName !== patch.oldFileName; } - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + function selectField(index, mine, theirs) { + if (mine === theirs) { + return mine; } else { - return ctx.stylize('[Object]', 'special'); + index.conflict = true; + return { + mine: mine, + theirs: theirs + }; } } - ctx.seen.push(value); + function hunkBefore(test, check) { + return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; + } - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); + function cloneHunk(hunk, offset) { + return { + oldStart: hunk.oldStart, + oldLines: hunk.oldLines, + newStart: hunk.newStart + offset, + newLines: hunk.newLines, + lines: hunk.lines + }; } - ctx.seen.pop(); + function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { + // This will generally result in a conflicted hunk, but there are cases where the context + // is the only overlap where we can successfully merge the content here. + var mine = { + offset: mineOffset, + lines: mineLines, + index: 0 + }, + their = { + offset: theirOffset, + lines: theirLines, + index: 0 + }; // Handle any leading content + + insertLeading(hunk, mine, their); + insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. + + while (mine.index < mine.lines.length && their.index < their.lines.length) { + var mineCurrent = mine.lines[mine.index], + theirCurrent = their.lines[their.index]; + + if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { + // Both modified ... + mutualChange(hunk, mine, their); + } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { + /*istanbul ignore start*/ + var _hunk$lines; + + /*istanbul ignore end*/ + // Mine inserted + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines = + /*istanbul ignore end*/ + hunk.lines).push.apply( + /*istanbul ignore start*/ + _hunk$lines + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + collectChange(mine))); + } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { + /*istanbul ignore start*/ + var _hunk$lines2; + + /*istanbul ignore end*/ + // Theirs inserted + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines2 = + /*istanbul ignore end*/ + hunk.lines).push.apply( + /*istanbul ignore start*/ + _hunk$lines2 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + collectChange(their))); + } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { + // Mine removed or edited + removal(hunk, mine, their); + } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { + // Their removed or edited + removal(hunk, their, mine, true); + } else if (mineCurrent === theirCurrent) { + // Context identity + hunk.lines.push(mineCurrent); + mine.index++; + their.index++; + } else { + // Context mismatch + conflict(hunk, collectChange(mine), collectChange(their)); + } + } // Now push anything that may be remaining + + + insertTrailing(hunk, mine); + insertTrailing(hunk, their); + calcLineCount(hunk); + } + + function mutualChange(hunk, mine, their) { + var myChanges = collectChange(mine), + theirChanges = collectChange(their); + + if (allRemoves(myChanges) && allRemoves(theirChanges)) { + // Special case for remove changes that are supersets of one another + if ( + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _array + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + arrayStartsWith) + /*istanbul ignore end*/ + (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { + /*istanbul ignore start*/ + var _hunk$lines3; + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines3 = + /*istanbul ignore end*/ + hunk.lines).push.apply( + /*istanbul ignore start*/ + _hunk$lines3 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + myChanges)); + + return; + } else if ( + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _array + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + arrayStartsWith) + /*istanbul ignore end*/ + (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { + /*istanbul ignore start*/ + var _hunk$lines4; + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines4 = + /*istanbul ignore end*/ + hunk.lines).push.apply( + /*istanbul ignore start*/ + _hunk$lines4 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + theirChanges)); - return reduceToSingleString(output, base, braces); -} + return; + } + } else if ( + /*istanbul ignore start*/ + (/*istanbul ignore end*/ + + /*istanbul ignore start*/ + 0, _array + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + arrayEqual) + /*istanbul ignore end*/ + (myChanges, theirChanges)) { + /*istanbul ignore start*/ + var _hunk$lines5; + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines5 = + /*istanbul ignore end*/ + hunk.lines).push.apply( + /*istanbul ignore start*/ + _hunk$lines5 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + myChanges)); + return; + } -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); + conflict(hunk, myChanges, theirChanges); } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} + function removal(hunk, mine, their, swap) { + var myChanges = collectChange(mine), + theirChanges = collectContext(their, myChanges); + + if (theirChanges.merged) { + /*istanbul ignore start*/ + var _hunk$lines6; + + /*istanbul ignore end*/ -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} + /*istanbul ignore start*/ + /*istanbul ignore end*/ -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); + /*istanbul ignore start*/ + (_hunk$lines6 = + /*istanbul ignore end*/ + hunk.lines).push.apply( + /*istanbul ignore start*/ + _hunk$lines6 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + theirChanges.merged)); } else { - output.push(''); + conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); } } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} + function conflict(hunk, mine, their) { + hunk.conflict = true; + hunk.lines.push({ + conflict: true, + mine: mine, + theirs: their + }); + } -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); + function insertLeading(hunk, insert, their) { + while (insert.offset < their.offset && insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + insert.offset++; } } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; + + function insertTrailing(hunk, insert) { + while (insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + } } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); + + function collectChange(state) { + var ret = [], + operation = state.lines[state.index][0]; + + while (state.index < state.lines.length) { + var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. + + if (operation === '-' && line[0] === '+') { + operation = '+'; } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } + + if (operation === line[0]) { + ret.push(line); + state.index++; + } else { + break; } - } else { - str = ctx.stylize('[Circular]', 'special'); } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { + + return ret; + } + + function collectContext(state, matchChanges) { + var changes = [], + merged = [], + matchIndex = 0, + contextChanges = false, + conflicted = false; + + while (matchIndex < matchChanges.length && state.index < state.lines.length) { + var change = state.lines[state.index], + match = matchChanges[matchIndex]; // Once we've hit our add, then we are done + + if (match[0] === '+') { + break; + } + + contextChanges = contextChanges || change[0] !== ' '; + merged.push(match); + matchIndex++; // Consume any additions in the other block as a conflict to attempt + // to pull in the remaining context after this + + if (change[0] === '+') { + conflicted = true; + + while (change[0] === '+') { + changes.push(change); + change = state.lines[++state.index]; + } + } + + if (match.substr(1) === change.substr(1)) { + changes.push(change); + state.index++; + } else { + conflicted = true; + } + } + + if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { + conflicted = true; + } + + if (conflicted) { + return changes; + } + + while (matchIndex < matchChanges.length) { + merged.push(matchChanges[matchIndex++]); + } + + return { + merged: merged, + changes: changes + }; + } + + function allRemoves(changes) { + return changes.reduce(function (prev, change) { + return prev && change[0] === '-'; + }, true); + } + + function skipRemoveSuperset(state, removeChanges, delta) { + for (var i = 0; i < delta; i++) { + var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); + + if (state.lines[state.index + i] !== ' ' + changeContent) { + return false; + } + } + + state.index += delta; + return true; + } + + function calcOldNewLineCount(lines) { + var oldLines = 0; + var newLines = 0; + lines.forEach(function (line) { + if (typeof line !== 'string') { + var myCount = calcOldNewLineCount(line.mine); + var theirCount = calcOldNewLineCount(line.theirs); + + if (oldLines !== undefined) { + if (myCount.oldLines === theirCount.oldLines) { + oldLines += myCount.oldLines; + } else { + oldLines = undefined; + } + } + + if (newLines !== undefined) { + if (myCount.newLines === theirCount.newLines) { + newLines += myCount.newLines; + } else { + newLines = undefined; + } + } + } else { + if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { + newLines++; + } + + if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { + oldLines++; + } + } + }); + return { + oldLines: oldLines, + newLines: newLines + }; + } + + var dmp = {}; + + /*istanbul ignore start*/ + + Object.defineProperty(dmp, "__esModule", { + value: true + }); + dmp.convertChangesToDMP = convertChangesToDMP; + + /*istanbul ignore end*/ + // See: http://code.google.com/p/google-diff-match-patch/wiki/API + function convertChangesToDMP(changes) { + var ret = [], + change, + operation; + + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + + if (change.added) { + operation = 1; + } else if (change.removed) { + operation = -1; + } else { + operation = 0; + } + + ret.push([operation, change.value]); + } + + return ret; + } + + var xml = {}; + + /*istanbul ignore start*/ + + Object.defineProperty(xml, "__esModule", { + value: true + }); + xml.convertChangesToXML = convertChangesToXML; + + /*istanbul ignore end*/ + function convertChangesToXML(changes) { + var ret = []; + + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + + return ret.join(''); + } + + function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; + } + + /*istanbul ignore start*/ + + (function (exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, "Diff", { + enumerable: true, + get: function get() { + return _base["default"]; + } + }); + Object.defineProperty(exports, "diffChars", { + enumerable: true, + get: function get() { + return _character.diffChars; + } + }); + Object.defineProperty(exports, "diffWords", { + enumerable: true, + get: function get() { + return _word.diffWords; + } + }); + Object.defineProperty(exports, "diffWordsWithSpace", { + enumerable: true, + get: function get() { + return _word.diffWordsWithSpace; + } + }); + Object.defineProperty(exports, "diffLines", { + enumerable: true, + get: function get() { + return _line.diffLines; + } + }); + Object.defineProperty(exports, "diffTrimmedLines", { + enumerable: true, + get: function get() { + return _line.diffTrimmedLines; + } + }); + Object.defineProperty(exports, "diffSentences", { + enumerable: true, + get: function get() { + return _sentence.diffSentences; + } + }); + Object.defineProperty(exports, "diffCss", { + enumerable: true, + get: function get() { + return _css.diffCss; + } + }); + Object.defineProperty(exports, "diffJson", { + enumerable: true, + get: function get() { + return _json.diffJson; + } + }); + Object.defineProperty(exports, "canonicalize", { + enumerable: true, + get: function get() { + return _json.canonicalize; + } + }); + Object.defineProperty(exports, "diffArrays", { + enumerable: true, + get: function get() { + return _array.diffArrays; + } + }); + Object.defineProperty(exports, "applyPatch", { + enumerable: true, + get: function get() { + return _apply.applyPatch; + } + }); + Object.defineProperty(exports, "applyPatches", { + enumerable: true, + get: function get() { + return _apply.applyPatches; + } + }); + Object.defineProperty(exports, "parsePatch", { + enumerable: true, + get: function get() { + return _parse.parsePatch; + } + }); + Object.defineProperty(exports, "merge", { + enumerable: true, + get: function get() { + return _merge.merge; + } + }); + Object.defineProperty(exports, "structuredPatch", { + enumerable: true, + get: function get() { + return _create.structuredPatch; + } + }); + Object.defineProperty(exports, "createTwoFilesPatch", { + enumerable: true, + get: function get() { + return _create.createTwoFilesPatch; + } + }); + Object.defineProperty(exports, "createPatch", { + enumerable: true, + get: function get() { + return _create.createPatch; + } + }); + Object.defineProperty(exports, "convertChangesToDMP", { + enumerable: true, + get: function get() { + return _dmp.convertChangesToDMP; + } + }); + Object.defineProperty(exports, "convertChangesToXML", { + enumerable: true, + get: function get() { + return _xml.convertChangesToXML; + } + }); + + /*istanbul ignore end*/ + var + /*istanbul ignore start*/ + _base = _interopRequireDefault(base) + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _character = character + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _word = word + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _line = line + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _sentence = sentence + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _css = css + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _json = json$1 + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _array = array$1 + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _apply = apply + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _parse = parse$2 + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _merge = merge$1 + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _create = create + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _dmp = dmp + /*istanbul ignore end*/ + ; + + var + /*istanbul ignore start*/ + _xml = xml + /*istanbul ignore end*/ + ; + + /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + /*istanbul ignore end*/ + + }(lib)); + + /** + * Helpers. + */ + + var s$1 = 1000; + var m$1 = s$1 * 60; + var h$1 = m$1 * 60; + var d$1 = h$1 * 24; + var w$1 = d$1 * 7; + var y$1 = d$1 * 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 + */ + + var ms$1 = function (val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse$1(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong$1(val) : fmtShort$1(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$1(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\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$1; + case 'weeks': + case 'week': + case 'w': + return n * w$1; + case 'days': + case 'day': + case 'd': + return n * d$1; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h$1; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m$1; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s$1; + 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$1(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d$1) { + return Math.round(ms / d$1) + 'd'; + } + if (msAbs >= h$1) { + return Math.round(ms / h$1) + 'h'; + } + if (msAbs >= m$1) { + return Math.round(ms / m$1) + 'm'; + } + if (msAbs >= s$1) { + return Math.round(ms / s$1) + 's'; + } + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong$1(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d$1) { + return plural$1(ms, msAbs, d$1, 'day'); + } + if (msAbs >= h$1) { + return plural$1(ms, msAbs, h$1, 'hour'); + } + if (msAbs >= m$1) { + return plural$1(ms, msAbs, m$1, 'minute'); + } + if (msAbs >= s$1) { + return plural$1(ms, msAbs, s$1, 'second'); + } + return ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural$1(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); + } + + var lookup = []; + var revLookup = []; + var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; + var inited = false; + function init () { + inited = true; + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + + revLookup['-'.charCodeAt(0)] = 62; + revLookup['_'.charCodeAt(0)] = 63; + } + + function toByteArray (b64) { + if (!inited) { + init(); + } + var i, j, l, tmp, placeHolders, arr; + var len = b64.length; + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(len * 3 / 4 - placeHolders); + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len; + + var L = 0; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]; + arr[L++] = (tmp >> 16) & 0xFF; + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[L++] = tmp & 0xFF; + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; + } + + return arr + } + + function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] + } + + function encodeChunk (uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); + output.push(tripletToBase64(tmp)); + } + return output.join('') + } + + function fromByteArray (uint8) { + if (!inited) { + init(); + } + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var output = ''; + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + output += lookup[tmp >> 2]; + output += lookup[(tmp << 4) & 0x3F]; + output += '=='; + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); + output += lookup[tmp >> 10]; + output += lookup[(tmp >> 4) & 0x3F]; + output += lookup[(tmp << 2) & 0x3F]; + output += '='; + } + + parts.push(output); + + return parts.join('') + } + + function read (buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? (nBytes - 1) : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) + } + + function write (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); + var i = isLE ? 0 : (nBytes - 1); + var d = isLE ? 1 : -1; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; + } + + var toString$1 = {}.toString; + + var isArray = Array.isArray || function (arr) { + return toString$1.call(arr) == '[object Array]'; + }; + + var INSPECT_MAX_BYTES = 50; + + /** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ + Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined + ? global$1.TYPED_ARRAY_SUPPORT + : true; + + function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff + } + + function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length); + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length); + } + that.length = length; + } + + return that + } + + /** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + + function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) + } + + Buffer.poolSize = 8192; // not used by this implementation + + // TODO: Legacy, not needed anymore. Remove in next major version. + Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype; + return arr + }; + + function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) + } + + /** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ + Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) + }; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype; + Buffer.__proto__ = Uint8Array; + } + + function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } + } + + function alloc (that, size, fill, encoding) { + assertSize(size); + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) + } + + /** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ + Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) + }; + + function allocUnsafe (that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } + } + return that + } + + /** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ + Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) + }; + /** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ + Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) + }; + + function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); + + var actual = that.write(string, encoding); + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual); + } + + return that + } + + function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; + } + return that + } + + function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength; // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array; + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array); + } + return that + } + + function fromObject (that, obj) { + if (internalIsBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len); + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') + } + + function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 + } + Buffer.isBuffer = isBuffer; + function internalIsBuffer (b) { + return !!(b != null && b._isBuffer) + } + + Buffer.compare = function compare (a, b) { + if (!internalIsBuffer(a) || !internalIsBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 + }; + + Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } + }; + + Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i; + if (length === undefined) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer.allocUnsafe(length); + var pos = 0; + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + if (!internalIsBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos); + pos += buf.length; + } + return buffer + }; + + function byteLength (string, encoding) { + if (internalIsBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } + } + Buffer.byteLength = byteLength; + + function slowToString (encoding, start, end) { + var loweredCase = false; + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0; + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8'; + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase(); + loweredCase = true; + } + } + } + + // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect + // Buffer instances. + Buffer.prototype._isBuffer = true; + + function swap (b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; + } + + Buffer.prototype.swap16 = function swap16 () { + var len = this.length; + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + return this + }; + + Buffer.prototype.swap32 = function swap32 () { + var len = this.length; + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + return this + }; + + Buffer.prototype.swap64 = function swap64 () { + var len = this.length; + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + return this + }; + + Buffer.prototype.toString = function toString () { + var length = this.length | 0; + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) + }; + + Buffer.prototype.equals = function equals (b) { + if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 + }; + + Buffer.prototype.inspect = function inspect () { + var str = ''; + var max = INSPECT_MAX_BYTES; + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + return '' + }; + + Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!internalIsBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0; + } + if (end === undefined) { + end = target ? target.length : 0; + } + if (thisStart === undefined) { + thisStart = 0; + } + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + + if (this === target) return 0 + + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 + }; + + // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, + // OR the last index of `val` in `buffer` at offset <= `byteOffset`. + // + // Arguments: + // - buffer - a Buffer to search + // - val - a string, Buffer, or number + // - byteOffset - an index into `buffer`; will be clamped to an int32 + // - encoding - an optional encoding, relevant is val is a string + // - dir - true for indexOf, false for lastIndexOf + function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + byteOffset = +byteOffset; // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1); + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0; + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding); + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (internalIsBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF; // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') + } + + function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i; + if (dir) { + var foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + var found = true; + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break + } + } + if (found) return i + } + } + + return -1 + } + + Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 + }; + + Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) + }; + + Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) + }; + + function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } + + // must be an even number of digits + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2; + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i + buf[offset + i] = parsed; + } + return i + } + + function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) + } + + function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) + } + + function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) + } + + function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) + } + + function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) + } + + Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0; + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8'; + + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } + }; + + Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } + }; + + function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return fromByteArray(buf) + } else { + return fromByteArray(buf.slice(start, end)) + } + } + + function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + + var i = start; + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + break + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint; + } + } + break + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint; + } + } + break + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD; + bytesPerSequence = 1; + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res) + } + + // Based on http://stackoverflow.com/a/22747272/680742, the browser with + // the lowest limit is Chrome, with 0x10000 args. + // We go 1 magnitude less, for safety + var MAX_ARGUMENTS_LENGTH = 0x1000; + + function decodeCodePointsArray (codePoints) { + var len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = ''; + var i = 0; + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ); + } + return res + } + + function asciiSlice (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F); + } + return ret + } + + function latin1Slice (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret + } + + function hexSlice (buf, start, end) { + var len = buf.length; + + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + + var out = ''; + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + return out + } + + function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + return res + } + + Buffer.prototype.slice = function slice (start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + + var newBuf; + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer(sliceLen, undefined); + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } + } + + return newBuf + }; + + /* + * Need to make sure that buffer isn't trying to write out of bounds. + */ + function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') + } + + Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val + }; + + Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val + }; + + Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset] + }; + + Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | (this[offset + 1] << 8) + }; + + Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return (this[offset] << 8) | this[offset + 1] + }; + + Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) + }; + + Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) + }; + + Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val + }; + + Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val + }; + + Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) + }; + + Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | (this[offset + 1] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val + }; + + Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | (this[offset] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val + }; + + Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) + }; + + Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) + }; + + Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, true, 23, 4) + }; + + Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, false, 23, 4) + }; + + Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, true, 52, 8) + }; + + Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, false, 52, 8) + }; + + function checkInt (buf, value, offset, ext, max, min) { + if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') + } + + Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; + } + + return offset + byteLength + }; + + Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; + } + + return offset + byteLength + }; + + Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = (value & 0xff); + return offset + 1 + }; + + function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8; + } + } + + Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2 + }; + + Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2 + }; + + function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; + } + } + + Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24); + this[offset + 2] = (value >>> 16); + this[offset + 1] = (value >>> 8); + this[offset] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4 + }; + + Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4 + }; + + Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; + } + + return offset + byteLength + }; + + Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; + } + + return offset + byteLength + }; + + Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = (value & 0xff); + return offset + 1 + }; + + Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2 + }; + + Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2 + }; + + Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + this[offset + 2] = (value >>> 16); + this[offset + 3] = (value >>> 24); + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4 + }; + + Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4 + }; + + function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') + } + + function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4); + } + write(buf, value, offset, littleEndian, 23, 4); + return offset + 4 + } + + Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) + }; + + Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) + }; + + function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8); + } + write(buf, value, offset, littleEndian, 52, 8); + return offset + 8 + } + + Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) + }; + + Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) + }; + + // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) + Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ); + } + + return len + }; + + // Usage: + // buffer.fill(number[, offset[, end]]) + // buffer.fill(buffer[, offset[, end]]) + // buffer.fill(string[, offset[, end]][, encoding]) + Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if (code < 256) { + val = code; + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255; + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + + if (!val) val = 0; + + var i; + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = internalIsBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()); + var len = bytes.length; + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this + }; + + // HELPER FUNCTIONS + // ================ + + var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; + + function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '='; + } + return str + } + + function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') + } + + function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) + } + + function utf8ToBytes (string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } + + // valid lead + leadSurrogate = codePoint; + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + leadSurrogate = codePoint; + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + } + + leadSurrogate = null; + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else { + throw new Error('Invalid code point') + } + } + + return bytes + } + + function asciiToBytes (str) { + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF); + } + return byteArray + } + + function utf16leToBytes (str, units) { + var c, hi, lo; + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray + } + + + function base64ToBytes (str) { + return toByteArray(base64clean(str)) + } + + function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i]; + } + return i + } + + function isnan (val) { + return val !== val // eslint-disable-line no-self-compare + } + + + // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence + // The _isBuffer check is for Safari 5-7 support, because it's missing + // Object.prototype.constructor. Remove this eventually + function isBuffer(obj) { + return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) + } + + function isFastBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) + } + + // For Node v0.10 support. Remove this eventually. + function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) + } + + var browser$2 = true; + + var utils$3 = {}; + + let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; + let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = ''; + let i = size; + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0]; + } + return id + } + }; + let nanoid = (size = 21) => { + let id = ''; + let i = size; + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0]; + } + return id + }; + var nonSecure = { nanoid, customAlphabet }; + + var he = {exports: {}}; + + /*! https://mths.be/he v1.2.0 by @mathias | MIT license */ + + (function (module, exports) { + (function(root) { + + // Detect free variables `exports`. + var freeExports = exports; + + // Detect free variable `module`. + var freeModule = module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root`. + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + // All astral symbols. + var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + // All ASCII symbols (not just printable ASCII) except those listed in the + // first column of the overrides table. + // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides + var regexAsciiWhitelist = /[\x01-\x7F]/g; + // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or + // code points listed in the first column of the overrides table on + // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides. + var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g; + + var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g; + var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'}; + + var regexEscape = /["&'<>`]/g; + var escapeMap = { + '"': '"', + '&': '&', + '\'': ''', + '<': '<', + // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the + // following is not strictly necessary unless it’s part of a tag or an + // unquoted attribute value. We’re only escaping it to support those + // situations, and for XML support. + '>': '>', + // In Internet Explorer ≤ 8, the backtick character can be used + // to break out of (un)quoted attribute values or HTML comments. + // See http://html5sec.org/#102, http://html5sec.org/#108, and + // http://html5sec.org/#133. + '`': '`' + }; + + var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/; + var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g; + var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'}; + var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'}; + var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'}; + var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]; + + /*--------------------------------------------------------------------------*/ + + var stringFromCharCode = String.fromCharCode; + + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + var has = function(object, propertyName) { + return hasOwnProperty.call(object, propertyName); + }; + + var contains = function(array, value) { + var index = -1; + var length = array.length; + while (++index < length) { + if (array[index] == value) { + return true; + } + } + return false; + }; + + var merge = function(options, defaults) { + if (!options) { + return defaults; + } + var result = {}; + var key; + for (key in defaults) { + // A `hasOwnProperty` check is not needed here, since only recognized + // option names are used anyway. Any others are ignored. + result[key] = has(options, key) ? options[key] : defaults[key]; + } + return result; + }; + + // Modified version of `ucs2encode`; see https://mths.be/punycode. + var codePointToSymbol = function(codePoint, strict) { + var output = ''; + if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) { + // See issue #4: + // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is + // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD + // REPLACEMENT CHARACTER.” + if (strict) { + parseError('character reference outside the permissible Unicode range'); + } + return '\uFFFD'; + } + if (has(decodeMapNumeric, codePoint)) { + if (strict) { + parseError('disallowed character reference'); + } + return decodeMapNumeric[codePoint]; + } + if (strict && contains(invalidReferenceCodePoints, codePoint)) { + parseError('disallowed character reference'); + } + if (codePoint > 0xFFFF) { + codePoint -= 0x10000; + output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; + } + output += stringFromCharCode(codePoint); + return output; + }; + + var hexEscape = function(codePoint) { + return '&#x' + codePoint.toString(16).toUpperCase() + ';'; + }; + + var decEscape = function(codePoint) { + return '&#' + codePoint + ';'; + }; + + var parseError = function(message) { + throw Error('Parse error: ' + message); + }; + + /*--------------------------------------------------------------------------*/ + + var encode = function(string, options) { + options = merge(options, encode.options); + var strict = options.strict; + if (strict && regexInvalidRawCodePoint.test(string)) { + parseError('forbidden code point'); + } + var encodeEverything = options.encodeEverything; + var useNamedReferences = options.useNamedReferences; + var allowUnsafeSymbols = options.allowUnsafeSymbols; + var escapeCodePoint = options.decimal ? decEscape : hexEscape; + + var escapeBmpSymbol = function(symbol) { + return escapeCodePoint(symbol.charCodeAt(0)); + }; + + if (encodeEverything) { + // Encode ASCII symbols. + string = string.replace(regexAsciiWhitelist, function(symbol) { + // Use named references if requested & possible. + if (useNamedReferences && has(encodeMap, symbol)) { + return '&' + encodeMap[symbol] + ';'; + } + return escapeBmpSymbol(symbol); + }); + // Shorten a few escapes that represent two symbols, of which at least one + // is within the ASCII range. + if (useNamedReferences) { + string = string + .replace(/>\u20D2/g, '>⃒') + .replace(/<\u20D2/g, '<⃒') + .replace(/fj/g, 'fj'); + } + // Encode non-ASCII symbols. + if (useNamedReferences) { + // Encode non-ASCII symbols that can be replaced with a named reference. + string = string.replace(regexEncodeNonAscii, function(string) { + // Note: there is no need to check `has(encodeMap, string)` here. + return '&' + encodeMap[string] + ';'; + }); + } + // Note: any remaining non-ASCII symbols are handled outside of the `if`. + } else if (useNamedReferences) { + // Apply named character references. + // Encode `<>"'&` using named character references. + if (!allowUnsafeSymbols) { + string = string.replace(regexEscape, function(string) { + return '&' + encodeMap[string] + ';'; // no need to check `has()` here + }); + } + // Shorten escapes that represent two symbols, of which at least one is + // `<>"'&`. + string = string + .replace(/>\u20D2/g, '>⃒') + .replace(/<\u20D2/g, '<⃒'); + // Encode non-ASCII symbols that can be replaced with a named reference. + string = string.replace(regexEncodeNonAscii, function(string) { + // Note: there is no need to check `has(encodeMap, string)` here. + return '&' + encodeMap[string] + ';'; + }); + } else if (!allowUnsafeSymbols) { + // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled + // using named character references. + string = string.replace(regexEscape, escapeBmpSymbol); + } + return string + // Encode astral symbols. + .replace(regexAstralSymbols, function($0) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + var high = $0.charCodeAt(0); + var low = $0.charCodeAt(1); + var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000; + return escapeCodePoint(codePoint); + }) + // Encode any remaining BMP symbols that are not printable ASCII symbols + // using a hexadecimal escape. + .replace(regexBmpWhitelist, escapeBmpSymbol); + }; + // Expose default options (so they can be overridden globally). + encode.options = { + 'allowUnsafeSymbols': false, + 'encodeEverything': false, + 'strict': false, + 'useNamedReferences': false, + 'decimal' : false + }; + + var decode = function(html, options) { + options = merge(options, decode.options); + var strict = options.strict; + if (strict && regexInvalidEntity.test(html)) { + parseError('malformed character reference'); + } + return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) { + var codePoint; + var semicolon; + var decDigits; + var hexDigits; + var reference; + var next; + + if ($1) { + reference = $1; + // Note: there is no need to check `has(decodeMap, reference)`. + return decodeMap[reference]; + } + + if ($2) { + // Decode named character references without trailing `;`, e.g. `&`. + // This is only a parse error if it gets converted to `&`, or if it is + // followed by `=` in an attribute context. + reference = $2; + next = $3; + if (next && options.isAttributeValue) { + if (strict && next == '=') { + parseError('`&` did not start a character reference'); + } + return $0; + } else { + if (strict) { + parseError( + 'named character reference was not terminated by a semicolon' + ); + } + // Note: there is no need to check `has(decodeMapLegacy, reference)`. + return decodeMapLegacy[reference] + (next || ''); + } + } + + if ($4) { + // Decode decimal escapes, e.g. `𝌆`. + decDigits = $4; + semicolon = $5; + if (strict && !semicolon) { + parseError('character reference was not terminated by a semicolon'); + } + codePoint = parseInt(decDigits, 10); + return codePointToSymbol(codePoint, strict); + } + + if ($6) { + // Decode hexadecimal escapes, e.g. `𝌆`. + hexDigits = $6; + semicolon = $7; + if (strict && !semicolon) { + parseError('character reference was not terminated by a semicolon'); + } + codePoint = parseInt(hexDigits, 16); + return codePointToSymbol(codePoint, strict); + } + + // If we’re still here, `if ($7)` is implied; it’s an ambiguous + // ampersand for sure. https://mths.be/notes/ambiguous-ampersands + if (strict) { + parseError( + 'named character reference was not terminated by a semicolon' + ); + } + return $0; + }); + }; + // Expose default options (so they can be overridden globally). + decode.options = { + 'isAttributeValue': false, + 'strict': false + }; + + var escape = function(string) { + return string.replace(regexEscape, function($0) { + // Note: there is no need to check `has(escapeMap, $0)` here. + return escapeMap[$0]; + }); + }; + + /*--------------------------------------------------------------------------*/ + + var he = { + 'version': '1.2.0', + 'encode': encode, + 'decode': decode, + 'escape': escape, + 'unescape': decode + }; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = he; + } else { // in Narwhal or RingoJS v0.7.0- + for (var key in he) { + has(he, key) && (freeExports[key] = he[key]); + } + } + } else { // in Rhino or a web browser + root.he = he; + } + + }(commonjsGlobal)); + }(he, he.exports)); + + (function (exports) { + + /** + * Various utility functions used throughout Mocha's codebase. + * @module utils + */ + + /** + * Module dependencies. + */ + + const {nanoid} = nonSecure; + var path = require$$1; + var util = require$$0$1; + var he$1 = he.exports; + + const MOCHA_ID_PROP_NAME = '__mocha_id__'; + + /** + * Inherit the prototype methods from one constructor into another. + * + * @param {function} ctor - Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor - Constructor function to inherit prototype from. + * @throws {TypeError} if either constructor is null, or if super constructor + * lacks a prototype. + */ + exports.inherits = util.inherits; + + /** + * Escape special characters in the given string of html. + * + * @private + * @param {string} html + * @return {string} + */ + exports.escape = function (html) { + return he$1.encode(String(html), {useNamedReferences: false}); + }; + + /** + * Test if the given obj is type of string. + * + * @private + * @param {Object} obj + * @return {boolean} + */ + exports.isString = function (obj) { + return typeof obj === 'string'; + }; + + /** + * Compute a slug from the given `str`. + * + * @private + * @param {string} str + * @return {string} + */ + exports.slug = function (str) { + return str + .toLowerCase() + .replace(/\s+/g, '-') + .replace(/[^-\w]/g, '') + .replace(/-{2,}/g, '-'); + }; + + /** + * Strip the function definition from `str`, and re-indent for pre whitespace. + * + * @param {string} str + * @return {string} + */ + exports.clean = function (str) { + str = str + .replace(/\r\n?|[\n\u2028\u2029]/g, '\n') + .replace(/^\uFEFF/, '') + // (traditional)-> space/name parameters body (lambda)-> parameters body multi-statement/single keep body content + .replace( + /^function(?:\s*|\s[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\}|((?:.|\n)*))$/, + '$1$2$3' + ); + + var spaces = str.match(/^\n?( *)/)[1].length; + var tabs = str.match(/^\n?(\t*)/)[1].length; + var re = new RegExp( + '^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs || spaces) + '}', + 'gm' + ); + + str = str.replace(re, ''); + + return str.trim(); + }; + + /** + * If a value could have properties, and has none, this function is called, + * which returns a string representation of the empty value. + * + * Functions w/ no properties return `'[Function]'` + * Arrays w/ length === 0 return `'[]'` + * Objects w/ no properties return `'{}'` + * All else: return result of `value.toString()` + * + * @private + * @param {*} value The value to inspect. + * @param {string} typeHint The type of the value + * @returns {string} + */ + function emptyRepresentation(value, typeHint) { + switch (typeHint) { + case 'function': + return '[Function]'; + case 'object': + return '{}'; + case 'array': + return '[]'; + default: + return value.toString(); + } + } + + /** + * Takes some variable and asks `Object.prototype.toString()` what it thinks it + * is. + * + * @private + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString + * @param {*} value The value to test. + * @returns {string} Computed type + * @example + * canonicalType({}) // 'object' + * canonicalType([]) // 'array' + * canonicalType(1) // 'number' + * canonicalType(false) // 'boolean' + * canonicalType(Infinity) // 'number' + * canonicalType(null) // 'null' + * canonicalType(new Date()) // 'date' + * canonicalType(/foo/) // 'regexp' + * canonicalType('type') // 'string' + * canonicalType(global) // 'global' + * canonicalType(new String('foo') // 'object' + * canonicalType(async function() {}) // 'asyncfunction' + * canonicalType(await import(name)) // 'module' + */ + var canonicalType = (exports.canonicalType = function canonicalType(value) { + if (value === undefined) { + return 'undefined'; + } else if (value === null) { + return 'null'; + } else if (isBuffer(value)) { + return 'buffer'; + } + return Object.prototype.toString + .call(value) + .replace(/^\[.+\s(.+?)]$/, '$1') + .toLowerCase(); + }); + + /** + * + * Returns a general type or data structure of a variable + * @private + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures + * @param {*} value The value to test. + * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object + * @example + * type({}) // 'object' + * type([]) // 'array' + * type(1) // 'number' + * type(false) // 'boolean' + * type(Infinity) // 'number' + * type(null) // 'null' + * type(new Date()) // 'object' + * type(/foo/) // 'object' + * type('type') // 'string' + * type(global) // 'object' + * type(new String('foo') // 'string' + */ + exports.type = function type(value) { + // Null is special + if (value === null) return 'null'; + const primitives = new Set([ + 'undefined', + 'boolean', + 'number', + 'string', + 'bigint', + 'symbol' + ]); + const _type = typeof value; + if (_type === 'function') return _type; + if (primitives.has(_type)) return _type; + if (value instanceof String) return 'string'; + if (value instanceof Error) return 'error'; + if (Array.isArray(value)) return 'array'; + + return _type; + }; + + /** + * Stringify `value`. Different behavior depending on type of value: + * + * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. + * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. + * - If `value` is an *empty* object, function, or array, return result of function + * {@link emptyRepresentation}. + * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of + * JSON.stringify(). + * + * @private + * @see exports.type + * @param {*} value + * @return {string} + */ + exports.stringify = function (value) { + var typeHint = canonicalType(value); + + if (!~['object', 'array', 'function'].indexOf(typeHint)) { + if (typeHint === 'buffer') { + var json = Buffer.prototype.toJSON.call(value); + // Based on the toJSON result + return jsonStringify( + json.data && json.type ? json.data : json, + 2 + ).replace(/,(\n|$)/g, '$1'); + } + + // IE7/IE8 has a bizarre String constructor; needs to be coerced + // into an array and back to obj. + if (typeHint === 'string' && typeof value === 'object') { + value = value.split('').reduce(function (acc, char, idx) { + acc[idx] = char; + return acc; + }, {}); + typeHint = 'object'; + } else { + return jsonStringify(value); + } + } + + for (var prop in value) { + if (Object.prototype.hasOwnProperty.call(value, prop)) { + return jsonStringify( + exports.canonicalize(value, null, typeHint), + 2 + ).replace(/,(\n|$)/g, '$1'); + } + } + + return emptyRepresentation(value, typeHint); + }; + + /** + * like JSON.stringify but more sense. + * + * @private + * @param {Object} object + * @param {number=} spaces + * @param {number=} depth + * @returns {*} + */ + function jsonStringify(object, spaces, depth) { + if (typeof spaces === 'undefined') { + // primitive types + return _stringify(object); + } + + depth = depth || 1; + var space = spaces * depth; + var str = Array.isArray(object) ? '[' : '{'; + var end = Array.isArray(object) ? ']' : '}'; + var length = + typeof object.length === 'number' + ? object.length + : Object.keys(object).length; + // `.repeat()` polyfill + function repeat(s, n) { + return new Array(n).join(s); + } + + function _stringify(val) { + switch (canonicalType(val)) { + case 'null': + case 'undefined': + val = '[' + val + ']'; + break; + case 'array': + case 'object': + val = jsonStringify(val, spaces, depth + 1); + break; + case 'boolean': + case 'regexp': + case 'symbol': + case 'number': + val = + val === 0 && 1 / val === -Infinity // `-0` + ? '-0' + : val.toString(); + break; + case 'bigint': + val = val.toString() + 'n'; + break; + case 'date': + var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString(); + val = '[Date: ' + sDate + ']'; + break; + case 'buffer': + var json = val.toJSON(); + // Based on the toJSON result + json = json.data && json.type ? json.data : json; + val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']'; + break; + default: + val = + val === '[Function]' || val === '[Circular]' + ? val + : JSON.stringify(val); // string + } + return val; + } + + for (var i in object) { + if (!Object.prototype.hasOwnProperty.call(object, i)) { + continue; // not my business + } + --length; + str += + '\n ' + + repeat(' ', space) + + (Array.isArray(object) ? '' : '"' + i + '": ') + // key + _stringify(object[i]) + // value + (length ? ',' : ''); // comma + } + + return ( + str + + // [], {} + (str.length !== 1 ? '\n' + repeat(' ', --space) + end : end) + ); + } + + /** + * Return a new Thing that has the keys in sorted order. Recursive. + * + * If the Thing... + * - has already been seen, return string `'[Circular]'` + * - is `undefined`, return string `'[undefined]'` + * - is `null`, return value `null` + * - is some other primitive, return the value + * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method + * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. + * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` + * + * @private + * @see {@link exports.stringify} + * @param {*} value Thing to inspect. May or may not have properties. + * @param {Array} [stack=[]] Stack of seen values + * @param {string} [typeHint] Type hint + * @return {(Object|Array|Function|string|undefined)} + */ + exports.canonicalize = function canonicalize(value, stack, typeHint) { + var canonicalizedObj; + /* eslint-disable no-unused-vars */ + var prop; + /* eslint-enable no-unused-vars */ + typeHint = typeHint || canonicalType(value); + function withStack(value, fn) { + stack.push(value); + fn(); + stack.pop(); + } + + stack = stack || []; + + if (stack.indexOf(value) !== -1) { + return '[Circular]'; + } + + switch (typeHint) { + case 'undefined': + case 'buffer': + case 'null': + canonicalizedObj = value; + break; + case 'array': + withStack(value, function () { + canonicalizedObj = value.map(function (item) { + return exports.canonicalize(item, stack); + }); + }); + break; + case 'function': + /* eslint-disable-next-line no-unused-vars, no-unreachable-loop */ + for (prop in value) { + canonicalizedObj = {}; + break; + } + /* eslint-enable guard-for-in */ + if (!canonicalizedObj) { + canonicalizedObj = emptyRepresentation(value, typeHint); + break; + } + /* falls through */ + case 'object': + canonicalizedObj = canonicalizedObj || {}; + withStack(value, function () { + Object.keys(value) + .sort() + .forEach(function (key) { + canonicalizedObj[key] = exports.canonicalize(value[key], stack); + }); + }); + break; + case 'date': + case 'number': + case 'regexp': + case 'boolean': + case 'symbol': + canonicalizedObj = value; + break; + default: + canonicalizedObj = value + ''; + } + + return canonicalizedObj; + }; + + /** + * @summary + * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) + * @description + * When invoking this function you get a filter function that get the Error.stack as an input, + * and return a prettify output. + * (i.e: strip Mocha and internal node functions from stack trace). + * @returns {Function} + */ + exports.stackTraceFilter = function () { + // TODO: Replace with `process.browser` + var is = typeof document === 'undefined' ? {node: true} : {browser: true}; + var slash = path.sep; + var cwd; + if (is.node) { + cwd = exports.cwd() + slash; + } else { + cwd = ( + typeof location === 'undefined' ? window.location : location + ).href.replace(/\/[^/]*$/, '/'); + slash = '/'; + } + + function isMochaInternal(line) { + return ( + ~line.indexOf('node_modules' + slash + 'mocha' + slash) || + ~line.indexOf(slash + 'mocha.js') || + ~line.indexOf(slash + 'mocha.min.js') + ); + } + + function isNodeInternal(line) { + return ( + ~line.indexOf('(timers.js:') || + ~line.indexOf('(events.js:') || + ~line.indexOf('(node.js:') || + ~line.indexOf('(module.js:') || + ~line.indexOf('GeneratorFunctionPrototype.next (native)') || + false + ); + } + + return function (stack) { + stack = stack.split('\n'); + + stack = stack.reduce(function (list, line) { + if (isMochaInternal(line)) { + return list; + } + + if (is.node && isNodeInternal(line)) { + return list; + } + + // Clean up cwd(absolute) + if (/:\d+:\d+\)?$/.test(line)) { + line = line.replace('(' + cwd, '('); + } + + list.push(line); + return list; + }, []); + + return stack.join('\n'); + }; + }; + + /** + * Crude, but effective. + * @public + * @param {*} value + * @returns {boolean} Whether or not `value` is a Promise + */ + exports.isPromise = function isPromise(value) { + return ( + typeof value === 'object' && + value !== null && + typeof value.then === 'function' + ); + }; + + /** + * Clamps a numeric value to an inclusive range. + * + * @param {number} value - Value to be clamped. + * @param {number[]} range - Two element array specifying [min, max] range. + * @returns {number} clamped value + */ + exports.clamp = function clamp(value, range) { + return Math.min(Math.max(value, range[0]), range[1]); + }; + + /** + * It's a noop. + * @public + */ + exports.noop = function () {}; + + /** + * Creates a map-like object. + * + * @description + * A "map" is an object with no prototype, for our purposes. In some cases + * this would be more appropriate than a `Map`, especially if your environment + * doesn't support it. Recommended for use in Mocha's public APIs. + * + * @public + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign} + * @param {...*} [obj] - Arguments to `Object.assign()`. + * @returns {Object} An object with no prototype, having `...obj` properties + */ + exports.createMap = function (obj) { + return Object.assign.apply( + null, + [Object.create(null)].concat(Array.prototype.slice.call(arguments)) + ); + }; + + /** + * Creates a read-only map-like object. + * + * @description + * This differs from {@link module:utils.createMap createMap} only in that + * the argument must be non-empty, because the result is frozen. + * + * @see {@link module:utils.createMap createMap} + * @param {...*} [obj] - Arguments to `Object.assign()`. + * @returns {Object} A frozen object with no prototype, having `...obj` properties + * @throws {TypeError} if argument is not a non-empty object. + */ + exports.defineConstants = function (obj) { + if (canonicalType(obj) !== 'object' || !Object.keys(obj).length) { + throw new TypeError('Invalid argument; expected a non-empty object'); + } + return Object.freeze(exports.createMap(obj)); + }; + + /** + * Returns current working directory + * + * Wrapper around `process.cwd()` for isolation + * @private + */ + exports.cwd = function cwd() { + return process.cwd(); + }; + + /** + * Returns `true` if Mocha is running in a browser. + * Checks for `process.browser`. + * @returns {boolean} + * @private + */ + exports.isBrowser = function isBrowser() { + return Boolean(browser$2); + }; + + /* + * Casts `value` to an array; useful for optionally accepting array parameters + * + * It follows these rules, depending on `value`. If `value` is... + * 1. `undefined`: return an empty Array + * 2. `null`: return an array with a single `null` element + * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable + * 4. otherwise: return an array with a single element, `value` + * @param {*} value - Something to cast to an Array + * @returns {Array<*>} + */ + exports.castArray = function castArray(value) { + if (value === undefined) { + return []; + } + if (value === null) { + return [null]; + } + if ( + typeof value === 'object' && + (typeof value[Symbol.iterator] === 'function' || value.length !== undefined) + ) { + return Array.from(value); + } + return [value]; + }; + + exports.constants = exports.defineConstants({ + MOCHA_ID_PROP_NAME + }); + + /** + * Creates a new unique identifier + * @returns {string} Unique identifier + */ + exports.uniqueID = () => nanoid(); + + exports.assignNewMochaID = obj => { + const id = exports.uniqueID(); + Object.defineProperty(obj, MOCHA_ID_PROP_NAME, { + get() { + return id; + } + }); + return obj; + }; + + /** + * Retrieves a Mocha ID from an object, if present. + * @param {*} [obj] - Object + * @returns {string|void} + */ + exports.getMochaID = obj => + obj && typeof obj === 'object' ? obj[MOCHA_ID_PROP_NAME] : undefined; + }(utils$3)); + + var _nodeResolve_empty = {}; + + var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': _nodeResolve_empty + }); + + var require$$18 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1); + + var browser$1 = { + info: 'ℹ️', + success: '✅', + warning: '⚠️', + error: '❌️' + }; + + var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events); + + /** + @module Pending + */ + + var pending = Pending$2; + + /** + * Initialize a new `Pending` error with the given message. + * + * @param {string} message + */ + function Pending$2(message) { + this.message = message; + } + + var browser = {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 + */ + + var ms = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + 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+) *(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' : ''); + } + + /** + * 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 = ms; + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * 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 debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let 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) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const 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 + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const 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); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const 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.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const 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.slice(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + 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; + } + + let i; + let 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; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; + } + + var common$1 = setup; + + (function (module, exports) { + /** + * This is the web browser implementation of `debug()`. + */ + + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = localstorage(); + exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; + })(); + + /** + * 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; + } + + const 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 + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, 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.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 + */ + exports.log = console.debug || console.log || (() => {}); + + /** + * 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() { + let 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 = common$1(exports); + + const {formatters} = module.exports; + + /** + * 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; + } + }; + }(browser, browser.exports)); + + const {format} = require$$0$1; + + /** + * Contains error codes, factory functions to create throwable error objects, + * and warning/deprecation functions. + * @module + */ + + /** + * process.emitWarning or a polyfill + * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options + * @ignore + */ + const emitWarning = (msg, type) => { + if (process.emitWarning) { + process.emitWarning(msg, type); + } else { + /* istanbul ignore next */ + nextTick$1(function () { + console.warn(type + ': ' + msg); + }); + } + }; + + /** + * Show a deprecation warning. Each distinct message is only displayed once. + * Ignores empty messages. + * + * @param {string} [msg] - Warning to print + * @private + */ + const deprecate = msg => { + msg = String(msg); + if (msg && !deprecate.cache[msg]) { + deprecate.cache[msg] = true; + emitWarning(msg, 'DeprecationWarning'); + } + }; + deprecate.cache = {}; + + /** + * Show a generic warning. + * Ignores empty messages. + * + * @param {string} [msg] - Warning to print + * @private + */ + const warn = msg => { + if (msg) { + emitWarning(msg); + } + }; + + /** + * When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`. + * @public + * @namespace + * @memberof module:lib/errors + */ + var constants$4 = { + /** + * An unrecoverable error. + * @constant + * @default + */ + FATAL: 'ERR_MOCHA_FATAL', + + /** + * The type of an argument to a function call is invalid + * @constant + * @default + */ + INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE', + + /** + * The value of an argument to a function call is invalid + * @constant + * @default + */ + INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE', + + /** + * Something was thrown, but it wasn't an `Error` + * @constant + * @default + */ + INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION', + + /** + * An interface (e.g., `Mocha.interfaces`) is unknown or invalid + * @constant + * @default + */ + INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE', + + /** + * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid + * @constant + * @default + */ + INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER', + + /** + * `done()` was called twice in a `Test` or `Hook` callback + * @constant + * @default + */ + MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE', + + /** + * No files matched the pattern provided by the user + * @constant + * @default + */ + NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN', + + /** + * Known, but unsupported behavior of some kind + * @constant + * @default + */ + UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED', + + /** + * Invalid state transition occurring in `Mocha` instance + * @constant + * @default + */ + INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING', + + /** + * Invalid state transition occurring in `Mocha` instance + * @constant + * @default + */ + INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED', + + /** + * Use of `only()` w/ `--forbid-only` results in this error. + * @constant + * @default + */ + FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY', + + /** + * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid + * @constant + * @default + */ + INVALID_PLUGIN_IMPLEMENTATION: 'ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION', + + /** + * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid + * @constant + * @default + */ + INVALID_PLUGIN_DEFINITION: 'ERR_MOCHA_INVALID_PLUGIN_DEFINITION', + + /** + * When a runnable exceeds its allowed run time. + * @constant + * @default + */ + TIMEOUT: 'ERR_MOCHA_TIMEOUT', + + /** + * Input file is not able to be parsed + * @constant + * @default + */ + UNPARSABLE_FILE: 'ERR_MOCHA_UNPARSABLE_FILE' + }; + + /** + * A set containing all string values of all Mocha error constants, for use by {@link isMochaError}. + * @private + */ + const MOCHA_ERRORS = new Set(Object.values(constants$4)); + + /** + * Creates an error object to be thrown when no files to be tested could be found using specified pattern. + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} pattern - User-specified argument value. + * @returns {Error} instance detailing the error condition + */ + function createNoFilesMatchPatternError(message, pattern) { + var err = new Error(message); + err.code = constants$4.NO_FILES_MATCH_PATTERN; + err.pattern = pattern; + return err; + } + + /** + * Creates an error object to be thrown when the reporter specified in the options was not found. + * + * @public + * @param {string} message - Error message to be displayed. + * @param {string} reporter - User-specified reporter value. + * @returns {Error} instance detailing the error condition + */ + function createInvalidReporterError(message, reporter) { + var err = new TypeError(message); + err.code = constants$4.INVALID_REPORTER; + err.reporter = reporter; + return err; + } + + /** + * Creates an error object to be thrown when the interface specified in the options was not found. + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} ui - User-specified interface value. + * @returns {Error} instance detailing the error condition + */ + function createInvalidInterfaceError(message, ui) { + var err = new Error(message); + err.code = constants$4.INVALID_INTERFACE; + err.interface = ui; + return err; + } + + /** + * Creates an error object to be thrown when a behavior, option, or parameter is unsupported. + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} instance detailing the error condition + */ + function createUnsupportedError$2(message) { + var err = new Error(message); + err.code = constants$4.UNSUPPORTED; + return err; + } + + /** + * Creates an error object to be thrown when an argument is missing. + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} argument - Argument name. + * @param {string} expected - Expected argument datatype. + * @returns {Error} instance detailing the error condition + */ + function createMissingArgumentError$1(message, argument, expected) { + return createInvalidArgumentTypeError$1(message, argument, expected); + } + + /** + * Creates an error object to be thrown when an argument did not use the supported type + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} argument - Argument name. + * @param {string} expected - Expected argument datatype. + * @returns {Error} instance detailing the error condition + */ + function createInvalidArgumentTypeError$1(message, argument, expected) { + var err = new TypeError(message); + err.code = constants$4.INVALID_ARG_TYPE; + err.argument = argument; + err.expected = expected; + err.actual = typeof argument; + return err; + } + + /** + * Creates an error object to be thrown when an argument did not use the supported value + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} argument - Argument name. + * @param {string} value - Argument value. + * @param {string} [reason] - Why value is invalid. + * @returns {Error} instance detailing the error condition + */ + function createInvalidArgumentValueError(message, argument, value, reason) { + var err = new TypeError(message); + err.code = constants$4.INVALID_ARG_VALUE; + err.argument = argument; + err.value = value; + err.reason = typeof reason !== 'undefined' ? reason : 'is invalid'; + return err; + } + + /** + * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined. + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} instance detailing the error condition + */ + function createInvalidExceptionError$2(message, value) { + var err = new Error(message); + err.code = constants$4.INVALID_EXCEPTION; + err.valueType = typeof value; + err.value = value; + return err; + } + + /** + * Creates an error object to be thrown when an unrecoverable error occurs. + * + * @public + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} instance detailing the error condition + */ + function createFatalError$1(message, value) { + var err = new Error(message); + err.code = constants$4.FATAL; + err.valueType = typeof value; + err.value = value; + return err; + } + + /** + * Dynamically creates a plugin-type-specific error based on plugin type + * @param {string} message - Error message + * @param {"reporter"|"ui"} pluginType - Plugin type. Future: expand as needed + * @param {string} [pluginId] - Name/path of plugin, if any + * @throws When `pluginType` is not known + * @public + * @static + * @returns {Error} + */ + function createInvalidLegacyPluginError(message, pluginType, pluginId) { + switch (pluginType) { + case 'reporter': + return createInvalidReporterError(message, pluginId); + case 'ui': + return createInvalidInterfaceError(message, pluginId); + default: + throw new Error('unknown pluginType "' + pluginType + '"'); + } + } + + /** + * **DEPRECATED**. Use {@link createInvalidLegacyPluginError} instead Dynamically creates a plugin-type-specific error based on plugin type + * @deprecated + * @param {string} message - Error message + * @param {"reporter"|"interface"} pluginType - Plugin type. Future: expand as needed + * @param {string} [pluginId] - Name/path of plugin, if any + * @throws When `pluginType` is not known + * @public + * @static + * @returns {Error} + */ + function createInvalidPluginError(...args) { + deprecate('Use createInvalidLegacyPluginError() instead'); + return createInvalidLegacyPluginError(...args); + } + + /** + * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed. + * @param {string} message The error message to be displayed. + * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun` + * @param {Mocha} instance the mocha instance that throw this error + * @static + */ + function createMochaInstanceAlreadyDisposedError( + message, + cleanReferencesAfterRun, + instance + ) { + var err = new Error(message); + err.code = constants$4.INSTANCE_ALREADY_DISPOSED; + err.cleanReferencesAfterRun = cleanReferencesAfterRun; + err.instance = instance; + return err; + } + + /** + * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress. + * @param {string} message The error message to be displayed. + * @static + * @public + */ + function createMochaInstanceAlreadyRunningError(message, instance) { + var err = new Error(message); + err.code = constants$4.INSTANCE_ALREADY_RUNNING; + err.instance = instance; + return err; + } + + /** + * Creates an error object to be thrown when done() is called multiple times in a test + * + * @public + * @param {Runnable} runnable - Original runnable + * @param {Error} [originalErr] - Original error, if any + * @returns {Error} instance detailing the error condition + * @static + */ + function createMultipleDoneError$1(runnable, originalErr) { + var title; + try { + title = format('<%s>', runnable.fullTitle()); + if (runnable.parent.root) { + title += ' (of root suite)'; + } + } catch (ignored) { + title = format('<%s> (of unknown suite)', runnable.title); + } + var message = format( + 'done() called multiple times in %s %s', + runnable.type ? runnable.type : 'unknown runnable', + title + ); + if (runnable.file) { + message += format(' of file %s', runnable.file); + } + if (originalErr) { + message += format('; in addition, done() received error: %s', originalErr); + } + + var err = new Error(message); + err.code = constants$4.MULTIPLE_DONE; + err.valueType = typeof originalErr; + err.value = originalErr; + return err; + } + + /** + * Creates an error object to be thrown when `.only()` is used with + * `--forbid-only`. + * @static + * @public + * @param {Mocha} mocha - Mocha instance + * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY} + */ + function createForbiddenExclusivityError$1(mocha) { + var err = new Error( + mocha.isWorker + ? '`.only` is not supported in parallel mode' + : '`.only` forbidden by --forbid-only' + ); + err.code = constants$4.FORBIDDEN_EXCLUSIVITY; + return err; + } + + /** + * Creates an error object to be thrown when a plugin definition is invalid + * @static + * @param {string} msg - Error message + * @param {PluginDefinition} [pluginDef] - Problematic plugin definition + * @public + * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} + */ + function createInvalidPluginDefinitionError(msg, pluginDef) { + const err = new Error(msg); + err.code = constants$4.INVALID_PLUGIN_DEFINITION; + err.pluginDef = pluginDef; + return err; + } + + /** + * Creates an error object to be thrown when a plugin implementation (user code) is invalid + * @static + * @param {string} msg - Error message + * @param {Object} [opts] - Plugin definition and user-supplied implementation + * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition + * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied) + * @public + * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} + */ + function createInvalidPluginImplementationError( + msg, + {pluginDef, pluginImpl} = {} + ) { + const err = new Error(msg); + err.code = constants$4.INVALID_PLUGIN_IMPLEMENTATION; + err.pluginDef = pluginDef; + err.pluginImpl = pluginImpl; + return err; + } + + /** + * Creates an error object to be thrown when a runnable exceeds its allowed run time. + * @static + * @param {string} msg - Error message + * @param {number} [timeout] - Timeout in ms + * @param {string} [file] - File, if given + * @returns {MochaTimeoutError} + */ + function createTimeoutError$1(msg, timeout, file) { + const err = new Error(msg); + err.code = constants$4.TIMEOUT; + err.timeout = timeout; + err.file = file; + return err; + } + + /** + * Creates an error object to be thrown when file is unparsable + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} filename - File name + * @returns {Error} Error with code {@link constants.UNPARSABLE_FILE} + */ + function createUnparsableFileError(message, filename) { + var err = new Error(message); + err.code = constants$4.UNPARSABLE_FILE; + return err; + } + + /** + * Returns `true` if an error came out of Mocha. + * _Can suffer from false negatives, but not false positives._ + * @static + * @public + * @param {*} err - Error, or anything + * @returns {boolean} + */ + const isMochaError$1 = err => + Boolean(err && typeof err === 'object' && MOCHA_ERRORS.has(err.code)); + + var errors$2 = { + constants: constants$4, + createFatalError: createFatalError$1, + createForbiddenExclusivityError: createForbiddenExclusivityError$1, + createInvalidArgumentTypeError: createInvalidArgumentTypeError$1, + createInvalidArgumentValueError, + createInvalidExceptionError: createInvalidExceptionError$2, + createInvalidInterfaceError, + createInvalidLegacyPluginError, + createInvalidPluginDefinitionError, + createInvalidPluginError, + createInvalidPluginImplementationError, + createInvalidReporterError, + createMissingArgumentError: createMissingArgumentError$1, + createMochaInstanceAlreadyDisposedError, + createMochaInstanceAlreadyRunningError, + createMultipleDoneError: createMultipleDoneError$1, + createNoFilesMatchPatternError, + createTimeoutError: createTimeoutError$1, + createUnparsableFileError, + createUnsupportedError: createUnsupportedError$2, + deprecate, + isMochaError: isMochaError$1, + warn + }; + + var EventEmitter$1 = require$$0.EventEmitter; + var Pending$1 = pending; + var debug$1 = browser.exports('mocha:runnable'); + var milliseconds = ms$1; + var utils$2 = utils$3; + const { + createInvalidExceptionError: createInvalidExceptionError$1, + createMultipleDoneError, + createTimeoutError + } = errors$2; + + /** + * Save timer references to avoid Sinon interfering (see GH-237). + * @private + */ + var Date$3 = commonjsGlobal.Date; + var setTimeout$2 = commonjsGlobal.setTimeout; + var clearTimeout$1 = commonjsGlobal.clearTimeout; + var toString = Object.prototype.toString; + + var runnable = Runnable$3; + + /** + * Initialize a new `Runnable` with the given `title` and callback `fn`. + * + * @class + * @extends external:EventEmitter + * @public + * @param {String} title + * @param {Function} fn + */ + function Runnable$3(title, fn) { + this.title = title; + this.fn = fn; + this.body = (fn || '').toString(); + this.async = fn && fn.length; + this.sync = !this.async; + this._timeout = 2000; + this._slow = 75; + this._retries = -1; + utils$2.assignNewMochaID(this); + Object.defineProperty(this, 'id', { + get() { + return utils$2.getMochaID(this); + } + }); + this.reset(); + } + + /** + * Inherit from `EventEmitter.prototype`. + */ + utils$2.inherits(Runnable$3, EventEmitter$1); + + /** + * Resets the state initially or for a next run. + */ + Runnable$3.prototype.reset = function () { + this.timedOut = false; + this._currentRetry = 0; + this.pending = false; + delete this.state; + delete this.err; + }; + + /** + * Get current timeout value in msecs. + * + * @private + * @returns {number} current timeout threshold value + */ + /** + * @summary + * Set timeout threshold value (msecs). + * + * @description + * A string argument can use shorthand (e.g., "2s") and will be converted. + * The value will be clamped to range [0, 2^31-1]. + * If clamped value matches either range endpoint, timeouts will be disabled. + * + * @private + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value} + * @param {number|string} ms - Timeout threshold value. + * @returns {Runnable} this + * @chainable + */ + Runnable$3.prototype.timeout = function (ms) { + if (!arguments.length) { + return this._timeout; + } + if (typeof ms === 'string') { + ms = milliseconds(ms); + } + + // Clamp to range + var INT_MAX = Math.pow(2, 31) - 1; + var range = [0, INT_MAX]; + ms = utils$2.clamp(ms, range); + + // see #1652 for reasoning + if (ms === range[0] || ms === range[1]) { + this._timeout = 0; + } else { + this._timeout = ms; + } + debug$1('timeout %d', this._timeout); + + if (this.timer) { + this.resetTimeout(); + } + return this; + }; + + /** + * Set or get slow `ms`. + * + * @private + * @param {number|string} ms + * @return {Runnable|number} ms or Runnable instance. + */ + Runnable$3.prototype.slow = function (ms) { + if (!arguments.length || typeof ms === 'undefined') { + return this._slow; + } + if (typeof ms === 'string') { + ms = milliseconds(ms); + } + debug$1('slow %d', ms); + this._slow = ms; + return this; + }; + + /** + * Halt and mark as pending. + * + * @memberof Mocha.Runnable + * @public + */ + Runnable$3.prototype.skip = function () { + this.pending = true; + throw new Pending$1('sync skip; aborting execution'); + }; + + /** + * Check if this runnable or its parent suite is marked as pending. + * + * @private + */ + Runnable$3.prototype.isPending = function () { + return this.pending || (this.parent && this.parent.isPending()); + }; + + /** + * Return `true` if this Runnable has failed. + * @return {boolean} + * @private + */ + Runnable$3.prototype.isFailed = function () { + return !this.isPending() && this.state === constants$3.STATE_FAILED; + }; + + /** + * Return `true` if this Runnable has passed. + * @return {boolean} + * @private + */ + Runnable$3.prototype.isPassed = function () { + return !this.isPending() && this.state === constants$3.STATE_PASSED; + }; + + /** + * Set or get number of retries. + * + * @private + */ + Runnable$3.prototype.retries = function (n) { + if (!arguments.length) { + return this._retries; + } + this._retries = n; + }; + + /** + * Set or get current retry + * + * @private + */ + Runnable$3.prototype.currentRetry = function (n) { + if (!arguments.length) { + return this._currentRetry; + } + this._currentRetry = n; + }; + + /** + * Return the full title generated by recursively concatenating the parent's + * full title. + * + * @memberof Mocha.Runnable + * @public + * @return {string} + */ + Runnable$3.prototype.fullTitle = function () { + return this.titlePath().join(' '); + }; + + /** + * Return the title path generated by concatenating the parent's title path with the title. + * + * @memberof Mocha.Runnable + * @public + * @return {string} + */ + Runnable$3.prototype.titlePath = function () { + return this.parent.titlePath().concat([this.title]); + }; + + /** + * Clear the timeout. + * + * @private + */ + Runnable$3.prototype.clearTimeout = function () { + clearTimeout$1(this.timer); + }; + + /** + * Reset the timeout. + * + * @private + */ + Runnable$3.prototype.resetTimeout = function () { + var self = this; + var ms = this.timeout(); + + if (ms === 0) { + return; + } + this.clearTimeout(); + this.timer = setTimeout$2(function () { + if (self.timeout() === 0) { + return; + } + self.callback(self._timeoutError(ms)); + self.timedOut = true; + }, ms); + }; + + /** + * Set or get a list of whitelisted globals for this test run. + * + * @private + * @param {string[]} globals + */ + Runnable$3.prototype.globals = function (globals) { + if (!arguments.length) { + return this._allowedGlobals; + } + this._allowedGlobals = globals; + }; + + /** + * Run the test and invoke `fn(err)`. + * + * @param {Function} fn + * @private + */ + Runnable$3.prototype.run = function (fn) { + var self = this; + var start = new Date$3(); + var ctx = this.ctx; + var finished; + var errorWasHandled = false; + + if (this.isPending()) return fn(); + + // Sometimes the ctx exists, but it is not runnable + if (ctx && ctx.runnable) { + ctx.runnable(this); + } + + // called multiple times + function multiple(err) { + if (errorWasHandled) { + return; + } + errorWasHandled = true; + self.emit('error', createMultipleDoneError(self, err)); + } + + // finished + function done(err) { + var ms = self.timeout(); + if (self.timedOut) { + return; + } + + if (finished) { + return multiple(err); + } + + self.clearTimeout(); + self.duration = new Date$3() - start; + finished = true; + if (!err && self.duration > ms && ms > 0) { + err = self._timeoutError(ms); + } + fn(err); + } + + // for .resetTimeout() and Runner#uncaught() + this.callback = done; + + if (this.fn && typeof this.fn.call !== 'function') { + done( + new TypeError( + 'A runnable must be passed a function as its second argument.' + ) + ); + return; + } + + // explicit async with `done` argument + if (this.async) { + this.resetTimeout(); + + // allows skip() to be used in an explicit async context + this.skip = function asyncSkip() { + this.pending = true; + done(); + // halt execution, the uncaught handler will ignore the failure. + throw new Pending$1('async skip; aborting execution'); + }; + + try { + callFnAsync(this.fn); + } catch (err) { + // handles async runnables which actually run synchronously + errorWasHandled = true; + if (err instanceof Pending$1) { + return; // done() is already called in this.skip() + } else if (this.allowUncaught) { + throw err; + } + done(Runnable$3.toValueOrError(err)); + } + return; + } + + // sync or promise-returning + try { + callFn(this.fn); + } catch (err) { + errorWasHandled = true; + if (err instanceof Pending$1) { + return done(); + } else if (this.allowUncaught) { + throw err; + } + done(Runnable$3.toValueOrError(err)); + } + + function callFn(fn) { + var result = fn.call(ctx); + if (result && typeof result.then === 'function') { + self.resetTimeout(); + result.then( + function () { + done(); + // Return null so libraries like bluebird do not warn about + // subsequently constructed Promises. + return null; + }, + function (reason) { + done(reason || new Error('Promise rejected with no or falsy reason')); + } + ); + } else { + if (self.asyncOnly) { + return done( + new Error( + '--async-only option in use without declaring `done()` or returning a promise' + ) + ); + } + + done(); + } + } + + function callFnAsync(fn) { + var result = fn.call(ctx, function (err) { + if (err instanceof Error || toString.call(err) === '[object Error]') { + return done(err); + } + if (err) { + if (Object.prototype.toString.call(err) === '[object Object]') { + return done( + new Error('done() invoked with non-Error: ' + JSON.stringify(err)) + ); + } + return done(new Error('done() invoked with non-Error: ' + err)); + } + if (result && utils$2.isPromise(result)) { + return done( + new Error( + 'Resolution method is overspecified. Specify a callback *or* return a Promise; not both.' + ) + ); + } + + done(); + }); + } + }; + + /** + * Instantiates a "timeout" error + * + * @param {number} ms - Timeout (in milliseconds) + * @returns {Error} a "timeout" error + * @private + */ + Runnable$3.prototype._timeoutError = function (ms) { + let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.`; + if (this.file) { + msg += ' (' + this.file + ')'; + } + return createTimeoutError(msg, ms, this.file); + }; + + var constants$3 = utils$2.defineConstants( + /** + * {@link Runnable}-related constants. + * @public + * @memberof Runnable + * @readonly + * @static + * @alias constants + * @enum {string} + */ + { + /** + * Value of `state` prop when a `Runnable` has failed + */ + STATE_FAILED: 'failed', + /** + * Value of `state` prop when a `Runnable` has passed + */ + STATE_PASSED: 'passed', + /** + * Value of `state` prop when a `Runnable` has been skipped by user + */ + STATE_PENDING: 'pending' + } + ); + + /** + * Given `value`, return identity if truthy, otherwise create an "invalid exception" error and return that. + * @param {*} [value] - Value to return, if present + * @returns {*|Error} `value`, otherwise an `Error` + * @private + */ + Runnable$3.toValueOrError = function (value) { + return ( + value || + createInvalidExceptionError$1( + 'Runnable failed with falsy or undefined exception. Please throw an Error instead.', + value + ) + ); + }; + + Runnable$3.constants = constants$3; + + var suite = {exports: {}}; + + var Runnable$2 = runnable; + const {inherits, constants: constants$2} = utils$3; + const {MOCHA_ID_PROP_NAME: MOCHA_ID_PROP_NAME$1} = constants$2; + + /** + * Expose `Hook`. + */ + + var hook = Hook; + + /** + * Initialize a new `Hook` with the given `title` and callback `fn` + * + * @class + * @extends Runnable + * @param {String} title + * @param {Function} fn + */ + function Hook(title, fn) { + Runnable$2.call(this, title, fn); + this.type = 'hook'; + } + + /** + * Inherit from `Runnable.prototype`. + */ + inherits(Hook, Runnable$2); + + /** + * Resets the state for a next run. + */ + Hook.prototype.reset = function () { + Runnable$2.prototype.reset.call(this); + delete this._error; + }; + + /** + * Get or set the test `err`. + * + * @memberof Hook + * @public + * @param {Error} err + * @return {Error} + */ + Hook.prototype.error = function (err) { + if (!arguments.length) { + err = this._error; + this._error = null; + return err; + } + + this._error = err; + }; + + /** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + Hook.prototype.serialize = function serialize() { + return { + $$currentRetry: this.currentRetry(), + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + $$titlePath: this.titlePath(), + ctx: + this.ctx && this.ctx.currentTest + ? { + currentTest: { + title: this.ctx.currentTest.title, + [MOCHA_ID_PROP_NAME$1]: this.ctx.currentTest.id + } + } + : {}, + duration: this.duration, + file: this.file, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME$1]: this.parent.id + }, + state: this.state, + title: this.title, + type: this.type, + [MOCHA_ID_PROP_NAME$1]: this.id + }; + }; + + (function (module, exports) { + + /** + * Module dependencies. + * @private + */ + const {EventEmitter} = require$$0; + const Hook = hook; + var { + assignNewMochaID, + clamp, + constants: utilsConstants, + defineConstants, + getMochaID, + inherits, + isString + } = utils$3; + const debug = browser.exports('mocha:suite'); + const milliseconds = ms$1; + const errors = errors$2; + + const {MOCHA_ID_PROP_NAME} = utilsConstants; + + /** + * Expose `Suite`. + */ + + module.exports = Suite; + + /** + * Create a new `Suite` with the given `title` and parent `Suite`. + * + * @public + * @param {Suite} parent - Parent suite (required!) + * @param {string} title - Title + * @return {Suite} + */ + Suite.create = function (parent, title) { + var suite = new Suite(title, parent.ctx); + suite.parent = parent; + title = suite.fullTitle(); + parent.addSuite(suite); + return suite; + }; + + /** + * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`. + * + * @public + * @class + * @extends EventEmitter + * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter} + * @param {string} title - Suite title. + * @param {Context} parentContext - Parent context instance. + * @param {boolean} [isRoot=false] - Whether this is the root suite. + */ + function Suite(title, parentContext, isRoot) { + if (!isString(title)) { + throw errors.createInvalidArgumentTypeError( + 'Suite argument "title" must be a string. Received type "' + + typeof title + + '"', + 'title', + 'string' + ); + } + this.title = title; + function Context() {} + Context.prototype = parentContext; + this.ctx = new Context(); + this.suites = []; + this.tests = []; + this.root = isRoot === true; + this.pending = false; + this._retries = -1; + this._beforeEach = []; + this._beforeAll = []; + this._afterEach = []; + this._afterAll = []; + this._timeout = 2000; + this._slow = 75; + this._bail = false; + this._onlyTests = []; + this._onlySuites = []; + assignNewMochaID(this); + + Object.defineProperty(this, 'id', { + get() { + return getMochaID(this); + } + }); + + this.reset(); + } + + /** + * Inherit from `EventEmitter.prototype`. + */ + inherits(Suite, EventEmitter); + + /** + * Resets the state initially or for a next run. + */ + Suite.prototype.reset = function () { + this.delayed = false; + function doReset(thingToReset) { + thingToReset.reset(); + } + this.suites.forEach(doReset); + this.tests.forEach(doReset); + this._beforeEach.forEach(doReset); + this._afterEach.forEach(doReset); + this._beforeAll.forEach(doReset); + this._afterAll.forEach(doReset); + }; + + /** + * Return a clone of this `Suite`. + * + * @private + * @return {Suite} + */ + Suite.prototype.clone = function () { + var suite = new Suite(this.title); + debug('clone'); + suite.ctx = this.ctx; + suite.root = this.root; + suite.timeout(this.timeout()); + suite.retries(this.retries()); + suite.slow(this.slow()); + suite.bail(this.bail()); + return suite; + }; + + /** + * Set or get timeout `ms` or short-hand such as "2s". + * + * @private + * @todo Do not attempt to set value if `ms` is undefined + * @param {number|string} ms + * @return {Suite|number} for chaining + */ + Suite.prototype.timeout = function (ms) { + if (!arguments.length) { + return this._timeout; + } + if (typeof ms === 'string') { + ms = milliseconds(ms); + } + + // Clamp to range + var INT_MAX = Math.pow(2, 31) - 1; + var range = [0, INT_MAX]; + ms = clamp(ms, range); + + debug('timeout %d', ms); + this._timeout = parseInt(ms, 10); + return this; + }; + + /** + * Set or get number of times to retry a failed test. + * + * @private + * @param {number|string} n + * @return {Suite|number} for chaining + */ + Suite.prototype.retries = function (n) { + if (!arguments.length) { + return this._retries; + } + debug('retries %d', n); + this._retries = parseInt(n, 10) || 0; + return this; + }; + + /** + * Set or get slow `ms` or short-hand such as "2s". + * + * @private + * @param {number|string} ms + * @return {Suite|number} for chaining + */ + Suite.prototype.slow = function (ms) { + if (!arguments.length) { + return this._slow; + } + if (typeof ms === 'string') { + ms = milliseconds(ms); + } + debug('slow %d', ms); + this._slow = ms; + return this; + }; + + /** + * Set or get whether to bail after first error. + * + * @private + * @param {boolean} bail + * @return {Suite|number} for chaining + */ + Suite.prototype.bail = function (bail) { + if (!arguments.length) { + return this._bail; + } + debug('bail %s', bail); + this._bail = bail; + return this; + }; + + /** + * Check if this suite or its parent suite is marked as pending. + * + * @private + */ + Suite.prototype.isPending = function () { + return this.pending || (this.parent && this.parent.isPending()); + }; + + /** + * Generic hook-creator. + * @private + * @param {string} title - Title of hook + * @param {Function} fn - Hook callback + * @returns {Hook} A new hook + */ + Suite.prototype._createHook = function (title, fn) { + var hook = new Hook(title, fn); + hook.parent = this; + hook.timeout(this.timeout()); + hook.retries(this.retries()); + hook.slow(this.slow()); + hook.ctx = this.ctx; + hook.file = this.file; + return hook; + }; + + /** + * Run `fn(test[, done])` before running tests. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + Suite.prototype.beforeAll = function (title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === 'function') { + fn = title; + title = fn.name; + } + title = '"before all" hook' + (title ? ': ' + title : ''); + + var hook = this._createHook(title, fn); + this._beforeAll.push(hook); + this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook); + return this; + }; + + /** + * Run `fn(test[, done])` after running tests. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + Suite.prototype.afterAll = function (title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === 'function') { + fn = title; + title = fn.name; + } + title = '"after all" hook' + (title ? ': ' + title : ''); + + var hook = this._createHook(title, fn); + this._afterAll.push(hook); + this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook); + return this; + }; + + /** + * Run `fn(test[, done])` before each test case. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + Suite.prototype.beforeEach = function (title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === 'function') { + fn = title; + title = fn.name; + } + title = '"before each" hook' + (title ? ': ' + title : ''); + + var hook = this._createHook(title, fn); + this._beforeEach.push(hook); + this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook); + return this; + }; + + /** + * Run `fn(test[, done])` after each test case. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + Suite.prototype.afterEach = function (title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === 'function') { + fn = title; + title = fn.name; + } + title = '"after each" hook' + (title ? ': ' + title : ''); + + var hook = this._createHook(title, fn); + this._afterEach.push(hook); + this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook); + return this; + }; + + /** + * Add a test `suite`. + * + * @private + * @param {Suite} suite + * @return {Suite} for chaining + */ + Suite.prototype.addSuite = function (suite) { + suite.parent = this; + suite.root = false; + suite.timeout(this.timeout()); + suite.retries(this.retries()); + suite.slow(this.slow()); + suite.bail(this.bail()); + this.suites.push(suite); + this.emit(constants.EVENT_SUITE_ADD_SUITE, suite); + return this; + }; + + /** + * Add a `test` to this suite. + * + * @private + * @param {Test} test + * @return {Suite} for chaining + */ + Suite.prototype.addTest = function (test) { + test.parent = this; + test.timeout(this.timeout()); + test.retries(this.retries()); + test.slow(this.slow()); + test.ctx = this.ctx; + this.tests.push(test); + this.emit(constants.EVENT_SUITE_ADD_TEST, test); + return this; + }; + + /** + * Return the full title generated by recursively concatenating the parent's + * full title. + * + * @memberof Suite + * @public + * @return {string} + */ + Suite.prototype.fullTitle = function () { + return this.titlePath().join(' '); + }; + + /** + * Return the title path generated by recursively concatenating the parent's + * title path. + * + * @memberof Suite + * @public + * @return {string} + */ + Suite.prototype.titlePath = function () { + var result = []; + if (this.parent) { + result = result.concat(this.parent.titlePath()); + } + if (!this.root) { + result.push(this.title); + } + return result; + }; + + /** + * Return the total number of tests. + * + * @memberof Suite + * @public + * @return {number} + */ + Suite.prototype.total = function () { + return ( + this.suites.reduce(function (sum, suite) { + return sum + suite.total(); + }, 0) + this.tests.length + ); + }; + + /** + * Iterates through each suite recursively to find all tests. Applies a + * function in the format `fn(test)`. + * + * @private + * @param {Function} fn + * @return {Suite} + */ + Suite.prototype.eachTest = function (fn) { + this.tests.forEach(fn); + this.suites.forEach(function (suite) { + suite.eachTest(fn); + }); + return this; + }; + + /** + * This will run the root suite if we happen to be running in delayed mode. + * @private + */ + Suite.prototype.run = function run() { + if (this.root) { + this.emit(constants.EVENT_ROOT_SUITE_RUN); + } + }; + + /** + * Determines whether a suite has an `only` test or suite as a descendant. + * + * @private + * @returns {Boolean} + */ + Suite.prototype.hasOnly = function hasOnly() { + return ( + this._onlyTests.length > 0 || + this._onlySuites.length > 0 || + this.suites.some(function (suite) { + return suite.hasOnly(); + }) + ); + }; + + /** + * Filter suites based on `isOnly` logic. + * + * @private + * @returns {Boolean} + */ + Suite.prototype.filterOnly = function filterOnly() { + if (this._onlyTests.length) { + // If the suite contains `only` tests, run those and ignore any nested suites. + this.tests = this._onlyTests; + this.suites = []; + } else { + // Otherwise, do not run any of the tests in this suite. + this.tests = []; + this._onlySuites.forEach(function (onlySuite) { + // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite. + // Otherwise, all of the tests on this `only` suite should be run, so don't filter it. + if (onlySuite.hasOnly()) { + onlySuite.filterOnly(); + } + }); + // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants. + var onlySuites = this._onlySuites; + this.suites = this.suites.filter(function (childSuite) { + return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly(); + }); + } + // Keep the suite only if there is something to run + return this.tests.length > 0 || this.suites.length > 0; + }; + + /** + * Adds a suite to the list of subsuites marked `only`. + * + * @private + * @param {Suite} suite + */ + Suite.prototype.appendOnlySuite = function (suite) { + this._onlySuites.push(suite); + }; + + /** + * Marks a suite to be `only`. + * + * @private + */ + Suite.prototype.markOnly = function () { + this.parent && this.parent.appendOnlySuite(this); + }; + + /** + * Adds a test to the list of tests marked `only`. + * + * @private + * @param {Test} test + */ + Suite.prototype.appendOnlyTest = function (test) { + this._onlyTests.push(test); + }; + + /** + * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants. + * @private + */ + Suite.prototype.getHooks = function getHooks(name) { + return this['_' + name]; + }; + + /** + * cleans all references from this suite and all child suites. + */ + Suite.prototype.dispose = function () { + this.suites.forEach(function (suite) { + suite.dispose(); + }); + this.cleanReferences(); + }; + + /** + * Cleans up the references to all the deferred functions + * (before/after/beforeEach/afterEach) and tests of a Suite. + * These must be deleted otherwise a memory leak can happen, + * as those functions may reference variables from closures, + * thus those variables can never be garbage collected as long + * as the deferred functions exist. + * + * @private + */ + Suite.prototype.cleanReferences = function cleanReferences() { + function cleanArrReferences(arr) { + for (var i = 0; i < arr.length; i++) { + delete arr[i].fn; + } + } + + if (Array.isArray(this._beforeAll)) { + cleanArrReferences(this._beforeAll); + } + + if (Array.isArray(this._beforeEach)) { + cleanArrReferences(this._beforeEach); + } + + if (Array.isArray(this._afterAll)) { + cleanArrReferences(this._afterAll); + } + + if (Array.isArray(this._afterEach)) { + cleanArrReferences(this._afterEach); + } + + for (var i = 0; i < this.tests.length; i++) { + delete this.tests[i].fn; + } + }; + + /** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + Suite.prototype.serialize = function serialize() { + return { + _bail: this._bail, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + root: this.root, + title: this.title, + [MOCHA_ID_PROP_NAME]: this.id, + parent: this.parent ? {[MOCHA_ID_PROP_NAME]: this.parent.id} : null + }; + }; + + var constants = defineConstants( + /** + * {@link Suite}-related constants. + * @public + * @memberof Suite + * @alias constants + * @readonly + * @static + * @enum {string} + */ + { + /** + * Event emitted after a test file has been loaded. Not emitted in browser. + */ + EVENT_FILE_POST_REQUIRE: 'post-require', + /** + * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected. + */ + EVENT_FILE_PRE_REQUIRE: 'pre-require', + /** + * Event emitted immediately after a test file has been loaded. Not emitted in browser. + */ + EVENT_FILE_REQUIRE: 'require', + /** + * Event emitted when `global.run()` is called (use with `delay` option). + */ + EVENT_ROOT_SUITE_RUN: 'run', + + /** + * Namespace for collection of a `Suite`'s "after all" hooks. + */ + HOOK_TYPE_AFTER_ALL: 'afterAll', + /** + * Namespace for collection of a `Suite`'s "after each" hooks. + */ + HOOK_TYPE_AFTER_EACH: 'afterEach', + /** + * Namespace for collection of a `Suite`'s "before all" hooks. + */ + HOOK_TYPE_BEFORE_ALL: 'beforeAll', + /** + * Namespace for collection of a `Suite`'s "before each" hooks. + */ + HOOK_TYPE_BEFORE_EACH: 'beforeEach', + + /** + * Emitted after a child `Suite` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_SUITE: 'suite', + /** + * Emitted after an "after all" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll', + /** + * Emitted after an "after each" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach', + /** + * Emitted after an "before all" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll', + /** + * Emitted after an "before each" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach', + /** + * Emitted after a `Test` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_TEST: 'test' + } + ); + + Suite.constants = constants; + }(suite)); + + /** + * Module dependencies. + * @private + */ + var EventEmitter = require$$0.EventEmitter; + var Pending = pending; + var utils$1 = utils$3; + var debug = browser.exports('mocha:runner'); + var Runnable$1 = runnable; + var Suite$2 = suite.exports; + var HOOK_TYPE_BEFORE_EACH = Suite$2.constants.HOOK_TYPE_BEFORE_EACH; + var HOOK_TYPE_AFTER_EACH = Suite$2.constants.HOOK_TYPE_AFTER_EACH; + var HOOK_TYPE_AFTER_ALL = Suite$2.constants.HOOK_TYPE_AFTER_ALL; + var HOOK_TYPE_BEFORE_ALL = Suite$2.constants.HOOK_TYPE_BEFORE_ALL; + var EVENT_ROOT_SUITE_RUN = Suite$2.constants.EVENT_ROOT_SUITE_RUN; + var STATE_FAILED = Runnable$1.constants.STATE_FAILED; + var STATE_PASSED = Runnable$1.constants.STATE_PASSED; + var STATE_PENDING = Runnable$1.constants.STATE_PENDING; + var stackFilter = utils$1.stackTraceFilter(); + var stringify = utils$1.stringify; + + const { + createInvalidExceptionError, + createUnsupportedError: createUnsupportedError$1, + createFatalError, + isMochaError, + constants: errorConstants + } = errors$2; + + /** + * Non-enumerable globals. + * @private + * @readonly + */ + var globals = [ + 'setTimeout', + 'clearTimeout', + 'setInterval', + 'clearInterval', + 'XMLHttpRequest', + 'Date', + 'setImmediate', + 'clearImmediate' + ]; + + var constants$1 = utils$1.defineConstants( + /** + * {@link Runner}-related constants. + * @public + * @memberof Runner + * @readonly + * @alias constants + * @static + * @enum {string} + */ + { + /** + * Emitted when {@link Hook} execution begins + */ + EVENT_HOOK_BEGIN: 'hook', + /** + * Emitted when {@link Hook} execution ends + */ + EVENT_HOOK_END: 'hook end', + /** + * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution) + */ + EVENT_RUN_BEGIN: 'start', + /** + * Emitted when Root {@link Suite} execution has been delayed via `delay` option + */ + EVENT_DELAY_BEGIN: 'waiting', + /** + * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()` + */ + EVENT_DELAY_END: 'ready', + /** + * Emitted when Root {@link Suite} execution ends + */ + EVENT_RUN_END: 'end', + /** + * Emitted when {@link Suite} execution begins + */ + EVENT_SUITE_BEGIN: 'suite', + /** + * Emitted when {@link Suite} execution ends + */ + EVENT_SUITE_END: 'suite end', + /** + * Emitted when {@link Test} execution begins + */ + EVENT_TEST_BEGIN: 'test', + /** + * Emitted when {@link Test} execution ends + */ + EVENT_TEST_END: 'test end', + /** + * Emitted when {@link Test} execution fails + */ + EVENT_TEST_FAIL: 'fail', + /** + * Emitted when {@link Test} execution succeeds + */ + EVENT_TEST_PASS: 'pass', + /** + * Emitted when {@link Test} becomes pending + */ + EVENT_TEST_PENDING: 'pending', + /** + * Emitted when {@link Test} execution has failed, but will retry + */ + EVENT_TEST_RETRY: 'retry', + /** + * Initial state of Runner + */ + STATE_IDLE: 'idle', + /** + * State set to this value when the Runner has started running + */ + STATE_RUNNING: 'running', + /** + * State set to this value when the Runner has stopped + */ + STATE_STOPPED: 'stopped' + } + ); + + class Runner extends EventEmitter { + /** + * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}. + * + * @extends external:EventEmitter + * @public + * @class + * @param {Suite} suite - Root suite + * @param {Object} [opts] - Settings object + * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done. + * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready. + * @param {boolean} [opts.dryRun] - Whether to report tests without running them. + * @param {boolean} [opts.failZero] - Whether to fail test run if zero tests encountered. + */ + constructor(suite, opts = {}) { + super(); + + var self = this; + this._globals = []; + this._abort = false; + this.suite = suite; + this._opts = opts; + this.state = constants$1.STATE_IDLE; + this.total = suite.total(); + this.failures = 0; + /** + * @type {Map>>} + */ + this._eventListeners = new Map(); + this.on(constants$1.EVENT_TEST_END, function (test) { + if (test.type === 'test' && test.retriedTest() && test.parent) { + var idx = + test.parent.tests && test.parent.tests.indexOf(test.retriedTest()); + if (idx > -1) test.parent.tests[idx] = test; + } + self.checkGlobals(test); + }); + this.on(constants$1.EVENT_HOOK_END, function (hook) { + self.checkGlobals(hook); + }); + this._defaultGrep = /.*/; + this.grep(this._defaultGrep); + this.globals(this.globalProps()); + + this.uncaught = this._uncaught.bind(this); + this.unhandled = (reason, promise) => { + if (isMochaError(reason)) { + debug( + 'trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:', + reason + ); + this.uncaught(reason); + } else { + debug( + 'trapped unhandled rejection from (probably) user code; re-emitting on process' + ); + this._removeEventListener( + process, + 'unhandledRejection', + this.unhandled + ); + try { + process.emit('unhandledRejection', reason, promise); + } finally { + this._addEventListener(process, 'unhandledRejection', this.unhandled); + } + } + }; + } + } + + /** + * Wrapper for setImmediate, process.nextTick, or browser polyfill. + * + * @param {Function} fn + * @private + */ + Runner.immediately = commonjsGlobal.setImmediate || nextTick$1; + + /** + * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed. + * @param {EventEmitter} target - The `EventEmitter` + * @param {string} eventName - The event name + * @param {string} fn - Listener function + * @private + */ + Runner.prototype._addEventListener = function (target, eventName, listener) { + debug( + '_addEventListener(): adding for event %s; %d current listeners', + eventName, + target.listenerCount(eventName) + ); + /* istanbul ignore next */ + if ( + this._eventListeners.has(target) && + this._eventListeners.get(target).has(eventName) && + this._eventListeners.get(target).get(eventName).has(listener) + ) { + debug( + 'warning: tried to attach duplicate event listener for %s', + eventName + ); + return; + } + target.on(eventName, listener); + const targetListeners = this._eventListeners.has(target) + ? this._eventListeners.get(target) + : new Map(); + const targetEventListeners = targetListeners.has(eventName) + ? targetListeners.get(eventName) + : new Set(); + targetEventListeners.add(listener); + targetListeners.set(eventName, targetEventListeners); + this._eventListeners.set(target, targetListeners); + }; + + /** + * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping. + * @param {EventEmitter} target - The `EventEmitter` + * @param {string} eventName - The event name + * @param {function} listener - Listener function + * @private + */ + Runner.prototype._removeEventListener = function (target, eventName, listener) { + target.removeListener(eventName, listener); + + if (this._eventListeners.has(target)) { + const targetListeners = this._eventListeners.get(target); + if (targetListeners.has(eventName)) { + const targetEventListeners = targetListeners.get(eventName); + targetEventListeners.delete(listener); + if (!targetEventListeners.size) { + targetListeners.delete(eventName); + } + } + if (!targetListeners.size) { + this._eventListeners.delete(target); + } + } else { + debug('trying to remove listener for untracked object %s', target); + } + }; + + /** + * Removes all event handlers set during a run on this instance. + * Remark: this does _not_ clean/dispose the tests or suites themselves. + */ + Runner.prototype.dispose = function () { + this.removeAllListeners(); + this._eventListeners.forEach((targetListeners, target) => { + targetListeners.forEach((targetEventListeners, eventName) => { + targetEventListeners.forEach(listener => { + target.removeListener(eventName, listener); + }); + }); + }); + this._eventListeners.clear(); + }; + + /** + * Run tests with full titles matching `re`. Updates runner.total + * with number of tests matched. + * + * @public + * @memberof Runner + * @param {RegExp} re + * @param {boolean} invert + * @return {Runner} Runner instance. + */ + Runner.prototype.grep = function (re, invert) { + debug('grep(): setting to %s', re); + this._grep = re; + this._invert = invert; + this.total = this.grepTotal(this.suite); + return this; + }; + + /** + * Returns the number of tests matching the grep search for the + * given suite. + * + * @memberof Runner + * @public + * @param {Suite} suite + * @return {number} + */ + Runner.prototype.grepTotal = function (suite) { + var self = this; + var total = 0; + + suite.eachTest(function (test) { + var match = self._grep.test(test.fullTitle()); + if (self._invert) { + match = !match; + } + if (match) { + total++; + } + }); + + return total; + }; + + /** + * Return a list of global properties. + * + * @return {Array} + * @private + */ + Runner.prototype.globalProps = function () { + var props = Object.keys(commonjsGlobal); + + // non-enumerables + for (var i = 0; i < globals.length; ++i) { + if (~props.indexOf(globals[i])) { + continue; + } + props.push(globals[i]); + } + + return props; + }; + + /** + * Allow the given `arr` of globals. + * + * @public + * @memberof Runner + * @param {Array} arr + * @return {Runner} Runner instance. + */ + Runner.prototype.globals = function (arr) { + if (!arguments.length) { + return this._globals; + } + debug('globals(): setting to %O', arr); + this._globals = this._globals.concat(arr); + return this; + }; + + /** + * Check for global variable leaks. + * + * @private + */ + Runner.prototype.checkGlobals = function (test) { + if (!this.checkLeaks) { + return; + } + var ok = this._globals; + + var globals = this.globalProps(); + var leaks; + + if (test) { + ok = ok.concat(test._allowedGlobals || []); + } + + if (this.prevGlobalsLength === globals.length) { + return; + } + this.prevGlobalsLength = globals.length; + + leaks = filterLeaks(ok, globals); + this._globals = this._globals.concat(leaks); + + if (leaks.length) { + var msg = `global leak(s) detected: ${leaks.map(e => `'${e}'`).join(', ')}`; + this.fail(test, new Error(msg)); + } + }; + + /** + * Fail the given `test`. + * + * If `test` is a hook, failures work in the following pattern: + * - If bail, run corresponding `after each` and `after` hooks, + * then exit + * - Failed `before` hook skips all tests in a suite and subsuites, + * but jumps to corresponding `after` hook + * - Failed `before each` hook skips remaining tests in a + * suite and jumps to corresponding `after each` hook, + * which is run only once + * - Failed `after` hook does not alter execution order + * - Failed `after each` hook skips remaining tests in a + * suite and subsuites, but executes other `after each` + * hooks + * + * @private + * @param {Runnable} test + * @param {Error} err + * @param {boolean} [force=false] - Whether to fail a pending test. + */ + Runner.prototype.fail = function (test, err, force) { + force = force === true; + if (test.isPending() && !force) { + return; + } + if (this.state === constants$1.STATE_STOPPED) { + if (err.code === errorConstants.MULTIPLE_DONE) { + throw err; + } + throw createFatalError( + 'Test failed after root suite execution completed!', + err + ); + } + + ++this.failures; + debug('total number of failures: %d', this.failures); + test.state = STATE_FAILED; + + if (!isError(err)) { + err = thrown2Error(err); + } + + try { + err.stack = + this.fullStackTrace || !err.stack ? err.stack : stackFilter(err.stack); + } catch (ignore) { + // some environments do not take kindly to monkeying with the stack + } + + this.emit(constants$1.EVENT_TEST_FAIL, test, err); + }; + + /** + * Run hook `name` callbacks and then invoke `fn()`. + * + * @private + * @param {string} name + * @param {Function} fn + */ + + Runner.prototype.hook = function (name, fn) { + if (this._opts.dryRun) return fn(); + + var suite = this.suite; + var hooks = suite.getHooks(name); + var self = this; + + function next(i) { + var hook = hooks[i]; + if (!hook) { + return fn(); + } + self.currentRunnable = hook; + + if (name === HOOK_TYPE_BEFORE_ALL) { + hook.ctx.currentTest = hook.parent.tests[0]; + } else if (name === HOOK_TYPE_AFTER_ALL) { + hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1]; + } else { + hook.ctx.currentTest = self.test; + } + + setHookTitle(hook); + + hook.allowUncaught = self.allowUncaught; + + self.emit(constants$1.EVENT_HOOK_BEGIN, hook); + + if (!hook.listeners('error').length) { + self._addEventListener(hook, 'error', function (err) { + self.fail(hook, err); + }); + } + + hook.run(function cbHookRun(err) { + var testError = hook.error(); + if (testError) { + self.fail(self.test, testError); + } + // conditional skip + if (hook.pending) { + if (name === HOOK_TYPE_AFTER_EACH) { + // TODO define and implement use case + if (self.test) { + self.test.pending = true; + } + } else if (name === HOOK_TYPE_BEFORE_EACH) { + if (self.test) { + self.test.pending = true; + } + self.emit(constants$1.EVENT_HOOK_END, hook); + hook.pending = false; // activates hook for next test + return fn(new Error('abort hookDown')); + } else if (name === HOOK_TYPE_BEFORE_ALL) { + suite.tests.forEach(function (test) { + test.pending = true; + }); + suite.suites.forEach(function (suite) { + suite.pending = true; + }); + hooks = []; + } else { + hook.pending = false; + var errForbid = createUnsupportedError$1('`this.skip` forbidden'); + self.fail(hook, errForbid); + return fn(errForbid); + } + } else if (err) { + self.fail(hook, err); + // stop executing hooks, notify callee of hook err + return fn(err); + } + self.emit(constants$1.EVENT_HOOK_END, hook); + delete hook.ctx.currentTest; + setHookTitle(hook); + next(++i); + }); + + function setHookTitle(hook) { + hook.originalTitle = hook.originalTitle || hook.title; + if (hook.ctx && hook.ctx.currentTest) { + hook.title = `${hook.originalTitle} for "${hook.ctx.currentTest.title}"`; + } else { + var parentTitle; + if (hook.parent.title) { + parentTitle = hook.parent.title; + } else { + parentTitle = hook.parent.root ? '{root}' : ''; + } + hook.title = `${hook.originalTitle} in "${parentTitle}"`; + } + } + } + + Runner.immediately(function () { + next(0); + }); + }; + + /** + * Run hook `name` for the given array of `suites` + * in order, and callback `fn(err, errSuite)`. + * + * @private + * @param {string} name + * @param {Array} suites + * @param {Function} fn + */ + Runner.prototype.hooks = function (name, suites, fn) { + var self = this; + var orig = this.suite; + + function next(suite) { + self.suite = suite; + + if (!suite) { + self.suite = orig; + return fn(); + } + + self.hook(name, function (err) { + if (err) { + var errSuite = self.suite; + self.suite = orig; + return fn(err, errSuite); + } + + next(suites.pop()); + }); + } + + next(suites.pop()); + }; + + /** + * Run 'afterEach' hooks from bottom up. + * + * @param {String} name + * @param {Function} fn + * @private + */ + Runner.prototype.hookUp = function (name, fn) { + var suites = [this.suite].concat(this.parents()).reverse(); + this.hooks(name, suites, fn); + }; + + /** + * Run 'beforeEach' hooks from top level down. + * + * @param {String} name + * @param {Function} fn + * @private + */ + Runner.prototype.hookDown = function (name, fn) { + var suites = [this.suite].concat(this.parents()); + this.hooks(name, suites, fn); + }; + + /** + * Return an array of parent Suites from + * closest to furthest. + * + * @return {Array} + * @private + */ + Runner.prototype.parents = function () { + var suite = this.suite; + var suites = []; + while (suite.parent) { + suite = suite.parent; + suites.push(suite); + } + return suites; + }; + + /** + * Run the current test and callback `fn(err)`. + * + * @param {Function} fn + * @private + */ + Runner.prototype.runTest = function (fn) { + if (this._opts.dryRun) return Runner.immediately(fn); + + var self = this; + var test = this.test; + + if (!test) { + return; + } + + if (this.asyncOnly) { + test.asyncOnly = true; + } + this._addEventListener(test, 'error', function (err) { + self.fail(test, err); + }); + if (this.allowUncaught) { + test.allowUncaught = true; + return test.run(fn); + } + try { + test.run(fn); + } catch (err) { + fn(err); + } + }; + + /** + * Run tests in the given `suite` and invoke the callback `fn()` when complete. + * + * @private + * @param {Suite} suite + * @param {Function} fn + */ + Runner.prototype.runTests = function (suite, fn) { + var self = this; + var tests = suite.tests.slice(); + var test; + + function hookErr(_, errSuite, after) { + // before/after Each hook for errSuite failed: + var orig = self.suite; + + // for failed 'after each' hook start from errSuite parent, + // otherwise start from errSuite itself + self.suite = after ? errSuite.parent : errSuite; + + if (self.suite) { + self.hookUp(HOOK_TYPE_AFTER_EACH, function (err2, errSuite2) { + self.suite = orig; + // some hooks may fail even now + if (err2) { + return hookErr(err2, errSuite2, true); + } + // report error suite + fn(errSuite); + }); + } else { + // there is no need calling other 'after each' hooks + self.suite = orig; + fn(errSuite); + } + } + + function next(err, errSuite) { + // if we bail after first err + if (self.failures && suite._bail) { + tests = []; + } + + if (self._abort) { + return fn(); + } + + if (err) { + return hookErr(err, errSuite, true); + } + + // next test + test = tests.shift(); + + // all done + if (!test) { + return fn(); + } + + // grep + var match = self._grep.test(test.fullTitle()); + if (self._invert) { + match = !match; + } + if (!match) { + // Run immediately only if we have defined a grep. When we + // define a grep — It can cause maximum callstack error if + // the grep is doing a large recursive loop by neglecting + // all tests. The run immediately function also comes with + // a performance cost. So we don't want to run immediately + // if we run the whole test suite, because running the whole + // test suite don't do any immediate recursive loops. Thus, + // allowing a JS runtime to breathe. + if (self._grep !== self._defaultGrep) { + Runner.immediately(next); + } else { + next(); + } + return; + } + + // static skip, no hooks are executed + if (test.isPending()) { + if (self.forbidPending) { + self.fail(test, new Error('Pending test forbidden'), true); + } else { + test.state = STATE_PENDING; + self.emit(constants$1.EVENT_TEST_PENDING, test); + } + self.emit(constants$1.EVENT_TEST_END, test); + return next(); + } + + // execute test and hook(s) + self.emit(constants$1.EVENT_TEST_BEGIN, (self.test = test)); + self.hookDown(HOOK_TYPE_BEFORE_EACH, function (err, errSuite) { + // conditional skip within beforeEach + if (test.isPending()) { + if (self.forbidPending) { + self.fail(test, new Error('Pending test forbidden'), true); + } else { + test.state = STATE_PENDING; + self.emit(constants$1.EVENT_TEST_PENDING, test); + } + self.emit(constants$1.EVENT_TEST_END, test); + // skip inner afterEach hooks below errSuite level + var origSuite = self.suite; + self.suite = errSuite || self.suite; + return self.hookUp(HOOK_TYPE_AFTER_EACH, function (e, eSuite) { + self.suite = origSuite; + next(e, eSuite); + }); + } + if (err) { + return hookErr(err, errSuite, false); + } + self.currentRunnable = self.test; + self.runTest(function (err) { + test = self.test; + // conditional skip within it + if (test.pending) { + if (self.forbidPending) { + self.fail(test, new Error('Pending test forbidden'), true); + } else { + test.state = STATE_PENDING; + self.emit(constants$1.EVENT_TEST_PENDING, test); + } + self.emit(constants$1.EVENT_TEST_END, test); + return self.hookUp(HOOK_TYPE_AFTER_EACH, next); + } else if (err) { + var retry = test.currentRetry(); + if (retry < test.retries()) { + var clonedTest = test.clone(); + clonedTest.currentRetry(retry + 1); + tests.unshift(clonedTest); + + self.emit(constants$1.EVENT_TEST_RETRY, test, err); + + // Early return + hook trigger so that it doesn't + // increment the count wrong + return self.hookUp(HOOK_TYPE_AFTER_EACH, next); + } else { + self.fail(test, err); + } + self.emit(constants$1.EVENT_TEST_END, test); + return self.hookUp(HOOK_TYPE_AFTER_EACH, next); + } + + test.state = STATE_PASSED; + self.emit(constants$1.EVENT_TEST_PASS, test); + self.emit(constants$1.EVENT_TEST_END, test); + self.hookUp(HOOK_TYPE_AFTER_EACH, next); + }); + }); + } + + this.next = next; + this.hookErr = hookErr; + next(); + }; + + /** + * Run the given `suite` and invoke the callback `fn()` when complete. + * + * @private + * @param {Suite} suite + * @param {Function} fn + */ + Runner.prototype.runSuite = function (suite, fn) { + var i = 0; + var self = this; + var total = this.grepTotal(suite); + + debug('runSuite(): running %s', suite.fullTitle()); + + if (!total || (self.failures && suite._bail)) { + debug('runSuite(): bailing'); + return fn(); + } + + this.emit(constants$1.EVENT_SUITE_BEGIN, (this.suite = suite)); + + function next(errSuite) { + if (errSuite) { + // current suite failed on a hook from errSuite + if (errSuite === suite) { + // if errSuite is current suite + // continue to the next sibling suite + return done(); + } + // errSuite is among the parents of current suite + // stop execution of errSuite and all sub-suites + return done(errSuite); + } + + if (self._abort) { + return done(); + } + + var curr = suite.suites[i++]; + if (!curr) { + return done(); + } + + // Avoid grep neglecting large number of tests causing a + // huge recursive loop and thus a maximum call stack error. + // See comment in `this.runTests()` for more information. + if (self._grep !== self._defaultGrep) { + Runner.immediately(function () { + self.runSuite(curr, next); + }); + } else { + self.runSuite(curr, next); + } + } + + function done(errSuite) { + self.suite = suite; + self.nextSuite = next; + + // remove reference to test + delete self.test; + + self.hook(HOOK_TYPE_AFTER_ALL, function () { + self.emit(constants$1.EVENT_SUITE_END, suite); + fn(errSuite); + }); + } + + this.nextSuite = next; + + this.hook(HOOK_TYPE_BEFORE_ALL, function (err) { + if (err) { + return done(); + } + self.runTests(suite, next); + }); + }; + + /** + * Handle uncaught exceptions within runner. + * + * This function is bound to the instance as `Runner#uncaught` at instantiation + * time. It's intended to be listening on the `Process.uncaughtException` event. + * In order to not leak EE listeners, we need to ensure no more than a single + * `uncaughtException` listener exists per `Runner`. The only way to do + * this--because this function needs the context (and we don't have lambdas)--is + * to use `Function.prototype.bind`. We need strict equality to unregister and + * _only_ unregister the _one_ listener we set from the + * `Process.uncaughtException` event; would be poor form to just remove + * everything. See {@link Runner#run} for where the event listener is registered + * and unregistered. + * @param {Error} err - Some uncaught error + * @private + */ + Runner.prototype._uncaught = function (err) { + // this is defensive to prevent future developers from mis-calling this function. + // it's more likely that it'd be called with the incorrect context--say, the global + // `process` object--than it would to be called with a context that is not a "subclass" + // of `Runner`. + if (!(this instanceof Runner)) { + throw createFatalError( + 'Runner#uncaught() called with invalid context', + this + ); + } + if (err instanceof Pending) { + debug('uncaught(): caught a Pending'); + return; + } + // browser does not exit script when throwing in global.onerror() + if (this.allowUncaught && !utils$1.isBrowser()) { + debug('uncaught(): bubbling exception due to --allow-uncaught'); + throw err; + } + + if (this.state === constants$1.STATE_STOPPED) { + debug('uncaught(): throwing after run has completed!'); + throw err; + } + + if (err) { + debug('uncaught(): got truthy exception %O', err); + } else { + debug('uncaught(): undefined/falsy exception'); + err = createInvalidExceptionError( + 'Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger', + err + ); + } + + if (!isError(err)) { + err = thrown2Error(err); + debug('uncaught(): converted "error" %o to Error', err); + } + err.uncaught = true; + + var runnable = this.currentRunnable; + + if (!runnable) { + runnable = new Runnable$1('Uncaught error outside test suite'); + debug('uncaught(): no current Runnable; created a phony one'); + runnable.parent = this.suite; + + if (this.state === constants$1.STATE_RUNNING) { + debug('uncaught(): failing gracefully'); + this.fail(runnable, err); + } else { + // Can't recover from this failure + debug('uncaught(): test run has not yet started; unrecoverable'); + this.emit(constants$1.EVENT_RUN_BEGIN); + this.fail(runnable, err); + this.emit(constants$1.EVENT_RUN_END); + } + + return; + } + + runnable.clearTimeout(); + + if (runnable.isFailed()) { + debug('uncaught(): Runnable has already failed'); + // Ignore error if already failed + return; + } else if (runnable.isPending()) { + debug('uncaught(): pending Runnable wound up failing!'); + // report 'pending test' retrospectively as failed + this.fail(runnable, err, true); + return; + } + + // we cannot recover gracefully if a Runnable has already passed + // then fails asynchronously + if (runnable.isPassed()) { + debug('uncaught(): Runnable has already passed; bailing gracefully'); + this.fail(runnable, err); + this.abort(); + } else { + debug('uncaught(): forcing Runnable to complete with Error'); + return runnable.callback(err); + } + }; + + /** + * Run the root suite and invoke `fn(failures)` + * on completion. + * + * @public + * @memberof Runner + * @param {Function} fn - Callback when finished + * @param {Object} [opts] - For subclasses + * @param {string[]} opts.files - Files to run + * @param {Options} opts.options - command-line options + * @returns {Runner} Runner instance. + */ + Runner.prototype.run = function (fn, opts = {}) { + var rootSuite = this.suite; + var options = opts.options || {}; + + debug('run(): got options: %O', options); + fn = fn || function () {}; + + const end = () => { + if (!this.total && this._opts.failZero) this.failures = 1; + + debug('run(): root suite completed; emitting %s', constants$1.EVENT_RUN_END); + this.emit(constants$1.EVENT_RUN_END); + }; + + const begin = () => { + debug('run(): emitting %s', constants$1.EVENT_RUN_BEGIN); + this.emit(constants$1.EVENT_RUN_BEGIN); + debug('run(): emitted %s', constants$1.EVENT_RUN_BEGIN); + + this.runSuite(rootSuite, end); + }; + + const prepare = () => { + debug('run(): starting'); + // If there is an `only` filter + if (rootSuite.hasOnly()) { + rootSuite.filterOnly(); + debug('run(): filtered exclusive Runnables'); + } + this.state = constants$1.STATE_RUNNING; + if (this._opts.delay) { + this.emit(constants$1.EVENT_DELAY_END); + debug('run(): "delay" ended'); + } + + return begin(); + }; + + // references cleanup to avoid memory leaks + if (this._opts.cleanReferencesAfterRun) { + this.on(constants$1.EVENT_SUITE_END, suite => { + suite.cleanReferences(); + }); + } + + // callback + this.on(constants$1.EVENT_RUN_END, function () { + this.state = constants$1.STATE_STOPPED; + debug('run(): emitted %s', constants$1.EVENT_RUN_END); + fn(this.failures); + }); + + this._removeEventListener(process, 'uncaughtException', this.uncaught); + this._removeEventListener(process, 'unhandledRejection', this.unhandled); + this._addEventListener(process, 'uncaughtException', this.uncaught); + this._addEventListener(process, 'unhandledRejection', this.unhandled); + + if (this._opts.delay) { + // for reporters, I guess. + // might be nice to debounce some dots while we wait. + this.emit(constants$1.EVENT_DELAY_BEGIN, rootSuite); + rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare); + debug('run(): waiting for green light due to --delay'); + } else { + Runner.immediately(prepare); + } + + return this; + }; + + /** + * Toggle partial object linking behavior; used for building object references from + * unique ID's. Does nothing in serial mode, because the object references already exist. + * Subclasses can implement this (e.g., `ParallelBufferedRunner`) + * @abstract + * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable + * @returns {Runner} + * @chainable + * @public + * @example + * // this reporter needs proper object references when run in parallel mode + * class MyReporter() { + * constructor(runner) { + * this.runner.linkPartialObjects(true) + * .on(EVENT_SUITE_BEGIN, suite => { + // this Suite may be the same object... + * }) + * .on(EVENT_TEST_BEGIN, test => { + * // ...as the `test.parent` property + * }); + * } + * } + */ + Runner.prototype.linkPartialObjects = function (value) { + return this; + }; + + /* + * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`. + * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead. + * @public + * @memberof Runner + * @param {Object} [opts] - Options for {@link Runner#run} + * @returns {Promise} Failure count + */ + Runner.prototype.runAsync = async function runAsync(opts = {}) { + return new Promise(resolve => { + this.run(resolve, opts); + }); + }; + + /** + * Cleanly abort execution. + * + * @memberof Runner + * @public + * @return {Runner} Runner instance. + */ + Runner.prototype.abort = function () { + debug('abort(): aborting'); + this._abort = true; + + return this; + }; + + /** + * Returns `true` if Mocha is running in parallel mode. For reporters. + * + * Subclasses should return an appropriate value. + * @public + * @returns {false} + */ + Runner.prototype.isParallelMode = function isParallelMode() { + return false; + }; + + /** + * Configures an alternate reporter for worker processes to use. Subclasses + * using worker processes should implement this. + * @public + * @param {string} path - Absolute path to alternate reporter for worker processes to use + * @returns {Runner} + * @throws When in serial mode + * @chainable + * @abstract + */ + Runner.prototype.workerReporter = function () { + throw createUnsupportedError$1('workerReporter() not supported in serial mode'); + }; + + /** + * Filter leaks with the given globals flagged as `ok`. + * + * @private + * @param {Array} ok + * @param {Array} globals + * @return {Array} + */ + function filterLeaks(ok, globals) { + return globals.filter(function (key) { + // Firefox and Chrome exposes iframes as index inside the window object + if (/^\d+/.test(key)) { + return false; + } + + // in firefox + // if runner runs in an iframe, this iframe's window.getInterface method + // not init at first it is assigned in some seconds + if (commonjsGlobal.navigator && /^getInterface/.test(key)) { + return false; + } + + // an iframe could be approached by window[iframeIndex] + // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak + if (commonjsGlobal.navigator && /^\d+/.test(key)) { + return false; + } + + // Opera and IE expose global variables for HTML element IDs (issue #243) + if (/^mocha-/.test(key)) { + return false; + } + + var matched = ok.filter(function (ok) { + if (~ok.indexOf('*')) { + return key.indexOf(ok.split('*')[0]) === 0; + } + return key === ok; + }); + return !matched.length && (!commonjsGlobal.navigator || key !== 'onerror'); + }); + } + + /** + * Check if argument is an instance of Error object or a duck-typed equivalent. + * + * @private + * @param {Object} err - object to check + * @param {string} err.message - error message + * @returns {boolean} + */ + function isError(err) { + return err instanceof Error || (err && typeof err.message === 'string'); + } + + /** + * + * Converts thrown non-extensible type into proper Error. + * + * @private + * @param {*} thrown - Non-extensible type thrown by code + * @return {Error} + */ + function thrown2Error(err) { + return new Error( + `the ${utils$1.canonicalType(err)} ${stringify( + err + )} was thrown, throw an Error :)` + ); + } + + Runner.constants = constants$1; + + /** + * Node.js' `EventEmitter` + * @external EventEmitter + * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter} + */ + + var runner = Runner; + + (function (module, exports) { + /** + * @module Base + */ + /** + * Module dependencies. + */ + + var diff = lib; + var milliseconds = ms$1; + var utils = utils$3; + var supportsColor = require$$18; + var symbols = browser$1; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + + const isBrowser = utils.isBrowser(); + + function getBrowserWindowSize() { + if ('innerHeight' in commonjsGlobal) { + return [commonjsGlobal.innerHeight, commonjsGlobal.innerWidth]; + } + // In a Web Worker, the DOM Window is not available. + return [640, 480]; + } + + /** + * Expose `Base`. + */ + + exports = module.exports = Base; + + /** + * Check if both stdio streams are associated with a tty. + */ + + var isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY); + + /** + * Save log references to avoid tests interfering (see GH-3604). + */ + var consoleLog = console.log; + + /** + * Enable coloring by default, except in the browser interface. + */ + + exports.useColors = + !isBrowser && + (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined); + + /** + * Inline diffs instead of +/- + */ + + exports.inlineDiffs = false; + + /** + * Truncate diffs longer than this value to avoid slow performance + */ + exports.maxDiffSize = 8192; + + /** + * Default color map. + */ + + exports.colors = { + pass: 90, + fail: 31, + 'bright pass': 92, + 'bright fail': 91, + 'bright yellow': 93, + pending: 36, + suite: 0, + 'error title': 0, + 'error message': 31, + 'error stack': 90, + checkmark: 32, + fast: 90, + medium: 33, + slow: 31, + green: 32, + light: 90, + 'diff gutter': 90, + 'diff added': 32, + 'diff removed': 31, + 'diff added inline': '30;42', + 'diff removed inline': '30;41' + }; + + /** + * Default symbol map. + */ + + exports.symbols = { + ok: symbols.success, + err: symbols.error, + dot: '.', + comma: ',', + bang: '!' + }; + + /** + * Color `str` with the given `type`, + * allowing colors to be disabled, + * as well as user-defined color + * schemes. + * + * @private + * @param {string} type + * @param {string} str + * @return {string} + */ + var color = (exports.color = function (type, str) { + if (!exports.useColors) { + return String(str); + } + return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; + }); + + /** + * Expose term window size, with some defaults for when stderr is not a tty. + */ + + exports.window = { + width: 75 + }; + + if (isatty) { + if (isBrowser) { + exports.window.width = getBrowserWindowSize()[1]; + } else { + exports.window.width = process.stdout.getWindowSize(1)[0]; + } + } + + /** + * Expose some basic cursor interactions that are common among reporters. + */ + + exports.cursor = { + hide: function () { + isatty && process.stdout.write('\u001b[?25l'); + }, + + show: function () { + isatty && process.stdout.write('\u001b[?25h'); + }, + + deleteLine: function () { + isatty && process.stdout.write('\u001b[2K'); + }, + + beginningOfLine: function () { + isatty && process.stdout.write('\u001b[0G'); + }, + + CR: function () { + if (isatty) { + exports.cursor.deleteLine(); + exports.cursor.beginningOfLine(); + } else { + process.stdout.write('\r'); + } + } + }; + + var showDiff = (exports.showDiff = function (err) { + return ( + err && + err.showDiff !== false && + sameType(err.actual, err.expected) && + err.expected !== undefined + ); + }); + + function stringifyDiffObjs(err) { + if (!utils.isString(err.actual) || !utils.isString(err.expected)) { + err.actual = utils.stringify(err.actual); + err.expected = utils.stringify(err.expected); + } + } + + /** + * Returns a diff between 2 strings with coloured ANSI output. + * + * @description + * The diff will be either inline or unified dependent on the value + * of `Base.inlineDiff`. + * + * @param {string} actual + * @param {string} expected + * @return {string} Diff + */ + + var generateDiff = (exports.generateDiff = function (actual, expected) { + try { + var maxLen = exports.maxDiffSize; + var skipped = 0; + if (maxLen > 0) { + skipped = Math.max(actual.length - maxLen, expected.length - maxLen); + actual = actual.slice(0, maxLen); + expected = expected.slice(0, maxLen); + } + let result = exports.inlineDiffs + ? inlineDiff(actual, expected) + : unifiedDiff(actual, expected); + if (skipped > 0) { + result = `${result}\n [mocha] output truncated to ${maxLen} characters, see "maxDiffSize" reporter-option\n`; + } + return result; + } catch (err) { + var msg = + '\n ' + + color('diff added', '+ expected') + + ' ' + + color('diff removed', '- actual: failed to generate Mocha diff') + + '\n'; + return msg; + } + }); + + /** + * Outputs the given `failures` as a list. + * + * @public + * @memberof Mocha.reporters.Base + * @variation 1 + * @param {Object[]} failures - Each is Test instance with corresponding + * Error property + */ + exports.list = function (failures) { + var multipleErr, multipleTest; + Base.consoleLog(); + failures.forEach(function (test, i) { + // format + var fmt = + color('error title', ' %s) %s:\n') + + color('error message', ' %s') + + color('error stack', '\n%s\n'); + + // msg + var msg; + var err; + if (test.err && test.err.multiple) { + if (multipleTest !== test) { + multipleTest = test; + multipleErr = [test.err].concat(test.err.multiple); + } + err = multipleErr.shift(); + } else { + err = test.err; + } + var message; + if (typeof err.inspect === 'function') { + message = err.inspect() + ''; + } else if (err.message && typeof err.message.toString === 'function') { + message = err.message + ''; + } else { + message = ''; + } + var stack = err.stack || message; + var index = message ? stack.indexOf(message) : -1; + + if (index === -1) { + msg = message; + } else { + index += message.length; + msg = stack.slice(0, index); + // remove msg from stack + stack = stack.slice(index + 1); + } + + // uncaught + if (err.uncaught) { + msg = 'Uncaught ' + msg; + } + // explicitly show diff + if (!exports.hideDiff && showDiff(err)) { + stringifyDiffObjs(err); + fmt = + color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); + var match = message.match(/^([^:]+): expected/); + msg = '\n ' + color('error message', match ? match[1] : msg); + + msg += generateDiff(err.actual, err.expected); + } + + // indent stack trace + stack = stack.replace(/^/gm, ' '); + + // indented test title + var testTitle = ''; + test.titlePath().forEach(function (str, index) { + if (index !== 0) { + testTitle += '\n '; + } + for (var i = 0; i < index; i++) { + testTitle += ' '; + } + testTitle += str; + }); + + Base.consoleLog(fmt, i + 1, testTitle, msg, stack); + }); + }; + + /** + * Constructs a new `Base` reporter instance. + * + * @description + * All other reporters generally inherit from this reporter. + * + * @public + * @class + * @memberof Mocha.reporters + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function Base(runner, options) { + var failures = (this.failures = []); + + if (!runner) { + throw new TypeError('Missing runner argument'); + } + this.options = options || {}; + this.runner = runner; + this.stats = runner.stats; // assigned so Reporters keep a closer reference + + var maxDiffSizeOpt = + this.options.reporterOption && this.options.reporterOption.maxDiffSize; + if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) { + exports.maxDiffSize = Number(maxDiffSizeOpt); + } + + runner.on(EVENT_TEST_PASS, function (test) { + if (test.duration > test.slow()) { + test.speed = 'slow'; + } else if (test.duration > test.slow() / 2) { + test.speed = 'medium'; + } else { + test.speed = 'fast'; + } + }); + + runner.on(EVENT_TEST_FAIL, function (test, err) { + if (showDiff(err)) { + stringifyDiffObjs(err); + } + // more than one error per test + if (test.err && err instanceof Error) { + test.err.multiple = (test.err.multiple || []).concat(err); + } else { + test.err = err; + } + failures.push(test); + }); + } + + /** + * Outputs common epilogue used by many of the bundled reporters. + * + * @public + * @memberof Mocha.reporters + */ + Base.prototype.epilogue = function () { + var stats = this.stats; + var fmt; + + Base.consoleLog(); + + // passes + fmt = + color('bright pass', ' ') + + color('green', ' %d passing') + + color('light', ' (%s)'); + + Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration)); + + // pending + if (stats.pending) { + fmt = color('pending', ' ') + color('pending', ' %d pending'); + + Base.consoleLog(fmt, stats.pending); + } + + // failures + if (stats.failures) { + fmt = color('fail', ' %d failing'); + + Base.consoleLog(fmt, stats.failures); + + Base.list(this.failures); + Base.consoleLog(); + } + + Base.consoleLog(); + }; + + /** + * Pads the given `str` to `len`. + * + * @private + * @param {string} str + * @param {string} len + * @return {string} + */ + function pad(str, len) { + str = String(str); + return Array(len - str.length + 1).join(' ') + str; + } + + /** + * Returns inline diff between 2 strings with coloured ANSI output. + * + * @private + * @param {String} actual + * @param {String} expected + * @return {string} Diff + */ + function inlineDiff(actual, expected) { + var msg = errorDiff(actual, expected); + + // linenos + var lines = msg.split('\n'); + if (lines.length > 4) { + var width = String(lines.length).length; + msg = lines + .map(function (str, i) { + return pad(++i, width) + ' |' + ' ' + str; + }) + .join('\n'); + } + + // legend + msg = + '\n' + + color('diff removed inline', 'actual') + + ' ' + + color('diff added inline', 'expected') + + '\n\n' + + msg + + '\n'; + + // indent + msg = msg.replace(/^/gm, ' '); + return msg; + } + + /** + * Returns unified diff between two strings with coloured ANSI output. + * + * @private + * @param {String} actual + * @param {String} expected + * @return {string} The diff. + */ + function unifiedDiff(actual, expected) { + var indent = ' '; + function cleanUp(line) { + if (line[0] === '+') { + return indent + colorLines('diff added', line); + } + if (line[0] === '-') { + return indent + colorLines('diff removed', line); + } + if (line.match(/@@/)) { + return '--'; + } + if (line.match(/\\ No newline/)) { + return null; + } + return indent + line; + } + function notBlank(line) { + return typeof line !== 'undefined' && line !== null; + } + var msg = diff.createPatch('string', actual, expected); + var lines = msg.split('\n').splice(5); + return ( + '\n ' + + colorLines('diff added', '+ expected') + + ' ' + + colorLines('diff removed', '- actual') + + '\n\n' + + lines.map(cleanUp).filter(notBlank).join('\n') + ); + } + + /** + * Returns character diff for `err`. + * + * @private + * @param {String} actual + * @param {String} expected + * @return {string} the diff + */ + function errorDiff(actual, expected) { + return diff + .diffWordsWithSpace(actual, expected) + .map(function (str) { + if (str.added) { + return colorLines('diff added inline', str.value); + } + if (str.removed) { + return colorLines('diff removed inline', str.value); + } + return str.value; + }) + .join(''); + } + + /** + * Colors lines for `str`, using the color `name`. + * + * @private + * @param {string} name + * @param {string} str + * @return {string} + */ + function colorLines(name, str) { + return str + .split('\n') + .map(function (str) { + return color(name, str); + }) + .join('\n'); + } + + /** + * Object#toString reference. + */ + var objToString = Object.prototype.toString; + + /** + * Checks that a / b have the same type. + * + * @private + * @param {Object} a + * @param {Object} b + * @return {boolean} + */ + function sameType(a, b) { + return objToString.call(a) === objToString.call(b); + } + + Base.consoleLog = consoleLog; + + Base.abstract = true; + }(base$1, base$1.exports)); + + var dot = {exports: {}}; + + (function (module, exports) { + /** + * @module Dot + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var inherits = utils$3.inherits; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var EVENT_RUN_END = constants.EVENT_RUN_END; + + /** + * Expose `Dot`. + */ + + module.exports = Dot; + + /** + * Constructs a new `Dot` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function Dot(runner, options) { + Base.call(this, runner, options); + + var self = this; + var width = (Base.window.width * 0.75) | 0; + var n = -1; + + runner.on(EVENT_RUN_BEGIN, function () { + process.stdout.write('\n'); + }); + + runner.on(EVENT_TEST_PENDING, function () { + if (++n % width === 0) { + process.stdout.write('\n '); + } + process.stdout.write(Base.color('pending', Base.symbols.comma)); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + if (++n % width === 0) { + process.stdout.write('\n '); + } + if (test.speed === 'slow') { + process.stdout.write(Base.color('bright yellow', Base.symbols.dot)); + } else { + process.stdout.write(Base.color(test.speed, Base.symbols.dot)); + } + }); + + runner.on(EVENT_TEST_FAIL, function () { + if (++n % width === 0) { + process.stdout.write('\n '); + } + process.stdout.write(Base.color('fail', Base.symbols.bang)); + }); + + runner.once(EVENT_RUN_END, function () { + process.stdout.write('\n'); + self.epilogue(); + }); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(Dot, Base); + + Dot.description = 'dot matrix representation'; + }(dot)); + + var doc = {exports: {}}; + + (function (module, exports) { + /** + * @module Doc + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var utils = utils$3; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; + var EVENT_SUITE_END = constants.EVENT_SUITE_END; + + /** + * Expose `Doc`. + */ + + module.exports = Doc; + + /** + * Constructs a new `Doc` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function Doc(runner, options) { + Base.call(this, runner, options); + + var indents = 2; + + function indent() { + return Array(indents).join(' '); + } + + runner.on(EVENT_SUITE_BEGIN, function (suite) { + if (suite.root) { + return; + } + ++indents; + Base.consoleLog('%s
      ', indent()); + ++indents; + Base.consoleLog('%s

      %s

      ', indent(), utils.escape(suite.title)); + Base.consoleLog('%s
      ', indent()); + }); + + runner.on(EVENT_SUITE_END, function (suite) { + if (suite.root) { + return; + } + Base.consoleLog('%s
      ', indent()); + --indents; + Base.consoleLog('%s
      ', indent()); + --indents; + }); + + runner.on(EVENT_TEST_PASS, function (test) { + Base.consoleLog('%s
      %s
      ', indent(), utils.escape(test.title)); + Base.consoleLog('%s
      %s
      ', indent(), utils.escape(test.file)); + var code = utils.escape(utils.clean(test.body)); + Base.consoleLog('%s
      %s
      ', indent(), code); + }); + + runner.on(EVENT_TEST_FAIL, function (test, err) { + Base.consoleLog( + '%s
      %s
      ', + indent(), + utils.escape(test.title) + ); + Base.consoleLog( + '%s
      %s
      ', + indent(), + utils.escape(test.file) + ); + var code = utils.escape(utils.clean(test.body)); + Base.consoleLog( + '%s
      %s
      ', + indent(), + code + ); + Base.consoleLog( + '%s
      %s
      ', + indent(), + utils.escape(err) + ); + }); + } + + Doc.description = 'HTML documentation'; + }(doc)); + + var tap = {exports: {}}; + + (function (module, exports) { + /** + * @module TAP + */ + /** + * Module dependencies. + */ + + var util = require$$0$1; + var Base = base$1.exports; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var EVENT_TEST_END = constants.EVENT_TEST_END; + var inherits = utils$3.inherits; + var sprintf = util.format; + + /** + * Expose `TAP`. + */ + + module.exports = TAP; + + /** + * Constructs a new `TAP` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function TAP(runner, options) { + Base.call(this, runner, options); + + var self = this; + var n = 1; + + var tapVersion = '12'; + if (options && options.reporterOptions) { + if (options.reporterOptions.tapVersion) { + tapVersion = options.reporterOptions.tapVersion.toString(); + } + } + + this._producer = createProducer(tapVersion); + + runner.once(EVENT_RUN_BEGIN, function () { + self._producer.writeVersion(); + }); + + runner.on(EVENT_TEST_END, function () { + ++n; + }); + + runner.on(EVENT_TEST_PENDING, function (test) { + self._producer.writePending(n, test); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + self._producer.writePass(n, test); + }); + + runner.on(EVENT_TEST_FAIL, function (test, err) { + self._producer.writeFail(n, test, err); + }); + + runner.once(EVENT_RUN_END, function () { + self._producer.writeEpilogue(runner.stats); + }); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(TAP, Base); + + /** + * Returns a TAP-safe title of `test`. + * + * @private + * @param {Test} test - Test instance. + * @return {String} title with any hash character removed + */ + function title(test) { + return test.fullTitle().replace(/#/g, ''); + } + + /** + * Writes newline-terminated formatted string to reporter output stream. + * + * @private + * @param {string} format - `printf`-like format string + * @param {...*} [varArgs] - Format string arguments + */ + function println(format, varArgs) { + var vargs = Array.from(arguments); + vargs[0] += '\n'; + process.stdout.write(sprintf.apply(null, vargs)); + } + + /** + * Returns a `tapVersion`-appropriate TAP producer instance, if possible. + * + * @private + * @param {string} tapVersion - Version of TAP specification to produce. + * @returns {TAPProducer} specification-appropriate instance + * @throws {Error} if specification version has no associated producer. + */ + function createProducer(tapVersion) { + var producers = { + 12: new TAP12Producer(), + 13: new TAP13Producer() + }; + var producer = producers[tapVersion]; + + if (!producer) { + throw new Error( + 'invalid or unsupported TAP version: ' + JSON.stringify(tapVersion) + ); + } + + return producer; + } + + /** + * @summary + * Constructs a new TAPProducer. + * + * @description + * Only to be used as an abstract base class. + * + * @private + * @constructor + */ + function TAPProducer() {} + + /** + * Writes the TAP version to reporter output stream. + * + * @abstract + */ + TAPProducer.prototype.writeVersion = function () {}; + + /** + * Writes the plan to reporter output stream. + * + * @abstract + * @param {number} ntests - Number of tests that are planned to run. + */ + TAPProducer.prototype.writePlan = function (ntests) { + println('%d..%d', 1, ntests); + }; + + /** + * Writes that test passed to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that passed. + * @param {Test} test - Instance containing test information. + */ + TAPProducer.prototype.writePass = function (n, test) { + println('ok %d %s', n, title(test)); + }; + + /** + * Writes that test was skipped to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that was skipped. + * @param {Test} test - Instance containing test information. + */ + TAPProducer.prototype.writePending = function (n, test) { + println('ok %d %s # SKIP -', n, title(test)); + }; + + /** + * Writes that test failed to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that failed. + * @param {Test} test - Instance containing test information. + * @param {Error} err - Reason the test failed. + */ + TAPProducer.prototype.writeFail = function (n, test, err) { + println('not ok %d %s', n, title(test)); + }; + + /** + * Writes the summary epilogue to reporter output stream. + * + * @abstract + * @param {Object} stats - Object containing run statistics. + */ + TAPProducer.prototype.writeEpilogue = function (stats) { + // :TBD: Why is this not counting pending tests? + println('# tests ' + (stats.passes + stats.failures)); + println('# pass ' + stats.passes); + // :TBD: Why are we not showing pending results? + println('# fail ' + stats.failures); + this.writePlan(stats.passes + stats.failures + stats.pending); + }; + + /** + * @summary + * Constructs a new TAP12Producer. + * + * @description + * Produces output conforming to the TAP12 specification. + * + * @private + * @constructor + * @extends TAPProducer + * @see {@link https://testanything.org/tap-specification.html|Specification} + */ + function TAP12Producer() { + /** + * Writes that test failed to reporter output stream, with error formatting. + * @override + */ + this.writeFail = function (n, test, err) { + TAPProducer.prototype.writeFail.call(this, n, test, err); + if (err.message) { + println(err.message.replace(/^/gm, ' ')); + } + if (err.stack) { + println(err.stack.replace(/^/gm, ' ')); + } + }; + } + + /** + * Inherit from `TAPProducer.prototype`. + */ + inherits(TAP12Producer, TAPProducer); + + /** + * @summary + * Constructs a new TAP13Producer. + * + * @description + * Produces output conforming to the TAP13 specification. + * + * @private + * @constructor + * @extends TAPProducer + * @see {@link https://testanything.org/tap-version-13-specification.html|Specification} + */ + function TAP13Producer() { + /** + * Writes the TAP version to reporter output stream. + * @override + */ + this.writeVersion = function () { + println('TAP version 13'); + }; + + /** + * Writes that test failed to reporter output stream, with error formatting. + * @override + */ + this.writeFail = function (n, test, err) { + TAPProducer.prototype.writeFail.call(this, n, test, err); + var emitYamlBlock = err.message != null || err.stack != null; + if (emitYamlBlock) { + println(indent(1) + '---'); + if (err.message) { + println(indent(2) + 'message: |-'); + println(err.message.replace(/^/gm, indent(3))); + } + if (err.stack) { + println(indent(2) + 'stack: |-'); + println(err.stack.replace(/^/gm, indent(3))); + } + println(indent(1) + '...'); + } + }; + + function indent(level) { + return Array(level + 1).join(' '); + } + } + + /** + * Inherit from `TAPProducer.prototype`. + */ + inherits(TAP13Producer, TAPProducer); + + TAP.description = 'TAP-compatible output'; + }(tap)); + + var json = {exports: {}}; + + var _polyfillNode_fs = {}; + + var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': _polyfillNode_fs + }); + + var require$$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_fs$1); + + (function (module, exports) { + /** + * @module JSON + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var fs = require$$2; + var path = require$$1; + const createUnsupportedError = errors$2.createUnsupportedError; + const utils = utils$3; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_TEST_END = constants.EVENT_TEST_END; + var EVENT_RUN_END = constants.EVENT_RUN_END; + + /** + * Expose `JSON`. + */ + + module.exports = JSONReporter; + + /** + * Constructs a new `JSON` reporter instance. + * + * @public + * @class JSON + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function JSONReporter(runner, options = {}) { + Base.call(this, runner, options); + + var self = this; + var tests = []; + var pending = []; + var failures = []; + var passes = []; + var output; + + if (options.reporterOption && options.reporterOption.output) { + if (utils.isBrowser()) { + throw createUnsupportedError('file output not supported in browser'); + } + output = options.reporterOption.output; + } + + runner.on(EVENT_TEST_END, function (test) { + tests.push(test); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + passes.push(test); + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + failures.push(test); + }); + + runner.on(EVENT_TEST_PENDING, function (test) { + pending.push(test); + }); + + runner.once(EVENT_RUN_END, function () { + var obj = { + stats: self.stats, + tests: tests.map(clean), + pending: pending.map(clean), + failures: failures.map(clean), + passes: passes.map(clean) + }; + + runner.testResults = obj; + + var json = JSON.stringify(obj, null, 2); + if (output) { + try { + fs.mkdirSync(path.dirname(output), {recursive: true}); + fs.writeFileSync(output, json); + } catch (err) { + console.error( + `${Base.symbols.err} [mocha] writing output to "${output}" failed: ${err.message}\n` + ); + process.stdout.write(json); + } + } else { + process.stdout.write(json); + } + }); + } + + /** + * Return a plain-object representation of `test` + * free of cyclic properties etc. + * + * @private + * @param {Object} test + * @return {Object} + */ + function clean(test) { + var err = test.err || {}; + if (err instanceof Error) { + err = errorJSON(err); + } + + return { + title: test.title, + fullTitle: test.fullTitle(), + file: test.file, + duration: test.duration, + currentRetry: test.currentRetry(), + speed: test.speed, + err: cleanCycles(err) + }; + } + + /** + * Replaces any circular references inside `obj` with '[object Object]' + * + * @private + * @param {Object} obj + * @return {Object} + */ + function cleanCycles(obj) { + var cache = []; + return JSON.parse( + JSON.stringify(obj, function (key, value) { + if (typeof value === 'object' && value !== null) { + if (cache.indexOf(value) !== -1) { + // Instead of going in a circle, we'll print [object Object] + return '' + value; + } + cache.push(value); + } + + return value; + }) + ); + } + + /** + * Transform an Error object into a JSON object. + * + * @private + * @param {Error} err + * @return {Object} + */ + function errorJSON(err) { + var res = {}; + Object.getOwnPropertyNames(err).forEach(function (key) { + res[key] = err[key]; + }, err); + return res; + } + + JSONReporter.description = 'single JSON object'; + }(json)); + + var html = {exports: {}}; + + /** + @module browser/Progress + */ + + /** + * Expose `Progress`. + */ + + var progress$1 = Progress; + + /** + * Initialize a new `Progress` indicator. + */ + function Progress() { + this.percent = 0; + this.size(0); + this.fontSize(11); + this.font('helvetica, arial, sans-serif'); + } + + /** + * Set progress size to `size`. + * + * @public + * @param {number} size + * @return {Progress} Progress instance. + */ + Progress.prototype.size = function (size) { + this._size = size; + return this; + }; + + /** + * Set text to `text`. + * + * @public + * @param {string} text + * @return {Progress} Progress instance. + */ + Progress.prototype.text = function (text) { + this._text = text; + return this; + }; + + /** + * Set font size to `size`. + * + * @public + * @param {number} size + * @return {Progress} Progress instance. + */ + Progress.prototype.fontSize = function (size) { + this._fontSize = size; + return this; + }; + + /** + * Set font to `family`. + * + * @param {string} family + * @return {Progress} Progress instance. + */ + Progress.prototype.font = function (family) { + this._font = family; + return this; + }; + + /** + * Update percentage to `n`. + * + * @param {number} n + * @return {Progress} Progress instance. + */ + Progress.prototype.update = function (n) { + this.percent = n; + return this; + }; + + /** + * Draw on `ctx`. + * + * @param {CanvasRenderingContext2d} ctx + * @return {Progress} Progress instance. + */ + Progress.prototype.draw = function (ctx) { + try { + var darkMatcher = window.matchMedia('(prefers-color-scheme: dark)'); + var isDarkMode = !!darkMatcher.matches; + var lightColors = { + outerCircle: '#9f9f9f', + innerCircle: '#eee', + text: '#000' + }; + var darkColors = { + outerCircle: '#888', + innerCircle: '#444', + text: '#fff' + }; + var colors = isDarkMode ? darkColors : lightColors; + + var percent = Math.min(this.percent, 100); + var size = this._size; + var half = size / 2; + var x = half; + var y = half; + var rad = half - 1; + var fontSize = this._fontSize; + + ctx.font = fontSize + 'px ' + this._font; + + var angle = Math.PI * 2 * (percent / 100); + ctx.clearRect(0, 0, size, size); + + // outer circle + ctx.strokeStyle = colors.outerCircle; + ctx.beginPath(); + ctx.arc(x, y, rad, 0, angle, false); + ctx.stroke(); + + // inner circle + ctx.strokeStyle = colors.innerCircle; + ctx.beginPath(); + ctx.arc(x, y, rad - 1, 0, angle, true); + ctx.stroke(); + + // text + var text = this._text || (percent | 0) + '%'; + var w = ctx.measureText(text).width; + + ctx.fillStyle = colors.text; + ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1); + } catch (ignore) { + // don't fail if we can't render progress + } + return this; + }; + + (function (module, exports) { + + /* eslint-env browser */ + /** + * @module HTML + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var utils = utils$3; + var Progress = progress$1; + var escapeRe = escapeStringRegexp; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; + var EVENT_SUITE_END = constants.EVENT_SUITE_END; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var escape = utils.escape; + + /** + * Save timer references to avoid Sinon interfering (see GH-237). + */ + + var Date = commonjsGlobal.Date; + + /** + * Expose `HTML`. + */ + + module.exports = HTML; + + /** + * Stats template. + */ + + var statsTemplate = + ''; + + var playIcon = '‣'; + + /** + * Constructs a new `HTML` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function HTML(runner, options) { + Base.call(this, runner, options); + + var self = this; + var stats = this.stats; + var stat = fragment(statsTemplate); + var items = stat.getElementsByTagName('li'); + var passes = items[1].getElementsByTagName('em')[0]; + var passesLink = items[1].getElementsByTagName('a')[0]; + var failures = items[2].getElementsByTagName('em')[0]; + var failuresLink = items[2].getElementsByTagName('a')[0]; + var duration = items[3].getElementsByTagName('em')[0]; + var canvas = stat.getElementsByTagName('canvas')[0]; + var report = fragment('
        '); + var stack = [report]; + var progress; + var ctx; + var root = document.getElementById('mocha'); + + if (canvas.getContext) { + var ratio = window.devicePixelRatio || 1; + canvas.style.width = canvas.width; + canvas.style.height = canvas.height; + canvas.width *= ratio; + canvas.height *= ratio; + ctx = canvas.getContext('2d'); + ctx.scale(ratio, ratio); + progress = new Progress(); + } + + if (!root) { + return error('#mocha div missing, add it to your document'); + } + + // pass toggle + on(passesLink, 'click', function (evt) { + evt.preventDefault(); + unhide(); + var name = /pass/.test(report.className) ? '' : ' pass'; + report.className = report.className.replace(/fail|pass/g, '') + name; + if (report.className.trim()) { + hideSuitesWithout('test pass'); + } + }); + + // failure toggle + on(failuresLink, 'click', function (evt) { + evt.preventDefault(); + unhide(); + var name = /fail/.test(report.className) ? '' : ' fail'; + report.className = report.className.replace(/fail|pass/g, '') + name; + if (report.className.trim()) { + hideSuitesWithout('test fail'); + } + }); + + root.appendChild(stat); + root.appendChild(report); + + if (progress) { + progress.size(40); + } + + runner.on(EVENT_SUITE_BEGIN, function (suite) { + if (suite.root) { + return; + } + + // suite + var url = self.suiteURL(suite); + var el = fragment( + '
      • %s

      • ', + url, + escape(suite.title) + ); + + // container + stack[0].appendChild(el); + stack.unshift(document.createElement('ul')); + el.appendChild(stack[0]); + }); + + runner.on(EVENT_SUITE_END, function (suite) { + if (suite.root) { + updateStats(); + return; + } + stack.shift(); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + var url = self.testURL(test); + var markup = + '
      • %e%ems ' + + '' + + playIcon + + '

      • '; + var el = fragment(markup, test.speed, test.title, test.duration, url); + self.addCodeToggle(el, test.body); + appendToStack(el); + updateStats(); + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + var el = fragment( + '
      • %e ' + + playIcon + + '

      • ', + test.title, + self.testURL(test) + ); + var stackString; // Note: Includes leading newline + var message = test.err.toString(); + + // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we + // check for the result of the stringifying. + if (message === '[object Error]') { + message = test.err.message; + } + + if (test.err.stack) { + var indexOfMessage = test.err.stack.indexOf(test.err.message); + if (indexOfMessage === -1) { + stackString = test.err.stack; + } else { + stackString = test.err.stack.slice( + test.err.message.length + indexOfMessage + ); + } + } else if (test.err.sourceURL && test.err.line !== undefined) { + // Safari doesn't give you a stack. Let's at least provide a source line. + stackString = '\n(' + test.err.sourceURL + ':' + test.err.line + ')'; + } + + stackString = stackString || ''; + + if (test.err.htmlMessage && stackString) { + el.appendChild( + fragment( + '
        %s\n
        %e
        ', + test.err.htmlMessage, + stackString + ) + ); + } else if (test.err.htmlMessage) { + el.appendChild( + fragment('
        %s
        ', test.err.htmlMessage) + ); + } else { + el.appendChild( + fragment('
        %e%e
        ', message, stackString) + ); + } + + self.addCodeToggle(el, test.body); + appendToStack(el); + updateStats(); + }); + + runner.on(EVENT_TEST_PENDING, function (test) { + var el = fragment( + '
      • %e

      • ', + test.title + ); + appendToStack(el); + updateStats(); + }); + + function appendToStack(el) { + // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. + if (stack[0]) { + stack[0].appendChild(el); + } + } + + function updateStats() { + // TODO: add to stats + var percent = ((stats.tests / runner.total) * 100) | 0; + if (progress) { + progress.update(percent).draw(ctx); + } + + // update stats + var ms = new Date() - stats.start; + text(passes, stats.passes); + text(failures, stats.failures); + text(duration, (ms / 1000).toFixed(2)); + } + } + + /** + * Makes a URL, preserving querystring ("search") parameters. + * + * @param {string} s + * @return {string} A new URL. + */ + function makeUrl(s) { + var search = window.location.search; + + // Remove previous grep query parameter if present + if (search) { + search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?'); + } + + return ( + window.location.pathname + + (search ? search + '&' : '?') + + 'grep=' + + encodeURIComponent(escapeRe(s)) + ); + } + + /** + * Provide suite URL. + * + * @param {Object} [suite] + */ + HTML.prototype.suiteURL = function (suite) { + return makeUrl(suite.fullTitle()); + }; + + /** + * Provide test URL. + * + * @param {Object} [test] + */ + HTML.prototype.testURL = function (test) { + return makeUrl(test.fullTitle()); + }; + + /** + * Adds code toggle functionality for the provided test's list element. + * + * @param {HTMLLIElement} el + * @param {string} contents + */ + HTML.prototype.addCodeToggle = function (el, contents) { + var h2 = el.getElementsByTagName('h2')[0]; + + on(h2, 'click', function () { + pre.style.display = pre.style.display === 'none' ? 'block' : 'none'; + }); + + var pre = fragment('
        %e
        ', utils.clean(contents)); + el.appendChild(pre); + pre.style.display = 'none'; + }; + + /** + * Display error `msg`. + * + * @param {string} msg + */ + function error(msg) { + document.body.appendChild(fragment('
        %s
        ', msg)); + } + + /** + * Return a DOM fragment from `html`. + * + * @param {string} html + */ + function fragment(html) { + var args = arguments; + var div = document.createElement('div'); + var i = 1; + + div.innerHTML = html.replace(/%([se])/g, function (_, type) { + switch (type) { + case 's': + return String(args[i++]); + case 'e': + return escape(args[i++]); + // no default + } + }); + + return div.firstChild; + } + + /** + * Check for suites that do not have elements + * with `classname`, and hide them. + * + * @param {text} classname + */ + function hideSuitesWithout(classname) { + var suites = document.getElementsByClassName('suite'); + for (var i = 0; i < suites.length; i++) { + var els = suites[i].getElementsByClassName(classname); + if (!els.length) { + suites[i].className += ' hidden'; + } + } + } + + /** + * Unhide .hidden suites. + */ + function unhide() { + var els = document.getElementsByClassName('suite hidden'); + while (els.length > 0) { + els[0].className = els[0].className.replace('suite hidden', 'suite'); + } + } + + /** + * Set an element's text contents. + * + * @param {HTMLElement} el + * @param {string} contents + */ + function text(el, contents) { + if (el.textContent) { + el.textContent = contents; + } else { + el.innerText = contents; + } + } + + /** + * Listen on `event` with callback `fn`. + */ + function on(el, event, fn) { + if (el.addEventListener) { + el.addEventListener(event, fn, false); + } else { + el.attachEvent('on' + event, fn); + } + } + + HTML.browserOnly = true; + }(html)); + + var list = {exports: {}}; + + (function (module, exports) { + /** + * @module List + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var inherits = utils$3.inherits; + var constants = runner.constants; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var color = Base.color; + var cursor = Base.cursor; + + /** + * Expose `List`. + */ + + module.exports = List; + + /** + * Constructs a new `List` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function List(runner, options) { + Base.call(this, runner, options); + + var self = this; + var n = 0; + + runner.on(EVENT_RUN_BEGIN, function () { + Base.consoleLog(); + }); + + runner.on(EVENT_TEST_BEGIN, function (test) { + process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); + }); + + runner.on(EVENT_TEST_PENDING, function (test) { + var fmt = color('checkmark', ' -') + color('pending', ' %s'); + Base.consoleLog(fmt, test.fullTitle()); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + var fmt = + color('checkmark', ' ' + Base.symbols.ok) + + color('pass', ' %s: ') + + color(test.speed, '%dms'); + cursor.CR(); + Base.consoleLog(fmt, test.fullTitle(), test.duration); + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + cursor.CR(); + Base.consoleLog(color('fail', ' %d) %s'), ++n, test.fullTitle()); + }); + + runner.once(EVENT_RUN_END, self.epilogue.bind(self)); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(List, Base); + + List.description = 'like "spec" reporter but flat'; + }(list)); + + var min = {exports: {}}; + + (function (module, exports) { + /** + * @module Min + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var inherits = utils$3.inherits; + var constants = runner.constants; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + + /** + * Expose `Min`. + */ + + module.exports = Min; + + /** + * Constructs a new `Min` reporter instance. + * + * @description + * This minimal test reporter is best used with '--watch'. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function Min(runner, options) { + Base.call(this, runner, options); + + runner.on(EVENT_RUN_BEGIN, function () { + // clear screen + process.stdout.write('\u001b[2J'); + // set cursor position + process.stdout.write('\u001b[1;3H'); + }); + + runner.once(EVENT_RUN_END, this.epilogue.bind(this)); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(Min, Base); + + Min.description = 'essentially just a summary'; + }(min)); + + var spec = {exports: {}}; + + (function (module, exports) { + /** + * @module Spec + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var constants = runner.constants; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; + var EVENT_SUITE_END = constants.EVENT_SUITE_END; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var inherits = utils$3.inherits; + var color = Base.color; + + /** + * Expose `Spec`. + */ + + module.exports = Spec; + + /** + * Constructs a new `Spec` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function Spec(runner, options) { + Base.call(this, runner, options); + + var self = this; + var indents = 0; + var n = 0; + + function indent() { + return Array(indents).join(' '); + } + + runner.on(EVENT_RUN_BEGIN, function () { + Base.consoleLog(); + }); + + runner.on(EVENT_SUITE_BEGIN, function (suite) { + ++indents; + Base.consoleLog(color('suite', '%s%s'), indent(), suite.title); + }); + + runner.on(EVENT_SUITE_END, function () { + --indents; + if (indents === 1) { + Base.consoleLog(); + } + }); + + runner.on(EVENT_TEST_PENDING, function (test) { + var fmt = indent() + color('pending', ' - %s'); + Base.consoleLog(fmt, test.title); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + var fmt; + if (test.speed === 'fast') { + fmt = + indent() + + color('checkmark', ' ' + Base.symbols.ok) + + color('pass', ' %s'); + Base.consoleLog(fmt, test.title); + } else { + fmt = + indent() + + color('checkmark', ' ' + Base.symbols.ok) + + color('pass', ' %s') + + color(test.speed, ' (%dms)'); + Base.consoleLog(fmt, test.title, test.duration); + } + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + Base.consoleLog(indent() + color('fail', ' %d) %s'), ++n, test.title); + }); + + runner.once(EVENT_RUN_END, self.epilogue.bind(self)); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(Spec, Base); + + Spec.description = 'hierarchical & verbose [default]'; + }(spec)); + + var nyan = {exports: {}}; + + (function (module, exports) { + /** + * @module Nyan + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var constants = runner.constants; + var inherits = utils$3.inherits; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + + /** + * Expose `Dot`. + */ + + module.exports = NyanCat; + + /** + * Constructs a new `Nyan` reporter instance. + * + * @public + * @class Nyan + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function NyanCat(runner, options) { + Base.call(this, runner, options); + + var self = this; + var width = (Base.window.width * 0.75) | 0; + var nyanCatWidth = (this.nyanCatWidth = 11); + + this.colorIndex = 0; + this.numberOfLines = 4; + this.rainbowColors = self.generateColors(); + this.scoreboardWidth = 5; + this.tick = 0; + this.trajectories = [[], [], [], []]; + this.trajectoryWidthMax = width - nyanCatWidth; + + runner.on(EVENT_RUN_BEGIN, function () { + Base.cursor.hide(); + self.draw(); + }); + + runner.on(EVENT_TEST_PENDING, function () { + self.draw(); + }); + + runner.on(EVENT_TEST_PASS, function () { + self.draw(); + }); + + runner.on(EVENT_TEST_FAIL, function () { + self.draw(); + }); + + runner.once(EVENT_RUN_END, function () { + Base.cursor.show(); + for (var i = 0; i < self.numberOfLines; i++) { + write('\n'); + } + self.epilogue(); + }); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(NyanCat, Base); + + /** + * Draw the nyan cat + * + * @private + */ + + NyanCat.prototype.draw = function () { + this.appendRainbow(); + this.drawScoreboard(); + this.drawRainbow(); + this.drawNyanCat(); + this.tick = !this.tick; + }; + + /** + * Draw the "scoreboard" showing the number + * of passes, failures and pending tests. + * + * @private + */ + + NyanCat.prototype.drawScoreboard = function () { + var stats = this.stats; + + function draw(type, n) { + write(' '); + write(Base.color(type, n)); + write('\n'); + } + + draw('green', stats.passes); + draw('fail', stats.failures); + draw('pending', stats.pending); + write('\n'); + + this.cursorUp(this.numberOfLines); + }; + + /** + * Append the rainbow. + * + * @private + */ + + NyanCat.prototype.appendRainbow = function () { + var segment = this.tick ? '_' : '-'; + var rainbowified = this.rainbowify(segment); + + for (var index = 0; index < this.numberOfLines; index++) { + var trajectory = this.trajectories[index]; + if (trajectory.length >= this.trajectoryWidthMax) { + trajectory.shift(); + } + trajectory.push(rainbowified); + } + }; + + /** + * Draw the rainbow. + * + * @private + */ + + NyanCat.prototype.drawRainbow = function () { + var self = this; + + this.trajectories.forEach(function (line) { + write('\u001b[' + self.scoreboardWidth + 'C'); + write(line.join('')); + write('\n'); + }); + + this.cursorUp(this.numberOfLines); + }; + + /** + * Draw the nyan cat + * + * @private + */ + NyanCat.prototype.drawNyanCat = function () { + var self = this; + var startWidth = this.scoreboardWidth + this.trajectories[0].length; + var dist = '\u001b[' + startWidth + 'C'; + var padding = ''; + + write(dist); + write('_,------,'); + write('\n'); + + write(dist); + padding = self.tick ? ' ' : ' '; + write('_|' + padding + '/\\_/\\ '); + write('\n'); + + write(dist); + padding = self.tick ? '_' : '__'; + var tail = self.tick ? '~' : '^'; + write(tail + '|' + padding + this.face() + ' '); + write('\n'); + + write(dist); + padding = self.tick ? ' ' : ' '; + write(padding + '"" "" '); + write('\n'); + + this.cursorUp(this.numberOfLines); + }; + + /** + * Draw nyan cat face. + * + * @private + * @return {string} + */ + + NyanCat.prototype.face = function () { + var stats = this.stats; + if (stats.failures) { + return '( x .x)'; + } else if (stats.pending) { + return '( o .o)'; + } else if (stats.passes) { + return '( ^ .^)'; + } + return '( - .-)'; + }; + + /** + * Move cursor up `n`. + * + * @private + * @param {number} n + */ + + NyanCat.prototype.cursorUp = function (n) { + write('\u001b[' + n + 'A'); + }; + + /** + * Move cursor down `n`. + * + * @private + * @param {number} n + */ + + NyanCat.prototype.cursorDown = function (n) { + write('\u001b[' + n + 'B'); + }; + + /** + * Generate rainbow colors. + * + * @private + * @return {Array} + */ + NyanCat.prototype.generateColors = function () { + var colors = []; + + for (var i = 0; i < 6 * 7; i++) { + var pi3 = Math.floor(Math.PI / 3); + var n = i * (1.0 / 6); + var r = Math.floor(3 * Math.sin(n) + 3); + var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); + var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); + colors.push(36 * r + 6 * g + b + 16); + } + + return colors; + }; + + /** + * Apply rainbow to the given `str`. + * + * @private + * @param {string} str + * @return {string} + */ + NyanCat.prototype.rainbowify = function (str) { + if (!Base.useColors) { return str; } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); + var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; + this.colorIndex += 1; + return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; + }; + + /** + * Stdout helper. + * + * @param {string} string A message to write to stdout. + */ + function write(string) { + process.stdout.write(string); + } + + NyanCat.description = '"nyan cat"'; + }(nyan)); + + var xunit = {exports: {}}; + + (function (module, exports) { + /** + * @module XUnit + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var utils = utils$3; + var fs = require$$2; + var path = require$$1; + var errors = errors$2; + var createUnsupportedError = errors.createUnsupportedError; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var STATE_FAILED = runnable.constants.STATE_FAILED; + var inherits = utils.inherits; + var escape = utils.escape; + + /** + * Save timer references to avoid Sinon interfering (see GH-237). + */ + var Date = commonjsGlobal.Date; + + /** + * Expose `XUnit`. + */ + + module.exports = XUnit; + + /** + * Constructs a new `XUnit` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function XUnit(runner, options) { + Base.call(this, runner, options); + + var stats = this.stats; + var tests = []; + var self = this; + + // the name of the test suite, as it will appear in the resulting XML file + var suiteName; + + // the default name of the test suite if none is provided + var DEFAULT_SUITE_NAME = 'Mocha Tests'; + + if (options && options.reporterOptions) { + if (options.reporterOptions.output) { + if (!fs.createWriteStream) { + throw createUnsupportedError('file output not supported in browser'); + } + + fs.mkdirSync(path.dirname(options.reporterOptions.output), { + recursive: true + }); + self.fileStream = fs.createWriteStream(options.reporterOptions.output); + } + + // get the suite name from the reporter options (if provided) + suiteName = options.reporterOptions.suiteName; + } + + // fall back to the default suite name + suiteName = suiteName || DEFAULT_SUITE_NAME; + + runner.on(EVENT_TEST_PENDING, function (test) { + tests.push(test); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + tests.push(test); + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + tests.push(test); + }); + + runner.once(EVENT_RUN_END, function () { + self.write( + tag( + 'testsuite', + { + name: suiteName, + tests: stats.tests, + failures: 0, + errors: stats.failures, + skipped: stats.tests - stats.failures - stats.passes, + timestamp: new Date().toUTCString(), + time: stats.duration / 1000 || 0 + }, + false + ) + ); + + tests.forEach(function (t) { + self.test(t); + }); + + self.write(''); + }); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(XUnit, Base); + + /** + * Override done to close the stream (if it's a file). + * + * @param failures + * @param {Function} fn + */ + XUnit.prototype.done = function (failures, fn) { + if (this.fileStream) { + this.fileStream.end(function () { + fn(failures); + }); + } else { + fn(failures); + } + }; + + /** + * Write out the given line. + * + * @param {string} line + */ + XUnit.prototype.write = function (line) { + if (this.fileStream) { + this.fileStream.write(line + '\n'); + } else if (typeof process === 'object' && process.stdout) { + process.stdout.write(line + '\n'); + } else { + Base.consoleLog(line); + } + }; + + /** + * Output tag for the given `test.` + * + * @param {Test} test + */ + XUnit.prototype.test = function (test) { + Base.useColors = false; + + var attrs = { + classname: test.parent.fullTitle(), + name: test.title, + time: test.duration / 1000 || 0 + }; + + if (test.state === STATE_FAILED) { + var err = test.err; + var diff = + !Base.hideDiff && Base.showDiff(err) + ? '\n' + Base.generateDiff(err.actual, err.expected) + : ''; + this.write( + tag( + 'testcase', + attrs, + false, + tag( + 'failure', + {}, + false, + escape(err.message) + escape(diff) + '\n' + escape(err.stack) + ) + ) + ); + } else if (test.isPending()) { + this.write(tag('testcase', attrs, false, tag('skipped', {}, true))); + } else { + this.write(tag('testcase', attrs, true)); + } + }; + + /** + * HTML tag helper. + * + * @param name + * @param attrs + * @param close + * @param content + * @return {string} + */ + function tag(name, attrs, close, content) { + var end = close ? '/>' : '>'; + var pairs = []; + var tag; + + for (var key in attrs) { + if (Object.prototype.hasOwnProperty.call(attrs, key)) { + pairs.push(key + '="' + escape(attrs[key]) + '"'); + } + } + + tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; + if (content) { + tag += content + '' + '\n'; + buf += title(suite.title) + '\n'; + }); + + runner.on(EVENT_SUITE_END, function () { + --level; + }); + + runner.on(EVENT_TEST_PASS, function (test) { + var code = utils.clean(test.body); + buf += test.title + '.\n'; + buf += '\n```js\n'; + buf += code + '\n'; + buf += '```\n\n'; + }); + + runner.once(EVENT_RUN_END, function () { + process.stdout.write('# TOC\n'); + process.stdout.write(generateTOC(runner.suite)); + process.stdout.write(buf); + }); + } + + Markdown.description = 'GitHub Flavored Markdown'; + }(markdown)); + + var progress = {exports: {}}; + + (function (module, exports) { + /** + * @module Progress + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var constants = runner.constants; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_TEST_END = constants.EVENT_TEST_END; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var inherits = utils$3.inherits; + var color = Base.color; + var cursor = Base.cursor; + + /** + * Expose `Progress`. + */ + + module.exports = Progress; + + /** + * General progress bar color. + */ + + Base.colors.progress = 90; + + /** + * Constructs a new `Progress` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function Progress(runner, options) { + Base.call(this, runner, options); + + var self = this; + var width = (Base.window.width * 0.5) | 0; + var total = runner.total; + var complete = 0; + var lastN = -1; + + // default chars + options = options || {}; + var reporterOptions = options.reporterOptions || {}; + + options.open = reporterOptions.open || '['; + options.complete = reporterOptions.complete || '▬'; + options.incomplete = reporterOptions.incomplete || Base.symbols.dot; + options.close = reporterOptions.close || ']'; + options.verbose = reporterOptions.verbose || false; + + // tests started + runner.on(EVENT_RUN_BEGIN, function () { + process.stdout.write('\n'); + cursor.hide(); + }); + + // tests complete + runner.on(EVENT_TEST_END, function () { + complete++; + + var percent = complete / total; + var n = (width * percent) | 0; + var i = width - n; + + if (n === lastN && !options.verbose) { + // Don't re-render the line if it hasn't changed + return; + } + lastN = n; + + cursor.CR(); + process.stdout.write('\u001b[J'); + process.stdout.write(color('progress', ' ' + options.open)); + process.stdout.write(Array(n).join(options.complete)); + process.stdout.write(Array(i).join(options.incomplete)); + process.stdout.write(color('progress', options.close)); + if (options.verbose) { + process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); + } + }); + + // tests are complete, output some stats + // and the failures if any + runner.once(EVENT_RUN_END, function () { + cursor.show(); + process.stdout.write('\n'); + self.epilogue(); + }); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(Progress, Base); + + Progress.description = 'a progress bar'; + }(progress)); + + var landing = {exports: {}}; + + (function (module, exports) { + /** + * @module Landing + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var inherits = utils$3.inherits; + var constants = runner.constants; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_TEST_END = constants.EVENT_TEST_END; + var STATE_FAILED = runnable.constants.STATE_FAILED; + + var cursor = Base.cursor; + var color = Base.color; + + /** + * Expose `Landing`. + */ + + module.exports = Landing; + + /** + * Airplane color. + */ + + Base.colors.plane = 0; + + /** + * Airplane crash color. + */ + + Base.colors['plane crash'] = 31; + + /** + * Runway color. + */ + + Base.colors.runway = 90; + + /** + * Constructs a new `Landing` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function Landing(runner, options) { + Base.call(this, runner, options); + + var self = this; + var width = (Base.window.width * 0.75) | 0; + var stream = process.stdout; + + var plane = color('plane', '✈'); + var crashed = -1; + var n = 0; + var total = 0; + + function runway() { + var buf = Array(width).join('-'); + return ' ' + color('runway', buf); + } + + runner.on(EVENT_RUN_BEGIN, function () { + stream.write('\n\n\n '); + cursor.hide(); + }); + + runner.on(EVENT_TEST_END, function (test) { + // check if the plane crashed + var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed; + // show the crash + if (test.state === STATE_FAILED) { + plane = color('plane crash', '✈'); + crashed = col; + } + + // render landing strip + stream.write('\u001b[' + (width + 1) + 'D\u001b[2A'); + stream.write(runway()); + stream.write('\n '); + stream.write(color('runway', Array(col).join('⋅'))); + stream.write(plane); + stream.write(color('runway', Array(width - col).join('⋅') + '\n')); + stream.write(runway()); + stream.write('\u001b[0m'); + }); + + runner.once(EVENT_RUN_END, function () { + cursor.show(); + process.stdout.write('\n'); + self.epilogue(); + }); + + // if cursor is hidden when we ctrl-C, then it will remain hidden unless... + process.once('SIGINT', function () { + cursor.show(); + nextTick$1(function () { + process.kill(process.pid, 'SIGINT'); + }); + }); + } + + /** + * Inherit from `Base.prototype`. + */ + inherits(Landing, Base); + + Landing.description = 'Unicode landing strip'; + }(landing)); + + var jsonStream = {exports: {}}; + + (function (module, exports) { + /** + * @module JSONStream + */ + /** + * Module dependencies. + */ + + var Base = base$1.exports; + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_RUN_END = constants.EVENT_RUN_END; + + /** + * Expose `JSONStream`. + */ + + module.exports = JSONStream; + + /** + * Constructs a new `JSONStream` reporter instance. + * + * @public + * @class + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + function JSONStream(runner, options) { + Base.call(this, runner, options); + + var self = this; + var total = runner.total; + + runner.once(EVENT_RUN_BEGIN, function () { + writeEvent(['start', {total}]); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + writeEvent(['pass', clean(test)]); + }); + + runner.on(EVENT_TEST_FAIL, function (test, err) { + test = clean(test); + test.err = err.message; + test.stack = err.stack || null; + writeEvent(['fail', test]); + }); + + runner.once(EVENT_RUN_END, function () { + writeEvent(['end', self.stats]); + }); + } + + /** + * Mocha event to be written to the output stream. + * @typedef {Array} JSONStream~MochaEvent + */ + + /** + * Writes Mocha event to reporter output stream. + * + * @private + * @param {JSONStream~MochaEvent} event - Mocha event to be output. + */ + function writeEvent(event) { + process.stdout.write(JSON.stringify(event) + '\n'); + } + + /** + * Returns an object literal representation of `test` + * free of cyclic properties, etc. + * + * @private + * @param {Test} test - Instance used as data source. + * @return {Object} object containing pared-down test instance data + */ + function clean(test) { + return { + title: test.title, + fullTitle: test.fullTitle(), + file: test.file, + duration: test.duration, + currentRetry: test.currentRetry(), + speed: test.speed + }; + } + + JSONStream.description = 'newline delimited JSON events'; + }(jsonStream)); + + (function (exports) { + + // Alias exports to a their normalized format Mocha#reporter to prevent a need + // for dynamic (try/catch) requires, which Browserify doesn't handle. + exports.Base = exports.base = base$1.exports; + exports.Dot = exports.dot = dot.exports; + exports.Doc = exports.doc = doc.exports; + exports.TAP = exports.tap = tap.exports; + exports.JSON = exports.json = json.exports; + exports.HTML = exports.html = html.exports; + exports.List = exports.list = list.exports; + exports.Min = exports.min = min.exports; + exports.Spec = exports.spec = spec.exports; + exports.Nyan = exports.nyan = nyan.exports; + exports.XUnit = exports.xunit = xunit.exports; + exports.Markdown = exports.markdown = markdown.exports; + exports.Progress = exports.progress = progress.exports; + exports.Landing = exports.landing = landing.exports; + exports.JSONStream = exports['json-stream'] = jsonStream.exports; + }(reporters)); + + var diff = true; + var extension = [ + "js", + "cjs", + "mjs" + ]; + var reporter = "spec"; + var slow = 75; + var timeout = 2000; + var ui = "bdd"; + var require$$4 = { + diff: diff, + extension: extension, + "package": "./package.json", + reporter: reporter, + slow: slow, + timeout: timeout, + ui: ui, + "watch-ignore": [ + "node_modules", + ".git" + ] + }; + + /** + * Provides a factory function for a {@link StatsCollector} object. + * @module + */ + + var constants = runner.constants; + var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; + var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; + var EVENT_RUN_END = constants.EVENT_RUN_END; + var EVENT_TEST_END = constants.EVENT_TEST_END; + + /** + * Test statistics collector. + * + * @public + * @typedef {Object} StatsCollector + * @property {number} suites - integer count of suites run. + * @property {number} tests - integer count of tests run. + * @property {number} passes - integer count of passing tests. + * @property {number} pending - integer count of pending tests. + * @property {number} failures - integer count of failed tests. + * @property {Date} start - time when testing began. + * @property {Date} end - time when testing concluded. + * @property {number} duration - number of msecs that testing took. + */ + + var Date$2 = commonjsGlobal.Date; + + /** + * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`. + * + * @private + * @param {Runner} runner - Runner instance + * @throws {TypeError} If falsy `runner` + */ + function createStatsCollector(runner) { + /** + * @type StatsCollector + */ + var stats = { + suites: 0, + tests: 0, + passes: 0, + pending: 0, + failures: 0 + }; + + if (!runner) { + throw new TypeError('Missing runner argument'); + } + + runner.stats = stats; + + runner.once(EVENT_RUN_BEGIN, function () { + stats.start = new Date$2(); + }); + runner.on(EVENT_SUITE_BEGIN, function (suite) { + suite.root || stats.suites++; + }); + runner.on(EVENT_TEST_PASS, function () { + stats.passes++; + }); + runner.on(EVENT_TEST_FAIL, function () { + stats.failures++; + }); + runner.on(EVENT_TEST_PENDING, function () { + stats.pending++; + }); + runner.on(EVENT_TEST_END, function () { + stats.tests++; + }); + runner.once(EVENT_RUN_END, function () { + stats.end = new Date$2(); + stats.duration = stats.end - stats.start; + }); + } + + var statsCollector = createStatsCollector; + + var interfaces = {}; + + var bdd = {exports: {}}; + + var Runnable = runnable; + var utils = utils$3; + var errors$1 = errors$2; + var createInvalidArgumentTypeError = errors$1.createInvalidArgumentTypeError; + var isString = utils.isString; + + const {MOCHA_ID_PROP_NAME} = utils.constants; + + var test = Test$4; + + /** + * Initialize a new `Test` with the given `title` and callback `fn`. + * + * @public + * @class + * @extends Runnable + * @param {String} title - Test title (required) + * @param {Function} [fn] - Test callback. If omitted, the Test is considered "pending" + */ + function Test$4(title, fn) { + if (!isString(title)) { + throw createInvalidArgumentTypeError( + 'Test argument "title" should be a string. Received type "' + + typeof title + + '"', + 'title', + 'string' + ); + } + this.type = 'test'; + Runnable.call(this, title, fn); + this.reset(); + } + + /** + * Inherit from `Runnable.prototype`. + */ + utils.inherits(Test$4, Runnable); + + /** + * Resets the state initially or for a next run. + */ + Test$4.prototype.reset = function () { + Runnable.prototype.reset.call(this); + this.pending = !this.fn; + delete this.state; + }; + + /** + * Set or get retried test + * + * @private + */ + Test$4.prototype.retriedTest = function (n) { + if (!arguments.length) { + return this._retriedTest; + } + this._retriedTest = n; + }; + + /** + * Add test to the list of tests marked `only`. + * + * @private + */ + Test$4.prototype.markOnly = function () { + this.parent.appendOnlyTest(this); + }; + + Test$4.prototype.clone = function () { + var test = new Test$4(this.title, this.fn); + test.timeout(this.timeout()); + test.slow(this.slow()); + test.retries(this.retries()); + test.currentRetry(this.currentRetry()); + test.retriedTest(this.retriedTest() || this); + test.globals(this.globals()); + test.parent = this.parent; + test.file = this.file; + test.ctx = this.ctx; + return test; + }; + + /** + * Returns an minimal object suitable for transmission over IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + Test$4.prototype.serialize = function serialize() { + return { + $$currentRetry: this._currentRetry, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.pending), + $$retriedTest: this._retriedTest || null, + $$slow: this._slow, + $$titlePath: this.titlePath(), + body: this.body, + duration: this.duration, + err: this.err, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME]: this.parent.id + }, + speed: this.speed, + state: this.state, + title: this.title, + type: this.type, + file: this.file, + [MOCHA_ID_PROP_NAME]: this.id + }; + }; + + /** + @module interfaces/common + */ + + var Suite$1 = suite.exports; + var errors = errors$2; + var createMissingArgumentError = errors.createMissingArgumentError; + var createUnsupportedError = errors.createUnsupportedError; + var createForbiddenExclusivityError = errors.createForbiddenExclusivityError; + + /** + * Functions common to more than one interface. + * + * @private + * @param {Suite[]} suites + * @param {Context} context + * @param {Mocha} mocha + * @return {Object} An object containing common functions. + */ + var common = function (suites, context, mocha) { + /** + * Check if the suite should be tested. + * + * @private + * @param {Suite} suite - suite to check + * @returns {boolean} + */ + function shouldBeTested(suite) { + return ( + !mocha.options.grep || + (mocha.options.grep && + mocha.options.grep.test(suite.fullTitle()) && + !mocha.options.invert) + ); + } + + return { + /** + * This is only present if flag --delay is passed into Mocha. It triggers + * root suite execution. + * + * @param {Suite} suite The root suite. + * @return {Function} A function which runs the root suite + */ + runWithSuite: function runWithSuite(suite) { + return function run() { + suite.run(); + }; + }, + + /** + * Execute before running tests. + * + * @param {string} name + * @param {Function} fn + */ + before: function (name, fn) { + suites[0].beforeAll(name, fn); + }, + + /** + * Execute after running tests. + * + * @param {string} name + * @param {Function} fn + */ + after: function (name, fn) { + suites[0].afterAll(name, fn); + }, + + /** + * Execute before each test case. + * + * @param {string} name + * @param {Function} fn + */ + beforeEach: function (name, fn) { + suites[0].beforeEach(name, fn); + }, + + /** + * Execute after each test case. + * + * @param {string} name + * @param {Function} fn + */ + afterEach: function (name, fn) { + suites[0].afterEach(name, fn); + }, + + suite: { + /** + * Create an exclusive Suite; convenience function + * See docstring for create() below. + * + * @param {Object} opts + * @returns {Suite} + */ + only: function only(opts) { + if (mocha.options.forbidOnly) { + throw createForbiddenExclusivityError(mocha); + } + opts.isOnly = true; + return this.create(opts); + }, + + /** + * Create a Suite, but skip it; convenience function + * See docstring for create() below. + * + * @param {Object} opts + * @returns {Suite} + */ + skip: function skip(opts) { + opts.pending = true; + return this.create(opts); + }, + + /** + * Creates a suite. + * + * @param {Object} opts Options + * @param {string} opts.title Title of Suite + * @param {Function} [opts.fn] Suite Function (not always applicable) + * @param {boolean} [opts.pending] Is Suite pending? + * @param {string} [opts.file] Filepath where this Suite resides + * @param {boolean} [opts.isOnly] Is Suite exclusive? + * @returns {Suite} + */ + create: function create(opts) { + var suite = Suite$1.create(suites[0], opts.title); + suite.pending = Boolean(opts.pending); + suite.file = opts.file; + suites.unshift(suite); + if (opts.isOnly) { + suite.markOnly(); + } + if ( + suite.pending && + mocha.options.forbidPending && + shouldBeTested(suite) + ) { + throw createUnsupportedError('Pending test forbidden'); + } + if (typeof opts.fn === 'function') { + opts.fn.call(suite); + suites.shift(); + } else if (typeof opts.fn === 'undefined' && !suite.pending) { + throw createMissingArgumentError( + 'Suite "' + + suite.fullTitle() + + '" was defined but no callback was supplied. ' + + 'Supply a callback or explicitly skip the suite.', + 'callback', + 'function' + ); + } else if (!opts.fn && suite.pending) { + suites.shift(); + } + + return suite; + } + }, + + test: { + /** + * Exclusive test-case. + * + * @param {Object} mocha + * @param {Function} test + * @returns {*} + */ + only: function (mocha, test) { + if (mocha.options.forbidOnly) { + throw createForbiddenExclusivityError(mocha); + } + test.markOnly(); + return test; + }, + + /** + * Pending test case. + * + * @param {string} title + */ + skip: function (title) { + context.test(title); + } + } + }; + }; + + var Test$3 = test; + var EVENT_FILE_PRE_REQUIRE$2 = + suite.exports.constants.EVENT_FILE_PRE_REQUIRE; + + /** + * BDD-style interface: + * + * describe('Array', function() { + * describe('#indexOf()', function() { + * it('should return -1 when not present', function() { + * // ... + * }); + * + * it('should return the index when present', function() { + * // ... + * }); + * }); + * }); + * + * @param {Suite} suite Root suite. + */ + bdd.exports = function bddInterface(suite) { + var suites = [suite]; + + suite.on(EVENT_FILE_PRE_REQUIRE$2, function (context, file, mocha) { + var common$1 = common(suites, context, mocha); + + context.before = common$1.before; + context.after = common$1.after; + context.beforeEach = common$1.beforeEach; + context.afterEach = common$1.afterEach; + context.run = mocha.options.delay && common$1.runWithSuite(suite); + /** + * Describe a "suite" with the given `title` + * and callback `fn` containing nested suites + * and/or tests. + */ + + context.describe = context.context = function (title, fn) { + return common$1.suite.create({ + title, + file, + fn + }); + }; + + /** + * Pending describe. + */ + + context.xdescribe = + context.xcontext = + context.describe.skip = + function (title, fn) { + return common$1.suite.skip({ + title, + file, + fn + }); + }; + + /** + * Exclusive suite. + */ + + context.describe.only = function (title, fn) { + return common$1.suite.only({ + title, + file, + fn + }); + }; + + /** + * Describe a specification or test-case + * with the given `title` and callback `fn` + * acting as a thunk. + */ + + context.it = context.specify = function (title, fn) { + var suite = suites[0]; + if (suite.isPending()) { + fn = null; + } + var test = new Test$3(title, fn); + test.file = file; + suite.addTest(test); + return test; + }; + + /** + * Exclusive test-case. + */ + + context.it.only = function (title, fn) { + return common$1.test.only(mocha, context.it(title, fn)); + }; + + /** + * Pending test case. + */ + + context.xit = + context.xspecify = + context.it.skip = + function (title) { + return context.it(title); + }; + }); + }; + + bdd.exports.description = 'BDD or RSpec style [default]'; + + var tdd = {exports: {}}; + + var Test$2 = test; + var EVENT_FILE_PRE_REQUIRE$1 = + suite.exports.constants.EVENT_FILE_PRE_REQUIRE; + + /** + * TDD-style interface: + * + * suite('Array', function() { + * suite('#indexOf()', function() { + * suiteSetup(function() { + * + * }); + * + * test('should return -1 when not present', function() { + * + * }); + * + * test('should return the index when present', function() { + * + * }); + * + * suiteTeardown(function() { + * + * }); + * }); + * }); + * + * @param {Suite} suite Root suite. + */ + tdd.exports = function (suite) { + var suites = [suite]; + + suite.on(EVENT_FILE_PRE_REQUIRE$1, function (context, file, mocha) { + var common$1 = common(suites, context, mocha); + + context.setup = common$1.beforeEach; + context.teardown = common$1.afterEach; + context.suiteSetup = common$1.before; + context.suiteTeardown = common$1.after; + context.run = mocha.options.delay && common$1.runWithSuite(suite); + + /** + * Describe a "suite" with the given `title` and callback `fn` containing + * nested suites and/or tests. + */ + context.suite = function (title, fn) { + return common$1.suite.create({ + title, + file, + fn + }); + }; + + /** + * Pending suite. + */ + context.suite.skip = function (title, fn) { + return common$1.suite.skip({ + title, + file, + fn + }); + }; + + /** + * Exclusive test-case. + */ + context.suite.only = function (title, fn) { + return common$1.suite.only({ + title, + file, + fn + }); + }; + + /** + * Describe a specification or test-case with the given `title` and + * callback `fn` acting as a thunk. + */ + context.test = function (title, fn) { + var suite = suites[0]; + if (suite.isPending()) { + fn = null; + } + var test = new Test$2(title, fn); + test.file = file; + suite.addTest(test); + return test; + }; + + /** + * Exclusive test-case. + */ + + context.test.only = function (title, fn) { + return common$1.test.only(mocha, context.test(title, fn)); + }; + + context.test.skip = common$1.test.skip; + }); + }; + + tdd.exports.description = + 'traditional "suite"/"test" instead of BDD\'s "describe"/"it"'; + + var qunit = {exports: {}}; + + var Test$1 = test; + var EVENT_FILE_PRE_REQUIRE = + suite.exports.constants.EVENT_FILE_PRE_REQUIRE; + + /** + * QUnit-style interface: + * + * suite('Array'); + * + * test('#length', function() { + * var arr = [1,2,3]; + * ok(arr.length == 3); + * }); + * + * test('#indexOf()', function() { + * var arr = [1,2,3]; + * ok(arr.indexOf(1) == 0); + * ok(arr.indexOf(2) == 1); + * ok(arr.indexOf(3) == 2); + * }); + * + * suite('String'); + * + * test('#length', function() { + * ok('foo'.length == 3); + * }); + * + * @param {Suite} suite Root suite. + */ + qunit.exports = function qUnitInterface(suite) { + var suites = [suite]; + + suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { + var common$1 = common(suites, context, mocha); + + context.before = common$1.before; + context.after = common$1.after; + context.beforeEach = common$1.beforeEach; + context.afterEach = common$1.afterEach; + context.run = mocha.options.delay && common$1.runWithSuite(suite); + /** + * Describe a "suite" with the given `title`. + */ + + context.suite = function (title) { + if (suites.length > 1) { + suites.shift(); + } + return common$1.suite.create({ + title, + file, + fn: false + }); + }; + + /** + * Exclusive Suite. + */ + + context.suite.only = function (title) { + if (suites.length > 1) { + suites.shift(); + } + return common$1.suite.only({ + title, + file, + fn: false + }); + }; + + /** + * Describe a specification or test-case + * with the given `title` and callback `fn` + * acting as a thunk. + */ + + context.test = function (title, fn) { + var test = new Test$1(title, fn); + test.file = file; + suites[0].addTest(test); + return test; + }; + + /** + * Exclusive test-case. + */ + + context.test.only = function (title, fn) { + return common$1.test.only(mocha, context.test(title, fn)); + }; + + context.test.skip = common$1.test.skip; + }); + }; + + qunit.exports.description = 'QUnit style'; + + var exports$1 = {exports: {}}; + + var Suite = suite.exports; + var Test = test; + + /** + * Exports-style (as Node.js module) interface: + * + * exports.Array = { + * '#indexOf()': { + * 'should return -1 when the value is not present': function() { + * + * }, + * + * 'should return the correct index when the value is present': function() { + * + * } + * } + * }; + * + * @param {Suite} suite Root suite. + */ + exports$1.exports = function (suite) { + var suites = [suite]; + + suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit); + + function visit(obj, file) { + var suite; + for (var key in obj) { + if (typeof obj[key] === 'function') { + var fn = obj[key]; + switch (key) { + case 'before': + suites[0].beforeAll(fn); + break; + case 'after': + suites[0].afterAll(fn); + break; + case 'beforeEach': + suites[0].beforeEach(fn); + break; + case 'afterEach': + suites[0].afterEach(fn); + break; + default: + var test = new Test(key, fn); + test.file = file; + suites[0].addTest(test); + } + } else { + suite = Suite.create(suites[0], key); + suites.unshift(suite); + visit(obj[key], file); + suites.shift(); + } + } + } + }; + + exports$1.exports.description = 'Node.js module ("exports") style'; + + interfaces.bdd = bdd.exports; + interfaces.tdd = tdd.exports; + interfaces.qunit = qunit.exports; + interfaces.exports = exports$1.exports; + + /** + * @module Context + */ + /** + * Expose `Context`. + */ + + var context = Context; + + /** + * Initialize a new `Context`. + * + * @private + */ + function Context() {} + + /** + * Set or get the context `Runnable` to `runnable`. + * + * @private + * @param {Runnable} runnable + * @return {Context} context + */ + Context.prototype.runnable = function (runnable) { + if (!arguments.length) { + return this._runnable; + } + this.test = this._runnable = runnable; + return this; + }; + + /** + * Set or get test timeout `ms`. + * + * @private + * @param {number} ms + * @return {Context} self + */ + Context.prototype.timeout = function (ms) { + if (!arguments.length) { + return this.runnable().timeout(); + } + this.runnable().timeout(ms); + return this; + }; + + /** + * Set or get test slowness threshold `ms`. + * + * @private + * @param {number} ms + * @return {Context} self + */ + Context.prototype.slow = function (ms) { + if (!arguments.length) { + return this.runnable().slow(); + } + this.runnable().slow(ms); + return this; + }; + + /** + * Mark a test as skipped. + * + * @private + * @throws Pending + */ + Context.prototype.skip = function () { + this.runnable().skip(); + }; + + /** + * Set or get a number of allowed retries on failed tests + * + * @private + * @param {number} n + * @return {Context} self + */ + Context.prototype.retries = function (n) { + if (!arguments.length) { + return this.runnable().retries(); + } + this.runnable().retries(n); + return this; + }; + + var name = "mocha"; + var version = "10.2.0"; + var homepage = "https://mochajs.org/"; + var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png"; + var require$$17 = { + name: name, + version: version, + homepage: homepage, + notifyLogo: notifyLogo + }; + + (function (module, exports) { + + /*! + * mocha + * Copyright(c) 2011 TJ Holowaychuk + * MIT Licensed + */ + + var escapeRe = escapeStringRegexp; + var path = require$$1; + var builtinReporters = reporters; + var utils = utils$3; + var mocharc = require$$4; + var Suite = suite.exports; + var esmUtils = require$$18; + var createStatsCollector = statsCollector; + const { + createInvalidReporterError, + createInvalidInterfaceError, + createMochaInstanceAlreadyDisposedError, + createMochaInstanceAlreadyRunningError, + createUnsupportedError + } = errors$2; + const {EVENT_FILE_PRE_REQUIRE, EVENT_FILE_POST_REQUIRE, EVENT_FILE_REQUIRE} = + Suite.constants; + var debug = browser.exports('mocha:mocha'); + + exports = module.exports = Mocha; + + /** + * A Mocha instance is a finite state machine. + * These are the states it can be in. + * @private + */ + var mochaStates = utils.defineConstants({ + /** + * Initial state of the mocha instance + * @private + */ + INIT: 'init', + /** + * Mocha instance is running tests + * @private + */ + RUNNING: 'running', + /** + * Mocha instance is done running tests and references to test functions and hooks are cleaned. + * You can reset this state by unloading the test files. + * @private + */ + REFERENCES_CLEANED: 'referencesCleaned', + /** + * Mocha instance is disposed and can no longer be used. + * @private + */ + DISPOSED: 'disposed' + }); + + /** + * To require local UIs and reporters when running in node. + */ + + if (!utils.isBrowser() && typeof module.paths !== 'undefined') { + var cwd = utils.cwd(); + module.paths.push(cwd, path.join(cwd, 'node_modules')); + } + + /** + * Expose internals. + * @private + */ + + exports.utils = utils; + exports.interfaces = interfaces; + /** + * @public + * @memberof Mocha + */ + exports.reporters = builtinReporters; + exports.Runnable = runnable; + exports.Context = context; + /** + * + * @memberof Mocha + */ + exports.Runner = runner; + exports.Suite = Suite; + exports.Hook = hook; + exports.Test = test; + + let currentContext; + exports.afterEach = function (...args) { + return (currentContext.afterEach || currentContext.teardown).apply( + this, + args + ); + }; + exports.after = function (...args) { + return (currentContext.after || currentContext.suiteTeardown).apply( + this, + args + ); + }; + exports.beforeEach = function (...args) { + return (currentContext.beforeEach || currentContext.setup).apply(this, args); + }; + exports.before = function (...args) { + return (currentContext.before || currentContext.suiteSetup).apply(this, args); + }; + exports.describe = function (...args) { + return (currentContext.describe || currentContext.suite).apply(this, args); + }; + exports.describe.only = function (...args) { + return (currentContext.describe || currentContext.suite).only.apply( + this, + args + ); + }; + exports.describe.skip = function (...args) { + return (currentContext.describe || currentContext.suite).skip.apply( + this, + args + ); + }; + exports.it = function (...args) { + return (currentContext.it || currentContext.test).apply(this, args); + }; + exports.it.only = function (...args) { + return (currentContext.it || currentContext.test).only.apply(this, args); + }; + exports.it.skip = function (...args) { + return (currentContext.it || currentContext.test).skip.apply(this, args); + }; + exports.xdescribe = exports.describe.skip; + exports.xit = exports.it.skip; + exports.setup = exports.beforeEach; + exports.suiteSetup = exports.before; + exports.suiteTeardown = exports.after; + exports.suite = exports.describe; + exports.teardown = exports.afterEach; + exports.test = exports.it; + exports.run = function (...args) { + return currentContext.run.apply(this, args); + }; + + /** + * Constructs a new Mocha instance with `options`. + * + * @public + * @class Mocha + * @param {Object} [options] - Settings object. + * @param {boolean} [options.allowUncaught] - Propagate uncaught errors? + * @param {boolean} [options.asyncOnly] - Force `done` callback or promise? + * @param {boolean} [options.bail] - Bail after first test failure? + * @param {boolean} [options.checkLeaks] - Check for global variable leaks? + * @param {boolean} [options.color] - Color TTY output from reporter? + * @param {boolean} [options.delay] - Delay root suite execution? + * @param {boolean} [options.diff] - Show diff on failure? + * @param {boolean} [options.dryRun] - Report tests without running them? + * @param {boolean} [options.failZero] - Fail test run if zero tests? + * @param {string} [options.fgrep] - Test filter given string. + * @param {boolean} [options.forbidOnly] - Tests marked `only` fail the suite? + * @param {boolean} [options.forbidPending] - Pending tests fail the suite? + * @param {boolean} [options.fullTrace] - Full stacktrace upon failure? + * @param {string[]} [options.global] - Variables expected in global scope. + * @param {RegExp|string} [options.grep] - Test filter given regular expression. + * @param {boolean} [options.inlineDiffs] - Display inline diffs? + * @param {boolean} [options.invert] - Invert test filter matches? + * @param {boolean} [options.noHighlighting] - Disable syntax highlighting? + * @param {string|constructor} [options.reporter] - Reporter name or constructor. + * @param {Object} [options.reporterOption] - Reporter settings object. + * @param {number} [options.retries] - Number of times to retry failed tests. + * @param {number} [options.slow] - Slow threshold value. + * @param {number|string} [options.timeout] - Timeout threshold value. + * @param {string} [options.ui] - Interface name. + * @param {boolean} [options.parallel] - Run jobs in parallel. + * @param {number} [options.jobs] - Max number of worker processes for parallel runs. + * @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root suite with. + * @param {string[]} [options.require] - Pathname of `rootHooks` plugin for parallel runs. + * @param {boolean} [options.isWorker] - Should be `true` if `Mocha` process is running in a worker process. + */ + function Mocha(options = {}) { + options = {...mocharc, ...options}; + this.files = []; + this.options = options; + // root suite + this.suite = new exports.Suite('', new exports.Context(), true); + this._cleanReferencesAfterRun = true; + this._state = mochaStates.INIT; + + this.grep(options.grep) + .fgrep(options.fgrep) + .ui(options.ui) + .reporter( + options.reporter, + options.reporterOption || options.reporterOptions // for backwards compatibility + ) + .slow(options.slow) + .global(options.global); + + // this guard exists because Suite#timeout does not consider `undefined` to be valid input + if (typeof options.timeout !== 'undefined') { + this.timeout(options.timeout === false ? 0 : options.timeout); + } + + if ('retries' in options) { + this.retries(options.retries); + } + + [ + 'allowUncaught', + 'asyncOnly', + 'bail', + 'checkLeaks', + 'color', + 'delay', + 'diff', + 'dryRun', + 'failZero', + 'forbidOnly', + 'forbidPending', + 'fullTrace', + 'inlineDiffs', + 'invert' + ].forEach(function (opt) { + if (options[opt]) { + this[opt](); + } + }, this); + + if (options.rootHooks) { + this.rootHooks(options.rootHooks); + } + + /** + * The class which we'll instantiate in {@link Mocha#run}. Defaults to + * {@link Runner} in serial mode; changes in parallel mode. + * @memberof Mocha + * @private + */ + this._runnerClass = exports.Runner; + + /** + * Whether or not to call {@link Mocha#loadFiles} implicitly when calling + * {@link Mocha#run}. If this is `true`, then it's up to the consumer to call + * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}. + * @private + * @memberof Mocha + */ + this._lazyLoadFiles = false; + + /** + * It's useful for a Mocha instance to know if it's running in a worker process. + * We could derive this via other means, but it's helpful to have a flag to refer to. + * @memberof Mocha + * @private + */ + this.isWorker = Boolean(options.isWorker); + + this.globalSetup(options.globalSetup) + .globalTeardown(options.globalTeardown) + .enableGlobalSetup(options.enableGlobalSetup) + .enableGlobalTeardown(options.enableGlobalTeardown); + + if ( + options.parallel && + (typeof options.jobs === 'undefined' || options.jobs > 1) + ) { + debug('attempting to enable parallel mode'); + this.parallelMode(true); + } + } + + /** + * Enables or disables bailing on the first failure. + * + * @public + * @see [CLI option](../#-bail-b) + * @param {boolean} [bail=true] - Whether to bail on first error. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.bail = function (bail) { + this.suite.bail(bail !== false); + return this; + }; + + /** + * @summary + * Adds `file` to be loaded for execution. + * + * @description + * Useful for generic setup code that must be included within test suite. + * + * @public + * @see [CLI option](../#-file-filedirectoryglob) + * @param {string} file - Pathname of file to be loaded. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.addFile = function (file) { + this.files.push(file); + return this; + }; + + /** + * Sets reporter to `reporter`, defaults to "spec". + * + * @public + * @see [CLI option](../#-reporter-name-r-name) + * @see [Reporters](../#reporters) + * @param {String|Function} reporterName - Reporter name or constructor. + * @param {Object} [reporterOptions] - Options used to configure the reporter. + * @returns {Mocha} this + * @chainable + * @throws {Error} if requested reporter cannot be loaded + * @example + * + * // Use XUnit reporter and direct its output to file + * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' }); + */ + Mocha.prototype.reporter = function (reporterName, reporterOptions) { + if (typeof reporterName === 'function') { + this._reporter = reporterName; + } else { + reporterName = reporterName || 'spec'; + var reporter; + // Try to load a built-in reporter. + if (builtinReporters[reporterName]) { + reporter = builtinReporters[reporterName]; + } + // Try to load reporters from process.cwd() and node_modules + if (!reporter) { + let foundReporter; + try { + foundReporter = require.resolve(reporterName); + reporter = commonjsRequire(foundReporter); + } catch (err) { + if (foundReporter) { + throw createInvalidReporterError(err.message, foundReporter); + } + // Try to load reporters from a cwd-relative path + try { + reporter = commonjsRequire(path.resolve(reporterName)); + } catch (e) { + throw createInvalidReporterError(e.message, reporterName); + } + } + } + this._reporter = reporter; + } + this.options.reporterOption = reporterOptions; + // alias option name is used in built-in reporters xunit/tap/progress + this.options.reporterOptions = reporterOptions; + return this; + }; + + /** + * Sets test UI `name`, defaults to "bdd". + * + * @public + * @see [CLI option](../#-ui-name-u-name) + * @see [Interface DSLs](../#interfaces) + * @param {string|Function} [ui=bdd] - Interface name or class. + * @returns {Mocha} this + * @chainable + * @throws {Error} if requested interface cannot be loaded + */ + Mocha.prototype.ui = function (ui) { + var bindInterface; + if (typeof ui === 'function') { + bindInterface = ui; + } else { + ui = ui || 'bdd'; + bindInterface = exports.interfaces[ui]; + if (!bindInterface) { + try { + bindInterface = commonjsRequire(ui); + } catch (err) { + throw createInvalidInterfaceError(`invalid interface '${ui}'`, ui); + } + } + } + bindInterface(this.suite); + + this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) { + currentContext = context; + }); + + return this; + }; + + /** + * Loads `files` prior to execution. Does not support ES Modules. + * + * @description + * The implementation relies on Node's `require` to execute + * the test interface functions and will be subject to its cache. + * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync. + * + * @private + * @see {@link Mocha#addFile} + * @see {@link Mocha#run} + * @see {@link Mocha#unloadFiles} + * @see {@link Mocha#loadFilesAsync} + * @param {Function} [fn] - Callback invoked upon completion. + */ + Mocha.prototype.loadFiles = function (fn) { + var self = this; + var suite = this.suite; + this.files.forEach(function (file) { + file = path.resolve(file); + suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self); + suite.emit(EVENT_FILE_REQUIRE, commonjsRequire(file), file, self); + suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self); + }); + fn && fn(); + }; + + /** + * Loads `files` prior to execution. Supports Node ES Modules. + * + * @description + * The implementation relies on Node's `require` and `import` to execute + * the test interface functions and will be subject to its cache. + * Supports both CJS and ESM modules. + * + * @public + * @see {@link Mocha#addFile} + * @see {@link Mocha#run} + * @see {@link Mocha#unloadFiles} + * @param {Object} [options] - Settings object. + * @param {Function} [options.esmDecorator] - Function invoked on esm module name right before importing it. By default will passthrough as is. + * @returns {Promise} + * @example + * + * // loads ESM (and CJS) test files asynchronously, then runs root suite + * mocha.loadFilesAsync() + * .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0)) + * .catch(() => process.exitCode = 1); + */ + Mocha.prototype.loadFilesAsync = function ({esmDecorator} = {}) { + var self = this; + var suite = this.suite; + this.lazyLoadFiles(true); + + return esmUtils.loadFilesAsync( + this.files, + function (file) { + suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self); + }, + function (file, resultModule) { + suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self); + suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self); + }, + esmDecorator + ); + }; + + /** + * Removes a previously loaded file from Node's `require` cache. + * + * @private + * @static + * @see {@link Mocha#unloadFiles} + * @param {string} file - Pathname of file to be unloaded. + */ + Mocha.unloadFile = function (file) { + if (utils.isBrowser()) { + throw createUnsupportedError( + 'unloadFile() is only supported in a Node.js environment' + ); + } + return require$$18.unloadFile(file); + }; + + /** + * Unloads `files` from Node's `require` cache. + * + * @description + * This allows required files to be "freshly" reloaded, providing the ability + * to reuse a Mocha instance programmatically. + * Note: does not clear ESM module files from the cache + * + * Intended for consumers — not used internally + * + * @public + * @see {@link Mocha#run} + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.unloadFiles = function () { + if (this._state === mochaStates.DISPOSED) { + throw createMochaInstanceAlreadyDisposedError( + 'Mocha instance is already disposed, it cannot be used again.', + this._cleanReferencesAfterRun, + this + ); + } + + this.files.forEach(function (file) { + Mocha.unloadFile(file); + }); + this._state = mochaStates.INIT; + return this; + }; + + /** + * Sets `grep` filter after escaping RegExp special characters. + * + * @public + * @see {@link Mocha#grep} + * @param {string} str - Value to be converted to a regexp. + * @returns {Mocha} this + * @chainable + * @example + * + * // Select tests whose full title begins with `"foo"` followed by a period + * mocha.fgrep('foo.'); + */ + Mocha.prototype.fgrep = function (str) { + if (!str) { + return this; + } + return this.grep(new RegExp(escapeRe(str))); + }; + + /** + * @summary + * Sets `grep` filter used to select specific tests for execution. + * + * @description + * If `re` is a regexp-like string, it will be converted to regexp. + * The regexp is tested against the full title of each test (i.e., the + * name of the test preceded by titles of each its ancestral suites). + * As such, using an exact-match fixed pattern against the + * test name itself will not yield any matches. + *
        + * Previous filter value will be overwritten on each call! + * + * @public + * @see [CLI option](../#-grep-regexp-g-regexp) + * @see {@link Mocha#fgrep} + * @see {@link Mocha#invert} + * @param {RegExp|String} re - Regular expression used to select tests. + * @return {Mocha} this + * @chainable + * @example + * + * // Select tests whose full title contains `"match"`, ignoring case + * mocha.grep(/match/i); + * @example + * + * // Same as above but with regexp-like string argument + * mocha.grep('/match/i'); + * @example + * + * // ## Anti-example + * // Given embedded test `it('only-this-test')`... + * mocha.grep('/^only-this-test$/'); // NO! Use `.only()` to do this! + */ + Mocha.prototype.grep = function (re) { + if (utils.isString(re)) { + // extract args if it's regex-like, i.e: [string, pattern, flag] + var arg = re.match(/^\/(.*)\/([gimy]{0,4})$|.*/); + this.options.grep = new RegExp(arg[1] || arg[0], arg[2]); + } else { + this.options.grep = re; + } + return this; + }; + + /** + * Inverts `grep` matches. + * + * @public + * @see {@link Mocha#grep} + * @return {Mocha} this + * @chainable + * @example + * + * // Select tests whose full title does *not* contain `"match"`, ignoring case + * mocha.grep(/match/i).invert(); + */ + Mocha.prototype.invert = function () { + this.options.invert = true; + return this; + }; + + /** + * Enables or disables checking for global variables leaked while running tests. + * + * @public + * @see [CLI option](../#-check-leaks) + * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.checkLeaks = function (checkLeaks) { + this.options.checkLeaks = checkLeaks !== false; + return this; + }; + + /** + * Enables or disables whether or not to dispose after each test run. + * Disable this to ensure you can run the test suite multiple times. + * If disabled, be sure to dispose mocha when you're done to prevent memory leaks. + * @public + * @see {@link Mocha#dispose} + * @param {boolean} cleanReferencesAfterRun + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.cleanReferencesAfterRun = function (cleanReferencesAfterRun) { + this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false; + return this; + }; + + /** + * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests. + * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector. + * @public + */ + Mocha.prototype.dispose = function () { + if (this._state === mochaStates.RUNNING) { + throw createMochaInstanceAlreadyRunningError( + 'Cannot dispose while the mocha instance is still running tests.' + ); + } + this.unloadFiles(); + this._previousRunner && this._previousRunner.dispose(); + this.suite.dispose(); + this._state = mochaStates.DISPOSED; + }; + + /** + * Displays full stack trace upon test failure. + * + * @public + * @see [CLI option](../#-full-trace) + * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.fullTrace = function (fullTrace) { + this.options.fullTrace = fullTrace !== false; + return this; + }; + + /** + * Specifies whitelist of variable names to be expected in global scope. + * + * @public + * @see [CLI option](../#-global-variable-name) + * @see {@link Mocha#checkLeaks} + * @param {String[]|String} global - Accepted global variable name(s). + * @return {Mocha} this + * @chainable + * @example + * + * // Specify variables to be expected in global scope + * mocha.global(['jQuery', 'MyLib']); + */ + Mocha.prototype.global = function (global) { + this.options.global = (this.options.global || []) + .concat(global) + .filter(Boolean) + .filter(function (elt, idx, arr) { + return arr.indexOf(elt) === idx; + }); + return this; + }; + // for backwards compatibility, 'globals' is an alias of 'global' + Mocha.prototype.globals = Mocha.prototype.global; + + /** + * Enables or disables TTY color output by screen-oriented reporters. + * + * @public + * @see [CLI option](../#-color-c-colors) + * @param {boolean} [color=true] - Whether to enable color output. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.color = function (color) { + this.options.color = color !== false; + return this; + }; + + /** + * Enables or disables reporter to use inline diffs (rather than +/-) + * in test failure output. + * + * @public + * @see [CLI option](../#-inline-diffs) + * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.inlineDiffs = function (inlineDiffs) { + this.options.inlineDiffs = inlineDiffs !== false; + return this; + }; + + /** + * Enables or disables reporter to include diff in test failure output. + * + * @public + * @see [CLI option](../#-diff) + * @param {boolean} [diff=true] - Whether to show diff on failure. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.diff = function (diff) { + this.options.diff = diff !== false; + return this; + }; + + /** + * @summary + * Sets timeout threshold value. + * + * @description + * A string argument can use shorthand (such as "2s") and will be converted. + * If the value is `0`, timeouts will be disabled. + * + * @public + * @see [CLI option](../#-timeout-ms-t-ms) + * @see [Timeouts](../#timeouts) + * @param {number|string} msecs - Timeout threshold value. + * @return {Mocha} this + * @chainable + * @example + * + * // Sets timeout to one second + * mocha.timeout(1000); + * @example + * + * // Same as above but using string argument + * mocha.timeout('1s'); + */ + Mocha.prototype.timeout = function (msecs) { + this.suite.timeout(msecs); + return this; + }; + + /** + * Sets the number of times to retry failed tests. + * + * @public + * @see [CLI option](../#-retries-n) + * @see [Retry Tests](../#retry-tests) + * @param {number} retry - Number of times to retry failed tests. + * @return {Mocha} this + * @chainable + * @example + * + * // Allow any failed test to retry one more time + * mocha.retries(1); + */ + Mocha.prototype.retries = function (retry) { + this.suite.retries(retry); + return this; + }; + + /** + * Sets slowness threshold value. + * + * @public + * @see [CLI option](../#-slow-ms-s-ms) + * @param {number} msecs - Slowness threshold value. + * @return {Mocha} this + * @chainable + * @example + * + * // Sets "slow" threshold to half a second + * mocha.slow(500); + * @example + * + * // Same as above but using string argument + * mocha.slow('0.5s'); + */ + Mocha.prototype.slow = function (msecs) { + this.suite.slow(msecs); + return this; + }; + + /** + * Forces all tests to either accept a `done` callback or return a promise. + * + * @public + * @see [CLI option](../#-async-only-a) + * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.asyncOnly = function (asyncOnly) { + this.options.asyncOnly = asyncOnly !== false; + return this; + }; + + /** + * Disables syntax highlighting (in browser). + * + * @public + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.noHighlighting = function () { + this.options.noHighlighting = true; + return this; + }; + + /** + * Enables or disables uncaught errors to propagate. + * + * @public + * @see [CLI option](../#-allow-uncaught) + * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.allowUncaught = function (allowUncaught) { + this.options.allowUncaught = allowUncaught !== false; + return this; + }; + + /** + * @summary + * Delays root suite execution. + * + * @description + * Used to perform async operations before any suites are run. + * + * @public + * @see [delayed root suite](../#delayed-root-suite) + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.delay = function delay() { + this.options.delay = true; + return this; + }; + + /** + * Enables or disables running tests in dry-run mode. + * + * @public + * @see [CLI option](../#-dry-run) + * @param {boolean} [dryRun=true] - Whether to activate dry-run mode. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.dryRun = function (dryRun) { + this.options.dryRun = dryRun !== false; + return this; + }; + + /** + * Fails test run if no tests encountered with exit-code 1. + * + * @public + * @see [CLI option](../#-fail-zero) + * @param {boolean} [failZero=true] - Whether to fail test run. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.failZero = function (failZero) { + this.options.failZero = failZero !== false; + return this; + }; + + /** + * Causes tests marked `only` to fail the suite. + * + * @public + * @see [CLI option](../#-forbid-only) + * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.forbidOnly = function (forbidOnly) { + this.options.forbidOnly = forbidOnly !== false; + return this; + }; + + /** + * Causes pending tests and tests marked `skip` to fail the suite. + * + * @public + * @see [CLI option](../#-forbid-pending) + * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.forbidPending = function (forbidPending) { + this.options.forbidPending = forbidPending !== false; + return this; + }; + + /** + * Throws an error if mocha is in the wrong state to be able to transition to a "running" state. + * @private + */ + Mocha.prototype._guardRunningStateTransition = function () { + if (this._state === mochaStates.RUNNING) { + throw createMochaInstanceAlreadyRunningError( + 'Mocha instance is currently running tests, cannot start a next test run until this one is done', + this + ); + } + if ( + this._state === mochaStates.DISPOSED || + this._state === mochaStates.REFERENCES_CLEANED + ) { + throw createMochaInstanceAlreadyDisposedError( + 'Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.', + this._cleanReferencesAfterRun, + this + ); + } + }; + + /** + * Mocha version as specified by "package.json". + * + * @name Mocha#version + * @type string + * @readonly + */ + Object.defineProperty(Mocha.prototype, 'version', { + value: require$$17.version, + configurable: false, + enumerable: true, + writable: false + }); + + /** + * Callback to be invoked when test execution is complete. + * + * @private + * @callback DoneCB + * @param {number} failures - Number of failures that occurred. + */ + + /** + * Runs root suite and invokes `fn()` when complete. + * + * @description + * To run tests multiple times (or to run tests in files that are + * already in the `require` cache), make sure to clear them from + * the cache first! + * + * @public + * @see {@link Mocha#unloadFiles} + * @see {@link Runner#run} + * @param {DoneCB} [fn] - Callback invoked when test execution completed. + * @returns {Runner} runner instance + * @example + * + * // exit with non-zero status if there were test failures + * mocha.run(failures => process.exitCode = failures ? 1 : 0); + */ + Mocha.prototype.run = function (fn) { + this._guardRunningStateTransition(); + this._state = mochaStates.RUNNING; + if (this._previousRunner) { + this._previousRunner.dispose(); + this.suite.reset(); + } + if (this.files.length && !this._lazyLoadFiles) { + this.loadFiles(); + } + var suite = this.suite; + var options = this.options; + options.files = this.files; + const runner = new this._runnerClass(suite, { + cleanReferencesAfterRun: this._cleanReferencesAfterRun, + delay: options.delay, + dryRun: options.dryRun, + failZero: options.failZero + }); + createStatsCollector(runner); + var reporter = new this._reporter(runner, options); + runner.checkLeaks = options.checkLeaks === true; + runner.fullStackTrace = options.fullTrace; + runner.asyncOnly = options.asyncOnly; + runner.allowUncaught = options.allowUncaught; + runner.forbidOnly = options.forbidOnly; + runner.forbidPending = options.forbidPending; + if (options.grep) { + runner.grep(options.grep, options.invert); + } + if (options.global) { + runner.globals(options.global); + } + if (options.color !== undefined) { + exports.reporters.Base.useColors = options.color; + } + exports.reporters.Base.inlineDiffs = options.inlineDiffs; + exports.reporters.Base.hideDiff = !options.diff; + + const done = failures => { + this._previousRunner = runner; + this._state = this._cleanReferencesAfterRun + ? mochaStates.REFERENCES_CLEANED + : mochaStates.INIT; + fn = fn || utils.noop; + if (typeof reporter.done === 'function') { + reporter.done(failures, fn); + } else { + fn(failures); + } + }; + + const runAsync = async runner => { + const context = + this.options.enableGlobalSetup && this.hasGlobalSetupFixtures() + ? await this.runGlobalSetup(runner) + : {}; + const failureCount = await runner.runAsync({ + files: this.files, + options + }); + if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) { + await this.runGlobalTeardown(runner, {context}); + } + return failureCount; + }; + + // no "catch" here is intentional. errors coming out of + // Runner#run are considered uncaught/unhandled and caught + // by the `process` event listeners. + // also: returning anything other than `runner` would be a breaking + // change + runAsync(runner).then(done); + + return runner; + }; + + /** + * Assigns hooks to the root suite + * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite + * @chainable + */ + Mocha.prototype.rootHooks = function rootHooks({ + beforeAll = [], + beforeEach = [], + afterAll = [], + afterEach = [] + } = {}) { + beforeAll = utils.castArray(beforeAll); + beforeEach = utils.castArray(beforeEach); + afterAll = utils.castArray(afterAll); + afterEach = utils.castArray(afterEach); + beforeAll.forEach(hook => { + this.suite.beforeAll(hook); + }); + beforeEach.forEach(hook => { + this.suite.beforeEach(hook); + }); + afterAll.forEach(hook => { + this.suite.afterAll(hook); + }); + afterEach.forEach(hook => { + this.suite.afterEach(hook); + }); + return this; + }; + + /** + * Toggles parallel mode. + * + * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to + * use; also enables lazy file loading if not already done so. + * + * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel + * mode, but parallel mode is _not_ a prerequisite for lazy loading! + * @param {boolean} [enable] - If `true`, enable; otherwise disable. + * @throws If run in browser + * @throws If Mocha not in `INIT` state + * @returns {Mocha} + * @chainable + * @public + */ + Mocha.prototype.parallelMode = function parallelMode(enable = true) { + if (utils.isBrowser()) { + throw createUnsupportedError('parallel mode is only supported in Node.js'); + } + const parallel = Boolean(enable); + if ( + parallel === this.options.parallel && + this._lazyLoadFiles && + this._runnerClass !== exports.Runner + ) { + return this; + } + if (this._state !== mochaStates.INIT) { + throw createUnsupportedError( + 'cannot change parallel mode after having called run()' + ); + } + this.options.parallel = parallel; + + // swap Runner class + this._runnerClass = parallel + ? require$$18 + : exports.Runner; + + // lazyLoadFiles may have been set `true` otherwise (for ESM loading), + // so keep `true` if so. + return this.lazyLoadFiles(this._lazyLoadFiles || parallel); + }; + + /** + * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This + * setting is used by watch mode, parallel mode, and for loading ESM files. + * @todo This should throw if we've already loaded files; such behavior + * necessitates adding a new state. + * @param {boolean} [enable] - If `true`, disable eager loading of files in + * {@link Mocha#run} + * @chainable + * @public + */ + Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) { + this._lazyLoadFiles = enable === true; + debug('set lazy load to %s', enable); + return this; + }; + + /** + * Configures one or more global setup fixtures. + * + * If given no parameters, _unsets_ any previously-set fixtures. + * @chainable + * @public + * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s) + * @returns {Mocha} + */ + Mocha.prototype.globalSetup = function globalSetup(setupFns = []) { + setupFns = utils.castArray(setupFns); + this.options.globalSetup = setupFns; + debug('configured %d global setup functions', setupFns.length); + return this; + }; + + /** + * Configures one or more global teardown fixtures. + * + * If given no parameters, _unsets_ any previously-set fixtures. + * @chainable + * @public + * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s) + * @returns {Mocha} + */ + Mocha.prototype.globalTeardown = function globalTeardown(teardownFns = []) { + teardownFns = utils.castArray(teardownFns); + this.options.globalTeardown = teardownFns; + debug('configured %d global teardown functions', teardownFns.length); + return this; + }; + + /** + * Run any global setup fixtures sequentially, if any. + * + * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}. + * + * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}. + * @param {object} [context] - Context object if already have one + * @public + * @returns {Promise} Context object + */ + Mocha.prototype.runGlobalSetup = async function runGlobalSetup(context = {}) { + const {globalSetup} = this.options; + if (globalSetup && globalSetup.length) { + debug('run(): global setup starting'); + await this._runGlobalFixtures(globalSetup, context); + debug('run(): global setup complete'); + } + return context; + }; + + /** + * Run any global teardown fixtures sequentially, if any. + * + * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}. + * + * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable. + * @param {object} [context] - Context object if already have one + * @public + * @returns {Promise} Context object + */ + Mocha.prototype.runGlobalTeardown = async function runGlobalTeardown( + context = {} + ) { + const {globalTeardown} = this.options; + if (globalTeardown && globalTeardown.length) { + debug('run(): global teardown starting'); + await this._runGlobalFixtures(globalTeardown, context); + } + debug('run(): global teardown complete'); + return context; + }; + + /** + * Run global fixtures sequentially with context `context` + * @private + * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run + * @param {object} [context] - context object + * @returns {Promise} context object + */ + Mocha.prototype._runGlobalFixtures = async function _runGlobalFixtures( + fixtureFns = [], + context = {} + ) { + for await (const fixtureFn of fixtureFns) { + await fixtureFn.call(context); + } + return context; + }; + + /** + * Toggle execution of any global setup fixture(s) + * + * @chainable + * @public + * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture + * @returns {Mocha} + */ + Mocha.prototype.enableGlobalSetup = function enableGlobalSetup(enabled = true) { + this.options.enableGlobalSetup = Boolean(enabled); + return this; + }; + + /** + * Toggle execution of any global teardown fixture(s) + * + * @chainable + * @public + * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture + * @returns {Mocha} + */ + Mocha.prototype.enableGlobalTeardown = function enableGlobalTeardown( + enabled = true + ) { + this.options.enableGlobalTeardown = Boolean(enabled); + return this; + }; + + /** + * Returns `true` if one or more global setup fixtures have been supplied. + * @public + * @returns {boolean} + */ + Mocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() { + return Boolean(this.options.globalSetup.length); + }; + + /** + * Returns `true` if one or more global teardown fixtures have been supplied. + * @public + * @returns {boolean} + */ + Mocha.prototype.hasGlobalTeardownFixtures = + function hasGlobalTeardownFixtures() { + return Boolean(this.options.globalTeardown.length); + }; + + /** + * An alternative way to define root hooks that works with parallel runs. + * @typedef {Object} MochaRootHookObject + * @property {Function|Function[]} [beforeAll] - "Before all" hook(s) + * @property {Function|Function[]} [beforeEach] - "Before each" hook(s) + * @property {Function|Function[]} [afterAll] - "After all" hook(s) + * @property {Function|Function[]} [afterEach] - "After each" hook(s) + */ + + /** + * An function that returns a {@link MochaRootHookObject}, either sync or async. + @callback MochaRootHookFunction + * @returns {MochaRootHookObject|Promise} + */ + + /** + * A function that's invoked _once_ which is either sync or async. + * Can be a "teardown" or "setup". These will all share the same context. + * @callback MochaGlobalFixture + * @returns {void|Promise} + */ + + /** + * An object making up all necessary parts of a plugin loader and aggregator + * @typedef {Object} PluginDefinition + * @property {string} exportName - Named export to use + * @property {string} [optionName] - Option name for Mocha constructor (use `exportName` if omitted) + * @property {PluginValidator} [validate] - Validator function + * @property {PluginFinalizer} [finalize] - Finalizer/aggregator function + */ + + /** + * A (sync) function to assert a user-supplied plugin implementation is valid. + * + * Defined in a {@link PluginDefinition}. + + * @callback PluginValidator + * @param {*} value - Value to check + * @this {PluginDefinition} + * @returns {void} + */ + + /** + * A function to finalize plugins impls of a particular ilk + * @callback PluginFinalizer + * @param {Array<*>} impls - User-supplied implementations + * @returns {Promise<*>|*} + */ + }(mocha$1, mocha$1.exports)); + + /* eslint no-unused-vars: off */ + /* eslint-env commonjs */ + + /** + * Shim process.stdout. + */ + + process.stdout = browserStdout({label: false}); + + var parseQuery = parseQuery$1; + var highlightTags = highlightTags$1; + var Mocha = mocha$1.exports; + + /** + * Create a Mocha instance. + * + * @return {undefined} + */ + + var mocha = new Mocha({reporter: 'html'}); + + /** + * Save timer references to avoid Sinon interfering (see GH-237). + */ + + var Date$1 = commonjsGlobal.Date; + var setTimeout$1 = commonjsGlobal.setTimeout; + commonjsGlobal.setInterval; + commonjsGlobal.clearTimeout; + commonjsGlobal.clearInterval; + + var uncaughtExceptionHandlers = []; + + var originalOnerrorHandler = commonjsGlobal.onerror; + + /** + * Remove uncaughtException listener. + * Revert to original onerror handler if previously defined. + */ + + process.removeListener = function (e, fn) { + if (e === 'uncaughtException') { + if (originalOnerrorHandler) { + commonjsGlobal.onerror = originalOnerrorHandler; + } else { + commonjsGlobal.onerror = function () {}; + } + var i = uncaughtExceptionHandlers.indexOf(fn); + if (i !== -1) { + uncaughtExceptionHandlers.splice(i, 1); + } + } + }; + + /** + * Implements listenerCount for 'uncaughtException'. + */ + + process.listenerCount = function (name) { + if (name === 'uncaughtException') { + return uncaughtExceptionHandlers.length; + } + return 0; + }; + + /** + * Implements uncaughtException listener. + */ + + process.on = function (e, fn) { + if (e === 'uncaughtException') { + commonjsGlobal.onerror = function (err, url, line) { + fn(new Error(err + ' (' + url + ':' + line + ')')); + return !mocha.options.allowUncaught; + }; + uncaughtExceptionHandlers.push(fn); + } + }; + + process.listeners = function (e) { + if (e === 'uncaughtException') { + return uncaughtExceptionHandlers; + } + return []; + }; + + // The BDD UI is registered by default, but no UI will be functional in the + // browser without an explicit call to the overridden `mocha.ui` (see below). + // Ensure that this default UI does not expose its methods to the global scope. + mocha.suite.removeAllListeners('pre-require'); + + var immediateQueue = []; + var immediateTimeout; + + function timeslice() { + var immediateStart = new Date$1().getTime(); + while (immediateQueue.length && new Date$1().getTime() - immediateStart < 100) { + immediateQueue.shift()(); + } + if (immediateQueue.length) { + immediateTimeout = setTimeout$1(timeslice, 0); } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":88,"_process":69,"inherits":56}],90:[function(require,module,exports){ -module.exports={ - "name": "mocha", - "version": "6.2.0", - "homepage": "https://mochajs.org/", - "notifyLogo": "https://ibin.co/4QuRuGjXvl36.png" -} -},{}]},{},[1]); + immediateTimeout = null; + } + } + + /** + * High-performance override of Runner.immediately. + */ + + Mocha.Runner.immediately = function (callback) { + immediateQueue.push(callback); + if (!immediateTimeout) { + immediateTimeout = setTimeout$1(timeslice, 0); + } + }; + + /** + * Function to allow assertion libraries to throw errors directly into mocha. + * This is useful when running tests in a browser because window.onerror will + * only receive the 'message' attribute of the Error. + */ + mocha.throwError = function (err) { + uncaughtExceptionHandlers.forEach(function (fn) { + fn(err); + }); + throw err; + }; + + /** + * Override ui to ensure that the ui functions are initialized. + * Normally this would happen in Mocha.prototype.loadFiles. + */ + + mocha.ui = function (ui) { + Mocha.prototype.ui.call(this, ui); + this.suite.emit('pre-require', commonjsGlobal, null, this); + return this; + }; + + /** + * Setup mocha with the given setting options. + */ + + mocha.setup = function (opts) { + if (typeof opts === 'string') { + opts = {ui: opts}; + } + if (opts.delay === true) { + this.delay(); + } + var self = this; + Object.keys(opts) + .filter(function (opt) { + return opt !== 'delay'; + }) + .forEach(function (opt) { + if (Object.prototype.hasOwnProperty.call(opts, opt)) { + self[opt](opts[opt]); + } + }); + return this; + }; + + /** + * Run mocha, returning the Runner. + */ + + mocha.run = function (fn) { + var options = mocha.options; + mocha.globals('location'); + + var query = parseQuery(commonjsGlobal.location.search || ''); + if (query.grep) { + mocha.grep(query.grep); + } + if (query.fgrep) { + mocha.fgrep(query.fgrep); + } + if (query.invert) { + mocha.invert(); + } + + return Mocha.prototype.run.call(mocha, function (err) { + // The DOM Document is not available in Web Workers. + var document = commonjsGlobal.document; + if ( + document && + document.getElementById('mocha') && + options.noHighlighting !== true + ) { + highlightTags('code'); + } + if (fn) { + fn(err); + } + }); + }; + + /** + * Expose the process shim. + * https://github.com/mochajs/mocha/pull/916 + */ + + Mocha.process = process; + + /** + * Expose mocha. + */ + commonjsGlobal.Mocha = Mocha; + commonjsGlobal.mocha = mocha; + + // for bundlers: enable `import {describe, it} from 'mocha'` + // `bdd` interface only + // prettier-ignore + [ + 'describe', 'context', 'it', 'specify', + 'xdescribe', 'xcontext', 'xit', 'xspecify', + 'before', 'beforeEach', 'afterEach', 'after' + ].forEach(function(key) { + mocha[key] = commonjsGlobal[key]; + }); + + var browserEntry = mocha; + + return browserEntry; + +})); +//# sourceMappingURL=mocha.js.map diff --git a/node_modules/mocha/package.json b/node_modules/mocha/package.json index 618b9676..bdb347cc 100644 --- a/node_modules/mocha/package.json +++ b/node_modules/mocha/package.json @@ -1,2086 +1,186 @@ { - "@mocha/contributors": { - "exclude": [ - "greenkeeperio-bot ", - "greenkeeper[bot] ", - "TJ Holowaychuk " - ] - }, - "_args": [ - [ - "mocha@6.2.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] + "name": "mocha", + "version": "10.2.0", + "type": "commonjs", + "description": "simple, flexible, fun test framework", + "keywords": [ + "mocha", + "test", + "bdd", + "tdd", + "tap", + "testing", + "chai", + "assertion", + "ava", + "jest", + "tape", + "jasmine", + "karma" ], - "_development": true, - "_from": "mocha@6.2.0", - "_id": "mocha@6.2.0", - "_inBundle": false, - "_integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", - "_location": "/mocha", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "mocha@6.2.0", - "name": "mocha", - "escapedName": "mocha", - "rawSpec": "6.2.0", - "saveSpec": null, - "fetchSpec": "6.2.0" + "author": "TJ Holowaychuk ", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/mochajs/mocha.git" }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", - "_spec": "6.2.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" + "bugs": { + "url": "https://github.com/mochajs/mocha/issues/" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" }, + "gitter": "https://gitter.im/mochajs/mocha", + "homepage": "https://mochajs.org/", + "logo": "https://cldup.com/S9uQ-cOLYz.svg", + "notifyLogo": "https://ibin.co/4QuRuGjXvl36.png", "bin": { - "mocha": "./bin/mocha", + "mocha": "./bin/mocha.js", "_mocha": "./bin/_mocha" }, - "browser": { - "./index.js": "./browser-entry.js", - "./lib/growl.js": "./lib/browser/growl.js", - "tty": "./lib/browser/tty.js", - "fs": false, - "glob": false, - "path": false, - "supports-color": false + "directories": { + "lib": "./lib", + "test": "./test" }, - "browserify": { - "transform": [ - "./scripts/package-json-cullify" - ] + "engines": { + "node": ">= 14.0.0" }, - "bugs": { - "url": "https://github.com/mochajs/mocha/issues/" + "scripts": { + "prepublishOnly": "nps test clean build", + "start": "nps", + "test": "nps test", + "version": "nps version", + "test:smoke": "node ./bin/mocha --no-config test/smoke/smoke.spec.js" }, - "contributors": [ - { - "name": "38elements", - "email": "mh19820223@gmail.com" - }, - { - "name": "Aaron Brady", - "email": "aaron@mori.com" - }, - { - "name": "Aaron Hamid", - "email": "aaron.hamid@gmail.com" - }, - { - "name": "Aaron Heckmann", - "email": "aaron.heckmann+github@gmail.com" - }, - { - "name": "Aaron Krause", - "email": "aaronjkrause@gmail.com" - }, - { - "name": "Aaron Petcoff", - "email": "hello@aaronpetcoff.me" - }, - { - "name": "abrkn", - "email": "a@abrkn.com" - }, - { - "name": "Adam Crabtree", - "email": "adam.crabtree@redrobotlabs.com" - }, - { - "name": "Adam Ginzberg", - "email": "aginzberg@gmail.com" - }, - { - "name": "Adam Gruber", - "email": "talknmime@gmail.com" - }, - { - "name": "Adrian Ludwig", - "email": "me@adrianludwig.pl" - }, - { - "name": "Ahmad Bamieh", - "email": "ahmadbamieh@gmail.com" - }, - { - "name": "airportyh", - "email": "airportyh@gmail.com" - }, - { - "name": "Ajay Kodali", - "email": "ajay.kodali@citrix.com" - }, - { - "name": "Al Scott", - "email": "al.scott@atomicobject.com" - }, - { - "name": "Alex Bainter", - "email": "metalex9@users.noreply.github.com" - }, - { - "name": "Alexander Early", - "email": "alexander.early@gmail.com" - }, - { - "name": "Alexander Shepelin", - "email": "Brightcor@gmail.com" - }, - { - "name": "Alhadis", - "email": "gardnerjohng@gmail.com" - }, - { - "name": "amsul", - "email": "reach@amsul.ca" - }, - { - "name": "Anders Olsen Sandvik", - "email": "Andersos@users.noreply.github.com" - }, - { - "name": "Andreas Brekken", - "email": "andreas@opuno.com" - }, - { - "name": "Andreas Lind", - "email": "andreaslindpetersen@gmail.com" - }, - { - "name": "Andreas Lind Petersen", - "email": "andreas@one.com" - }, - { - "name": "Andrew Bradley", - "email": "abradley@brightcove.com" - }, - { - "name": "Andrew Bradley", - "email": "cspotcode@gmail.com" - }, - { - "name": "Andrew Krawchyk", - "email": "903716+akrawchyk@users.noreply.github.com" - }, - { - "name": "Andrew Nesbitt", - "email": "andrewnez@gmail.com" - }, - { - "name": "Andrey Popp", - "email": "8mayday@gmail.com" - }, - { - "name": "Andrii Shumada", - "email": "eagleeyes91@gmail.com" - }, - { - "name": "andy matthews", - "email": "andy@commadelimited.com" - }, - { - "name": "Angelica Valenta", - "email": "angelicavalenta@gmail.com" - }, - { - "name": "Anis Safine", - "email": "anis.safine.ext@francetv.fr" - }, - { - "name": "Anish Karandikar", - "email": "anishkny@gmail.com" - }, - { - "name": "Anna Henningsen", - "email": "github@addaleax.net" - }, - { - "name": "Anthony", - "email": "keppi@o2.pl" - }, - { - "name": "Anton", - "email": "anton.redfox@gmail.com" - }, - { - "name": "anton", - "email": "anton.valickij@gmail.com" - }, - { - "name": "APerson", - "email": "danielhglus@gmail.com" - }, - { - "name": "Arian Stolwijk", - "email": "arian@aryweb.nl" - }, - { - "name": "Ariel Mashraki", - "email": "ariel@mashraki.co.il" - }, - { - "name": "Arnaud Brousseau", - "email": "arnaud.brousseau@gmail.com" - }, - { - "name": "Artem Govorov", - "email": "artem.govorov@gmail.com" - }, - { - "name": "Atsuya Takagi", - "email": "asoftonight@gmail.com" - }, - { - "name": "Attila Domokos", - "email": "adomokos@gmail.com" - }, - { - "name": "Austin Birch", - "email": "mraustinbirch@gmail.com" - }, - { - "name": "Avi Vahl", - "email": "avi.vahl@wix.com" - }, - { - "name": "badunk", - "email": "baduncaduncan@gmail.com" - }, - { - "name": "Bamieh", - "email": "ahmadbamieh@gmail.com" - }, - { - "name": "Ben Bradley", - "email": "ben@bradleyit.com" - }, - { - "name": "Ben Glassman", - "email": "benglass@users.noreply.github.com" - }, - { - "name": "Ben Harris", - "email": "benhdev@gmail.com" - }, - { - "name": "Ben Hutchison", - "email": "ben@aldaviva.com" - }, - { - "name": "Ben Lindsey", - "email": "ben.lindsey@vungle.com" - }, - { - "name": "Ben Noordhuis", - "email": "info@bnoordhuis.nl" - }, - { - "name": "Ben Vinegar", - "email": "ben@benv.ca" - }, - { - "name": "Benjamin Eidelman", - "email": "beneidel@gmail.com" - }, - { - "name": "Benjie Gillam", - "email": "benjie@jemjie.com" - }, - { - "name": "Benoit Larroque", - "email": "zeta.ben@gmail.com" - }, - { - "name": "Benoît Zugmeyer", - "email": "bzugmeyer@gmail.com" - }, - { - "name": "Benson Trent", - "email": "bensontrent@gmail.com" - }, - { - "name": "Berker Peksag", - "email": "berker.peksag@gmail.com" - }, - { - "name": "berni", - "email": "berni@extensa.pl" - }, - { - "name": "Bjørge Næss", - "email": "bjoerge@origo.no" - }, - { - "name": "Bjorn Stromberg", - "email": "bjorn@bjornstar.com" - }, - { - "name": "Brendan Nee", - "email": "brendan.nee@gmail.com" - }, - { - "name": "Brian Beck", - "email": "exogen@gmail.com" - }, - { - "name": "Brian Lagerman", - "email": "49239617+brian-lagerman@users.noreply.github.com" - }, - { - "name": "Brian Lalor", - "email": "blalor@bravo5.org" - }, - { - "name": "Brian M. Carlson", - "email": "brian.m.carlson@gmail.com" - }, - { - "name": "Brian Moore", - "email": "guardbionic-github@yahoo.com" - }, - { - "name": "Brian Tomlin", - "email": "tendonstrength@gmail.com" - }, - { - "name": "Brittany Moore", - "email": "moore.brittanyann@gmail.com" - }, - { - "name": "Bryan Donovan", - "email": "bdondo@gmail.com" - }, - { - "name": "Buck Doyle", - "email": "b@chromatin.ca" - }, - { - "name": "C. Scott Ananian", - "email": "cscott@cscott.net" - }, - { - "name": "Callum Macrae", - "email": "callum@macr.ae" - }, - { - "name": "Can Oztokmak", - "email": "can@zeplin.io" - }, - { - "name": "Capacitor Set", - "email": "CapacitorSet@users.noreply.github.com" - }, - { - "name": "Carl-Erik Kopseng", - "email": "carlerik@gmail.com" - }, - { - "name": "Casey Foster", - "email": "casey@caseywebdev.com" - }, - { - "name": "Charles Lowell", - "email": "cowboyd@frontside.io" - }, - { - "name": "Charles Merriam", - "email": "charles.merriam@gmail.com" - }, - { - "name": "Charles Samborski", - "email": "demurgos@demurgos.net" - }, - { - "name": "Charlie Rudolph", - "email": "charles.w.rudolph@gmail.com" - }, - { - "name": "Chen Yangjian", - "email": "252317+cyjake@users.noreply.github.com" - }, - { - "name": "Chris", - "email": "chrisleck@users.noreply.github.com" - }, - { - "name": "Chris Buckley", - "email": "chris@cmbuckley.co.uk" - }, - { - "name": "Chris Lamb", - "email": "chris@chris-lamb.co.uk" - }, - { - "name": "Christian", - "email": "me@rndm.de" - }, - { - "name": "Christoffer Hallas", - "email": "christoffer.hallas@gmail.com" - }, - { - "name": "Christoph Neuroth", - "email": "christoph.neuroth@gmail.com" - }, - { - "name": "Christopher Hiller", - "email": "boneskull@boneskull.com" - }, - { - "name": "ChrisWren", - "email": "cthewren@gmail.com" - }, - { - "name": "claudyus", - "email": "claudyus@HEX.(none)", - "url": "none" - }, - { - "name": "Connor Dunn", - "email": "connorhd@gmail.com" - }, - { - "name": "Corey Butler", - "email": "corey@coreybutler.com" - }, - { - "name": "Corey Farrell", - "email": "git@cfware.com" - }, - { - "name": "Cory Thomas", - "email": "cory.thomas@bazaarvoice.com" - }, - { - "name": "Craig Taub", - "email": "craigtaub@gmail.com" - }, - { - "name": "Cube", - "email": "maty21@gmail.com" - }, - { - "name": "Daniel Ruf", - "email": "827205+DanielRuf@users.noreply.github.com" - }, - { - "name": "Daniel Ruf", - "email": "daniel@daniel-ruf.de" - }, - { - "name": "Daniel St. Jules", - "email": "danielst.jules@gmail.com" - }, - { - "name": "Daniel Stockman", - "email": "daniel.stockman@gmail.com" - }, - { - "name": "Darryl Pogue", - "email": "dvpdiner2@gmail.com" - }, - { - "name": "Dave McKenna", - "email": "davemckenna01@gmail.com" - }, - { - "name": "David da Silva Contín", - "email": "dasilvacontin@gmail.com" - }, - { - "name": "David Henderson", - "email": "david.henderson@triggeredmessaging.com" - }, - { - "name": "David M. Lee", - "email": "leedm777@yahoo.com" - }, - { - "name": "David Neubauer", - "email": "davidneub@gmail.com" - }, - { - "name": "DavidLi119", - "email": "han.david.li@gmail.com" - }, - { - "name": "DavNej", - "email": "davnej.dev@gmail.com" - }, - { - "name": "Denis Bardadym", - "email": "bardadymchik@gmail.com" - }, - { - "name": "Devin Weaver", - "email": "suki@tritarget.org" - }, - { - "name": "dfberry", - "email": "dinaberry@outlook.com" - }, - { - "name": "Di Wu", - "email": "dwu@palantir.com" - }, - { - "name": "Dina Berry", - "email": "dfberry@users.noreply.github.com" - }, - { - "name": "Diogo Monteiro", - "email": "diogo.gmt@gmail.com" - }, - { - "name": "Dmitriy Simushev", - "email": "simushevds@gmail.com" - }, - { - "name": "Dmitry Shirokov", - "email": "deadrunk@gmail.com" - }, - { - "name": "Dmitry Sorin", - "email": "info@staypositive.ru" - }, - { - "name": "Domenic Denicola", - "email": "domenic@domenicdenicola.com" - }, - { - "name": "Dominic Barnes", - "email": "dominic@dbarnes.info" - }, - { - "name": "Dominique Quatravaux", - "email": "dominique@quatravaux.org" - }, - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "eiji.ienaga", - "email": "eiji.ienaga@gmail.com" - }, - { - "name": "elergy", - "email": "elergy@yandex-team.ru" - }, - { - "name": "Eli Skeggs", - "email": "skeggse@users.noreply.github.com" - }, - { - "name": "ELLIOTTCABLE", - "email": "me@ell.io" - }, - { - "name": "Emanuele", - "email": "my.burning@gmail.com" - }, - { - "name": "Enric Pallerols", - "email": "enric@pallerols.cat" - }, - { - "name": "Erik Eng", - "email": "mail@ptz0n.se" - }, - { - "name": "Eugene Tiutiunnyk", - "email": "eugene.tiutiunnyk@lookout.com" - }, - { - "name": "Fabio M. Costa", - "email": "fabiomcosta@gmail.com" - }, - { - "name": "Fábio Santos", - "email": "fabiosantosart@gmail.com" - }, - { - "name": "Fagner Brack", - "email": "github3@fagnermartins.com" - }, - { - "name": "fargies", - "email": "fargies@users.noreply.github.com" - }, - { - "name": "FARKAS Máté", - "email": "mate.farkas@virtual-call-center.eu" - }, - { - "name": "fcrisci", - "email": "fabio.crisci@amadeus.com" - }, - { - "name": "Fede Ramirez", - "email": "i@2fd.me" - }, - { - "name": "Fedor Indutny", - "email": "fedor.indutny@gmail.com" - }, - { - "name": "fengmk2", - "email": "fengmk2@gmail.com" - }, - { - "name": "Fin Chen", - "email": "finfin@gmail.com" - }, - { - "name": "Florian Margaine", - "email": "florian@margaine.com" - }, - { - "name": "FND", - "email": "FND@users.noreply.github.com" - }, - { - "name": "fool2fish", - "email": "fool2fish@gmail.com" - }, - { - "name": "Forbes Lindesay", - "email": "forbes@lindesay.co.uk" - }, - { - "name": "Frank Leon Rose", - "email": "frankleonrose@gmail.com" - }, - { - "name": "Frederico Silva", - "email": "frederico.silva@gmail.com" - }, - { - "name": "Fredrik Enestad", - "email": "fredrik@devloop.se" - }, - { - "name": "Fredrik Lindin", - "email": "fredriklindin@gmail.com" - }, - { - "name": "Fumiaki MATSUSHIMA", - "email": "mtsmfm@gmail.com" - }, - { - "name": "Gabe Gorelick", - "email": "gabegorelick@gmail.com" - }, - { - "name": "Gabriel Silk", - "email": "gabesilk@gmail.com" - }, - { - "name": "Gareth Aye", - "email": "gaye@mozilla.com" - }, - { - "name": "Gareth Murphy", - "email": "gareth.cpm@gmail.com" - }, - { - "name": "Gastón I. Silva", - "email": "givanse@gmail.com" - }, - { - "name": "Gavin Mogan", - "email": "GavinM@airg.com" - }, - { - "name": "gaye", - "email": "gaye@mozilla.com" - }, - { - "name": "gigadude", - "email": "gigadude@users.noreply.github.com" - }, - { - "name": "Giovanni Bassi", - "email": "giggio@giggio.net" - }, - { - "name": "gizemkeser", - "email": "44727928+gizemkeser@users.noreply.github.com" - }, - { - "name": "Glen Huang", - "email": "curvedmark@gmail.com" - }, - { - "name": "Glen Mailer", - "email": "glenjamin@gmail.com" - }, - { - "name": "grasGendarme", - "email": "me@grasgendar.me" - }, - { - "name": "Greg Perkins", - "email": "gregperkins@alum.mit.edu" - }, - { - "name": "Guangcong Luo", - "email": "guangcongluo@gmail.com" - }, - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - }, - { - "name": "Guy Arye", - "email": "arye.guy@gmail.com" - }, - { - "name": "Gyandeep Singh", - "email": "gyandeeps@gmail.com" - }, - { - "name": "Harish", - "email": "hyeluri@gmail.com" - }, - { - "name": "Harry Brundage", - "email": "harry.brundage@gmail.com" - }, - { - "name": "Harry Sarson", - "email": "harry.sarson@hotmail.co.uk" - }, - { - "name": "Harry Wolff", - "email": "hswolff@users.noreply.github.com" - }, - { - "name": "Herman Junge", - "email": "herman@geekli.st" - }, - { - "name": "hokaccha", - "email": "k.hokamura@gmail.com" - }, - { - "name": "Honza Javorek", - "email": "mail@honzajavorek.cz" - }, - { - "name": "Hugo Giraudel", - "email": "hugo.giraudel@gmail.com" - }, - { - "name": "Ian Storm Taylor", - "email": "ian@ianstormtaylor.com" - }, - { - "name": "Ian W. Remmel", - "email": "design@ianwremmel.com" - }, - { - "name": "Ian Young", - "email": "ian.greenleaf@gmail.com" - }, - { - "name": "Ian Zamojc", - "email": "ian@thesecretlocation.net" - }, - { - "name": "Igwe Kalu", - "email": "igwe.kalu@live.com" - }, - { - "name": "ImgBot", - "email": "31427850+ImgBotApp@users.noreply.github.com" - }, - { - "name": "inxorable", - "email": "inxorable@codewren.ch" - }, - { - "name": "Ivan", - "email": "ivan@kinvey.com" - }, - { - "name": "Jaakko Salonen", - "email": "jaakko.salonen@iki.fi" - }, - { - "name": "Jacob Wejendorp", - "email": "jacob@wejendorp.dk" - }, - { - "name": "Jake Craige", - "email": "james.craige@gmail.com" - }, - { - "name": "Jake Marsh", - "email": "jakemmarsh@gmail.com" - }, - { - "name": "Jakob Krigovsky", - "email": "jakob@krigovsky.com" - }, - { - "name": "Jakub Nešetřil", - "email": "jakub@apiary.io" - }, - { - "name": "James Bowes", - "email": "jbowes@repl.ca" - }, - { - "name": "James Carr", - "email": "james.r.carr@gmail.com" - }, - { - "name": "James D. Rogers", - "email": "jd2rogers2@gmail.com" - }, - { - "name": "James G. Kim", - "email": "jgkim@jayg.org" - }, - { - "name": "James Lal", - "email": "james@lightsofapollo.com" - }, - { - "name": "James Nylen", - "email": "jnylen@gmail.com" - }, - { - "name": "Jan Kopriva", - "email": "jan.kopriva@gooddata.com" - }, - { - "name": "Jan Krems", - "email": "jan.krems@groupon.com" - }, - { - "name": "Jan Lehnardt", - "email": "jan@apache.org" - }, - { - "name": "Jason Barry", - "email": "jay@jcbarry.com" - }, - { - "name": "Jason Lai", - "email": "jason@getpebble.com" - }, - { - "name": "Jason Leyba", - "email": "jmleyba@gmail.com" - }, - { - "name": "Javier Aranda", - "email": "javierav@javierav.com" - }, - { - "name": "Jayasankar", - "email": "jayasankar.m@gmail.com" - }, - { - "name": "Jean Ponchon", - "email": "gelule@gmail.com" - }, - { - "name": "Jeff Kunkle", - "email": "jeff.kunkle@nearinfinity.com" - }, - { - "name": "Jeff Schilling", - "email": "jeff.schilling@q2ebanking.com" - }, - { - "name": "JeongHoon Byun", - "email": "outsideris@gmail.com", - "url": "aka Outsider" - }, - { - "name": "Jérémie Astori", - "email": "jeremie@astori.fr" - }, - { - "name": "Jeremy Martin", - "email": "jmar777@gmail.com" - }, - { - "name": "Jerry Muzsik", - "email": "jerrymuzsik@icloud.com" - }, - { - "name": "Jesse Dailey", - "email": "jesse.dailey@gmail.com" - }, - { - "name": "jimenglish81", - "email": "jimenglish81@gmail.com" - }, - { - "name": "Jimmy Cuadra", - "email": "jimmy@jimmycuadra.com" - }, - { - "name": "Jo Liss", - "email": "joliss42@gmail.com" - }, - { - "name": "Joao Moreno", - "email": "mail@joaomoreno.com" - }, - { - "name": "Joel Kemp", - "email": "mrjoelkemp@gmail.com" - }, - { - "name": "Joey Cozza", - "email": "joey@grow.com" - }, - { - "name": "John Doty", - "email": "jrhdoty@gmail.com" - }, - { - "name": "John Firebaugh", - "email": "john.firebaugh@gmail.com" - }, - { - "name": "John Reeves", - "email": "github@jonnyreeves.co.uk" - }, - { - "name": "Johnathon Sanders", - "email": "outdooricon@gmail.com" - }, - { - "name": "Jon Surrell", - "email": "jon.surrell@automattic.com" - }, - { - "name": "Jonas Dohse", - "email": "jonas@mbr-targeting.com" - }, - { - "name": "Jonas Westerlund", - "email": "jonas.westerlund@me.com" - }, - { - "name": "Jonathan Creamer", - "email": "matrixhasyou2k4@gmail.com" - }, - { - "name": "Jonathan Delgado", - "email": "jdelgado@rewip.com" - }, - { - "name": "Jonathan Kim", - "email": "jkimbo@gmail.com" - }, - { - "name": "Jonathan Ong", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "Jonathan Park", - "email": "jpark@daptiv.com" - }, - { - "name": "Jonathan Rajavuori", - "email": "jrajav@gmail.com" - }, - { - "name": "Jordan Sexton", - "email": "jordan@jordansexton.com" - }, - { - "name": "Joseph Lin", - "email": "josephlin55555@gmail.com" - }, - { - "name": "Josh Eversmann", - "email": "josh.eversmann@gmail.com" - }, - { - "name": "Josh Lory", - "email": "josh.lory@code.org" - }, - { - "name": "Josh Soref", - "email": "jsoref@users.noreply.github.com" - }, - { - "name": "Joshua Appelman", - "email": "jappelman@xebia.com" - }, - { - "name": "Joshua Krall", - "email": "joshuakrall@pobox.com" - }, - { - "name": "JP Bochi", - "email": "jpbochi@gmail.com" - }, - { - "name": "jsdevel", - "email": "js.developer.undefined@gmail.com" - }, - { - "name": "Juerg B", - "email": "44573692+juergba@users.noreply.github.com" - }, - { - "name": "juergba", - "email": "filodron@gmail.com" - }, - { - "name": "Julien Wajsberg", - "email": "felash@gmail.com" - }, - { - "name": "Jupp Müller", - "email": "jupp0r@gmail.com" - }, - { - "name": "Jussi Virtanen", - "email": "jussi.k.virtanen@gmail.com" - }, - { - "name": "Justin DuJardin", - "email": "justin.dujardin@sococo.com" - }, - { - "name": "Juzer Ali", - "email": "er.juzerali@gmail.com" - }, - { - "name": "Katie Gengler", - "email": "katiegengler@gmail.com" - }, - { - "name": "kavun", - "email": "kevin.a.reed@gmail.com" - }, - { - "name": "Kazuhito Hokamura", - "email": "k.hokamura@gmail.com" - }, - { - "name": "Keith Cirkel", - "email": "github@keithcirkel.co.uk" - }, - { - "name": "Kelong Wang", - "email": "buaawkl@gmail.com" - }, - { - "name": "Kent C. Dodds", - "email": "kent+github@doddsfamily.us" - }, - { - "name": "Kevin Burke", - "email": "kev@inburke.com" - }, - { - "name": "Kevin Conway", - "email": "kevinjacobconway@gmail.com" - }, - { - "name": "Kevin Kirsche", - "email": "Kev.Kirsche+GitHub@gmail.com" - }, - { - "name": "Kevin Partington", - "email": "platinum.azure@kernelpanicstudios.com" - }, - { - "name": "Kevin Wang", - "email": "kevin@fossa.io" - }, - { - "name": "Kirill Korolyov", - "email": "kirill.korolyov@gmail.com" - }, - { - "name": "klaemo", - "email": "klaemo@fastmail.fm" - }, - { - "name": "Koen Punt", - "email": "koen@koenpunt.nl" - }, - { - "name": "Konstantin Käfer", - "email": "github@kkaefer.com" - }, - { - "name": "Kris Rasmussen", - "email": "kristopher.rasmussen@gmail.com" - }, - { - "name": "Kunal Nagpal", - "email": "kunagpal@users.noreply.github.com" - }, - { - "name": "Kyle Mitchell", - "email": "kyle@kemitchell.com" - }, - { - "name": "lakmeer", - "email": "lakmeerkravid@gmail.com" - }, - { - "name": "Lane Kelly", - "email": "lanekelly16@gmail.com" - }, - { - "name": "László Bácsi", - "email": "lackac@lackac.hu" - }, - { - "name": "Laurence Rowe", - "email": "lrowe@netflix.com" - }, - { - "name": "Liam Newman", - "email": "bitwiseman@gmail.com" - }, - { - "name": "Linus Unnebäck", - "email": "linus@folkdatorn.se" - }, - { - "name": "lodr", - "email": "salva@unoyunodiez.com" - }, - { - "name": "Long Ho", - "email": "longlho@users.noreply.github.com" - }, - { - "name": "Maciej Małecki", - "email": "maciej.malecki@notimplemented.org" - }, - { - "name": "Mal Graty", - "email": "mal.graty@googlemail.com" - }, - { - "name": "Marais Rossouw", - "email": "me@maraisr.com" - }, - { - "name": "Marc Kuo", - "email": "kuomarc2@gmail.com" - }, - { - "name": "Marc Udoff", - "email": "mlucool@gmail.com" - }, - { - "name": "Marcello Bastea-Forte", - "email": "marcello@cellosoft.com" - }, - { - "name": "Mark Banner", - "email": "standard8@mozilla.com" - }, - { - "name": "Mark Owsiak", - "email": "mark.owsiak@gmail.com" - }, - { - "name": "Markus Tacker", - "email": "m@coderbyheart.com" - }, - { - "name": "Martijn Cuppens", - "email": "martijn.cuppens@intracto.com" - }, - { - "name": "Martin Marko", - "email": "marcus@gratex.com" - }, - { - "name": "Mathieu Desvé", - "email": "mathieudesve@MacBook-Pro-de-Mathieu.local" - }, - { - "name": "Matija Marohnić", - "email": "matija.marohnic@gmail.com" - }, - { - "name": "Matt Bierner", - "email": "mattbierner@gmail.com" - }, - { - "name": "Matt Giles", - "email": "matt.giles@cerner.com" - }, - { - "name": "Matt Robenolt", - "email": "matt@ydekproductions.com" - }, - { - "name": "Matt Smith", - "email": "matthewgarysmith@gmail.com" - }, - { - "name": "Matthew Shanley", - "email": "matthewshanley@littlesecretsrecords.com" - }, - { - "name": "Mattias Tidlund", - "email": "mattias.tidlund@learningwell.se" - }, - { - "name": "Max Goodman", - "email": "c@chromakode.com" - }, - { - "name": "Maximilian Antoni", - "email": "mail@maxantoni.de" - }, - { - "name": "Merrick Christensen", - "email": "merrick.christensen@gmail.com" - }, - { - "name": "Michael Demmer", - "email": "demmer@jut.io" - }, - { - "name": "Michael Jackson", - "email": "mjijackson@gmail.com" - }, - { - "name": "Michael Olson", - "email": "mwolson@member.fsf.org" - }, - { - "name": "Michael Riley", - "email": "michael.riley@autodesk.com" - }, - { - "name": "Michael Schoonmaker", - "email": "michael.r.schoonmaker@gmail.com" - }, - { - "name": "Michal Charemza", - "email": "michalcharemza@gmail.com" - }, - { - "name": "Michiel de Jong", - "email": "michiel@unhosted.org" - }, - { - "name": "Mick Brooks", - "email": "mick.brooks@sinking.in" - }, - { - "name": "Mike Pennisi", - "email": "mike@mikepennisi.com" - }, - { - "name": "Mislav Marohnić", - "email": "mislav.marohnic@gmail.com" - }, - { - "name": "monowerker", - "email": "monowerker@gmail.com" - }, - { - "name": "Moshe Kolodny", - "email": "mkolodny@integralads.com" - }, - { - "name": "mrShturman", - "email": "mrshturman@gmail.com" - }, - { - "name": "Nathan Alderson", - "email": "nathan.alderson@adtran.com" - }, - { - "name": "Nathan Black", - "email": "nathan@nathanblack.org" - }, - { - "name": "Nathan Bowser", - "email": "nathan.bowser@spiderstrategies.com" - }, - { - "name": "Nathan Houle", - "email": "nathan@nathanhoule.com" - }, - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net" - }, - { - "name": "nexdrew", - "email": "andrew.goode@nextraq.com" - }, - { - "name": "Nick Fitzgerald", - "email": "fitzgen@gmail.com" - }, - { - "name": "Nicolas Girault", - "email": "nic.girault@gmail.com" - }, - { - "name": "Nicolo Taddei", - "email": "taddei.uk@gmail.com" - }, - { - "name": "Nik Nyby", - "email": "nnyby@columbia.edu" - }, - { - "name": "Nikolaos Georgiou", - "email": "Nikolaos.Georgiou@gmail.com" - }, - { - "name": "nishigori", - "email": "Takuya_Nishigori@voyagegroup.com" - }, - { - "name": "Noshir Patel", - "email": "nosh@blackpiano.com" - }, - { - "name": "not-an-aardvark", - "email": "not-an-aardvark@users.noreply.github.com" - }, - { - "name": "OlegTsyba", - "email": "oleg.tsyba.ua@gmail.com" - }, - { - "name": "olsonpm", - "email": "olsonpm@users.noreply.github.com" - }, - { - "name": "omardelarosa", - "email": "thedelarosa@gmail.com" - }, - { - "name": "Oscar Godson", - "email": "oscargodson@outlook.com" - }, - { - "name": "Outsider", - "email": "outsideris@gmail.com" - }, - { - "name": "oveddan", - "email": "stangogh@gmail.com" - }, - { - "name": "P. Roebuck", - "email": "plroebuck@users.noreply.github.com" - }, - { - "name": "Panu Horsmalahti", - "email": "panu.horsmalahti@iki.fi" - }, - { - "name": "Parker Moore", - "email": "parkrmoore@gmail.com" - }, - { - "name": "Pascal", - "email": "pascal@pascal.com" - }, - { - "name": "Pat Finnigan", - "email": "patrick.k.finnigan@gmail.com" - }, - { - "name": "Paul Armstrong", - "email": "paul@paularmstrongdesigns.com" - }, - { - "name": "Paul Miller", - "email": "paul@paulmillr.com" - }, - { - "name": "Paul Roebuck", - "email": "plroebuck@users.noreply.github.com" - }, - { - "name": "Pavel Zubkou", - "email": "pavel.zubkou@gmail.com" - }, - { - "name": "Pete Hawkins", - "email": "pete@petes-imac.frontinternal.net" - }, - { - "name": "Peter Müller", - "email": "munter@fumle.dk" - }, - { - "name": "Peter Rust", - "email": "peter@cornerstonenw.com" - }, - { - "name": "Phil Sung", - "email": "psung@dnanexus.com" - }, - { - "name": "Philip M. White", - "email": "philip@mailworks.org" - }, - { - "name": "Piotr Kuczynski", - "email": "piotr.kuczynski@gmail.com" - }, - { - "name": "PoppinL", - "email": "poppinlp@gmail.com" - }, - { - "name": "Poprádi Árpád", - "email": "popradi.arpad11@gmail.com" - }, - { - "name": "Prayag Verma", - "email": "prayag.verma@gmail.com" - }, - { - "name": "qiuzuhui", - "email": "qiuzuhui@users.noreply.github.com" - }, - { - "name": "Quang Van", - "email": "quangvvv@gmail.com" - }, - { - "name": "Quanlong He", - "email": "kyan.ql.he@gmail.com" - }, - { - "name": "R56", - "email": "rviskus@gmail.com" - }, - { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - { - "name": "Refael Ackermann", - "email": "refael@empeeric.com" - }, - { - "name": "Rich Trott", - "email": "rtrott@gmail.com" - }, - { - "name": "Richard Dingwall", - "email": "rdingwall@gmail.com" - }, - { - "name": "Richard Knop", - "email": "RichardKnop@users.noreply.github.com" - }, - { - "name": "Rico Sta. Cruz", - "email": "rstacruz@users.noreply.github.com" - }, - { - "name": "rmacklin", - "email": "richard.github@nrm.com" - }, - { - "name": "Rob Loach", - "email": "robloach@gmail.com" - }, - { - "name": "Rob Raux", - "email": "rraux@peachworks.com" - }, - { - "name": "Rob Wu", - "email": "rob@robwu.nl" - }, - { - "name": "Robert Rossmann", - "email": "rr.rossmann@me.com" - }, - { - "name": "Romain Prieto", - "email": "romain.prieto@gmail.com" - }, - { - "name": "Roman Neuhauser", - "email": "rneuhauser@suse.cz" - }, - { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "Ross Warren", - "email": "rosswarren4@gmail.com" - }, - { - "name": "rotemdan", - "email": "rotemdan@gmail.com" - }, - { - "name": "Russ Bradberry", - "email": "devdazed@me.com" - }, - { - "name": "Russell Munson", - "email": "rmunson@github.com" - }, - { - "name": "Rustem Mustafin", - "email": "mustafin.rustem@gmail.com" - }, - { - "name": "Ryan Hubbard", - "email": "ryanmhubbard@gmail.com" - }, - { - "name": "Ryan Shaw", - "email": "ryan.shaw@min.vc" - }, - { - "name": "Ryan Tablada", - "email": "ryan.tablada@gmail.com" - }, - { - "name": "Ryunosuke SATO", - "email": "tricknotes.rs@gmail.com" - }, - { - "name": "ryym", - "email": "ryym.64@gmail.com" - }, - { - "name": "Salehen Shovon Rahman", - "email": "salehen.rahman@gmail.com" - }, - { - "name": "Sam Mussell", - "email": "smussell@gmail.com" - }, - { - "name": "samuel goldszmidt", - "email": "samuel.goldszmidt@gmail.com" - }, - { - "name": "sarehag", - "email": "joakim.sarehag@gmail.com" - }, - { - "name": "Sasha Koss", - "email": "koss@nocorp.me" - }, - { - "name": "Scott Kao", - "email": "Scottkao85@users.noreply.github.com" - }, - { - "name": "Scott Santucci", - "email": "ScottFreeCode@users.noreply.github.com" - }, - { - "name": "ScottFreeCode", - "email": "ScottFreeCode@users.noreply.github.com" - }, - { - "name": "Sean Lang", - "email": "slang800@gmail.com" - }, - { - "name": "Sebastian Van Sande", - "email": "sebastian@vansande.org" - }, - { - "name": "sebv", - "email": "seb.vincent@gmail.com" - }, - { - "name": "Seiya Konno", - "email": "nulltask@gmail.com" - }, - { - "name": "Sergey Simonchik", - "email": "sergey.simonchik@jetbrains.com" - }, - { - "name": "Sergio Santoro", - "email": "santoro.srg@gmail.com" - }, - { - "name": "Shaine Hatch", - "email": "shaine@squidtree.com" - }, - { - "name": "Shawn Krisman", - "email": "telaviv@github" - }, - { - "name": "Shinnosuke Watanabe", - "email": "snnskwtnb@gmail.com" - }, - { - "name": "silentcloud", - "email": "rjmuqiang@gmail.com" - }, - { - "name": "Silvio Massari", - "email": "silvio.massari@auth0.com" - }, - { - "name": "Simon Gaeremynck", - "email": "gaeremyncks@gmail.com" - }, - { - "name": "Simon Goumaz", - "email": "simon@attentif.ch" - }, - { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - }, - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "Slobodan Mišković", - "email": "slobodan@miskovic.ca" - }, - { - "name": "slyg", - "email": "syl.faucherand@gmail.com" - }, - { - "name": "Soel", - "email": "shachar.soel@sap.com" - }, - { - "name": "solodynamo", - "email": "bittuf3@gmail.com" - }, - { - "name": "Sorin Iclanzan", - "email": "sorin@iclanzan.com" - }, - { - "name": "Standa Opichal", - "email": "opichals@gmail.com" - }, - { - "name": "startswithaj", - "email": "jake.mc@icloud.com" - }, - { - "name": "Stephen Hess", - "email": "trescube@users.noreply.github.com" - }, - { - "name": "Stephen Mathieson", - "email": "smath23@gmail.com" - }, - { - "name": "Steve Mason", - "email": "stevem@brandwatch.com" - }, - { - "name": "Stewart Taylor", - "email": "stewart.taylor1@gmail.com" - }, - { - "name": "Stone", - "email": "baoshi.li@adleida.com" - }, - { - "name": "Sulabh Bista", - "email": "sul4bh@gmail.com" - }, - { - "name": "Sune Simonsen", - "email": "sune@we-knowhow.dk" - }, - { - "name": "Svetlana", - "email": "39729453+Lana-Light@users.noreply.github.com" - }, - { - "name": "Sylvain", - "email": "sstephant+github@gmail.com" - }, - { - "name": "Sylvester Keil", - "email": "sylvester@keil.or.at" - }, - { - "name": "Szauka", - "email": "33459309+Szauka@users.noreply.github.com" - }, - { - "name": "Tapiwa Kelvin", - "email": "tapiwa@munzwa.tk" - }, - { - "name": "Ted Yavuzkurt", - "email": "hello@TedY.io" - }, - { - "name": "Teddy Zeenny", - "email": "teddyzeenny@gmail.com" - }, - { - "name": "tgautier@yahoo.com", - "email": "tgautier@gmail.com" - }, - { - "name": "Thedark1337", - "email": "thedark1337@thedark1337.com" - }, - { - "name": "Thomas Broadley", - "email": "buriedunderbooks@hotmail.com" - }, - { - "name": "Thomas Grainger", - "email": "tagrain@gmail.com" - }, - { - "name": "Thomas Scholtes", - "email": "thomas-scholtes@gmx.de" - }, - { - "name": "Thomas Vantuycom", - "email": "thomasvantuycom@protonmail.com" - }, - { - "name": "Tim Ehat", - "email": "timehat@gmail.com" - }, - { - "name": "Tim Harshman", - "email": "goteamtim+git@gmail.com" - }, - { - "name": "Timo Tijhof", - "email": "krinklemail@gmail.com" - }, - { - "name": "Timothy Gu", - "email": "timothygu99@gmail.com" - }, - { - "name": "Tingan Ho", - "email": "tingan87@gmail.com" - }, - { - "name": "tmont", - "email": "tommy.mont@gmail.com" - }, - { - "name": "Tobias Bieniek", - "email": "tobias.bieniek@gmail.com" - }, - { - "name": "Tobias Mollstam", - "email": "tobias@mollstam.com" - }, - { - "name": "Todd Agulnick", - "email": "tagulnick@onjack.com" - }, - { - "name": "Tom Coquereau", - "email": "tom@thau.me" - }, - { - "name": "Tom Hughes", - "email": "tom@compton.nu" - }, - { - "name": "Tomer Eskenazi", - "email": "tomer.eskenazi@ironsrc.com" - }, - { - "name": "toyjhlee", - "email": "toyjhlee@gmail.com" - }, - { - "name": "traleig1", - "email": "darkphoenix739@gmail.com" - }, - { - "name": "Travis Jeffery", - "email": "tj@travisjeffery.com" - }, - { - "name": "tripu", - "email": "t@tripu.info" - }, - { - "name": "Tyson Tate", - "email": "tyson@tysontate.com" - }, - { - "name": "Vadim Nikitin", - "email": "vnikiti@ncsu.edu" - }, - { - "name": "Valentin Agachi", - "email": "github-com@agachi.name" - }, - { - "name": "Valeri Karpov", - "email": "val@karpov.io" - }, - { - "name": "Victor", - "email": "victor@turo.com" - }, - { - "name": "Victor Costan", - "email": "costan@gmail.com" - }, - { - "name": "Ville Saukkonen", - "email": "villesau@users.noreply.github.com" - }, - { - "name": "Vivek Ganesan", - "email": "caliberoviv@gmail.com" - }, - { - "name": "vlad", - "email": "iamvlad@gmail.com" - }, - { - "name": "Vlad Magdalin", - "email": "vlad@webflow.com" - }, - { - "name": "Volker Buzek", - "email": "volker.buzek@sap.com" - }, - { - "name": "Wanseob Lim", - "email": "email@wanseob.com" - }, - { - "name": "Wil Moore III", - "email": "wil.moore@wilmoore.com" - }, - { - "name": "Will Langstroth", - "email": "will@langstroth.com" - }, - { - "name": "wsw", - "email": "wsw0108@gmail.com" - }, - { - "name": "Xavier Antoviaque", - "email": "xavier@antoviaque.org" - }, - { - "name": "Xavier Damman", - "email": "xdamman@gmail.com" - }, - { - "name": "XhmikosR", - "email": "xhmikosr@gmail.com" - }, - { - "name": "XhmikosR", - "email": "xhmikosr@users.sourceforge.net" - }, - { - "name": "Yanis Wang", - "email": "yanis.wang@gmail.com" - }, - { - "name": "yehiyam", - "email": "yehiyam@users.noreply.github.com" - }, - { - "name": "Yoshiya Hinosawa", - "email": "hinosawa@waku-2.com" - }, - { - "name": "Yuest Wang", - "email": "yuestwang@gmail.com" - }, - { - "name": "yuitest", - "email": "yuitest@cjhat.net" - }, - { - "name": "zhiyelee", - "email": "zhiyelee@gmail.com" - }, - { - "name": "Zsolt Takács", - "email": "zsolt@takacs.cc" - }, - { - "name": "现充", - "email": "qixiang.cqx@alibaba-inc.com" - } - ], "dependencies": { - "ansi-colors": "3.2.3", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" }, - "description": "simple, flexible, fun test framework", "devDependencies": { - "@11ty/eleventy": "^0.8.3", - "@mocha/contributors": "^1.0.4", - "@mocha/docdash": "^2.1.1", - "assetgraph-builder": "^6.10.1", - "autoprefixer": "^9.6.0", - "browserify": "^16.2.3", - "browserify-package-json": "^1.0.1", - "chai": "^4.2.0", - "coffee-script": "^1.12.7", - "coveralls": "^3.0.3", - "cross-env": "^5.2.0", - "cross-spawn": "^6.0.5", - "eslint": "^5.16.0", - "eslint-config-prettier": "^3.6.0", - "eslint-config-semistandard": "^13.0.0", - "eslint-config-standard": "^12.0.0", - "eslint-plugin-import": "^2.17.3", - "eslint-plugin-node": "^8.0.1", - "eslint-plugin-prettier": "^3.1.0", - "eslint-plugin-promise": "^4.1.1", - "eslint-plugin-standard": "^4.0.0", - "fs-extra": "^8.0.1", - "husky": "^1.3.1", - "jsdoc": "^3.6.2", - "karma": "^4.1.0", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", + "@11ty/eleventy": "^1.0.0", + "@11ty/eleventy-plugin-inclusive-language": "^1.0.3", + "@babel/eslint-parser": "^7.19.1", + "@mocha/docdash": "^4.0.1", + "@rollup/plugin-commonjs": "^21.0.2", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.0.1", + "@rollup/plugin-node-resolve": "^13.1.3", + "assetgraph-builder": "^9.0.0", + "autoprefixer": "^9.8.6", + "canvas": "^2.9.0", + "chai": "^4.3.4", + "coffeescript": "^2.6.1", + "coveralls": "^3.1.1", + "cross-env": "^7.0.2", + "eslint": "^8.24.0", + "eslint-config-prettier": "^8.3.0", + "eslint-config-semistandard": "^17.0.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.24.2", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.0.1", + "fail-on-errors-webpack-plugin": "^3.0.0", + "fs-extra": "^10.0.0", + "husky": "^4.2.5", + "hyperlink": "^5.0.4", + "jsdoc": "^3.6.7", + "jsdoc-ts-utils": "^2.0.1", + "karma": "^6.3.11", + "karma-chrome-launcher": "^3.1.0", + "karma-mocha": "^2.0.1", "karma-mocha-reporter": "^2.2.5", - "karma-sauce-launcher": "^2.0.2", - "lint-staged": "^8.1.7", - "markdown-it": "^8.4.2", - "markdown-it-anchor": "^5.2.4", - "markdown-it-attrs": "^2.4.1", - "markdown-it-prism": "^2.0.2", - "markdown-magic": "^0.1.25", - "markdown-magic-package-json": "^2.0.0", + "karma-sauce-launcher": "^4.3.6", + "lint-staged": "^10.2.11", + "markdown-it": "^12.3.2", + "markdown-it-anchor": "^8.4.1", + "markdown-it-attrs": "^4.1.3", + "markdown-it-emoji": "^2.0.0", + "markdown-it-prism": "^2.2.2", "markdown-toc": "^1.2.0", - "markdownlint-cli": "^0.14.1", - "nps": "^5.9.5", - "nyc": "^14.1.1", - "prettier": "^1.17.1", - "remark": "^10.0.1", - "remark-github": "^7.0.6", - "remark-inline-links": "^3.1.2", - "rewiremock": "^3.13.7", - "rimraf": "^2.6.3", - "sinon": "^7.3.2", - "strip-ansi": "^5.2.0", - "svgo": "^1.2.2", - "through2": "^3.0.1", - "to-vfile": "^5.0.3", - "unexpected": "^10.40.2", - "unexpected-eventemitter": "^1.1.3", + "markdownlint-cli": "^0.30.0", + "needle": "^2.5.0", + "nps": "^5.10.0", + "nyc": "^15.1.0", + "pidtree": "^0.5.0", + "prettier": "^2.4.1", + "remark": "^14.0.2", + "remark-github": "^11.2.2", + "remark-inline-links": "^6.0.1", + "rewiremock": "^3.14.3", + "rimraf": "^3.0.2", + "rollup": "^2.70.1", + "rollup-plugin-node-globals": "^1.4.0", + "rollup-plugin-polyfill-node": "^0.8.0", + "rollup-plugin-visualizer": "^5.6.0", + "sinon": "^9.0.3", + "strip-ansi": "^6.0.0", + "svgo": "^1.3.2", + "touch": "^3.1.0", + "unexpected": "^11.14.0", + "unexpected-eventemitter": "^2.2.0", + "unexpected-map": "^2.0.0", + "unexpected-set": "^3.0.0", "unexpected-sinon": "^10.11.2", + "update-notifier": "^4.1.0", "uslug": "^1.0.4", - "watchify": "^3.11.1" - }, - "directories": { - "lib": "./lib", - "test": "./test" - }, - "engines": { - "node": ">= 6.0.0" + "uuid": "^8.3.0", + "webpack": "^5.67.0", + "webpack-cli": "^4.9.1" }, "files": [ - "bin/{*mocha,options.js}", - "assets/growl/*.png", + "bin/*mocha*", "lib/**/*.{js,html,json}", "index.js", "mocha.css", "mocha.js", + "mocha.js.map", "browser-entry.js" ], - "gitter": "https://gitter.im/mochajs/mocha", - "homepage": "https://mochajs.org/", - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } + "browser": { + "./index.js": "./browser-entry.js", + "fs": false, + "path": false, + "supports-color": false, + "./lib/nodejs/buffered-worker-pool.js": false, + "./lib/nodejs/esm-utils.js": false, + "./lib/nodejs/file-unloader.js": false, + "./lib/nodejs/parallel-buffered-runner.js": false, + "./lib/nodejs/serializer.js": false, + "./lib/nodejs/worker.js": false, + "./lib/nodejs/reporters/parallel-buffered.js": false, + "./lib/cli/index.js": false }, - "keywords": [ - "mocha", - "test", - "bdd", - "tdd", - "tap" - ], - "license": "MIT", - "logo": "https://cldup.com/S9uQ-cOLYz.svg", - "name": "mocha", - "notifyLogo": "https://ibin.co/4QuRuGjXvl36.png", "prettier": { - "singleQuote": true, + "arrowParens": "avoid", "bracketSpacing": false, - "endOfLine": "auto" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mochajs/mocha.git" - }, - "scripts": { - "prepublishOnly": "nps test clean build", - "start": "nps", - "test": "nps test", - "version": "nps version" + "endOfLine": "auto", + "singleQuote": true, + "trailingComma": "none" }, - "version": "6.2.0" + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + } } diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js index 72297501..ea734fb7 100644 --- a/node_modules/ms/index.js +++ b/node_modules/ms/index.js @@ -23,12 +23,12 @@ var y = d * 365.25; * @api public */ -module.exports = function(val, options) { +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) { + } else if (type === 'number' && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( @@ -50,7 +50,7 @@ function parse(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( + var match = /^(-?(?:\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) { diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md index 69b61253..fa5d39b6 100644 --- a/node_modules/ms/license.md +++ b/node_modules/ms/license.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Zeit, Inc. +Copyright (c) 2020 Vercel, 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 diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json index 46372ede..49971890 100644 --- a/node_modules/ms/package.json +++ b/node_modules/ms/package.json @@ -1,46 +1,16 @@ { - "_args": [ - [ - "ms@2.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "ms@2.1.1", - "_id": "ms@2.1.1", - "_inBundle": false, - "_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "_location": "/ms", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ms@2.1.1", - "name": "ms", - "escapedName": "ms", - "rawSpec": "2.1.1", - "saveSpec": null, - "fetchSpec": "2.1.1" - }, - "_requiredBy": [ - "/@babel/traverse/debug", - "/debug", - "/istanbul-lib-source-maps/debug", - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "_spec": "2.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "bugs": { - "url": "https://github.com/zeit/ms/issues" - }, + "name": "ms", + "version": "2.1.3", "description": "Tiny millisecond conversion utility", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" + "repository": "vercel/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" }, "eslintConfig": { "extends": "eslint:recommended", @@ -49,11 +19,6 @@ "es6": true } }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/zeit/ms#readme", - "license": "MIT", "lint-staged": { "*.js": [ "npm run lint", @@ -61,16 +26,13 @@ "git add" ] }, - "main": "./index", - "name": "ms", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/ms.git" - }, - "scripts": { - "lint": "eslint lib/* bin/*", - "precommit": "lint-staged", - "test": "mocha tests.js" - }, - "version": "2.1.1" + "license": "MIT", + "devDependencies": { + "eslint": "4.18.2", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1", + "prettier": "2.0.5" + } } diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md index bb767293..0fc1abb3 100644 --- a/node_modules/ms/readme.md +++ b/node_modules/ms/readme.md @@ -1,7 +1,6 @@ # ms -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) +![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) Use this package to easily convert various time formats to milliseconds. diff --git a/node_modules/nice-try/CHANGELOG.md b/node_modules/nice-try/CHANGELOG.md deleted file mode 100644 index 9e6baf2f..00000000 --- a/node_modules/nice-try/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -## [1.0.5] - 2018-08-25 - -### Changed - -- Removed `prepublish` script from `package.json` - -## [1.0.4] - 2017-08-08 - -### New - -- Added a changelog - -### Changed - -- Ignore `yarn.lock` and `package-lock.json` files \ No newline at end of file diff --git a/node_modules/nice-try/LICENSE b/node_modules/nice-try/LICENSE deleted file mode 100644 index 681c8f50..00000000 --- a/node_modules/nice-try/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Tobias Reich - -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/nice-try/README.md b/node_modules/nice-try/README.md deleted file mode 100644 index 5b83b788..00000000 --- a/node_modules/nice-try/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# nice-try - -[![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/) - -A function that tries to execute a function and discards any error that occurs. - -## Install - -``` -npm install nice-try -``` - -## Usage - -```js -const niceTry = require('nice-try') - -niceTry(() => JSON.parse('true')) // true -niceTry(() => JSON.parse('truee')) // undefined -niceTry() // undefined -niceTry(true) // undefined -``` - -## API - -### Parameters - -- `fn` `{Function}` Function that might or might not throw an error. - -### Returns - -- `{?*}` Return-value of the function when no error occurred. \ No newline at end of file diff --git a/node_modules/nice-try/package.json b/node_modules/nice-try/package.json deleted file mode 100644 index 16848381..00000000 --- a/node_modules/nice-try/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_args": [ - [ - "nice-try@1.0.5", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "nice-try@1.0.5", - "_id": "nice-try@1.0.5", - "_inBundle": false, - "_integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "_location": "/nice-try", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "nice-try@1.0.5", - "name": "nice-try", - "escapedName": "nice-try", - "rawSpec": "1.0.5", - "saveSpec": null, - "fetchSpec": "1.0.5" - }, - "_requiredBy": [ - "/cross-spawn" - ], - "_resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "_spec": "1.0.5", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "authors": [ - "Tobias Reich " - ], - "bugs": { - "url": "https://github.com/electerious/nice-try/issues" - }, - "description": "Tries to execute a function and discards any error that occurs", - "devDependencies": { - "chai": "^4.1.2", - "coveralls": "^3.0.0", - "mocha": "^5.1.1", - "nyc": "^12.0.1" - }, - "files": [ - "src" - ], - "homepage": "https://github.com/electerious/nice-try", - "keywords": [ - "try", - "catch", - "error" - ], - "license": "MIT", - "main": "src/index.js", - "name": "nice-try", - "repository": { - "type": "git", - "url": "git+https://github.com/electerious/nice-try.git" - }, - "scripts": { - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "nyc node_modules/mocha/bin/_mocha" - }, - "version": "1.0.5" -} diff --git a/node_modules/nice-try/src/index.js b/node_modules/nice-try/src/index.js deleted file mode 100644 index 837506f2..00000000 --- a/node_modules/nice-try/src/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -/** - * Tries to execute a function and discards any error that occurs. - * @param {Function} fn - Function that might or might not throw an error. - * @returns {?*} Return-value of the function when no error occurred. - */ -module.exports = function(fn) { - - try { return fn() } catch (e) {} - -} \ No newline at end of file diff --git a/node_modules/node-environment-flags/README.md b/node_modules/node-environment-flags/README.md deleted file mode 100644 index 20c4c3df..00000000 --- a/node_modules/node-environment-flags/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# node-environment-flags - -> Polyfill/shim for `process.allowedNodeEnvironmentFlags` - -[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) - -**node-environment-flags** is a *rough* polyfill and shim for [process.allowedNodeEnvironmentFlags](https://nodejs.org/api/process.html#process_process_allowednodeenvironmentflags), which was introduced in Node.js v10.10.0. - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Maintainers](#maintainers) -- [Contribute](#contribute) -- [License](#license) - -## Install - -*Requires Node.js v6.0.0 or newer.* - -```shell -$ npm i node-environment-flags -``` - -## Usage - -If the current Node.js version is v10.10.0 or newer, the native implementation will be provided instead. - -### As Polyfill (Recommended) - -```js -const nodeEnvironmentFlags = require('node-environment-flags'); - -nodeEnvironmentFlags.has('--require'); // true -``` - -### As Shim - -```js -require('node-environment-flags/shim')(); - -process.allowedNodeEnvironmentFlags.has('--require'); // true -``` - -## Notes - -- This module approximates what `process.allowedNodeEnvironmentFlags` provides in versions of Node.js prior to v10.10.0. Since `process.allowedNodeEnvironmentFlags` is based on [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) (introduced in v8.0.0), the set of supported flags for versions older than v8.0.0 is *highly theoretical*. -- Version ranges are matched using [semver](https://npm.im/semver). -- This module is granular to the *minor* Node.js version number; *patch* version numbers are not considered. -- Results for unmaintained (odd) versions of Node.js are based on data for the most recent LTS version; e.g., running this module against Node.js v7.10.0 will yield the same results as would v6.14.0. -- Prior art: @ljharb's [util.promisify](https://npm.im/util.promisify) - -## Maintainers - -[@boneskull](https://github.com/boneskull) - -## License - -Copyright © 2018 Christopher Hiller. Licensed Apache-2.0. diff --git a/node_modules/node-environment-flags/flags.json b/node_modules/node-environment-flags/flags.json deleted file mode 100644 index cdb0117e..00000000 --- a/node_modules/node-environment-flags/flags.json +++ /dev/null @@ -1,439 +0,0 @@ -{ - ">=6.0.0 <6.3.0": [ - "--debug", - "--debug-brk", - "--icu-data-dir", - "--no-deprecation", - "--no-warnings", - "--port", - "--prof-process", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=6.3.0 <6.9.0": [ - "--debug", - "--debug-brk", - "--icu-data-dir", - "--inspect", - "--no-deprecation", - "--no-warnings", - "--port", - "--prof-process", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=6.9.0 <6.11.0": [ - "--debug", - "--debug-brk", - "--icu-data-dir", - "--inspect", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--port", - "--prof-process", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - "~6.11.0": [ - "--debug", - "--debug-brk", - "--icu-data-dir", - "--inspect", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--port", - "--prof-process", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=6.12.0 <8.0.0": [ - "--debug", - "--debug-brk", - "--icu-data-dir", - "--inspect", - "--inspect-brk", - "--inspect-port", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--port", - "--prof-process", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=8.0.0 <8.2.0": [ - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--max-old-space-size", - "--napi-modules", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=8.2.0 <8.4.0": [ - "--abort-on-uncaught-exception", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--max-old-space-size", - "--napi-modules", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - "~8.4.0": [ - "--abort-on-uncaught-exception", - "--expose-http2", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--max-old-space-size", - "--napi-modules", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=8.5.0 <8.8.0": [ - "--abort-on-uncaught-exception", - "--experimental-modules", - "--expose-http2", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--max-old-space-size", - "--napi-modules", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=8.8.0 <8.12.0": [ - "--abort-on-uncaught-exception", - "--experimental-modules", - "--expose-http2", - "--force-async-hooks-checks", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--max-old-space-size", - "--napi-modules", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=8.12.0 <10.0.0": [ - "--abort-on-uncaught-exception", - "--experimental-modules", - "--expose-http2", - "--force-async-hooks-checks", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--max-old-space-size", - "--napi-modules", - "--no-deprecation", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-event-file-pattern", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=10.0.0 <10.3.0": [ - "--enable-fips", - "--experimental-modules", - "--experimental-repl-await", - "--experimental-vm-modules", - "--force-fips", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--napi-modules", - "--no-deprecation", - "--no-force-async-hooks-checks", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-event-file-pattern", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=10.3.0 <10.5.0": [ - "--enable-fips", - "--experimental-modules", - "--experimental-repl-await", - "--experimental-vm-modules", - "--force-fips", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--napi-modules", - "--no-deprecation", - "--no-force-async-hooks-checks", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--prof", - "--prof-process", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-event-file-pattern", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=10.5.0 <10.7.0": [ - "--enable-fips", - "--experimental-modules", - "--experimental-repl-await", - "--experimental-vm-modules", - "--experimental-worker", - "--force-fips", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--napi-modules", - "--no-deprecation", - "--no-force-async-hooks-checks", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--prof", - "--prof-process", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-event-file-pattern", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ], - ">=10.7.0 <10.10.0": [ - "--enable-fips", - "--experimental-modules", - "--experimental-repl-await", - "--experimental-vm-modules", - "--experimental-worker", - "--force-fips", - "--icu-data-dir", - "--inspect-brk", - "--inspect-port", - "--inspect", - "--loader", - "--napi-modules", - "--no-deprecation", - "--no-force-async-hooks-checks", - "--no-warnings", - "--openssl-config", - "--pending-deprecation", - "--prof", - "--prof-process", - "--redirect-warnings", - "--require", - "--throw-deprecation", - "--title", - "--tls-cipher-list", - "--trace-deprecation", - "--trace-event-categories", - "--trace-event-file-pattern", - "--trace-events-enabled", - "--trace-sync-io", - "--trace-warnings", - "--track-heap-objects", - "--use-bundled-ca", - "--use-openssl-ca", - "--v8-pool-size", - "--zero-fill-buffers", - "-r" - ] -} diff --git a/node_modules/node-environment-flags/implementation.js b/node_modules/node-environment-flags/implementation.js deleted file mode 100644 index e69165bd..00000000 --- a/node_modules/node-environment-flags/implementation.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -const semver = require('semver'); -const flags = require('./flags.json'); -const getDescriptors = require('object.getownpropertydescriptors'); - -const replaceUnderscoresRegex = /_/g; -const leadingDashesRegex = /^--?/; -const trailingValuesRegex = /=.*$/; - -const replace = Function.call.bind(String.prototype.replace); -const has = Function.call.bind(Set.prototype.has); -const test = Function.call.bind(RegExp.prototype.test); - -const [allowedNodeEnvironmentFlags, detectedSemverRange] = Object.keys( - flags -).reduce( - (acc, range) => - acc || - (semver.satisfies(process.version, range) ? [flags[range], range] : acc), - null -); - -const trimLeadingDashes = flag => replace(flag, leadingDashesRegex, ''); - -class NodeEnvironmentFlagsSet extends Set { - constructor(...args) { - super(...args); - - this.add = () => this; - } - - delete() { - return false; - } - - clear() {} - - has(key) { - if (typeof key === 'string') { - key = replace(key, replaceUnderscoresRegex, '-'); - if (test(leadingDashesRegex, key)) { - key = replace(key, trailingValuesRegex, ''); - return has(this, key); - } - return has(nodeFlags, key); - } - return false; - } -} -const nodeFlags = Object.defineProperties( - new Set(allowedNodeEnvironmentFlags.map(trimLeadingDashes)), - getDescriptors(Set.prototype) -); - -Object.freeze(NodeEnvironmentFlagsSet.prototype.constructor); -Object.freeze(NodeEnvironmentFlagsSet.prototype); - -exports.allowedNodeEnvironmentFlags = Object.freeze( - new NodeEnvironmentFlagsSet(allowedNodeEnvironmentFlags) -); -exports.detectedSemverRange = detectedSemverRange; diff --git a/node_modules/node-environment-flags/index.js b/node_modules/node-environment-flags/index.js deleted file mode 100644 index 79631a86..00000000 --- a/node_modules/node-environment-flags/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./polyfill')(); diff --git a/node_modules/node-environment-flags/package.json b/node_modules/node-environment-flags/package.json deleted file mode 100644 index 0e5b3bcc..00000000 --- a/node_modules/node-environment-flags/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - "node-environment-flags@1.0.5", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "node-environment-flags@1.0.5", - "_id": "node-environment-flags@1.0.5", - "_inBundle": false, - "_integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "_location": "/node-environment-flags", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "node-environment-flags@1.0.5", - "name": "node-environment-flags", - "escapedName": "node-environment-flags", - "rawSpec": "1.0.5", - "saveSpec": null, - "fetchSpec": "1.0.5" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "_spec": "1.0.5", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Christopher Hiller", - "email": "boneskull@boneskull.com", - "url": "https://boneskull.com/" - }, - "bugs": { - "url": "https://github.com/boneskull/node-environment-flags/issues" - }, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "description": "> Polyfill/shim for `process.allowedNodeEnvironmentFlags`", - "devDependencies": { - "eslint": "^5.9.0", - "eslint-config-prettier": "^3.3.0", - "eslint-config-semistandard": "^13.0.0", - "eslint-config-standard": "^12.0.0", - "eslint-plugin-import": "^2.14.0", - "eslint-plugin-node": "^8.0.0", - "eslint-plugin-prettier": "^3.0.0", - "eslint-plugin-promise": "^4.0.1", - "eslint-plugin-standard": "^4.0.0", - "husky": "^1.1.3", - "lint-staged": "^8.0.4", - "mocha": "^5.2.0", - "nyc": "^13.3.0", - "prettier-eslint-cli": "^4.7.1", - "semantic-release": "^15.13.8", - "travis-deploy-once": "^5.0.9", - "unexpected": "^10.39.1" - }, - "files": [ - "implementation.js", - "flags.json", - "index.js", - "polyfill.js", - "shim.js" - ], - "homepage": "https://github.com/boneskull/node-environment-flags#readme", - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "keywords": [], - "license": "Apache-2.0", - "lint-staged": { - "*.{js,json}": [ - "prettier-eslint --write", - "git add" - ] - }, - "main": "index.js", - "name": "node-environment-flags", - "prettier": { - "singleQuote": true, - "bracketSpacing": false - }, - "repository": { - "type": "git", - "url": "git+https://github.com/boneskull/node-environment-flags.git" - }, - "scripts": { - "format": "prettier-eslint --write \"*.js\" \"*.json\" \"test/**/*.js\"", - "semantic-release": "semantic-release", - "test": "mocha", - "travis-deploy-once": "travis-deploy-once" - }, - "version": "1.0.5" -} diff --git a/node_modules/node-environment-flags/polyfill.js b/node_modules/node-environment-flags/polyfill.js deleted file mode 100644 index ccba9e24..00000000 --- a/node_modules/node-environment-flags/polyfill.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -module.exports = () => { - if (typeof process.allowedNodeEnvironmentFlags === 'object') { - return process.allowedNodeEnvironmentFlags; - } - return require('./implementation').allowedNodeEnvironmentFlags; -}; diff --git a/node_modules/node-environment-flags/shim.js b/node_modules/node-environment-flags/shim.js deleted file mode 100644 index ed0e13ec..00000000 --- a/node_modules/node-environment-flags/shim.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const getPolyfill = require('./polyfill'); - -module.exports = () => { - const polyfill = getPolyfill(); - if (polyfill !== process.allowedNodeEnvironmentFlags) { - Object.defineProperty(process, 'allowedNodeEnvironmentFlags', { - writable: true, - enumerable: true, - configurable: true, - value: polyfill - }); - } - return polyfill; -}; diff --git a/node_modules/npm-run-path/index.js b/node_modules/npm-run-path/index.js deleted file mode 100644 index 56f31e47..00000000 --- a/node_modules/npm-run-path/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -const path = require('path'); -const pathKey = require('path-key'); - -module.exports = opts => { - opts = Object.assign({ - cwd: process.cwd(), - path: process.env[pathKey()] - }, opts); - - let prev; - let pth = path.resolve(opts.cwd); - const ret = []; - - while (prev !== pth) { - ret.push(path.join(pth, 'node_modules/.bin')); - prev = pth; - pth = path.resolve(pth, '..'); - } - - // ensure the running `node` binary is used - ret.push(path.dirname(process.execPath)); - - return ret.concat(opts.path).join(path.delimiter); -}; - -module.exports.env = opts => { - opts = Object.assign({ - env: process.env - }, opts); - - const env = Object.assign({}, opts.env); - const path = pathKey({env}); - - opts.path = env[path]; - env[path] = module.exports(opts); - - return env; -}; diff --git a/node_modules/npm-run-path/license b/node_modules/npm-run-path/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/npm-run-path/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/npm-run-path/package.json b/node_modules/npm-run-path/package.json deleted file mode 100644 index a312c7b9..00000000 --- a/node_modules/npm-run-path/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "npm-run-path@2.0.2", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "npm-run-path@2.0.2", - "_id": "npm-run-path@2.0.2", - "_inBundle": false, - "_integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "_location": "/npm-run-path", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "npm-run-path@2.0.2", - "name": "npm-run-path", - "escapedName": "npm-run-path", - "rawSpec": "2.0.2", - "saveSpec": null, - "fetchSpec": "2.0.2" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "_spec": "2.0.2", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/npm-run-path/issues" - }, - "dependencies": { - "path-key": "^2.0.0" - }, - "description": "Get your PATH prepended with locally installed binaries", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/npm-run-path#readme", - "keywords": [ - "npm", - "run", - "path", - "package", - "bin", - "binary", - "binaries", - "script", - "cli", - "command-line", - "execute", - "executable" - ], - "license": "MIT", - "name": "npm-run-path", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/npm-run-path.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.2", - "xo": { - "esnext": true - } -} diff --git a/node_modules/npm-run-path/readme.md b/node_modules/npm-run-path/readme.md deleted file mode 100644 index 4ff4722a..00000000 --- a/node_modules/npm-run-path/readme.md +++ /dev/null @@ -1,81 +0,0 @@ -# npm-run-path [![Build Status](https://travis-ci.org/sindresorhus/npm-run-path.svg?branch=master)](https://travis-ci.org/sindresorhus/npm-run-path) - -> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries - -In [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm. - - -## Install - -``` -$ npm install --save npm-run-path -``` - - -## Usage - -```js -const childProcess = require('child_process'); -const npmRunPath = require('npm-run-path'); - -console.log(process.env.PATH); -//=> '/usr/local/bin' - -console.log(npmRunPath()); -//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin' - -// `foo` is a locally installed binary -childProcess.execFileSync('foo', { - env: npmRunPath.env() -}); -``` - - -## API - -### npmRunPath([options]) - -#### options - -##### cwd - -Type: `string`
        -Default: `process.cwd()` - -Working directory. - -##### path - -Type: `string`
        -Default: [`PATH`](https://github.com/sindresorhus/path-key) - -PATH to be appended.
        -Set it to an empty string to exclude the default PATH. - -### npmRunPath.env([options]) - -#### options - -##### cwd - -Type: `string`
        -Default: `process.cwd()` - -Working directory. - -##### env - -Type: `Object` - -Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options. - - -## Related - -- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module -- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/number-is-nan/index.js b/node_modules/number-is-nan/index.js deleted file mode 100644 index 79be4b9c..00000000 --- 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 654d0bfe..00000000 --- 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 2617f171..00000000 --- a/node_modules/number-is-nan/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_args": [ - [ - "number-is-nan@1.0.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 24635087..00000000 --- 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/object-keys/.editorconfig b/node_modules/object-keys/.editorconfig deleted file mode 100644 index eaa21416..00000000 --- a/node_modules/object-keys/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/object-keys/.eslintrc b/node_modules/object-keys/.eslintrc deleted file mode 100644 index 9a8d5b0e..00000000 --- a/node_modules/object-keys/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 23], - "id-length": [2, { "min": 1, "max": 40 }], - "max-params": [2, 3], - "max-statements": [2, 23], - "max-statements-per-line": [2, { "max": 2 }], - "no-extra-parens": [1], - "no-invalid-this": [1], - "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"], - "operator-linebreak": [2, "after"] - } -} diff --git a/node_modules/object-keys/.travis.yml b/node_modules/object-keys/.travis.yml deleted file mode 100644 index 94a6ce42..00000000 --- a/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,277 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "11.8" - - "10.15" - - "9.11" - - "8.15" - - "7.10" - - "6.16" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "11.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true - - env: POSTTEST=true diff --git a/node_modules/object-keys/CHANGELOG.md b/node_modules/object-keys/CHANGELOG.md deleted file mode 100644 index b7d92df2..00000000 --- a/node_modules/object-keys/CHANGELOG.md +++ /dev/null @@ -1,232 +0,0 @@ -1.1.1 / 2019-04-06 -================= - * [Fix] exclude deprecated Firefox keys (#53) - -1.1.0 / 2019-02-10 -================= - * [New] [Refactor] move full implementation to `implementation` entry point - * [Refactor] only evaluate the implementation if `Object.keys` is not present - * [Tests] up to `node` `v11.8`, `v10.15`, `v8.15`, `v6.16` - * [Tests] remove jscs - * [Tests] switch to `npm audit` from `nsp` - -1.0.12 / 2018-06-18 -================= - * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46) - -1.0.11 / 2016-07-05 -================= - * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32) - -1.0.10 / 2016-07-04 -================= - * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31) - * [Fix] In IE 6, `window.external` makes `Object.keys` throw - * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` - * [Tests] use pretest/posttest for linting/security - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` - * [Dev Deps] remove unused eccheck script + dep - -1.0.9 / 2015-10-19 -================= - * [Fix] Blacklist 'frame' property on window (#16, #17) - * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` - -1.0.8 / 2015-10-14 -================= - * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327) - * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322) - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Tests] up to `io.js` `v3.3`, `node` `v4.2` - * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs` - -1.0.7 / 2015-07-18 -================= - * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8. - * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15) - * [Tests] Improve test output for automation equality bugfix - * [Tests] Test on `io.js` `v2.4` - -1.0.6 / 2015-07-09 -================= - * [Fix] Use an object lookup rather than ES5's `indexOf` (#14) - * [Tests] ES3 browsers don't have `Array.isArray` - * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs. - -1.0.5 / 2015-07-03 -================= - * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws - * [Tests] Test up to `io.js` `v2.3` - * [Dev Deps] Update `nsp`, `eslint` - -1.0.4 / 2015-05-23 -================= - * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments` - * Test on latest `node` and `io.js` - * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert` - -1.0.3 / 2015-01-06 -================= - * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance - -1.0.2 / 2014-12-28 -================= - * Update lots of dev dependencies - * Tweaks to README - * Make `object-keys` more robust against later environment tampering - -1.0.1 / 2014-09-03 -================= - * Update URLs and badges in README - -1.0.0 / 2014-08-26 -================= - * v1.0.0 - -0.6.1 / 2014-08-25 -================= - * v0.6.1 - * Updating dependencies (tape, covert, is) - * Update badges in readme - * Use separate var statements - -0.6.0 / 2014-04-23 -================= - * v0.6.0 - * Updating dependencies (tape, covert) - * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers - * Improve test matrix: test all node versions, but only latest two stables are a failure - * Remove internal foreach shim. - -0.5.1 / 2014-03-09 -================= - * 0.5.1 - * Updating dependencies (tape, covert, is) - * Removing forEach from the module (but keeping it in tests) - -0.5.0 / 2014-01-30 -================= - * 0.5.0 - * Explicitly returning the shim, instead of returning native Object.keys when present - * Adding a changelog. - * Cleaning up IIFE wrapping - * Testing on node 0.4 through 0.11 - -0.4.0 / 2013-08-14 -================== - - * v0.4.0 - * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function' - * If it's a string, make sure to use charAt instead of brackets. - * Only use Function#call if necessary. - * Making sure the context tests actually run. - * Better function detection - * Adding the android browser - * Fixing testling files - * Updating tape - * Removing the "is" dependency. - * Making an isArguments shim. - * Adding a local forEach shim and tests. - * Updating paths. - * Moving the shim test. - * v0.3.0 - -0.3.0 / 2013-05-18 -================== - - * README tweak. - * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5). - * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5) - * Updating readme. - * Updating dependencies. - * Giving credit to lodash. - * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3). - * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2). - * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3). - * Adding node 0.10 to travis. - * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3) - * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2) - * Moving "indexof" and "is" to be dev dependencies. - * Making sure the shim works with functions. - * Flattening the tests. - -0.2.0 / 2013-05-10 -================== - - * v0.2.0 - * Object.keys should work with arrays. - -0.1.8 / 2013-05-10 -================== - - * v0.1.8 - * Upgrading dependencies. - * Using a simpler check. - * Fixing a bug in hasDontEnumBug browsers. - * Using the newest tape! - * Fixing this error test. - * "undefined" is probably a reserved word in ES3. - * Better test message. - -0.1.7 / 2013-04-17 -================== - - * Upgrading "is" once more. - * The key "null" is breaking some browsers. - -0.1.6 / 2013-04-17 -================== - - * v0.1.6 - * Upgrading "is" - -0.1.5 / 2013-04-14 -================== - - * Bumping version. - * Adding more testling browsers. - * Updating "is" - -0.1.4 / 2013-04-08 -================== - - * Using "is" instead of "is-extended". - -0.1.3 / 2013-04-07 -================== - - * Using "foreach" instead of my own shim. - * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug. - -0.1.2 / 2013-04-03 -================== - - * Adding dependency status; moving links to an index at the bottom. - * Upgrading is-extended; version 0.1.2 - * Adding an npm version badge. - -0.1.1 / 2013-04-01 -================== - - * Adding Travis CI. - * Bumping the version. - * Adding indexOf since IE sucks. - * Adding a forEach shim since older browsers don't have Array#forEach. - * Upgrading tape - 0.3.2 uses Array#map - * Using explicit end instead of plan. - * Can't test with Array.isArray in older browsers. - * Using is-extended. - * Fixing testling files. - * JSHint/JSLint-ing. - * Removing an unused object. - * Using strict mode. - -0.1.0 / 2013-03-30 -================== - - * Changing the exports should have meant a higher version bump. - * Oops, fixing the repo URL. - * Adding more tests. - * 0.0.2 - * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1) - * Move shim export to a separate file. diff --git a/node_modules/object-keys/LICENSE b/node_modules/object-keys/LICENSE deleted file mode 100644 index 28553fdd..00000000 --- a/node_modules/object-keys/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2013 Jordan Harband - -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/object-keys/README.md b/node_modules/object-keys/README.md deleted file mode 100644 index ed4c2770..00000000 --- a/node_modules/object-keys/README.md +++ /dev/null @@ -1,76 +0,0 @@ -#object-keys [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable. - -Most common usage: -```js -var keys = Object.keys || require('object-keys'); -``` - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.deepEqual(keys(obj), ['a', 'b', 'c']); -``` - -```js -var keys = require('object-keys'); -var assert = require('assert'); -/* when Object.keys is not present */ -delete Object.keys; -var shimmedKeys = keys.shim(); -assert.equal(shimmedKeys, keys); -assert.deepEqual(Object.keys(obj), keys(obj)); -``` - -```js -var keys = require('object-keys'); -var assert = require('assert'); -/* when Object.keys is present */ -var shimmedKeys = keys.shim(); -assert.equal(shimmedKeys, Object.keys); -assert.deepEqual(Object.keys(obj), keys(obj)); -``` - -## Source -Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url]. - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/object-keys -[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg -[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg -[travis-url]: https://travis-ci.org/ljharb/object-keys -[deps-svg]: https://david-dm.org/ljharb/object-keys.svg -[deps-url]: https://david-dm.org/ljharb/object-keys -[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/object-keys.png -[testling-url]: https://ci.testling.com/ljharb/object-keys -[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589 -[lodash-url]: https://github.com/lodash/lodash -[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/object-keys.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg -[downloads-url]: http://npm-stat.com/charts.html?package=object-keys - diff --git a/node_modules/object-keys/implementation.js b/node_modules/object-keys/implementation.js deleted file mode 100644 index 5b329861..00000000 --- a/node_modules/object-keys/implementation.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict'; - -var keysShim; -if (!Object.keys) { - // modified from https://github.com/es-shims/es5-shim - var has = Object.prototype.hasOwnProperty; - var toStr = Object.prototype.toString; - var isArgs = require('./isArguments'); // eslint-disable-line global-require - var isEnumerable = Object.prototype.propertyIsEnumerable; - var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); - var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); - var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; - }; - var excludedKeys = { - $applicationCache: true, - $console: true, - $external: true, - $frame: true, - $frameElement: true, - $frames: true, - $innerHeight: true, - $innerWidth: true, - $onmozfullscreenchange: true, - $onmozfullscreenerror: true, - $outerHeight: true, - $outerWidth: true, - $pageXOffset: true, - $pageYOffset: true, - $parent: true, - $scrollLeft: true, - $scrollTop: true, - $scrollX: true, - $scrollY: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true - }; - var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; - }()); - var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } - }; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } - - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } - - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; - }; -} -module.exports = keysShim; diff --git a/node_modules/object-keys/index.js b/node_modules/object-keys/index.js deleted file mode 100644 index a43807d2..00000000 --- a/node_modules/object-keys/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var slice = Array.prototype.slice; -var isArgs = require('./isArguments'); - -var origKeys = Object.keys; -var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); - -var originalKeys = Object.keys; - -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - var args = Object.keys(arguments); - return args && args.length === arguments.length; - }(1, 2)); - if (!keysWorksWithArguments) { - Object.keys = function keys(object) { // eslint-disable-line func-name-matching - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } - return originalKeys(object); - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; - -module.exports = keysShim; diff --git a/node_modules/object-keys/isArguments.js b/node_modules/object-keys/isArguments.js deleted file mode 100644 index f2a2a901..00000000 --- a/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var toStr = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json deleted file mode 100644 index ab99dc85..00000000 --- a/node_modules/object-keys/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - "object-keys@1.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "object-keys@1.1.1", - "_id": "object-keys@1.1.1", - "_inBundle": false, - "_integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "_location": "/object-keys", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "object-keys@1.1.1", - "name": "object-keys", - "escapedName": "object-keys", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/define-properties", - "/es-abstract", - "/object.assign" - ], - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "_spec": "1.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net" - }, - { - "name": "Ivan Starkov", - "email": "istarkov@gmail.com" - }, - { - "name": "Gary Katsevman", - "email": "git@gkatsev.com" - } - ], - "dependencies": {}, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", - "devDependencies": { - "@ljharb/eslint-config": "^13.1.1", - "covert": "^1.1.1", - "eslint": "^5.13.0", - "foreach": "^2.0.5", - "indexof": "^0.0.1", - "is": "^3.3.0", - "tape": "^4.9.2" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/object-keys#readme", - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "license": "MIT", - "main": "index.js", - "name": "object-keys", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "scripts": { - "audit": "npm audit", - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "eslint .", - "postaudit": "rm package-lock.json", - "posttest": "npm run --silent audit", - "preaudit": "npm install --package-lock --package-lock-only", - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "tests-only": "node test/index.js" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.1.1" -} diff --git a/node_modules/object-keys/test/index.js b/node_modules/object-keys/test/index.js deleted file mode 100644 index 5402465a..00000000 --- a/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -require('./isArguments'); - -require('./shim'); diff --git a/node_modules/object.assign/.editorconfig b/node_modules/object.assign/.editorconfig deleted file mode 100644 index ac29adef..00000000 --- a/node_modules/object.assign/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 120 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/object.assign/.eslintrc b/node_modules/object.assign/.eslintrc deleted file mode 100644 index 85cd8fb1..00000000 --- a/node_modules/object.assign/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 17], - "id-length": [2, { "min": 1, "max": 30 }], - "max-nested-callbacks": [2, 3], - "max-statements": [2, 33], - "max-statements-per-line": [2, { "max": 2 }], - "no-invalid-this": [1], - "no-magic-numbers": [1, { "ignore": [0] }], - "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], - "no-unused-vars": [1, { "vars": "all", "args": "after-used" }] - } -} diff --git a/node_modules/object.assign/CHANGELOG.md b/node_modules/object.assign/CHANGELOG.md deleted file mode 100644 index 45434ac7..00000000 --- a/node_modules/object.assign/CHANGELOG.md +++ /dev/null @@ -1,179 +0,0 @@ -4.0.4 / 2017-12-21 -================== - * [New] add `auto` entry point (#52) - * [Refactor] Use `has-symbols` module - * [Deps] update `function-bind`, `object-keys` - * [Dev Deps] update `@es-shims/api`, `browserify`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is` - * [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS - -4.0.4 / 2016-07-04 -================== - * [Fix] Cache original `getOwnPropertySymbols`, and use that when `Object.getOwnPropertySymbols` is unavailable - * [Deps] update `object-keys` - * [Dev Deps] update `eslint`, `get-own-property-symbols`, `core-js`, `jscs`, `nsp`, `browserify`, `@ljharb/eslint-config`, `tape`, `@es-shims/api` - * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` - * [Tests] run sham tests on node 0.10 - * [Tests] use pretest/posttest for linting/security - -4.0.3 / 2015-10-21 -================== - * [Fix] Support core-js's Symbol sham (#17) - * [Fix] Ensure that properties removed or made non-enumerable during enumeration are not assigned (#16) - * [Fix] Avoid looking up keys and values more than once - * [Tests] Avoid using `reduce` so `npm run test:shams:corejs` passes in `node` `v0.8` ([core-js#122](https://github.com/zloirock/core-js/issues/122)) - * [Tests] Refactor to use my conventional structure that separates shimmed, implementation, and common tests - * [Tests] Create `npm run test:shams` and better organize tests for symbol shams - * [Tests] Remove `nsp` in favor of `requiresafe` - -4.0.2 / 2015-10-20 -================== - * [Fix] Ensure correct property enumeration order, particularly in v8 (#15) - * [Deps] update `object-keys`, `define-properties` - * [Dev Deps] update `browserify`, `is`, `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` - * [Tests] up to `io.js` `v3.3`, `node` `v4.2` - -4.0.1 / 2015-08-16 -================== - * [Docs] Add `Symbol` note to readme - -4.0.0 / 2015-08-15 -================== - * [Breaking] Implement the [es-shim API](es-shims/api). - * [Robustness] Make implementation robust against later modification of environment methods. - * [Refactor] Move implementation to `implementation.js` - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Deps] update `object-keys`, `define-properties` - * [Dev Deps] update `browserify`, `tape`, `eslint`, `jscs`, `browserify` - * [Tests] Add `npm run tests-only` - * [Tests] use my personal shared `eslint` config. - * [Tests] up to `io.js` `v3.0` - -3.0.1 / 2015-06-28 -================== - * Cache `Object` and `Array#push` to make the shim more robust. - * [Fix] Remove use of `Array#filter`, which isn't in ES3. - * [Deps] Update `object-keys`, `define-properties` - * [Dev Deps] Update `get-own-property-symbols`, `browserify`, `eslint`, `nsp` - * [Tests] Test up to `io.js` `v2.3` - * [Tests] Adding `Object.assign` tests for non-object targets, per https://github.com/paulmillr/es6-shim/issues/348 - -3.0.0 / 2015-05-20 -================== - * Attempt to feature-detect Symbols, even if `typeof Symbol() !== 'symbol'` (#12) - * Make a separate `hasSymbols` internal module - * Update `browserify`, `eslint` - -2.0.3 / 2015-06-28 -================== - * Cache `Object` and `Array#push` to make the shim more robust. - * [Fix] Remove use of `Array#filter`, which isn't in ES3 - * [Deps] Update `object-keys`, `define-properties` - * [Dev Deps] Update `browserify`, `nsp`, `eslint` - * [Tests] Test up to `io.js` `v2.3` - -2.0.2 / 2015-05-20 -================== - * Make sure `.shim` is non-enumerable. - * Refactor `.shim` implementation to use `define-properties` predicates, rather than `delete`ing the original. - * Update docs to match spec/implementation. (#11) - * Add `npm run eslint` - * Test up to `io.js` `v2.0` - * Update `jscs`, `browserify`, `covert` - -2.0.1 / 2015-04-12 -================== - * Make sure non-enumerable Symbols are excluded. - -2.0.0 / 2015-04-12 -================== - * Make sure the shim function overwrites a broken implementation with pending exceptions. - * Ensure shim is not enumerable using `define-properties` - * Ensure `Object.assign` includes symbols. - * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. - * Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. - * Add `npm run security` via `nsp` - * Update `browserify`, `jscs`, `tape`, `object-keys`, `is` - -1.1.1 / 2014-12-14 -================== - * Actually include the browser build in `npm` - -1.1.0 / 2014-12-14 -================== - * Add `npm run build`, and build an automatic-shimming browser distribution as part of the npm publish process. - * Update `is`, `jscs` - -1.0.3 / 2014-11-29 -================== - * Revert "optimize --production installs" - -1.0.2 / 2014-11-27 -================== - * Update `jscs`, `is`, `object-keys`, `tape` - * Add badges to README - * Name URLs in README - * Lock `covert` to `v1.0.0` - * Optimize --production installs - -1.0.1 / 2014-08-26 -================== - * Update `is`, `covert` - -1.0.0 / 2014-08-07 -================== - * Update `object-keys`, `tape` - -0.5.0 / 2014-07-31 -================== - * Object.assign no longer throws on null or undefined sources, per https://bugs.ecmascript.org/show_bug.cgi?id=3096 - -0.4.3 / 2014-07-30 -================== - * Don’t modify vars in the function signature, since it deoptimizes v8 - -0.4.2 / 2014-07-30 -================== - * Fixing the version number: v0.4.2 - -0.4.1 / 2014-07-19 -================== - * Revert "Use the native Object.keys if it’s available." - -0.4.0 / 2014-07-19 -================== - * Use the native Object.keys if it’s available. - * Fixes [#2](https://github.com/ljharb/object.assign/issues/2). - * Adding failing tests for [#2](https://github.com/ljharb/object.assign/issues/2). - * Fix indentation. - * Adding `npm run lint` - * Update `tape`, `covert` - * README: Use SVG badge for Travis [#1](https://github.com/ljharb/object.assign/issues/1) from mathiasbynens/patch-1 - -0.3.1 / 2014-04-10 -================== - * Object.assign does partially modify objects if it throws, per https://twitter.com/awbjs/status/454320863093862400 - -0.3.0 / 2014-04-10 -================== - * Update with newest ES6 behavior - Object.assign now takes a variable number of source objects. - * Update `tape` - * Make sure old and unstable nodes don’t fail Travis - -0.2.1 / 2014-03-16 -================== - * Let object-keys handle the fallback - * Update dependency badges - * Adding bower.json - -0.2.0 / 2014-03-16 -================== - * Use a for loop, because ES3 browsers don’t have "reduce" - -0.1.1 / 2014-03-14 -================== - * Updating readme - -0.1.0 / 2014-03-14 -================== - * Initial release. - diff --git a/node_modules/object.assign/LICENSE b/node_modules/object.assign/LICENSE deleted file mode 100644 index ab29cbd6..00000000 --- a/node_modules/object.assign/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -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/object.assign/README.md b/node_modules/object.assign/README.md deleted file mode 100644 index 70b6ac44..00000000 --- a/node_modules/object.assign/README.md +++ /dev/null @@ -1,135 +0,0 @@ -#object.assign [![Version Badge][npm-version-svg]][npm-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][npm-url] - -[![browser support][testling-png]][testling-url] - -An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable. - -This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. - -Takes a minimum of 2 arguments: `target` and `source`. -Takes a variable sized list of source arguments - at least 1, as many as you want. -Throws a TypeError if the `target` argument is `null` or `undefined`. - -Most common usage: -```js -var assign = require('object.assign').getPolyfill(); // returns native method if compliant - /* or */ -var assign = require('object.assign/polyfill')(); // returns native method if compliant -``` - -## Example - -```js -var assert = require('assert'); - -// Multiple sources! -var target = { a: true }; -var source1 = { b: true }; -var source2 = { c: true }; -var sourceN = { n: true }; - -var expected = { - a: true, - b: true, - c: true, - n: true -}; - -assign(target, source1, source2, sourceN); -assert.deepEqual(target, expected); // AWESOME! -``` - -```js -var target = { - a: true, - b: true, - c: true -}; -var source1 = { - c: false, - d: false -}; -var sourceN = { - e: false -}; - -var assigned = assign(target, source1, sourceN); -assert.equal(target, assigned); // returns the target object -assert.deepEqual(assigned, { - a: true, - b: true, - c: false, - d: false, - e: false -}); -``` - -```js -/* when Object.assign is not present */ -delete Object.assign; -var shimmedAssign = require('object.assign').shim(); - /* or */ -var shimmedAssign = require('object.assign/shim')(); - -assert.equal(shimmedAssign, assign); - -var target = { - a: true, - b: true, - c: true -}; -var source = { - c: false, - d: false, - e: false -}; - -var assigned = assign(target, source); -assert.deepEqual(Object.assign(target, source), assign(target, source)); -``` - -```js -/* when Object.assign is present */ -var shimmedAssign = require('object.assign').shim(); -assert.equal(shimmedAssign, Object.assign); - -var target = { - a: true, - b: true, - c: true -}; -var source = { - c: false, - d: false, - e: false -}; - -assert.deepEqual(Object.assign(target, source), assign(target, source)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[npm-url]: https://npmjs.org/package/object.assign -[npm-version-svg]: http://versionbadg.es/ljharb/object.assign.svg -[travis-svg]: https://travis-ci.org/ljharb/object.assign.svg -[travis-url]: https://travis-ci.org/ljharb/object.assign -[deps-svg]: https://david-dm.org/ljharb/object.assign.svg?theme=shields.io -[deps-url]: https://david-dm.org/ljharb/object.assign -[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io -[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies -[testling-png]: https://ci.testling.com/ljharb/object.assign.png -[testling-url]: https://ci.testling.com/ljharb/object.assign -[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/object.assign.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg -[downloads-url]: http://npm-stat.com/charts.html?package=object.assign diff --git a/node_modules/object.assign/auto.js b/node_modules/object.assign/auto.js deleted file mode 100644 index 8ebf606c..00000000 --- a/node_modules/object.assign/auto.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -require('./shim')(); diff --git a/node_modules/object.assign/dist/browser.js b/node_modules/object.assign/dist/browser.js deleted file mode 100644 index 1b8da611..00000000 --- a/node_modules/object.assign/dist/browser.js +++ /dev/null @@ -1,492 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&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?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 2 ? arguments[2] : {}; - var props = keys(map); - if (hasSymbols) { - props = props.concat(Object.getOwnPropertySymbols(map)); - } - foreach(props, function (name) { - defineProperty(object, name, map[name], predicates[name]); - }); -}; - -defineProperties.supportsDescriptors = !!supportsDescriptors; - -module.exports = defineProperties; - -},{"foreach":5,"object-keys":9}],5:[function(require,module,exports){ - -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -module.exports = function forEach (obj, fn, ctx) { - if (toString.call(fn) !== '[object Function]') { - throw new TypeError('iterator must be a function'); - } - var l = obj.length; - if (l === +l) { - for (var i = 0; i < l; i++) { - fn.call(ctx, obj[i], i, obj); - } - } else { - for (var k in obj) { - if (hasOwn.call(obj, k)) { - fn.call(ctx, obj[k], k, obj); - } - } - } -}; - - -},{}],6:[function(require,module,exports){ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; - -},{"./implementation":6}],8:[function(require,module,exports){ -'use strict'; - -/* eslint complexity: [2, 17], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - -},{}],9:[function(require,module,exports){ -'use strict'; - -// modified from https://github.com/es-shims/es5-shim -var has = Object.prototype.hasOwnProperty; -var toStr = Object.prototype.toString; -var slice = Array.prototype.slice; -var isArgs = require('./isArguments'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); -var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); -var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' -]; -var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; -}; -var excludedKeys = { - $console: true, - $external: true, - $frame: true, - $frameElement: true, - $frames: true, - $innerHeight: true, - $innerWidth: true, - $outerHeight: true, - $outerWidth: true, - $pageXOffset: true, - $pageYOffset: true, - $parent: true, - $scrollLeft: true, - $scrollTop: true, - $scrollX: true, - $scrollY: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true -}; -var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; -}()); -var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } -}; - -var keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } - - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } - - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; -}; - -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - return (Object.keys(arguments) || '').length === 2; - }(1, 2)); - if (!keysWorksWithArguments) { - var originalKeys = Object.keys; - Object.keys = function keys(object) { - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } else { - return originalKeys(object); - } - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; - -module.exports = keysShim; - -},{"./isArguments":10}],10:[function(require,module,exports){ -'use strict'; - -var toStr = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - -var implementation = require('./implementation'); - -var lacksProperEnumerationOrder = function () { - if (!Object.assign) { - return false; - } - // v8, specifically in node 4.x, has a bug with incorrect property enumeration order - // note: this does not detect the bug unless there's 20 characters - var str = 'abcdefghijklmnopqrst'; - var letters = str.split(''); - var map = {}; - for (var i = 0; i < letters.length; ++i) { - map[letters[i]] = letters[i]; - } - var obj = Object.assign({}, map); - var actual = ''; - for (var k in obj) { - actual += k; - } - return str !== actual; -}; - -var assignHasPendingExceptions = function () { - if (!Object.assign || !Object.preventExtensions) { - return false; - } - // Firefox 37 still has "pending exception" logic in its Object.assign implementation, - // which is 72% slower than our shim, and Firefox 40's native implementation. - var thrower = Object.preventExtensions({ 1: 2 }); - try { - Object.assign(thrower, 'xy'); - } catch (e) { - return thrower[1] === 'y'; - } - return false; -}; - -module.exports = function getPolyfill() { - if (!Object.assign) { - return implementation; - } - if (lacksProperEnumerationOrder()) { - return implementation; - } - if (assignHasPendingExceptions()) { - return implementation; - } - return Object.assign; -}; - -},{"./implementation":2}],12:[function(require,module,exports){ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimAssign() { - var polyfill = getPolyfill(); - define( - Object, - { assign: polyfill }, - { assign: function () { return Object.assign !== polyfill; } } - ); - return polyfill; -}; - -},{"./polyfill":11,"define-properties":4}]},{},[1]); diff --git a/node_modules/object.assign/hasSymbols.js b/node_modules/object.assign/hasSymbols.js deleted file mode 100644 index f6e0db97..00000000 --- a/node_modules/object.assign/hasSymbols.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); - -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } - if (keys(obj).length !== 0) { return false; } - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js deleted file mode 100644 index 6db68e76..00000000 --- a/node_modules/object.assign/implementation.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -// modified from https://github.com/es-shims/es6-shim -var keys = require('object-keys'); -var bind = require('function-bind'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; -var hasSymbols = require('has-symbols/shams')(); -var toObject = Object; -var push = bind.call(Function.call, Array.prototype.push); -var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable); -var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; - -module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); - var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); - if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if (propIsEnumerable(source, key)) { - push(props, key); - } - } - } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if (propIsEnumerable(source, key)) { - objTarget[key] = value; - } - } - } - return objTarget; -}; diff --git a/node_modules/object.assign/index.js b/node_modules/object.assign/index.js deleted file mode 100644 index 1111459c..00000000 --- a/node_modules/object.assign/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var defineProperties = require('define-properties'); - -var implementation = require('./implementation'); -var getPolyfill = require('./polyfill'); -var shim = require('./shim'); - -var polyfill = getPolyfill(); - -defineProperties(polyfill, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = polyfill; diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json deleted file mode 100644 index 51d62192..00000000 --- a/node_modules/object.assign/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - "object.assign@4.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "object.assign@4.1.0", - "_id": "object.assign@4.1.0", - "_inBundle": false, - "_integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "_location": "/object.assign", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "object.assign@4.1.0", - "name": "object.assign", - "escapedName": "object.assign", - "rawSpec": "4.1.0", - "saveSpec": null, - "fetchSpec": "4.1.0" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "_spec": "4.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/object.assign/issues" - }, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim", - "devDependencies": { - "@es-shims/api": "^2.1.1", - "@ljharb/eslint-config": "^12.2.1", - "browserify": "^14.5.0", - "covert": "^1.1.0", - "eslint": "^4.13.1", - "for-each": "^0.3.2", - "is": "^3.2.1", - "jscs": "^3.0.7", - "nsp": "^3.1.0", - "tape": "^4.8.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/object.assign#readme", - "keywords": [ - "Object.assign", - "assign", - "ES6", - "extend", - "$.extend", - "jQuery", - "_.extend", - "Underscore", - "es-shim API", - "polyfill", - "shim" - ], - "license": "MIT", - "main": "index.js", - "name": "object.assign", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object.assign.git" - }, - "scripts": { - "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", - "coverage": "covert test/*.js", - "coverage:quiet": "covert test/*.js --quiet", - "eslint": "eslint *.js test/*.js", - "jscs": "jscs *.js test/*.js", - "lint": "npm run --silent jscs && npm run --silent eslint", - "posttest": "npm run --silent security", - "prepublish": "npm run --silent build", - "pretest": "npm run --silent lint && es-shim-api", - "security": "nsp check", - "test": "npm run --silent tests-only", - "test:implementation": "node test/index.js", - "test:native": "node test/native.js", - "test:shim": "node test/shimmed.js", - "tests-only": "npm run --silent test:implementation && npm run --silent test:shim" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "4.1.0" -} diff --git a/node_modules/object.assign/polyfill.js b/node_modules/object.assign/polyfill.js deleted file mode 100644 index 5b6c5774..00000000 --- a/node_modules/object.assign/polyfill.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -var lacksProperEnumerationOrder = function () { - if (!Object.assign) { - return false; - } - // v8, specifically in node 4.x, has a bug with incorrect property enumeration order - // note: this does not detect the bug unless there's 20 characters - var str = 'abcdefghijklmnopqrst'; - var letters = str.split(''); - var map = {}; - for (var i = 0; i < letters.length; ++i) { - map[letters[i]] = letters[i]; - } - var obj = Object.assign({}, map); - var actual = ''; - for (var k in obj) { - actual += k; - } - return str !== actual; -}; - -var assignHasPendingExceptions = function () { - if (!Object.assign || !Object.preventExtensions) { - return false; - } - // Firefox 37 still has "pending exception" logic in its Object.assign implementation, - // which is 72% slower than our shim, and Firefox 40's native implementation. - var thrower = Object.preventExtensions({ 1: 2 }); - try { - Object.assign(thrower, 'xy'); - } catch (e) { - return thrower[1] === 'y'; - } - return false; -}; - -module.exports = function getPolyfill() { - if (!Object.assign) { - return implementation; - } - if (lacksProperEnumerationOrder()) { - return implementation; - } - if (assignHasPendingExceptions()) { - return implementation; - } - return Object.assign; -}; diff --git a/node_modules/object.assign/shim.js b/node_modules/object.assign/shim.js deleted file mode 100644 index 9f896ae3..00000000 --- a/node_modules/object.assign/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimAssign() { - var polyfill = getPolyfill(); - define( - Object, - { assign: polyfill }, - { assign: function () { return Object.assign !== polyfill; } } - ); - return polyfill; -}; diff --git a/node_modules/object.assign/test.sh b/node_modules/object.assign/test.sh deleted file mode 100644 index da9818d7..00000000 --- a/node_modules/object.assign/test.sh +++ /dev/null @@ -1,53 +0,0 @@ -###-begin-npm-completion-### -# -# npm command completion script -# -# Installation: npm completion >> ~/.bashrc (or ~/.zshrc) -# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm -# - -COMP_WORDBREAKS=${COMP_WORDBREAKS/=/} -COMP_WORDBREAKS=${COMP_WORDBREAKS/@/} -export COMP_WORDBREAKS - -if type complete &>/dev/null; then - _npm_completion () { - local si="$IFS" - IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \ - COMP_LINE="$COMP_LINE" \ - COMP_POINT="$COMP_POINT" \ - npm completion -- "${COMP_WORDS[@]}" \ - 2>/dev/null)) || return $? - IFS="$si" - } - complete -F _npm_completion npm -elif type compdef &>/dev/null; then - _npm_completion() { - si=$IFS - compadd -- $(COMP_CWORD=$((CURRENT-1)) \ - COMP_LINE=$BUFFER \ - COMP_POINT=0 \ - npm completion -- "${words[@]}" \ - 2>/dev/null) - IFS=$si - } - compdef _npm_completion npm -elif type compctl &>/dev/null; then - _npm_completion () { - local cword line point words si - read -Ac words - read -cn cword - let cword-=1 - read -l line - read -ln point - si="$IFS" - IFS=$'\n' reply=($(COMP_CWORD="$cword" \ - COMP_LINE="$line" \ - COMP_POINT="$point" \ - npm completion -- "${words[@]}" \ - 2>/dev/null)) || return $? - IFS="$si" - } - compctl -K _npm_completion npm -fi -###-end-npm-completion-### diff --git a/node_modules/object.assign/test/.eslintrc b/node_modules/object.assign/test/.eslintrc deleted file mode 100644 index dde958cb..00000000 --- a/node_modules/object.assign/test/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "rules": { - "max-statements-per-line": [2, { "max": 3 }], - "no-magic-numbers": 0, - "object-curly-newline": 0, - } -} diff --git a/node_modules/object.assign/test/index.js b/node_modules/object.assign/test/index.js deleted file mode 100644 index 776b2b33..00000000 --- a/node_modules/object.assign/test/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var assign = require('../'); -var test = require('tape'); -var runTests = require('./tests'); - -test('as a function', function (t) { - t.test('bad array/this value', function (st) { - st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object'); - st['throws'](function () { assign(null); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(assign, t); - - t.end(); -}); diff --git a/node_modules/object.assign/test/native.js b/node_modules/object.assign/test/native.js deleted file mode 100644 index 6ebd70bb..00000000 --- a/node_modules/object.assign/test/native.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var test = require('tape'); -var defineProperties = require('define-properties'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = function f() {}.name === 'f'; - -var runTests = require('./tests'); - -test('native', function (t) { - t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad object value', { skip: !supportsStrictMode }, function (st) { - st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); - st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); - st.end(); - }); - - // v8 in node 0.8 and 0.10 have non-enumerable string properties - var stringCharsAreEnumerable = isEnumerable.call('xy', 0); - t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { - // Firefox 37 still has "pending exception" logic in its Object.assign implementation, - // which is 72% slower than our shim, and Firefox 40's native implementation. - var thrower = Object.preventExtensions({ 1: '2' }); - var error; - try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } - st.equal(error instanceof TypeError, true, 'error is TypeError'); - st.equal(thrower[1], '2', 'thrower[1] === "2"'); - - st.end(); - }); - - runTests(Object.assign, t); - - t.end(); -}); diff --git a/node_modules/object.assign/test/shimmed.js b/node_modules/object.assign/test/shimmed.js deleted file mode 100644 index 905b6531..00000000 --- a/node_modules/object.assign/test/shimmed.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var assign = require('../'); -assign.shim(); - -var test = require('tape'); -var defineProperties = require('define-properties'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = function f() {}.name === 'f'; - -var runTests = require('./tests'); - -test('shimmed', function (t) { - t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad object value', { skip: !supportsStrictMode }, function (st) { - st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); - st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); - st.end(); - }); - - // v8 in node 0.8 and 0.10 have non-enumerable string properties - var stringCharsAreEnumerable = isEnumerable.call('xy', 0); - t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { - // Firefox 37 still has "pending exception" logic in its Object.assign implementation, - // which is 72% slower than our shim, and Firefox 40's native implementation. - var thrower = Object.preventExtensions({ 1: '2' }); - var error; - try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } - st.equal(error instanceof TypeError, true, 'error is TypeError'); - st.equal(thrower[1], '2', 'thrower[1] === "2"'); - - st.end(); - }); - - runTests(Object.assign, t); - - t.end(); -}); diff --git a/node_modules/object.assign/test/tests.js b/node_modules/object.assign/test/tests.js deleted file mode 100644 index 34f6f2c1..00000000 --- a/node_modules/object.assign/test/tests.js +++ /dev/null @@ -1,224 +0,0 @@ -'use strict'; - -var hasSymbols = require('has-symbols/shams')(); -var forEach = require('for-each'); - -module.exports = function (assign, t) { - t.test('error cases', function (st) { - st['throws'](function () { assign(null); }, TypeError, 'target must be an object'); - st['throws'](function () { assign(undefined); }, TypeError, 'target must be an object'); - st['throws'](function () { assign(null, {}); }, TypeError, 'target must be an object'); - st['throws'](function () { assign(undefined, {}); }, TypeError, 'target must be an object'); - st.end(); - }); - - t.test('non-object target, no sources', function (st) { - var bool = assign(true); - st.equal(typeof bool, 'object', 'bool is object'); - st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); - - var number = assign(1); - st.equal(typeof number, 'object', 'number is object'); - st.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); - - var string = assign('1'); - st.equal(typeof string, 'object', 'number is object'); - st.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); - - st.end(); - }); - - t.test('non-object target, with sources', function (st) { - var signal = {}; - - st.test('boolean', function (st2) { - var bool = assign(true, { a: signal }); - st2.equal(typeof bool, 'object', 'bool is object'); - st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); - st2.equal(bool.a, signal, 'source properties copied'); - st2.end(); - }); - - st.test('number', function (st2) { - var number = assign(1, { a: signal }); - st2.equal(typeof number, 'object', 'number is object'); - st2.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); - st2.equal(number.a, signal, 'source properties copied'); - st2.end(); - }); - - st.test('string', function (st2) { - var string = assign('1', { a: signal }); - st2.equal(typeof string, 'object', 'number is object'); - st2.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); - st2.equal(string.a, signal, 'source properties copied'); - st2.end(); - }); - - st.end(); - }); - - t.test('non-object sources', function (st) { - st.deepEqual(assign({ a: 1 }, null, { b: 2 }), { a: 1, b: 2 }, 'ignores null source'); - st.deepEqual(assign({ a: 1 }, { b: 2 }, undefined), { a: 1, b: 2 }, 'ignores undefined source'); - st.end(); - }); - - t.test('returns the modified target object', function (st) { - var target = {}; - var returned = assign(target, { a: 1 }); - st.equal(returned, target, 'returned object is the same reference as the target object'); - st.end(); - }); - - t.test('has the right length', function (st) { - st.equal(assign.length, 2, 'length is 2 => 2 required arguments'); - st.end(); - }); - - t.test('merge two objects', function (st) { - var target = { a: 1 }; - var returned = assign(target, { b: 2 }); - st.deepEqual(returned, { a: 1, b: 2 }, 'returned object has properties from both'); - st.end(); - }); - - t.test('works with functions', function (st) { - var target = function () {}; - target.a = 1; - var returned = assign(target, { b: 2 }); - st.equal(target, returned, 'returned object is target'); - st.equal(returned.a, 1); - st.equal(returned.b, 2); - st.end(); - }); - - t.test('works with primitives', function (st) { - var target = 2; - var source = { b: 42 }; - var returned = assign(target, source); - st.equal(Object.prototype.toString.call(returned), '[object Number]', 'returned is object form of number primitive'); - st.equal(Number(returned), target, 'returned and target have same valueOf'); - st.equal(returned.b, source.b); - st.end(); - }); - - t.test('merge N objects', function (st) { - var target = { a: 1 }; - var source1 = { b: 2 }; - var source2 = { c: 3 }; - var returned = assign(target, source1, source2); - st.deepEqual(returned, { a: 1, b: 2, c: 3 }, 'returned object has properties from all sources'); - st.end(); - }); - - t.test('only iterates over own keys', function (st) { - var Foo = function () {}; - Foo.prototype.bar = true; - var foo = new Foo(); - foo.baz = true; - var target = { a: 1 }; - var returned = assign(target, foo); - st.equal(returned, target, 'returned object is the same reference as the target object'); - st.deepEqual(target, { a: 1, baz: true }, 'returned object has only own properties from both'); - st.end(); - }); - - t.test('includes enumerable symbols, after keys', { skip: !hasSymbols }, function (st) { - var visited = []; - var obj = {}; - Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); - var symbol = Symbol('enumerable'); - Object.defineProperty(obj, symbol, { - enumerable: true, - get: function () { visited.push(symbol); return Infinity; } - }); - var nonEnumSymbol = Symbol('non-enumerable'); - Object.defineProperty(obj, nonEnumSymbol, { - enumerable: false, - get: function () { visited.push(nonEnumSymbol); return -Infinity; } - }); - var target = assign({}, obj); - st.deepEqual(visited, ['a', symbol], 'key is visited first, then symbol'); - st.equal(target.a, 42, 'target.a is 42'); - st.equal(target[symbol], Infinity, 'target[symbol] is Infinity'); - st.notEqual(target[nonEnumSymbol], -Infinity, 'target[nonEnumSymbol] is not -Infinity'); - st.end(); - }); - - t.test('does not fail when symbols are not present', function (st) { - var getSyms; - if (hasSymbols) { - getSyms = Object.getOwnPropertySymbols; - delete Object.getOwnPropertySymbols; - } - - var visited = []; - var obj = {}; - Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); - var keys = ['a']; - if (hasSymbols) { - var symbol = Symbol('sym'); - Object.defineProperty(obj, symbol, { - enumerable: true, - get: function () { visited.push(symbol); return Infinity; } - }); - keys.push(symbol); - } - var target = assign({}, obj); - st.deepEqual(visited, keys, 'assign visits expected keys'); - st.equal(target.a, 42, 'target.a is 42'); - - if (hasSymbols) { - st.equal(target[symbol], Infinity); - - Object.getOwnPropertySymbols = getSyms; - } - st.end(); - }); - - t.test('preserves correct property enumeration order', function (st) { - var str = 'abcdefghijklmnopqrst'; - var letters = {}; - forEach(str.split(''), function (letter) { - letters[letter] = letter; - }); - - var n = 5; - st.comment('run the next test ' + n + ' times'); - var object = assign({}, letters); - var actual = ''; - for (var k in object) { - actual += k; - } - for (var i = 0; i < n; ++i) { - st.equal(actual, str, 'property enumeration order should be followed'); - } - st.end(); - }); - - t.test('checks enumerability and existence, in case of modification during [[Get]]', { skip: !Object.defineProperty }, function (st) { - var targetBvalue = {}; - var targetCvalue = {}; - var target = { b: targetBvalue, c: targetCvalue }; - var source = {}; - Object.defineProperty(source, 'a', { - enumerable: true, - get: function () { - delete this.b; - Object.defineProperty(this, 'c', { enumerable: false }); - return 'a'; - } - }); - var sourceBvalue = {}; - var sourceCvalue = {}; - source.b = sourceBvalue; - source.c = sourceCvalue; - var result = assign(target, source); - st.equal(result, target, 'sanity check: result is === target'); - st.equal(result.b, targetBvalue, 'target key not overwritten by deleted source key'); - st.equal(result.c, targetCvalue, 'target key not overwritten by non-enumerable source key'); - - st.end(); - }); -}; diff --git a/node_modules/object.getownpropertydescriptors/.editorconfig b/node_modules/object.getownpropertydescriptors/.editorconfig deleted file mode 100644 index eaa21416..00000000 --- a/node_modules/object.getownpropertydescriptors/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/object.getownpropertydescriptors/.eslintrc b/node_modules/object.getownpropertydescriptors/.eslintrc deleted file mode 100644 index 97ada312..00000000 --- a/node_modules/object.getownpropertydescriptors/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": [2, { "min": 1, "max": 30 }], - "new-cap": [2, { "capIsNewExceptions": ["IsCallable", "RequireObjectCoercible", "ToObject"] }] - } -} diff --git a/node_modules/object.getownpropertydescriptors/.jscs.json b/node_modules/object.getownpropertydescriptors/.jscs.json deleted file mode 100644 index 3d099c4b..00000000 --- a/node_modules/object.getownpropertydescriptors/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/object.getownpropertydescriptors/.npmignore b/node_modules/object.getownpropertydescriptors/.npmignore deleted file mode 100644 index 59d842ba..00000000 --- a/node_modules/object.getownpropertydescriptors/.npmignore +++ /dev/null @@ -1,28 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules - -# Users Environment Variables -.lock-wscript diff --git a/node_modules/object.getownpropertydescriptors/.travis.yml b/node_modules/object.getownpropertydescriptors/.travis.yml deleted file mode 100644 index 54ec28b3..00000000 --- a/node_modules/object.getownpropertydescriptors/.travis.yml +++ /dev/null @@ -1,96 +0,0 @@ -language: node_js -node_js: - - "6.2" - - "6.1" - - "6.0" - - "5.12" - - "5.11" - - "5.10" - - "5.9" - - "5.8" - - "5.7" - - "5.6" - - "5.5" - - "5.4" - - "5.3" - - "5.2" - - "5.1" - - "5.0" - - "4.4" - - "4.3" - - "4.2" - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' -script: - - 'if [ "${TRAVIS_NODE_VERSION}" != "4.4" ]; then npm run tests-only ; else npm test ; fi' -sudo: false -matrix: - fast_finish: true - allow_failures: - - node_js: "6.1" - - node_js: "6.0" - - node_js: "5.11" - - node_js: "5.10" - - node_js: "5.9" - - node_js: "5.8" - - node_js: "5.7" - - node_js: "5.6" - - node_js: "5.5" - - node_js: "5.4" - - node_js: "5.3" - - node_js: "5.2" - - node_js: "5.1" - - node_js: "5.0" - - node_js: "4.3" - - node_js: "4.2" - - node_js: "4.1" - - node_js: "4.0" - - node_js: "iojs-v3.2" - - node_js: "iojs-v3.1" - - node_js: "iojs-v3.0" - - node_js: "iojs-v2.4" - - node_js: "iojs-v2.3" - - node_js: "iojs-v2.2" - - node_js: "iojs-v2.1" - - node_js: "iojs-v2.0" - - node_js: "iojs-v1.7" - - node_js: "iojs-v1.6" - - node_js: "iojs-v1.5" - - node_js: "iojs-v1.4" - - node_js: "iojs-v1.3" - - node_js: "iojs-v1.2" - - node_js: "iojs-v1.1" - - node_js: "iojs-v1.0" - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.6" - - node_js: "0.4" diff --git a/node_modules/object.getownpropertydescriptors/CHANGELOG.md b/node_modules/object.getownpropertydescriptors/CHANGELOG.md deleted file mode 100644 index d7c2d150..00000000 --- a/node_modules/object.getownpropertydescriptors/CHANGELOG.md +++ /dev/null @@ -1,51 +0,0 @@ -2.0.3 / 2016-07-26 -================= - * [Fix] Update implementation to not return `undefined` descriptors - * [Deps] update `es-abstract` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `jscs`, `nsp`, `tape`, `semver` - * [Dev Deps] remove unused eccheck script + dep - * [Tests] up to `node` `v6.3`, `v5.12`, `v4.4` - * [Tests] use pretest/posttest for linting/security - * Update to stage 4 - -2.0.2 / 2016-01-27 -================= - * [Fix] ensure that `Object.getOwnPropertyDescriptors` does not fail when `Object.prototype` has a poisoned setter (#1, #2) - -2.0.1 / 2016-01-27 -================= - * [Deps] move `@es-shims/api` to dev deps - -2.0.0 / 2016-01-27 -================= - * [Breaking] implement the es-shims API - * [Deps] update `define-properties`, `es-abstract` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` - * [Tests] fix npm upgrades in older nodes - * [Tests] up to `node` `v5.5` - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - -1.0.4 / 2015-07-20 -================= - * [Tests] Test on `io.js` `v2.4` - * [Deps, Dev Deps] Update `define-properties`, `tape`, `eslint`, `semver` - -1.0.3 / 2015-06-28 -================= - * Increase robustness by caching `Array#{concat, reduce}` - * [Deps] Update `define_properties` - * [Dev Deps] Update `eslint`, `semver`, `nsp` - * [Tests] Test up to `io.js` `v2.3` - -1.0.2 / 2015-05-23 -================= - * Update `es-abstract`, `tape`, `eslint`, `jscs`, `semver`, `covert` - * Test up to `io.js` `v2.0` - -1.0.1 / 2015-03-20 -================= - * Update `es-abstract`, `editorconfig-tools`, `nsp`, `eslint`, `semver`, `replace` - -1.0.0 / 2015-02-17 -================= - * v1.0.0 diff --git a/node_modules/object.getownpropertydescriptors/LICENSE b/node_modules/object.getownpropertydescriptors/LICENSE deleted file mode 100644 index b43df444..00000000 --- a/node_modules/object.getownpropertydescriptors/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -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/object.getownpropertydescriptors/Makefile b/node_modules/object.getownpropertydescriptors/Makefile deleted file mode 100644 index b9e4fe1a..00000000 --- a/node_modules/object.getownpropertydescriptors/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/object.getownpropertydescriptors/README.md b/node_modules/object.getownpropertydescriptors/README.md deleted file mode 100644 index 0fc6c185..00000000 --- a/node_modules/object.getownpropertydescriptors/README.md +++ /dev/null @@ -1,99 +0,0 @@ -#object.getownpropertydescriptors [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -An ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5. -Invoke its "shim" method to shim `Object.getOwnPropertyDescriptors` if it is unavailable, and if `Object.getOwnPropertyDescriptor` is available. - -This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://github.com/tc39/ecma262/pull/582). - -## Example - -```js -var getDescriptors = require('object.getownpropertydescriptors'); -var assert = require('assert'); -var obj = { normal: Infinity }; -var enumDescriptor = { - enumerable: false, - writable: false, - configurable: true, - value: true -}; -var writableDescriptor = { - enumerable: true, - writable: true, - configurable: true, - value: 42 -}; -var symbol = Symbol(); -var symDescriptor = { - enumerable: true, - writable: true, - configurable: false, - value: [symbol] -}; - -Object.defineProperty(obj, 'enumerable', enumDescriptor); -Object.defineProperty(obj, 'writable', writableDescriptor); -Object.defineProperty(obj, 'symbol', symDescriptor); - -var descriptors = getDescriptors(obj); - -assert.deepEqual(descriptors, { - normal: { - enumerable: true, - writable: true, - configurable: true, - value: Infinity - }, - enumerable: enumDescriptor, - writable: writableDescriptor, - symbol: symDescriptor -}); -``` - -```js -var getDescriptors = require('object.getownpropertydescriptors'); -var assert = require('assert'); -/* when Object.getOwnPropertyDescriptors is not present */ -delete Object.getOwnPropertyDescriptors; -var shimmedDescriptors = getDescriptors.shim(); -assert.equal(shimmedDescriptors, getDescriptors); -assert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj)); -``` - -```js -var getDescriptors = require('object.getownpropertydescriptors'); -var assert = require('assert'); -/* when Object.getOwnPropertyDescriptors is present */ -var shimmedDescriptors = getDescriptors.shim(); -assert.notEqual(shimmedDescriptors, getDescriptors); -assert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/object.getownpropertydescriptors -[npm-version-svg]: http://versionbadg.es/ljharb/object.getownpropertydescriptors.svg -[travis-svg]: https://travis-ci.org/ljharb/object.getownpropertydescriptors.svg -[travis-url]: https://travis-ci.org/ljharb/object.getownpropertydescriptors -[deps-svg]: https://david-dm.org/ljharb/object.getownpropertydescriptors.svg -[deps-url]: https://david-dm.org/ljharb/object.getownpropertydescriptors -[dev-deps-svg]: https://david-dm.org/ljharb/object.getownpropertydescriptors/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/object.getownpropertydescriptors#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/object.getownpropertydescriptors.png -[testling-url]: https://ci.testling.com/ljharb/object.getownpropertydescriptors -[npm-badge-png]: https://nodei.co/npm/object.getownpropertydescriptors.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/object.getownpropertydescriptors.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/object.getownpropertydescriptors.svg -[downloads-url]: http://npm-stat.com/charts.html?package=object.getownpropertydescriptors diff --git a/node_modules/object.getownpropertydescriptors/implementation.js b/node_modules/object.getownpropertydescriptors/implementation.js deleted file mode 100644 index 784c22c9..00000000 --- a/node_modules/object.getownpropertydescriptors/implementation.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var ES = require('es-abstract/es7'); - -var defineProperty = Object.defineProperty; -var getDescriptor = Object.getOwnPropertyDescriptor; -var getOwnNames = Object.getOwnPropertyNames; -var getSymbols = Object.getOwnPropertySymbols; -var concat = Function.call.bind(Array.prototype.concat); -var reduce = Function.call.bind(Array.prototype.reduce); -var getAll = getSymbols ? function (obj) { - return concat(getOwnNames(obj), getSymbols(obj)); -} : getOwnNames; - -var isES5 = ES.IsCallable(getDescriptor) && ES.IsCallable(getOwnNames); - -var safePut = function put(obj, prop, val) { // eslint-disable-line max-params - if (defineProperty && prop in obj) { - defineProperty(obj, prop, { - configurable: true, - enumerable: true, - value: val, - writable: true - }); - } else { - obj[prop] = val; - } -}; - -module.exports = function getOwnPropertyDescriptors(value) { - ES.RequireObjectCoercible(value); - if (!isES5) { - throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor'); - } - - var O = ES.ToObject(value); - return reduce(getAll(O), function (acc, key) { - var descriptor = getDescriptor(O, key); - if (typeof descriptor !== 'undefined') { - safePut(acc, key, descriptor); - } - return acc; - }, {}); -}; diff --git a/node_modules/object.getownpropertydescriptors/index.js b/node_modules/object.getownpropertydescriptors/index.js deleted file mode 100644 index bf2aec5d..00000000 --- a/node_modules/object.getownpropertydescriptors/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var define = require('define-properties'); - -var implementation = require('./implementation'); -var getPolyfill = require('./polyfill'); -var shim = require('./shim'); - -define(implementation, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = implementation; diff --git a/node_modules/object.getownpropertydescriptors/package.json b/node_modules/object.getownpropertydescriptors/package.json deleted file mode 100644 index ba81985e..00000000 --- a/node_modules/object.getownpropertydescriptors/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - "object.getownpropertydescriptors@2.0.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "object.getownpropertydescriptors@2.0.3", - "_id": "object.getownpropertydescriptors@2.0.3", - "_inBundle": false, - "_integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "_location": "/object.getownpropertydescriptors", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "object.getownpropertydescriptors@2.0.3", - "name": "object.getownpropertydescriptors", - "escapedName": "object.getownpropertydescriptors", - "rawSpec": "2.0.3", - "saveSpec": null, - "fetchSpec": "2.0.3" - }, - "_requiredBy": [ - "/node-environment-flags" - ], - "_resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "_spec": "2.0.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/object.getownpropertydescriptors/issues" - }, - "dependencies": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - }, - "description": "ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.", - "devDependencies": { - "@es-shims/api": "^1.2.0", - "@ljharb/eslint-config": "^6.0.0", - "covert": "^1.1.0", - "eslint": "^3.1.1", - "jscs": "^3.0.7", - "nsp": "^2.6.1", - "replace": "^0.3.0", - "semver": "^5.3.0", - "tape": "^4.6.0" - }, - "engines": { - "node": ">= 0.8" - }, - "homepage": "https://github.com/ljharb/object.getownpropertydescriptors#readme", - "keywords": [ - "Object.getOwnPropertyDescriptors", - "descriptor", - "property descriptor", - "ES8", - "ES2017", - "shim", - "polyfill", - "getOwnPropertyDescriptor", - "es-shim API" - ], - "license": "MIT", - "main": "index.js", - "name": "object.getownpropertydescriptors", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object.getownpropertydescriptors.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "coverage:quiet": "covert test/*.js --quiet", - "eslint": "eslint test/*.js *.js", - "jscs": "jscs test/*.js *.js", - "lint": "npm run --silent jscs && npm run --silent eslint", - "posttest": "npm run --silent security", - "pretest": "npm run --silent lint && es-shim-api", - "security": "nsp check", - "test": "npm run --silent tests-only", - "test:module": "node test/index.js", - "test:shimmed": "node test/shimmed.js", - "tests-only": "npm run --silent test:shimmed && npm run --silent test:module" - }, - "testling": { - "files": [ - "test/index.js", - "test/shimmed.js" - ], - "browsers": [ - "iexplore/9.0..latest", - "firefox/4.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/5.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/12.0..latest", - "opera/next", - "safari/5.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "2.0.3" -} diff --git a/node_modules/object.getownpropertydescriptors/polyfill.js b/node_modules/object.getownpropertydescriptors/polyfill.js deleted file mode 100644 index 0424acfb..00000000 --- a/node_modules/object.getownpropertydescriptors/polyfill.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = function getPolyfill() { - return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation; -}; diff --git a/node_modules/object.getownpropertydescriptors/shim.js b/node_modules/object.getownpropertydescriptors/shim.js deleted file mode 100644 index 799c7d3c..00000000 --- a/node_modules/object.getownpropertydescriptors/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var getPolyfill = require('./polyfill'); -var define = require('define-properties'); - -module.exports = function shimGetOwnPropertyDescriptors() { - var polyfill = getPolyfill(); - define( - Object, - { getOwnPropertyDescriptors: polyfill }, - { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } } - ); - return polyfill; -}; diff --git a/node_modules/object.getownpropertydescriptors/test/.eslintrc b/node_modules/object.getownpropertydescriptors/test/.eslintrc deleted file mode 100644 index e9ca9795..00000000 --- a/node_modules/object.getownpropertydescriptors/test/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "rules": { - "max-nested-callbacks": [2, 3], - "max-statements": [2, 15], - "max-statements-per-line": [2, { "max": 2 }], - "no-invalid-this": [1] - } -} diff --git a/node_modules/object.getownpropertydescriptors/test/index.js b/node_modules/object.getownpropertydescriptors/test/index.js deleted file mode 100644 index 618a2050..00000000 --- a/node_modules/object.getownpropertydescriptors/test/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var getDescriptors = require('../'); -var test = require('tape'); -var runTests = require('./tests'); - -test('as a function', function (t) { - t.test('bad object/this value', function (st) { - st.throws(function () { return getDescriptors(undefined); }, TypeError, 'undefined is not an object'); - st.throws(function () { return getDescriptors(null); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(getDescriptors, t); - - t.end(); -}); diff --git a/node_modules/object.getownpropertydescriptors/test/shimmed.js b/node_modules/object.getownpropertydescriptors/test/shimmed.js deleted file mode 100644 index c9af4c1d..00000000 --- a/node_modules/object.getownpropertydescriptors/test/shimmed.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var getDescriptors = require('../'); -getDescriptors.shim(); - -var test = require('tape'); -var defineProperties = require('define-properties'); -var runTests = require('./tests'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = function f() {}.name === 'f'; - -test('shimmed', function (t) { - t.equal(Object.getOwnPropertyDescriptors.length, 1, 'Object.getOwnPropertyDescriptors has a length of 1'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal(Object.getOwnPropertyDescriptors.name, 'getOwnPropertyDescriptors', 'Object.getOwnPropertyDescriptors has name "getOwnPropertyDescriptors"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(Object, 'getOwnPropertyDescriptors'), 'Object.getOwnPropertyDescriptors is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad object/this value', { skip: !supportsStrictMode }, function (st) { - st.throws(function () { return getDescriptors(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st.throws(function () { return getDescriptors(null, 'a'); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(Object.getOwnPropertyDescriptors, t); - - t.end(); -}); diff --git a/node_modules/object.getownpropertydescriptors/test/tests.js b/node_modules/object.getownpropertydescriptors/test/tests.js deleted file mode 100644 index b9aa29ed..00000000 --- a/node_modules/object.getownpropertydescriptors/test/tests.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict'; - -module.exports = function (getDescriptors, t) { - var enumDescriptor = { - configurable: true, - enumerable: false, - value: true, - writable: false - }; - var writableDescriptor = { - configurable: true, - enumerable: true, - value: 42, - writable: true - }; - - t.test('works with Object.prototype poisoned setter', { skip: !Object.defineProperty }, function (st) { - var key = 'foo'; - - var obj = {}; - obj[key] = 42; - - var expected = {}; - expected[key] = { - configurable: true, - enumerable: true, - value: 42, - writable: true - }; - - /* eslint-disable no-extend-native, accessor-pairs */ - Object.defineProperty(Object.prototype, key, { configurable: true, set: function (v) { throw new Error(v); } }); - /* eslint-enable no-extend-native, accessor-pairs */ - - var hasOwnNamesBug = false; - try { - Object.getOwnPropertyNames(obj); - } catch (e) { - // v8 in node 0.6 - 0.12 has a bug :-( - hasOwnNamesBug = true; - st.comment('SKIP: this engine has a bug with Object.getOwnPropertyNames: it can not handle a throwing setter on Object.prototype.'); - } - - if (!hasOwnNamesBug) { - st.doesNotThrow(function () { - var result = getDescriptors(obj); - st.deepEqual(result, expected, 'got expected descriptors'); - }); - } - - /* eslint-disable no-extend-native */ - delete Object.prototype[key]; - /* eslint-enable no-extend-native */ - st.end(); - }); - - t.test('gets all expected non-Symbol descriptors', function (st) { - var obj = { normal: Infinity }; - Object.defineProperty(obj, 'enumerable', enumDescriptor); - Object.defineProperty(obj, 'writable', writableDescriptor); - - var descriptors = getDescriptors(obj); - - st.deepEqual(descriptors, { - enumerable: enumDescriptor, - normal: { - configurable: true, - enumerable: true, - value: Infinity, - writable: true - }, - writable: writableDescriptor - }); - st.end(); - }); - - var supportsSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; - t.test('gets Symbol descriptors too', { skip: !supportsSymbols }, function (st) { - var symbol = Symbol(); - var symDescriptor = { - configurable: false, - enumerable: true, - value: [symbol], - writable: true - }; - var obj = { normal: Infinity }; - Object.defineProperty(obj, 'enumerable', enumDescriptor); - Object.defineProperty(obj, 'writable', writableDescriptor); - Object.defineProperty(obj, 'symbol', symDescriptor); - - var descriptors = getDescriptors(obj); - - st.deepEqual(descriptors, { - enumerable: enumDescriptor, - normal: { - configurable: true, - enumerable: true, - value: Infinity, - writable: true - }, - symbol: symDescriptor, - writable: writableDescriptor - }); - st.end(); - }); - - /* global Proxy */ - var supportsProxy = typeof Proxy === 'function'; - t.test('Proxies that return an undefined descriptor', { skip: !supportsProxy }, function (st) { - var obj = { foo: true }; - var fooDescriptor = Object.getOwnPropertyDescriptor(obj, 'foo'); - - var proxy = new Proxy(obj, { - getOwnPropertyDescriptor: function (target, key) { - return Object.getOwnPropertyDescriptor(target, key); - }, - ownKeys: function () { - return [ - 'foo', - 'bar' - ]; - } - }); - st.deepEqual(getDescriptors(proxy), { foo: fooDescriptor }, 'object has no descriptors'); - st.end(); - }); -}; diff --git a/node_modules/os-locale/index.js b/node_modules/os-locale/index.js deleted file mode 100644 index 8c73c99f..00000000 --- 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 e7af2f77..00000000 --- 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 45803d6a..00000000 --- a/node_modules/os-locale/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - "os-locale@3.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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", - "/yargs-unparser/yargs" - ], - "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "_spec": "3.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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 8f9c280e..00000000 --- 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 eaef75e4..00000000 --- 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 654d0bfe..00000000 --- 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 6d351b1e..00000000 --- a/node_modules/p-defer/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_args": [ - [ - "p-defer@1.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 b94f1371..00000000 --- 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-finally/index.js b/node_modules/p-finally/index.js deleted file mode 100644 index 52b7b49c..00000000 --- a/node_modules/p-finally/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -module.exports = (promise, onFinally) => { - onFinally = onFinally || (() => {}); - - return promise.then( - val => new Promise(resolve => { - resolve(onFinally()); - }).then(() => val), - err => new Promise(resolve => { - resolve(onFinally()); - }).then(() => { - throw err; - }) - ); -}; diff --git a/node_modules/p-finally/license b/node_modules/p-finally/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/p-finally/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-finally/package.json b/node_modules/p-finally/package.json deleted file mode 100644 index 1035fe81..00000000 --- a/node_modules/p-finally/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "p-finally@1.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "p-finally@1.0.0", - "_id": "p-finally@1.0.0", - "_inBundle": false, - "_integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "_location": "/p-finally", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "p-finally@1.0.0", - "name": "p-finally", - "escapedName": "p-finally", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/p-finally/issues" - }, - "description": "`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/p-finally#readme", - "keywords": [ - "promise", - "finally", - "handler", - "function", - "async", - "await", - "promises", - "settled", - "ponyfill", - "polyfill", - "shim", - "bluebird" - ], - "license": "MIT", - "name": "p-finally", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/p-finally.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.0", - "xo": { - "esnext": true - } -} diff --git a/node_modules/p-finally/readme.md b/node_modules/p-finally/readme.md deleted file mode 100644 index 09ef3641..00000000 --- a/node_modules/p-finally/readme.md +++ /dev/null @@ -1,47 +0,0 @@ -# p-finally [![Build Status](https://travis-ci.org/sindresorhus/p-finally.svg?branch=master)](https://travis-ci.org/sindresorhus/p-finally) - -> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome - -Useful for cleanup. - - -## Install - -``` -$ npm install --save p-finally -``` - - -## Usage - -```js -const pFinally = require('p-finally'); - -const dir = createTempDir(); - -pFinally(write(dir), () => cleanup(dir)); -``` - - -## API - -### pFinally(promise, [onFinally]) - -Returns a `Promise`. - -#### onFinally - -Type: `Function` - -Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason. - - -## Related - -- [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain -- [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 662d9e0c..00000000 --- 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 389d38fc..00000000 --- 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 e7af2f77..00000000 --- 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 d2dac33c..00000000 --- a/node_modules/p-is-promise/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "p-is-promise@2.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 0e0e4817..00000000 --- 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/path-key/index.js b/node_modules/path-key/index.js deleted file mode 100644 index 62c8250a..00000000 --- a/node_modules/path-key/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -module.exports = opts => { - opts = opts || {}; - - const env = opts.env || process.env; - const platform = opts.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; -}; diff --git a/node_modules/path-key/license b/node_modules/path-key/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/path-key/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/path-key/package.json b/node_modules/path-key/package.json deleted file mode 100644 index 35672aa0..00000000 --- a/node_modules/path-key/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_args": [ - [ - "path-key@2.0.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "path-key@2.0.1", - "_id": "path-key@2.0.1", - "_inBundle": false, - "_integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "_location": "/path-key", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "path-key@2.0.1", - "name": "path-key", - "escapedName": "path-key", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/cross-spawn", - "/npm-run-path" - ], - "_resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/path-key/issues" - }, - "description": "Get the PATH environment variable key cross-platform", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/path-key#readme", - "keywords": [ - "path", - "key", - "environment", - "env", - "variable", - "var", - "get", - "cross-platform", - "windows" - ], - "license": "MIT", - "name": "path-key", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-key.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.1", - "xo": { - "esnext": true - } -} diff --git a/node_modules/path-key/readme.md b/node_modules/path-key/readme.md deleted file mode 100644 index cb5710aa..00000000 --- a/node_modules/path-key/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key) - -> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform - -It's usually `PATH`, but on Windows it can be any casing like `Path`... - - -## Install - -``` -$ npm install --save path-key -``` - - -## Usage - -```js -const pathKey = require('path-key'); - -const key = pathKey(); -//=> 'PATH' - -const PATH = process.env[key]; -//=> '/usr/local/bin:/usr/bin:/bin' -``` - - -## API - -### pathKey([options]) - -#### options - -##### env - -Type: `Object`
        -Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env) - -Use a custom environment variables object. - -#### platform - -Type: `string`
        -Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) - -Get the PATH key for a specific platform. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-parse/.travis.yml b/node_modules/path-parse/.travis.yml deleted file mode 100644 index dae31da9..00000000 --- a/node_modules/path-parse/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "0.12" - - "0.11" - - "0.10" - - "0.10.12" - - "0.8" - - "0.6" - - "iojs" diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js index 3b7601fe..f062d0a2 100644 --- a/node_modules/path-parse/index.js +++ b/node_modules/path-parse/index.js @@ -2,29 +2,14 @@ var isWindows = process.platform === 'win32'; -// Regex to split a windows path into three parts: [*, device, slash, -// tail] windows-only -var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - -// Regex to split the tail part of the above into [*, dir, basename, ext] -var splitTailRe = - /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; +// Regex to split a windows path into into [dir, root, basename, name, ext] +var splitWindowsRe = + /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; var win32 = {}; -// Function to split a filename into [root, dir, basename, ext] function win32SplitPath(filename) { - // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; - // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; - return [device, dir, basename, ext]; + return splitWindowsRe.exec(filename).slice(1); } win32.parse = function(pathString) { @@ -34,24 +19,24 @@ win32.parse = function(pathString) { ); } var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 4) { + if (!allParts || allParts.length !== 5) { throw new TypeError("Invalid path '" + pathString + "'"); } return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, -1), + root: allParts[1], + dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + ext: allParts[4], + name: allParts[3] }; }; -// Split a filename into [root, dir, basename, ext], unix version +// Split a filename into [dir, root, basename, name, ext], unix version // 'root' is just a slash, or nothing. var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; var posix = {}; @@ -67,19 +52,16 @@ posix.parse = function(pathString) { ); } var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 4) { + if (!allParts || allParts.length !== 5) { throw new TypeError("Invalid path '" + pathString + "'"); } - allParts[1] = allParts[1] || ''; - allParts[2] = allParts[2] || ''; - allParts[3] = allParts[3] || ''; - + return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, -1), + root: allParts[1], + dir: allParts[0].slice(0, -1), base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + ext: allParts[4], + name: allParts[3], }; }; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json index e42d29dd..36c23f84 100644 --- a/node_modules/path-parse/package.json +++ b/node_modules/path-parse/package.json @@ -1,42 +1,15 @@ { - "_args": [ - [ - "path-parse@1.0.6", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "path-parse@1.0.6", - "_id": "path-parse@1.0.6", - "_inBundle": false, - "_integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "_location": "/path-parse", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "path-parse@1.0.6", - "name": "path-parse", - "escapedName": "path-parse", - "rawSpec": "1.0.6", - "saveSpec": null, - "fetchSpec": "1.0.6" - }, - "_requiredBy": [ - "/resolve" - ], - "_resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "_spec": "1.0.6", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Javier Blanco", - "email": "http://jbgutierrez.info" + "name": "path-parse", + "version": "1.0.7", + "description": "Node.js path.parse() ponyfill", + "main": "index.js", + "scripts": { + "test": "node test.js" }, - "bugs": { - "url": "https://github.com/jbgutierrez/path-parse/issues" + "repository": { + "type": "git", + "url": "https://github.com/jbgutierrez/path-parse.git" }, - "description": "Node.js path.parse() ponyfill", - "homepage": "https://github.com/jbgutierrez/path-parse#readme", "keywords": [ "path", "paths", @@ -51,15 +24,10 @@ "polyfill", "shim" ], + "author": "Javier Blanco ", "license": "MIT", - "main": "index.js", - "name": "path-parse", - "repository": { - "type": "git", - "url": "git+https://github.com/jbgutierrez/path-parse.git" - }, - "scripts": { - "test": "node test.js" + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" }, - "version": "1.0.6" + "homepage": "https://github.com/jbgutierrez/path-parse#readme" } diff --git a/node_modules/path-parse/test.js b/node_modules/path-parse/test.js deleted file mode 100644 index 0b30c123..00000000 --- a/node_modules/path-parse/test.js +++ /dev/null @@ -1,77 +0,0 @@ -var assert = require('assert'); -var pathParse = require('./index'); - -var winParseTests = [ - [{ root: 'C:\\', dir: 'C:\\path\\dir', base: 'index.html', ext: '.html', name: 'index' }, 'C:\\path\\dir\\index.html'], - [{ root: 'C:\\', dir: 'C:\\another_path\\DIR\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'C:\\another_path\\DIR\\1\\2\\33\\index'], - [{ root: '', dir: 'another_path\\DIR with spaces\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'another_path\\DIR with spaces\\1\\2\\33\\index'], - [{ root: '\\', dir: '\\foo', base: 'C:', ext: '', name: 'C:' }, '\\foo\\C:'], - [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'], - [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, '.\\file'], - - // unc - [{ root: '\\\\server\\share\\', dir: '\\\\server\\share\\', base: 'file_path', ext: '', name: 'file_path' }, '\\\\server\\share\\file_path'], - [{ root: '\\\\server two\\shared folder\\', dir: '\\\\server two\\shared folder\\', base: 'file path.zip', ext: '.zip', name: 'file path' }, '\\\\server two\\shared folder\\file path.zip'], - [{ root: '\\\\teela\\admin$\\', dir: '\\\\teela\\admin$\\', base: 'system32', ext: '', name: 'system32' }, '\\\\teela\\admin$\\system32'], - [{ root: '\\\\?\\UNC\\', dir: '\\\\?\\UNC\\server', base: 'share', ext: '', name: 'share' }, '\\\\?\\UNC\\server\\share'] -]; - -var winSpecialCaseFormatTests = [ - [{dir: 'some\\dir'}, 'some\\dir\\'], - [{base: 'index.html'}, 'index.html'], - [{}, ''] -]; - -var unixParseTests = [ - [{ root: '/', dir: '/home/user/dir', base: 'file.txt', ext: '.txt', name: 'file' }, '/home/user/dir/file.txt'], - [{ root: '/', dir: '/home/user/a dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a dir/another File.zip'], - [{ root: '/', dir: '/home/user/a dir/', base: 'another&File.', ext: '.', name: 'another&File' }, '/home/user/a dir//another&File.'], - [{ root: '/', dir: '/home/user/a$$$dir/', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a$$$dir//another File.zip'], - [{ root: '', dir: 'user/dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, 'user/dir/another File.zip'], - [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'], - [{ root: '', dir: '', base: '.\\file', ext: '', name: '.\\file' }, '.\\file'], - [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, './file'], - [{ root: '', dir: '', base: 'C:\\foo', ext: '', name: 'C:\\foo' }, 'C:\\foo'] -]; - -var unixSpecialCaseFormatTests = [ - [{dir: 'some/dir'}, 'some/dir/'], - [{base: 'index.html'}, 'index.html'], - [{}, ''] -]; - -var errors = [ - {input: null, message: /Parameter 'pathString' must be a string, not/}, - {input: {}, message: /Parameter 'pathString' must be a string, not object/}, - {input: true, message: /Parameter 'pathString' must be a string, not boolean/}, - {input: 1, message: /Parameter 'pathString' must be a string, not number/}, - {input: undefined, message: /Parameter 'pathString' must be a string, not undefined/}, -]; - -checkParseFormat(pathParse.win32, winParseTests); -checkParseFormat(pathParse.posix, unixParseTests); -checkErrors(pathParse.win32); -checkErrors(pathParse.posix); - -function checkErrors(parse) { - errors.forEach(function(errorCase) { - try { - parse(errorCase.input); - } catch(err) { - assert.ok(err instanceof TypeError); - assert.ok( - errorCase.message.test(err.message), - 'expected ' + errorCase.message + ' to match ' + err.message - ); - return; - } - - assert.fail('should have thrown'); - }); -} - -function checkParseFormat(parse, testCases) { - testCases.forEach(function(testCase) { - assert.deepEqual(parse(testCase[1]), testCase[0]); - }); -} diff --git a/node_modules/pathval/README.md b/node_modules/pathval/README.md index 01abfd8e..22a841eb 100644 --- a/node_modules/pathval/README.md +++ b/node_modules/pathval/README.md @@ -1,7 +1,9 @@

        - ChaiJS pathval + ChaiJS +
        + pathval

        @@ -100,7 +102,7 @@ The primary export of `pathval` is an object which has the following methods: * `hasProperty(object, name)` - Checks whether an `object` has `name`d property or numeric array index. * `getPathInfo(object, path)` - Returns an object with info indicating the value of the `parent` of that path, the `name ` of the property we're retrieving and its `value`. * `getPathValue(object, path)` - Retrieves the value of a property at a given `path` inside an `object`'. -* `setPathValue(object, path, value)` - Sets the `value` of a property at a given `path` inside an `object`'. +* `setPathValue(object, path, value)` - Sets the `value` of a property at a given `path` inside an `object` and returns the object in which the property has been set. ```js var pathval = require('pathval'); diff --git a/node_modules/pathval/index.js b/node_modules/pathval/index.js index 1ec2148a..d0dc43e0 100644 --- a/node_modules/pathval/index.js +++ b/node_modules/pathval/index.js @@ -76,13 +76,20 @@ function parsePath(path) { var str = path.replace(/([^\\])\[/g, '$1.['); var parts = str.match(/(\\\.|[^.]+?)+/g); return parts.map(function mapMatches(value) { + if ( + value === 'constructor' || + value === '__proto__' || + value === 'prototype' + ) { + return {}; + } var regexp = /^\[(\d+)\]$/; var mArr = regexp.exec(value); var parsed = null; if (mArr) { parsed = { i: parseFloat(mArr[1]) }; } else { - parsed = { p: value.replace(/\\([.\[\]])/g, '$1') }; + parsed = { p: value.replace(/\\([.[\]])/g, '$1') }; } return parsed; @@ -107,7 +114,7 @@ function parsePath(path) { function internalGetPathValue(obj, parsed, pathDepth) { var temporaryValue = obj; var res = null; - pathDepth = (typeof pathDepth === 'undefined' ? parsed.length : pathDepth); + pathDepth = typeof pathDepth === 'undefined' ? parsed.length : pathDepth; for (var i = 0; i < pathDepth; i++) { var part = parsed[i]; @@ -118,7 +125,7 @@ function internalGetPathValue(obj, parsed, pathDepth) { temporaryValue = temporaryValue[part.p]; } - if (i === (pathDepth - 1)) { + if (i === pathDepth - 1) { res = temporaryValue; } } @@ -152,7 +159,7 @@ function internalSetPathValue(obj, val, parsed) { part = parsed[i]; // If it's the last part of the path, we set the 'propName' value with the property name - if (i === (pathDepth - 1)) { + if (i === pathDepth - 1) { propName = typeof part.p === 'undefined' ? part.i : part.p; // Now we set the property with the name held by 'propName' on object with the desired val tempObj[propName] = val; @@ -199,7 +206,10 @@ function getPathInfo(obj, path) { var parsed = parsePath(path); var last = parsed[parsed.length - 1]; var info = { - parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj, + parent: + parsed.length > 1 ? + internalGetPathValue(obj, parsed, parsed.length - 1) : + obj, name: last.p || last.i, value: internalGetPathValue(obj, parsed), }; diff --git a/node_modules/pathval/package.json b/node_modules/pathval/package.json index c2de8744..48ead1bd 100644 --- a/node_modules/pathval/package.json +++ b/node_modules/pathval/package.json @@ -1,72 +1,41 @@ { - "_args": [ - [ - "pathval@1.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] + "name": "pathval", + "description": "Object value retrieval given a string path", + "homepage": "https://github.com/chaijs/pathval", + "version": "1.1.1", + "keywords": [ + "pathval", + "value retrieval", + "chai util" ], - "_development": true, - "_from": "pathval@1.1.0", - "_id": "pathval@1.1.0", - "_inBundle": false, - "_integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "_location": "/pathval", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "pathval@1.1.0", - "name": "pathval", - "escapedName": "pathval", - "rawSpec": "1.1.0", - "saveSpec": null, - "fetchSpec": "1.1.0" - }, - "_requiredBy": [ - "/chai" + "license": "MIT", + "author": "Veselin Todorov ", + "files": [ + "index.js", + "pathval.js" ], - "_resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "_spec": "1.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Veselin Todorov", - "email": "hi@vesln.com" + "main": "./index.js", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chaijs/pathval.git" }, - "bugs": { - "url": "https://github.com/chaijs/pathval/issues" + "scripts": { + "build": "browserify --standalone pathval -o pathval.js", + "lint": "eslint --ignore-path .gitignore .", + "lint:fix": "npm run lint -- --fix", + "prepublish": "npm run build", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "pretest": "npm run lint", + "test": "npm run test:node && npm run test:browser && npm run upload-coverage", + "test:browser": "karma start --singleRun=true", + "test:node": "nyc mocha", + "upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0" }, "config": { "ghooks": { "commit-msg": "validate-commit-msg" } }, - "description": "Object value retrieval given a string path", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^1.0.0", - "coveralls": "2.11.9", - "eslint": "^2.4.0", - "eslint-config-strict": "^8.5.0", - "eslint-plugin-filenames": "^0.2.0", - "ghooks": "^1.0.1", - "istanbul": "^0.4.2", - "karma": "^0.13.22", - "karma-browserify": "^5.0.2", - "karma-coverage": "^0.5.5", - "karma-mocha": "^0.2.2", - "karma-phantomjs-launcher": "^1.0.0", - "karma-sauce-launcher": "^0.3.1", - "lcov-result-merger": "^1.0.2", - "mocha": "^3.1.2", - "phantomjs-prebuilt": "^2.1.5", - "semantic-release": "^4.3.5", - "simple-assert": "^1.0.0", - "travis-after-all": "^1.4.4", - "validate-commit-msg": "^2.3.1" - }, - "engines": { - "node": "*" - }, "eslintConfig": { "extends": [ "strict/es5" @@ -82,33 +51,30 @@ "max-statements": 0 } }, - "files": [ - "index.js", - "pathval.js" - ], - "homepage": "https://github.com/chaijs/pathval", - "keywords": [ - "pathval", - "value retrieval", - "chai util" - ], - "license": "MIT", - "main": "./index.js", - "name": "pathval", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/chaijs/pathval.git" - }, - "scripts": { - "build": "browserify --bare $npm_package_main --standalone pathval -o pathval.js", - "lint": "eslint --ignore-path .gitignore .", - "prepublish": "npm run build", - "pretest": "npm run lint", - "semantic-release": "semantic-release pre && npm publish && semantic-release post", - "test": "npm run test:node && npm run test:browser && npm run upload-coverage", - "test:browser": "karma start --singleRun=true", - "test:node": "istanbul cover _mocha", - "upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0" + "devDependencies": { + "browserify": "^17.0.0", + "browserify-istanbul": "^3.0.1", + "coveralls": "^3.1.0", + "eslint": "^7.13.0", + "eslint-config-strict": "^14.0.1", + "eslint-plugin-filenames": "^1.3.2", + "ghooks": "^2.0.4", + "karma": "^5.2.3", + "karma-browserify": "^7.0.0", + "karma-coverage": "^2.0.3", + "karma-mocha": "^2.0.1", + "karma-phantomjs-launcher": "^1.0.4", + "karma-sauce-launcher": "^4.3.3", + "lcov-result-merger": "^3.1.0", + "mocha": "^8.2.1", + "nyc": "^15.1.0", + "phantomjs-prebuilt": "^2.1.16", + "semantic-release": "^17.2.2", + "simple-assert": "^1.0.0", + "travis-after-all": "^1.4.5", + "validate-commit-msg": "^2.14.0" }, - "version": "1.1.0" + "engines": { + "node": "*" + } } diff --git a/node_modules/pathval/pathval.js b/node_modules/pathval/pathval.js index 77086363..0070ed45 100644 --- a/node_modules/pathval/pathval.js +++ b/node_modules/pathval/pathval.js @@ -1,295 +1 @@ -(function(f){if(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.pathval = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&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?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - * @see https://github.com/logicalparadox/filtr - * MIT Licensed - */ - -/** - * ### .hasProperty(object, name) - * - * This allows checking whether an object has own - * or inherited from prototype chain named property. - * - * Basically does the same thing as the `in` - * operator but works properly with null/undefined values - * and other primitives. - * - * var obj = { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * - * The following would be the results. - * - * hasProperty(obj, 'str'); // true - * hasProperty(obj, 'constructor'); // true - * hasProperty(obj, 'bar'); // false - * - * hasProperty(obj.str, 'length'); // true - * hasProperty(obj.str, 1); // true - * hasProperty(obj.str, 5); // false - * - * hasProperty(obj.arr, 'length'); // true - * hasProperty(obj.arr, 2); // true - * hasProperty(obj.arr, 3); // false - * - * @param {Object} object - * @param {String|Symbol} name - * @returns {Boolean} whether it exists - * @namespace Utils - * @name hasProperty - * @api public - */ - -function hasProperty(obj, name) { - if (typeof obj === 'undefined' || obj === null) { - return false; - } - - // The `in` operator does not work with primitives. - return name in Object(obj); -} - -/* ! - * ## parsePath(path) - * - * Helper function used to parse string object - * paths. Use in conjunction with `internalGetPathValue`. - * - * var parsed = parsePath('myobject.property.subprop'); - * - * ### Paths: - * - * * Can be infinitely deep and nested. - * * Arrays are also valid using the formal `myobject.document[3].property`. - * * Literal dots and brackets (not delimiter) must be backslash-escaped. - * - * @param {String} path - * @returns {Object} parsed - * @api private - */ - -function parsePath(path) { - var str = path.replace(/([^\\])\[/g, '$1.['); - var parts = str.match(/(\\\.|[^.]+?)+/g); - return parts.map(function mapMatches(value) { - var regexp = /^\[(\d+)\]$/; - var mArr = regexp.exec(value); - var parsed = null; - if (mArr) { - parsed = { i: parseFloat(mArr[1]) }; - } else { - parsed = { p: value.replace(/\\([.\[\]])/g, '$1') }; - } - - return parsed; - }); -} - -/* ! - * ## internalGetPathValue(obj, parsed[, pathDepth]) - * - * Helper companion function for `.parsePath` that returns - * the value located at the parsed address. - * - * var value = getPathValue(obj, parsed); - * - * @param {Object} object to search against - * @param {Object} parsed definition from `parsePath`. - * @param {Number} depth (nesting level) of the property we want to retrieve - * @returns {Object|Undefined} value - * @api private - */ - -function internalGetPathValue(obj, parsed, pathDepth) { - var temporaryValue = obj; - var res = null; - pathDepth = (typeof pathDepth === 'undefined' ? parsed.length : pathDepth); - - for (var i = 0; i < pathDepth; i++) { - var part = parsed[i]; - if (temporaryValue) { - if (typeof part.p === 'undefined') { - temporaryValue = temporaryValue[part.i]; - } else { - temporaryValue = temporaryValue[part.p]; - } - - if (i === (pathDepth - 1)) { - res = temporaryValue; - } - } - } - - return res; -} - -/* ! - * ## internalSetPathValue(obj, value, parsed) - * - * Companion function for `parsePath` that sets - * the value located at a parsed address. - * - * internalSetPathValue(obj, 'value', parsed); - * - * @param {Object} object to search and define on - * @param {*} value to use upon set - * @param {Object} parsed definition from `parsePath` - * @api private - */ - -function internalSetPathValue(obj, val, parsed) { - var tempObj = obj; - var pathDepth = parsed.length; - var part = null; - // Here we iterate through every part of the path - for (var i = 0; i < pathDepth; i++) { - var propName = null; - var propVal = null; - part = parsed[i]; - - // If it's the last part of the path, we set the 'propName' value with the property name - if (i === (pathDepth - 1)) { - propName = typeof part.p === 'undefined' ? part.i : part.p; - // Now we set the property with the name held by 'propName' on object with the desired val - tempObj[propName] = val; - } else if (typeof part.p !== 'undefined' && tempObj[part.p]) { - tempObj = tempObj[part.p]; - } else if (typeof part.i !== 'undefined' && tempObj[part.i]) { - tempObj = tempObj[part.i]; - } else { - // If the obj doesn't have the property we create one with that name to define it - var next = parsed[i + 1]; - // Here we set the name of the property which will be defined - propName = typeof part.p === 'undefined' ? part.i : part.p; - // Here we decide if this property will be an array or a new object - propVal = typeof next.p === 'undefined' ? [] : {}; - tempObj[propName] = propVal; - tempObj = tempObj[propName]; - } - } -} - -/** - * ### .getPathInfo(object, path) - * - * This allows the retrieval of property info in an - * object given a string path. - * - * The path info consists of an object with the - * following properties: - * - * * parent - The parent object of the property referenced by `path` - * * name - The name of the final property, a number if it was an array indexer - * * value - The value of the property, if it exists, otherwise `undefined` - * * exists - Whether the property exists or not - * - * @param {Object} object - * @param {String} path - * @returns {Object} info - * @namespace Utils - * @name getPathInfo - * @api public - */ - -function getPathInfo(obj, path) { - var parsed = parsePath(path); - var last = parsed[parsed.length - 1]; - var info = { - parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj, - name: last.p || last.i, - value: internalGetPathValue(obj, parsed), - }; - info.exists = hasProperty(info.parent, info.name); - - return info; -} - -/** - * ### .getPathValue(object, path) - * - * This allows the retrieval of values in an - * object given a string path. - * - * var obj = { - * prop1: { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * , prop2: { - * arr: [ { nested: 'Universe' } ] - * , str: 'Hello again!' - * } - * } - * - * The following would be the results. - * - * getPathValue(obj, 'prop1.str'); // Hello - * getPathValue(obj, 'prop1.att[2]'); // b - * getPathValue(obj, 'prop2.arr[0].nested'); // Universe - * - * @param {Object} object - * @param {String} path - * @returns {Object} value or `undefined` - * @namespace Utils - * @name getPathValue - * @api public - */ - -function getPathValue(obj, path) { - var info = getPathInfo(obj, path); - return info.value; -} - -/** - * ### .setPathValue(object, path, value) - * - * Define the value in an object at a given string path. - * - * ```js - * var obj = { - * prop1: { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * , prop2: { - * arr: [ { nested: 'Universe' } ] - * , str: 'Hello again!' - * } - * }; - * ``` - * - * The following would be acceptable. - * - * ```js - * var properties = require('tea-properties'); - * properties.set(obj, 'prop1.str', 'Hello Universe!'); - * properties.set(obj, 'prop1.arr[2]', 'B'); - * properties.set(obj, 'prop2.arr[0].nested.value', { hello: 'universe' }); - * ``` - * - * @param {Object} object - * @param {String} path - * @param {Mixed} value - * @api private - */ - -function setPathValue(obj, path, val) { - var parsed = parsePath(path); - internalSetPathValue(obj, val, parsed); - return obj; -} - -module.exports = { - hasProperty: hasProperty, - getPathInfo: getPathInfo, - getPathValue: getPathValue, - setPathValue: setPathValue, -}; - -},{}]},{},[1])(1) -}); \ No newline at end of file +(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= 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){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).psl=a()}(function(){return function e(s,n,t){function m(o,a){if(!n[o]){if(!s[o]){var i="function"==typeof require&&require;if(!a&&i)return i(o,!0);if(u)return u(o,!0);throw(a=new Error("Cannot find module '"+o+"'")).code="MODULE_NOT_FOUND",a}i=n[o]={exports:{}},s[o][0].call(i.exports,function(a){return m(s[o][1][a]||a)},i,i.exports,e,s,n,t)}return n[o].exports}for(var u="function"==typeof require&&require,a=0;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=j-1,y=Math.floor,f=String.fromCharCode;function v(a){throw new RangeError(c[a])}function k(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="",i=(1>>10&1023|55296),a=56320|1023&a),o+=f(a)}).join("")}function z(a,o){return a+22+75*(a<26)-((0!=o)<<5)}function x(a,o,i){var e=0;for(a=i?y(a/m):a>>1,a+=y(a/o);l*b>>1y((d-p)/n))&&v("overflow"),p+=m*n,!(m<(m=t<=l?1:l+b<=t?b:t-l));t+=j)n>y(d/(m=j-m))&&v("overflow"),n*=m;l=x(p-s,o=u.length+1,0==s),y(p/o)>d-c&&v("overflow"),c+=y(p/o),p%=o,u.splice(p++,0,c)}return h(u)}function A(a){for(var o,i,e,s,n,t,m,u,r,p,c=[],l=(a=w(a)).length,k=128,g=72,h=o=0;hy((d-o)/(u=i+1))&&v("overflow"),o+=(s-k)*u,k=s,h=0;hd&&v("overflow"),m==k){for(n=o,t=j;!(n<(r=t<=g?1:g+b<=t?b:t-g));t+=j)c.push(f(z(r+(p=n-r)%(r=j-r),0))),n=y(p/r);c.push(f(z(n,0))),g=x(o,u,i==e),o=0,++i}++o,++k}return c.join("")}if(s={version:"1.4.1",ucs2:{decode:w,encode:h},decode:q,encode:A,toASCII:function(a){return g(a,function(a){return r.test(a)?"xn--"+A(a):a})},toUnicode:function(a){return g(a,function(a){return u.test(a)?q(a.slice(4).toLowerCase()):a})}},o&&i)if(_.exports==o)i.exports=s;else for(n in s)s.hasOwnProperty(n)&&(o[n]=s[n]);else a.punycode=s}.call(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 d0ef2960..baddd50b 100644 --- a/node_modules/psl/package.json +++ b/node_modules/psl/package.json @@ -1,80 +1,43 @@ { - "_args": [ - [ - "psl@1.3.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "psl@1.3.0", - "_id": "psl@1.3.0", - "_inBundle": false, - "_integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", - "_location": "/psl", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "psl@1.3.0", - "name": "psl", - "escapedName": "psl", - "rawSpec": "1.3.0", - "saveSpec": null, - "fetchSpec": "1.3.0" - }, - "_requiredBy": [ - "/tough-cookie" - ], - "_resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", - "_spec": "1.3.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Lupo Montero", - "email": "lupomontero@gmail.com", - "url": "https://lupomontero.com/" - }, - "bugs": { - "url": "https://github.com/lupomontero/psl/issues" - }, - "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", - "eslint-config-hapi": "^12.0.0", - "eslint-plugin-hapi": "^4.1.0", - "karma": "^4.2.0", - "karma-browserify": "^6.1.0", - "karma-mocha": "^1.3.0", - "karma-mocha-reporter": "^2.2.5", - "karma-phantomjs-launcher": "^1.0.4", - "mocha": "^6.2.0", - "phantomjs-prebuilt": "^2.1.16", - "request": "^2.88.0", - "uglify-js": "^3.6.0", - "watchify": "^3.11.1" - }, - "homepage": "https://github.com/lupomontero/psl#readme", - "keywords": [ - "publicsuffix", - "publicsuffixlist" - ], - "license": "MIT", - "main": "index.js", "name": "psl", + "version": "1.9.0", + "description": "Domain name parser based on the Public Suffix List", "repository": { "type": "git", - "url": "git+ssh://git@github.com/lupomontero/psl.git" + "url": "git@github.com:lupomontero/psl.git" }, + "main": "index.js", "scripts": { + "lint": "eslint .", + "test": "mocha test/*.spec.js", + "test:browserstack": "node test/browserstack.js", + "watch": "mocha test --watch", + "prebuild": "./scripts/update-rules.js", "build": "browserify ./index.js --standalone=psl > ./dist/psl.js", - "changelog": "git log $(git describe --tags --abbrev=0)..HEAD --oneline --format=\"%h %s (%an <%ae>)\"", - "commit-and-pr": "commit-and-pr", "postbuild": "cat ./dist/psl.js | uglifyjs -c -m > ./dist/psl.min.js", - "prebuild": "./scripts/update-rules.js", - "pretest": "eslint .", - "test": "mocha test && karma start ./karma.conf.js --single-run", - "watch": "mocha test --watch" + "commit-and-pr": "commit-and-pr", + "changelog": "git log $(git describe --tags --abbrev=0)..HEAD --oneline --format=\"%h %s (%an <%ae>)\"" }, - "version": "1.3.0" + "keywords": [ + "publicsuffix", + "publicsuffixlist" + ], + "author": "Lupo Montero (https://lupomontero.com/)", + "license": "MIT", + "devDependencies": { + "browserify": "^17.0.0", + "browserslist-browserstack": "^3.1.1", + "browserstack-local": "^1.5.1", + "chai": "^4.3.6", + "commit-and-pr": "^1.0.4", + "eslint": "^8.19.0", + "JSONStream": "^1.3.5", + "mocha": "^7.2.0", + "porch": "^2.0.0", + "request": "^2.88.2", + "selenium-webdriver": "^4.3.0", + "serve-handler": "^6.1.3", + "uglify-js": "^3.16.2", + "watchify": "^4.0.0" + } } diff --git a/node_modules/pump/.travis.yml b/node_modules/pump/.travis.yml deleted file mode 100644 index 17f94330..00000000 --- a/node_modules/pump/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - -script: "npm test" diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/pump/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -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/pump/README.md b/node_modules/pump/README.md deleted file mode 100644 index 4c81471a..00000000 --- a/node_modules/pump/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# pump - -pump is a small node module that pipes streams together and destroys all of them if one of them closes. - -``` -npm install pump -``` - -[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) - -## What problem does it solve? - -When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. -You are also not able to provide a callback to tell when then pipe has finished. - -pump does these two things for you - -## Usage - -Simply pass the streams you want to pipe together to pump and add an optional callback - -``` js -var pump = require('pump') -var fs = require('fs') - -var source = fs.createReadStream('/dev/random') -var dest = fs.createWriteStream('/dev/null') - -pump(source, dest, function(err) { - console.log('pipe finished', err) -}) - -setTimeout(function() { - dest.destroy() // when dest is closed pump will destroy source -}, 1000) -``` - -You can use pump to pipe more than two streams together as well - -``` js -var transform = someTransformStream() - -pump(source, transform, anotherTransform, dest, function(err) { - console.log('pipe finished', err) -}) -``` - -If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. - -Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do: - -``` -return pump(s1, s2) // returns s2 -``` - -If you want to return a stream that combines *both* s1 and s2 to a single stream use -[pumpify](https://github.com/mafintosh/pumpify) instead. - -## License - -MIT - -## Related - -`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js deleted file mode 100644 index c15059f1..00000000 --- a/node_modules/pump/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var once = require('once') -var eos = require('end-of-stream') -var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} -var ancient = /^v?\.0/.test(process.version) - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json deleted file mode 100644 index d05bee7b..00000000 --- a/node_modules/pump/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_args": [ - [ - "pump@3.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "pump@3.0.0", - "_id": "pump@3.0.0", - "_inBundle": false, - "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "_location": "/pump", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "pump@3.0.0", - "name": "pump", - "escapedName": "pump", - "rawSpec": "3.0.0", - "saveSpec": null, - "fetchSpec": "3.0.0" - }, - "_requiredBy": [ - "/get-stream" - ], - "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Mathias Buus Madsen", - "email": "mathiasbuus@gmail.com" - }, - "browser": { - "fs": false - }, - "bugs": { - "url": "https://github.com/mafintosh/pump/issues" - }, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - }, - "description": "pipe streams together and close all of them if one of them closes", - "homepage": "https://github.com/mafintosh/pump#readme", - "keywords": [ - "streams", - "pipe", - "destroy", - "callback" - ], - "license": "MIT", - "name": "pump", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/pump.git" - }, - "scripts": { - "test": "node test-browser.js && node test-node.js" - }, - "version": "3.0.0" -} diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js deleted file mode 100644 index 9a06c8a4..00000000 --- a/node_modules/pump/test-browser.js +++ /dev/null @@ -1,66 +0,0 @@ -var stream = require('stream') -var pump = require('./index') - -var rs = new stream.Readable() -var ws = new stream.Writable() - -rs._read = function (size) { - this.push(Buffer(size).fill('abc')) -} - -ws._write = function (chunk, encoding, cb) { - setTimeout(function () { - cb() - }, 100) -} - -var toHex = function () { - var reverse = new (require('stream').Transform)() - - reverse._transform = function (chunk, enc, callback) { - reverse.push(chunk.toString('hex')) - callback() - } - - return reverse -} - -var wsClosed = false -var rsClosed = false -var callbackCalled = false - -var check = function () { - if (wsClosed && rsClosed && callbackCalled) { - console.log('test-browser.js passes') - clearTimeout(timeout) - } -} - -ws.on('finish', function () { - wsClosed = true - check() -}) - -rs.on('end', function () { - rsClosed = true - check() -}) - -var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { - callbackCalled = true - check() -}) - -if (res !== ws) { - throw new Error('should return last stream') -} - -setTimeout(function () { - rs.push(null) - rs.emit('close') -}, 1000) - -var timeout = setTimeout(function () { - check() - throw new Error('timeout') -}, 5000) diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js deleted file mode 100644 index 561251a0..00000000 --- a/node_modules/pump/test-node.js +++ /dev/null @@ -1,53 +0,0 @@ -var pump = require('./index') - -var rs = require('fs').createReadStream('/dev/random') -var ws = require('fs').createWriteStream('/dev/null') - -var toHex = function () { - var reverse = new (require('stream').Transform)() - - reverse._transform = function (chunk, enc, callback) { - reverse.push(chunk.toString('hex')) - callback() - } - - return reverse -} - -var wsClosed = false -var rsClosed = false -var callbackCalled = false - -var check = function () { - if (wsClosed && rsClosed && callbackCalled) { - console.log('test-node.js passes') - clearTimeout(timeout) - } -} - -ws.on('close', function () { - wsClosed = true - check() -}) - -rs.on('close', function () { - rsClosed = true - check() -}) - -var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { - callbackCalled = true - check() -}) - -if (res !== ws) { - throw new Error('should return last stream') -} - -setTimeout(function () { - rs.destroy() -}, 1000) - -var timeout = setTimeout(function () { - throw new Error('timeout') -}, 5000) diff --git a/node_modules/qs/.editorconfig b/node_modules/qs/.editorconfig index b2654e7a..2f084445 100644 --- a/node_modules/qs/.editorconfig +++ b/node_modules/qs/.editorconfig @@ -7,11 +7,15 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -max_line_length = 140 +max_line_length = 160 +quote_type = single [test/*] max_line_length = off +[LICENSE.md] +indent_size = off + [*.md] max_line_length = off @@ -28,3 +32,12 @@ indent_size = 2 [LICENSE] indent_size = 2 max_line_length = off + +[coverage/**/*] +indent_size = off +indent_style = off +indent = off +max_line_length = off + +[.nycrc] +indent_style = tab diff --git a/node_modules/qs/.eslintignore b/node_modules/qs/.eslintignore deleted file mode 100644 index 1521c8b7..00000000 --- a/node_modules/qs/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/node_modules/qs/.eslintrc b/node_modules/qs/.eslintrc index b7a87b93..3f848996 100644 --- a/node_modules/qs/.eslintrc +++ b/node_modules/qs/.eslintrc @@ -3,17 +3,35 @@ "extends": "@ljharb", + "ignorePatterns": [ + "dist/", + ], + "rules": { "complexity": 0, "consistent-return": 1, - "func-name-matching": 0, + "func-name-matching": 0, "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], "indent": [2, 4], + "max-lines-per-function": 0, "max-params": [2, 12], "max-statements": [2, 45], + "multiline-comment-style": 0, "no-continue": 1, "no-magic-numbers": 0, + "no-param-reassign": 1, "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], - "operator-linebreak": [2, "before"], - } + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + "max-statements": 0, + "no-extend-native": 0, + "function-paren-newline": 0, + }, + }, + ], } diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md index fe523209..849c92ea 100644 --- a/node_modules/qs/CHANGELOG.md +++ b/node_modules/qs/CHANGELOG.md @@ -1,3 +1,27 @@ +## **6.5.3** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source +- [Fix] correctly parse nested arrays +- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) +- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided +- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Fix] `utils.merge`: avoid a crash with a null target and an array source +- [Refactor] `utils`: reduce observable [[Get]]s +- [Refactor] use cached `Array.isArray` +- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) +- [Refactor] `parse`: only need to reassign the var once +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Docs] Clean up license text so it’s properly detected as BSD-3-Clause +- [Docs] Clarify the need for "arrayLimit" option +- [meta] fix README.md (#399) +- [meta] add FUNDING.yml +- [actions] backport actions from main +- [Tests] always use `String(x)` over `x.toString()` +- [Tests] remove nonexistent tape option +- [Dev Deps] backport from main + ## **6.5.2** - [Fix] use `safer-buffer` instead of `Buffer` constructor - [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230) diff --git a/node_modules/qs/LICENSE b/node_modules/qs/LICENSE deleted file mode 100644 index d4569487..00000000 --- a/node_modules/qs/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014 Nathan LaFreniere and other contributors. -All rights reserved. - -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. - * The names of any contributors may not 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 HOLDERS AND 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 complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/node_modules/qs/README.md b/node_modules/qs/README.md index d8119666..20fb9cad 100644 --- a/node_modules/qs/README.md +++ b/node_modules/qs/README.md @@ -1,12 +1,13 @@ # qs [![Version Badge][2]][1] -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] -[![npm badge][11]][1] +[![npm badge][npm-badge-png]][package-url] A querystring parsing and stringifying library with some added security. @@ -182,7 +183,7 @@ assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); ``` **qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will -instead be converted to an object with the index as the key: +instead be converted to an object with the index as the key. This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array. ```javascript var withMaxIndex = qs.parse('a[100]=b'); @@ -267,6 +268,30 @@ var decoded = qs.parse('x=z', { decoder: function (str) { }}) ``` +You can encode keys and values using different logic by using the type argument provided to the encoder: + +```javascript +var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultEncoder, charset, type) { + if (type === 'key') { + return // Encoded key + } else if (type === 'value') { + return // Encoded value + } +}}) +``` + +The type argument is also provided to the decoder: + +```javascript +var decoded = qs.parse('x=z', { decoder: function (str, defaultDecoder, charset, type) { + if (type === 'key') { + return // Decoded key + } else if (type === 'value') { + return // Decoded value + } +}}) +``` + Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. When arrays are stringified, by default they are given explicit indices: @@ -458,18 +483,28 @@ assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c'); assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c'); ``` -[1]: https://npmjs.org/package/qs -[2]: http://versionbadg.es/ljharb/qs.svg -[3]: https://api.travis-ci.org/ljharb/qs.svg -[4]: https://travis-ci.org/ljharb/qs -[5]: https://david-dm.org/ljharb/qs.svg -[6]: https://david-dm.org/ljharb/qs -[7]: https://david-dm.org/ljharb/qs/dev-status.svg -[8]: https://david-dm.org/ljharb/qs?type=dev -[9]: https://ci.testling.com/ljharb/qs.png -[10]: https://ci.testling.com/ljharb/qs -[11]: https://nodei.co/npm/qs.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/qs.svg +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +## qs for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of qs and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-qs?utm_source=npm-qs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +[package-url]: https://npmjs.org/package/qs +[npm-version-svg]: https://versionbadg.es/ljharb/qs.svg +[deps-svg]: https://david-dm.org/ljharb/qs.svg +[deps-url]: https://david-dm.org/ljharb/qs +[dev-deps-svg]: https://david-dm.org/ljharb/qs/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/qs#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/qs.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/qs.svg [license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/qs.svg -[downloads-url]: http://npm-stat.com/charts.html?package=qs +[downloads-image]: https://img.shields.io/npm/dm/qs.svg +[downloads-url]: https://npm-stat.com/charts.html?package=qs +[codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/qs/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/qs +[actions-url]: https://github.com/ljharb/qs/actions diff --git a/node_modules/qs/dist/qs.js b/node_modules/qs/dist/qs.js index ecf7ba44..9f54e3fb 100644 --- a/node_modules/qs/dist/qs.js +++ b/node_modules/qs/dist/qs.js @@ -11,7 +11,7 @@ module.exports = { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { - return value; + return String(value); } }, RFC1738: 'RFC1738', @@ -87,14 +87,15 @@ var parseObject = function (chain, val, options) { var obj; var root = chain[i]; - if (root === '[]') { - obj = []; - obj = obj.concat(leaf); + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); - if ( + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot @@ -103,7 +104,7 @@ var parseObject = function (chain, val, options) { ) { obj = []; obj[index] = leaf; - } else { + } else if (cleanRoot !== '__proto__') { obj[cleanRoot] = leaf; } } @@ -214,17 +215,23 @@ var utils = require('./utils'); var formats = require('./formats'); var arrayPrefixGenerators = { - brackets: function brackets(prefix) { // eslint-disable-line func-name-matching + brackets: function brackets(prefix) { return prefix + '[]'; }, - indices: function indices(prefix, key) { // eslint-disable-line func-name-matching + indices: function indices(prefix, key) { return prefix + '[' + key + ']'; }, - repeat: function repeat(prefix) { // eslint-disable-line func-name-matching + repeat: function repeat(prefix) { return prefix; } }; +var isArray = Array.isArray; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; + var toISO = Date.prototype.toISOString; var defaults = { @@ -232,14 +239,14 @@ var defaults = { encode: true, encoder: utils.encode, encodeValuesOnly: false, - serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching + serializeDate: function serializeDate(date) { return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; -var stringify = function stringify( // eslint-disable-line func-name-matching +var stringify = function stringify( object, prefix, generateArrayPrefix, @@ -258,7 +265,9 @@ var stringify = function stringify( // eslint-disable-line func-name-matching obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); - } else if (obj === null) { + } + + if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; } @@ -281,7 +290,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching } var objKeys; - if (Array.isArray(filter)) { + if (isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); @@ -295,8 +304,8 @@ var stringify = function stringify( // eslint-disable-line func-name-matching continue; } - if (Array.isArray(obj)) { - values = values.concat(stringify( + if (isArray(obj)) { + pushToArray(values, stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, @@ -311,7 +320,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching encodeValuesOnly )); } else { - values = values.concat(stringify( + pushToArray(values, stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, @@ -335,7 +344,7 @@ module.exports = function (object, opts) { var obj = object; var options = opts ? utils.assign({}, opts) : {}; - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + if (options.encoder !== null && typeof options.encoder !== 'undefined' && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } @@ -360,7 +369,7 @@ module.exports = function (object, opts) { if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); - } else if (Array.isArray(options.filter)) { + } else if (isArray(options.filter)) { filter = options.filter; objKeys = filter; } @@ -396,8 +405,7 @@ module.exports = function (object, opts) { if (skipNulls && obj[key] === null) { continue; } - - keys = keys.concat(stringify( + pushToArray(keys, stringify( obj[key], key, generateArrayPrefix, @@ -475,8 +483,8 @@ var merge = function merge(target, source, options) { if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); - } else if (typeof target === 'object') { - if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { target[source] = true; } } else { @@ -486,7 +494,7 @@ var merge = function merge(target, source, options) { return target; } - if (typeof target !== 'object') { + if (!target || typeof target !== 'object') { return [target].concat(source); } @@ -498,8 +506,9 @@ var merge = function merge(target, source, options) { if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { - if (target[i] && typeof target[i] === 'object') { - target[i] = merge(target[i], item, options); + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); } else { target.push(item); } @@ -580,6 +589,7 @@ var encode = function encode(str) { i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] diff --git a/node_modules/qs/lib/formats.js b/node_modules/qs/lib/formats.js index df459975..702da12e 100644 --- a/node_modules/qs/lib/formats.js +++ b/node_modules/qs/lib/formats.js @@ -10,7 +10,7 @@ module.exports = { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { - return value; + return String(value); } }, RFC1738: 'RFC1738', diff --git a/node_modules/qs/lib/parse.js b/node_modules/qs/lib/parse.js index 8c9872ec..cb7127d9 100644 --- a/node_modules/qs/lib/parse.js +++ b/node_modules/qs/lib/parse.js @@ -53,14 +53,15 @@ var parseObject = function (chain, val, options) { var obj; var root = chain[i]; - if (root === '[]') { - obj = []; - obj = obj.concat(leaf); + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); - if ( + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot @@ -69,7 +70,7 @@ var parseObject = function (chain, val, options) { ) { obj = []; obj[index] = leaf; - } else { + } else if (cleanRoot !== '__proto__') { obj[cleanRoot] = leaf; } } diff --git a/node_modules/qs/lib/stringify.js b/node_modules/qs/lib/stringify.js index ab915ac4..12a96e65 100644 --- a/node_modules/qs/lib/stringify.js +++ b/node_modules/qs/lib/stringify.js @@ -4,17 +4,23 @@ var utils = require('./utils'); var formats = require('./formats'); var arrayPrefixGenerators = { - brackets: function brackets(prefix) { // eslint-disable-line func-name-matching + brackets: function brackets(prefix) { return prefix + '[]'; }, - indices: function indices(prefix, key) { // eslint-disable-line func-name-matching + indices: function indices(prefix, key) { return prefix + '[' + key + ']'; }, - repeat: function repeat(prefix) { // eslint-disable-line func-name-matching + repeat: function repeat(prefix) { return prefix; } }; +var isArray = Array.isArray; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; + var toISO = Date.prototype.toISOString; var defaults = { @@ -22,14 +28,14 @@ var defaults = { encode: true, encoder: utils.encode, encodeValuesOnly: false, - serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching + serializeDate: function serializeDate(date) { return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; -var stringify = function stringify( // eslint-disable-line func-name-matching +var stringify = function stringify( object, prefix, generateArrayPrefix, @@ -48,7 +54,9 @@ var stringify = function stringify( // eslint-disable-line func-name-matching obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); - } else if (obj === null) { + } + + if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; } @@ -71,7 +79,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching } var objKeys; - if (Array.isArray(filter)) { + if (isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); @@ -85,8 +93,8 @@ var stringify = function stringify( // eslint-disable-line func-name-matching continue; } - if (Array.isArray(obj)) { - values = values.concat(stringify( + if (isArray(obj)) { + pushToArray(values, stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, @@ -101,7 +109,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching encodeValuesOnly )); } else { - values = values.concat(stringify( + pushToArray(values, stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, @@ -125,7 +133,7 @@ module.exports = function (object, opts) { var obj = object; var options = opts ? utils.assign({}, opts) : {}; - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + if (options.encoder !== null && typeof options.encoder !== 'undefined' && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } @@ -150,7 +158,7 @@ module.exports = function (object, opts) { if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); - } else if (Array.isArray(options.filter)) { + } else if (isArray(options.filter)) { filter = options.filter; objKeys = filter; } @@ -186,8 +194,7 @@ module.exports = function (object, opts) { if (skipNulls && obj[key] === null) { continue; } - - keys = keys.concat(stringify( + pushToArray(keys, stringify( obj[key], key, generateArrayPrefix, diff --git a/node_modules/qs/lib/utils.js b/node_modules/qs/lib/utils.js index 8775a327..6592e206 100644 --- a/node_modules/qs/lib/utils.js +++ b/node_modules/qs/lib/utils.js @@ -53,8 +53,8 @@ var merge = function merge(target, source, options) { if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); - } else if (typeof target === 'object') { - if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { target[source] = true; } } else { @@ -64,7 +64,7 @@ var merge = function merge(target, source, options) { return target; } - if (typeof target !== 'object') { + if (!target || typeof target !== 'object') { return [target].concat(source); } @@ -76,8 +76,9 @@ var merge = function merge(target, source, options) { if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { - if (target[i] && typeof target[i] === 'object') { - target[i] = merge(target[i], item, options); + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); } else { target.push(item); } @@ -158,6 +159,7 @@ var encode = function encode(str) { i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json index d4abf402..cc651b82 100644 --- a/node_modules/qs/package.json +++ b/node_modules/qs/package.json @@ -1,83 +1,54 @@ { - "_args": [ - [ - "qs@6.5.2", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "qs@6.5.2", - "_id": "qs@6.5.2", - "_inBundle": false, - "_integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "_location": "/qs", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "qs@6.5.2", "name": "qs", - "escapedName": "qs", - "rawSpec": "6.5.2", - "saveSpec": null, - "fetchSpec": "6.5.2" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "_spec": "6.5.2", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "bugs": { - "url": "https://github.com/ljharb/qs/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": {}, - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "browserify": "^16.2.0", - "covert": "^1.1.0", - "editorconfig-tools": "^0.1.1", - "eslint": "^4.19.1", - "evalmd": "^0.0.17", - "iconv-lite": "^0.4.21", - "mkdirp": "^0.5.1", - "qs-iconv": "^1.0.4", - "safe-publish-latest": "^1.1.1", - "safer-buffer": "^2.1.2", - "tape": "^4.9.0" - }, - "engines": { - "node": ">=0.6" - }, - "homepage": "https://github.com/ljharb/qs", - "keywords": [ - "querystring", - "qs" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "name": "qs", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/qs.git" - }, - "scripts": { - "coverage": "covert test", - "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", - "lint": "eslint lib/*.js test/*.js", - "prelint": "editorconfig-tools check * lib/* test/*", - "prepublish": "safe-publish-latest && npm run dist", - "pretest": "npm run --silent readme && npm run --silent lint", - "readme": "evalmd README.md", - "test": "npm run --silent coverage", - "tests-only": "node test" - }, - "version": "6.5.2" + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "homepage": "https://github.com/ljharb/qs", + "version": "6.5.3", + "repository": { + "type": "git", + "url": "https://github.com/ljharb/qs.git" + }, + "main": "lib/index.js", + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "keywords": [ + "querystring", + "qs" + ], + "engines": { + "node": ">=0.6" + }, + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "browserify": "^16.5.2", + "eclint": "^2.8.1", + "eslint": "^8.6.0", + "evalmd": "^0.0.17", + "iconv-lite": "^0.4.24", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.1", + "nyc": "^10.3.2", + "qs-iconv": "^1.0.4", + "safe-publish-latest": "^2.0.0", + "safer-buffer": "^2.1.2", + "tape": "^5.4.0" + }, + "scripts": { + "prepublishOnly": "safe-publish-latest && npm run dist", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent readme && npm run --silent lint", + "test": "npm run --silent tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "readme": "evalmd README.md", + "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js" + }, + "license": "BSD-3-Clause" } diff --git a/node_modules/qs/test/.eslintrc b/node_modules/qs/test/.eslintrc deleted file mode 100644 index 20175d64..00000000 --- a/node_modules/qs/test/.eslintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "consistent-return": 2, - "max-lines": 0, - "max-nested-callbacks": [2, 3], - "max-statements": 0, - "no-buffer-constructor": 0, - "no-extend-native": 0, - "no-magic-numbers": 0, - "object-curly-newline": 0, - "sort-keys": 0 - } -} diff --git a/node_modules/qs/test/parse.js b/node_modules/qs/test/parse.js index 0f8fe457..7c198380 100644 --- a/node_modules/qs/test/parse.js +++ b/node_modules/qs/test/parse.js @@ -237,6 +237,14 @@ test('parse()', function (t) { st.end(); }); + t.test('parses jquery-param strings', function (st) { + // readable = 'filter[0][]=int1&filter[0][]==&filter[0][]=77&filter[]=and&filter[2][]=int2&filter[2][]==&filter[2][]=8' + var encoded = 'filter%5B0%5D%5B%5D=int1&filter%5B0%5D%5B%5D=%3D&filter%5B0%5D%5B%5D=77&filter%5B%5D=and&filter%5B2%5D%5B%5D=int2&filter%5B2%5D%5B%5D=%3D&filter%5B2%5D%5B%5D=8'; + var expected = { filter: [['int1', '=', '77'], 'and', ['int2', '=', '8']] }; + st.deepEqual(qs.parse(encoded), expected); + st.end(); + }); + t.test('continues parsing when no parent is found', function (st) { st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' }); st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' }); @@ -257,7 +265,7 @@ test('parse()', function (t) { st.end(); }); - t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) { + t.test('should not throw when a native prototype has an enumerable property', function (st) { Object.prototype.crash = ''; Array.prototype.crash = ''; st.doesNotThrow(qs.parse.bind(null, 'a=b')); @@ -302,7 +310,14 @@ test('parse()', function (t) { }); t.test('allows disabling array parsing', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { 0: 'b', 1: 'c' } }); + var indices = qs.parse('a[0]=b&a[1]=c', { parseArrays: false }); + st.deepEqual(indices, { a: { 0: 'b', 1: 'c' } }); + st.equal(Array.isArray(indices.a), false, 'parseArrays:false, indices case is not an array'); + + var emptyBrackets = qs.parse('a[]=b', { parseArrays: false }); + st.deepEqual(emptyBrackets, { a: { 0: 'b' } }); + st.equal(Array.isArray(emptyBrackets.a), false, 'parseArrays:false, empty brackets case is not an array'); + st.end(); }); @@ -508,13 +523,73 @@ test('parse()', function (t) { st.deepEqual( qs.parse('a[b]=c&a=toString', { plainObjects: true }), - { a: { b: 'c', toString: true } }, + { __proto__: null, a: { __proto__: null, b: 'c', toString: true } }, 'can overwrite prototype with plainObjects true' ); st.end(); }); + t.test('dunder proto is ignored', function (st) { + var payload = 'categories[__proto__]=login&categories[__proto__]&categories[length]=42'; + var result = qs.parse(payload, { allowPrototypes: true }); + + st.deepEqual( + result, + { + categories: { + length: '42' + } + }, + 'silent [[Prototype]] payload' + ); + + var plainResult = qs.parse(payload, { allowPrototypes: true, plainObjects: true }); + + st.deepEqual( + plainResult, + { + __proto__: null, + categories: { + __proto__: null, + length: '42' + } + }, + 'silent [[Prototype]] payload: plain objects' + ); + + var query = qs.parse('categories[__proto__]=cats&categories[__proto__]=dogs&categories[some][json]=toInject', { allowPrototypes: true }); + + st.notOk(Array.isArray(query.categories), 'is not an array'); + st.notOk(query.categories instanceof Array, 'is not instanceof an array'); + st.deepEqual(query.categories, { some: { json: 'toInject' } }); + st.equal(JSON.stringify(query.categories), '{"some":{"json":"toInject"}}', 'stringifies as a non-array'); + + st.deepEqual( + qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true }), + { + foo: { + bar: 'stuffs' + } + }, + 'hidden values' + ); + + st.deepEqual( + qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true, plainObjects: true }), + { + __proto__: null, + foo: { + __proto__: null, + bar: 'stuffs' + } + }, + 'hidden values: plain objects' + ); + + st.end(); + }); + t.test('can return null objects', { skip: !Object.create }, function (st) { var expected = Object.create(null); expected.a = Object.create(null); @@ -540,7 +615,7 @@ test('parse()', function (t) { result.push(parseInt(parts[1], 16)); parts = reg.exec(str); } - return iconv.decode(SaferBuffer.from(result), 'shift_jis').toString(); + return String(iconv.decode(SaferBuffer.from(result), 'shift_jis')); } }), { 県: '大阪府' }); st.end(); diff --git a/node_modules/qs/test/stringify.js b/node_modules/qs/test/stringify.js index 165ac621..08f78430 100644 --- a/node_modules/qs/test/stringify.js +++ b/node_modules/qs/test/stringify.js @@ -19,6 +19,15 @@ test('stringify()', function (t) { st.end(); }); + t.test('stringifies falsy values', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(null, { strictNullHandling: true }), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(0), ''); + st.end(); + }); + t.test('adds query prefix', function (st) { st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); st.end(); @@ -29,6 +38,13 @@ test('stringify()', function (t) { st.end(); }); + t.test('stringifies nested falsy values', function (st) { + st.equal(qs.stringify({ a: { b: { c: null } } }), 'a%5Bb%5D%5Bc%5D='); + st.equal(qs.stringify({ a: { b: { c: null } } }, { strictNullHandling: true }), 'a%5Bb%5D%5Bc%5D'); + st.equal(qs.stringify({ a: { b: { c: false } } }), 'a%5Bb%5D%5Bc%5D=false'); + st.end(); + }); + t.test('stringifies a nested object', function (st) { st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); @@ -490,6 +506,12 @@ test('stringify()', function (t) { return String.fromCharCode(buffer.readUInt8(0) + 97); } }), 'a=b'); + + st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, { + encoder: function (buffer) { + return buffer; + } + }), 'a=a b'); st.end(); }); @@ -530,17 +552,20 @@ test('stringify()', function (t) { t.test('RFC 1738 spaces serialization', function (st) { st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b'); st.end(); }); t.test('RFC 3986 spaces serialization', function (st) { st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b'); st.end(); }); t.test('Backward compatibility to RFC 3986', function (st) { st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b'); st.end(); }); @@ -593,5 +618,25 @@ test('stringify()', function (t) { st.end(); }); + t.test('strictNullHandling works with custom filter', function (st) { + var filter = function (prefix, value) { + return value; + }; + + var options = { strictNullHandling: true, filter: filter }; + st.equal(qs.stringify({ key: null }, options), 'key'); + st.end(); + }); + + t.test('strictNullHandling works with null serializeDate', function (st) { + var serializeDate = function () { + return null; + }; + var options = { strictNullHandling: true, serializeDate: serializeDate }; + var date = new Date(); + st.equal(qs.stringify({ key: date }, options), 'key'); + st.end(); + }); + t.end(); }); diff --git a/node_modules/qs/test/utils.js b/node_modules/qs/test/utils.js index eff4011a..2bfe03a6 100644 --- a/node_modules/qs/test/utils.js +++ b/node_modules/qs/test/utils.js @@ -4,6 +4,10 @@ var test = require('tape'); var utils = require('../lib/utils'); test('merge()', function (t) { + t.deepEqual(utils.merge(null, true), [null, true], 'merges true into null'); + + t.deepEqual(utils.merge(null, [42]), [null, 42], 'merges null into an array'); + t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); @@ -18,6 +22,33 @@ test('merge()', function (t) { var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); + var noOptionsNonObjectSource = utils.merge({ foo: 'baz' }, 'bar'); + t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true }); + + t.test( + 'avoids invoking array setters unnecessarily', + { skip: typeof Object.defineProperty !== 'function' }, + function (st) { + var setCount = 0; + var getCount = 0; + var observed = []; + Object.defineProperty(observed, 0, { + get: function () { + getCount += 1; + return { bar: 'baz' }; + }, + set: function () { setCount += 1; } + }); + utils.merge(observed, [null]); + st.equal(setCount, 0); + st.equal(getCount, 1); + observed[0] = observed[0]; // eslint-disable-line no-self-assign + st.equal(setCount, 1); + st.equal(getCount, 2); + st.end(); + } + ); + t.end(); }); diff --git a/node_modules/request/CHANGELOG.md b/node_modules/request/CHANGELOG.md index 751514d2..d3ffcd00 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 b91623d2..9da0eb7d 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 f9b480a1..d50f9917 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 f5edf32c..02f20386 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 4633ba5f..0b9b18e5 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 2f660309..0dedee44 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/package.json b/node_modules/request/package.json index fe1449bb..cbb2f2ed 100644 --- a/node_modules/request/package.json +++ b/node_modules/request/package.json @@ -1,40 +1,31 @@ { - "_args": [ - [ - "request@2.88.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "request@2.88.0", - "_id": "request@2.88.0", - "_inBundle": false, - "_integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "_location": "/request", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "request@2.88.0", - "name": "request", - "escapedName": "request", - "rawSpec": "2.88.0", - "saveSpec": null, - "fetchSpec": "2.88.0" - }, - "_requiredBy": [ - "/", - "/coveralls" + "name": "request", + "description": "Simplified HTTP request client.", + "keywords": [ + "http", + "simple", + "util", + "utility" ], - "_resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "_spec": "2.88.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com" + "version": "2.88.2", + "author": "Mikeal Rogers ", + "repository": { + "type": "git", + "url": "https://github.com/request/request.git" }, "bugs": { "url": "http://github.com/request/request/issues" }, + "license": "Apache-2.0", + "engines": { + "node": ">= 6" + }, + "main": "index.js", + "files": [ + "lib/", + "index.js", + "request.js" + ], "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -43,7 +34,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", @@ -53,11 +44,17 @@ "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" }, - "description": "Simplified HTTP request client.", + "scripts": { + "test": "npm run lint && npm run test-ci && npm run test-browser", + "test-ci": "taper tests/test-*.js", + "test-cov": "nyc --reporter=lcov tape tests/test-*.js", + "test-browser": "node tests/browser/start.js", + "lint": "standard" + }, "devDependencies": { "bluebird": "^3.2.1", "browserify": "^13.0.1", @@ -66,13 +63,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", @@ -80,40 +77,10 @@ "tape": "^4.6.0", "taper": "^0.5.0" }, - "engines": { - "node": ">= 4" - }, - "files": [ - "lib/", - "index.js", - "request.js" - ], "greenkeeper": { "ignore": [ "hawk", "har-validator" ] - }, - "homepage": "https://github.com/request/request#readme", - "keywords": [ - "http", - "simple", - "util", - "utility" - ], - "license": "Apache-2.0", - "main": "index.js", - "name": "request", - "repository": { - "type": "git", - "url": "git+https://github.com/request/request.git" - }, - "scripts": { - "lint": "standard", - "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" - }, - "version": "2.88.0" + } } diff --git a/node_modules/request/request.js b/node_modules/request/request.js index 90bed4f4..198b7609 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/shebang-command/index.js b/node_modules/shebang-command/index.js deleted file mode 100644 index 2de70b07..00000000 --- a/node_modules/shebang-command/index.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; -var shebangRegex = require('shebang-regex'); - -module.exports = function (str) { - var match = str.match(shebangRegex); - - if (!match) { - return null; - } - - var arr = match[0].replace(/#! ?/, '').split(' '); - var bin = arr[0].split('/').pop(); - var arg = arr[1]; - - return (bin === 'env' ? - arg : - bin + (arg ? ' ' + arg : '') - ); -}; diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license deleted file mode 100644 index 0f8cf79c..00000000 --- a/node_modules/shebang-command/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Kevin Martensson (github.com/kevva) - -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/shebang-command/package.json b/node_modules/shebang-command/package.json deleted file mode 100644 index 5de0c020..00000000 --- a/node_modules/shebang-command/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "shebang-command@1.2.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "shebang-command@1.2.0", - "_id": "shebang-command@1.2.0", - "_inBundle": false, - "_integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "_location": "/shebang-command", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "shebang-command@1.2.0", - "name": "shebang-command", - "escapedName": "shebang-command", - "rawSpec": "1.2.0", - "saveSpec": null, - "fetchSpec": "1.2.0" - }, - "_requiredBy": [ - "/cross-spawn" - ], - "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "_spec": "1.2.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "github.com/kevva" - }, - "bugs": { - "url": "https://github.com/kevva/shebang-command/issues" - }, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "description": "Get the command from a shebang", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/kevva/shebang-command#readme", - "keywords": [ - "cmd", - "command", - "parse", - "shebang" - ], - "license": "MIT", - "name": "shebang-command", - "repository": { - "type": "git", - "url": "git+https://github.com/kevva/shebang-command.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.2.0", - "xo": { - "ignores": [ - "test.js" - ] - } -} diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md deleted file mode 100644 index 16b0be4d..00000000 --- a/node_modules/shebang-command/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) - -> Get the command from a shebang - - -## Install - -``` -$ npm install --save shebang-command -``` - - -## Usage - -```js -const shebangCommand = require('shebang-command'); - -shebangCommand('#!/usr/bin/env node'); -//=> 'node' - -shebangCommand('#!/bin/bash'); -//=> 'bash' -``` - - -## API - -### shebangCommand(string) - -#### string - -Type: `string` - -String containing a shebang. - - -## License - -MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js deleted file mode 100644 index d052d2e0..00000000 --- a/node_modules/shebang-regex/index.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; -module.exports = /^#!.*/; diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/shebang-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/shebang-regex/package.json b/node_modules/shebang-regex/package.json deleted file mode 100644 index 4746cb6b..00000000 --- a/node_modules/shebang-regex/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "shebang-regex@1.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "shebang-regex@1.0.0", - "_id": "shebang-regex@1.0.0", - "_inBundle": false, - "_integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "_location": "/shebang-regex", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "shebang-regex@1.0.0", - "name": "shebang-regex", - "escapedName": "shebang-regex", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/shebang-command" - ], - "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/shebang-regex/issues" - }, - "description": "Regular expression for matching a shebang", - "devDependencies": { - "ava": "0.0.4" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/shebang-regex#readme", - "keywords": [ - "re", - "regex", - "regexp", - "shebang", - "match", - "test" - ], - "license": "MIT", - "name": "shebang-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/shebang-regex.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md deleted file mode 100644 index ef75e51b..00000000 --- a/node_modules/shebang-regex/readme.md +++ /dev/null @@ -1,29 +0,0 @@ -# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) - -> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) - - -## Install - -``` -$ npm install --save shebang-regex -``` - - -## Usage - -```js -var shebangRegex = require('shebang-regex'); -var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; - -shebangRegex.test(str); -//=> true - -shebangRegex.exec(str)[0]; -//=> '#!/usr/bin/env node' -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/string-width/index.js b/node_modules/string-width/index.js index bbc49d29..f4d261a9 100644 --- a/node_modules/string-width/index.js +++ b/node_modules/string-width/index.js @@ -1,18 +1,25 @@ '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) { +const stringWidth = string => { + if (typeof string !== 'string' || string.length === 0) { return 0; } - str = stripAnsi(str); + string = stripAnsi(string); + + if (string.length === 0) { + return 0; + } + + string = string.replace(emojiRegex(), ' '); let width = 0; - for (let i = 0; i < str.length; i++) { - const code = str.codePointAt(i); + for (let i = 0; i < string.length; i++) { + const code = string.codePointAt(i); // Ignore control characters if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { @@ -34,3 +41,7 @@ module.exports = str => { return width; }; + +module.exports = stringWidth; +// TODO: remove this in the next major version +module.exports.default = stringWidth; diff --git a/node_modules/string-width/package.json b/node_modules/string-width/package.json index a31f1fb8..28ba7b4c 100644 --- a/node_modules/string-width/package.json +++ b/node_modules/string-width/package.json @@ -1,93 +1,56 @@ { - "_args": [ - [ - "string-width@2.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "string-width@2.1.1", - "_id": "string-width@2.1.1", - "_inBundle": false, - "_integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "_location": "/string-width", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "string-width@2.1.1", - "name": "string-width", - "escapedName": "string-width", - "rawSpec": "2.1.1", - "saveSpec": null, - "fetchSpec": "2.1.1" - }, - "_requiredBy": [ - "/cliui", - "/wide-align", - "/yargs-unparser/yargs" - ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "_spec": "2.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/string-width/issues" - }, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "description": "Get the visual width of a string - the number of columns required to display it", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "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": "2.1.1" + "name": "string-width", + "version": "4.2.3", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "string", + "character", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } } diff --git a/node_modules/string-width/readme.md b/node_modules/string-width/readme.md index df5b7199..bdd31412 100644 --- a/node_modules/string-width/readme.md +++ b/node_modules/string-width/readme.md @@ -1,4 +1,4 @@ -# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) +# string-width > Get the visual width of a string - the number of columns required to display it @@ -19,14 +19,14 @@ $ npm install string-width ```js const stringWidth = require('string-width'); +stringWidth('a'); +//=> 1 + stringWidth('古'); //=> 2 -stringWidth('\u001b[1m古\u001b[22m'); +stringWidth('\u001B[1m古\u001B[22m'); //=> 2 - -stringWidth('a'); -//=> 1 ``` @@ -37,6 +37,14 @@ stringWidth('a'); - [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) +

        + + 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. +
        +
        diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js index 96e0292c..9a593dfc 100644 --- a/node_modules/strip-ansi/index.js +++ b/node_modules/strip-ansi/index.js @@ -1,4 +1,4 @@ 'use strict'; const ansiRegex = require('ansi-regex'); -module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json index b0045b87..1a41108d 100644 --- a/node_modules/strip-ansi/package.json +++ b/node_modules/strip-ansi/package.json @@ -1,89 +1,54 @@ { - "_args": [ - [ - "strip-ansi@4.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "strip-ansi@4.0.0", - "_id": "strip-ansi@4.0.0", - "_inBundle": false, - "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "_location": "/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": [ - "/cliui", - "/string-width" - ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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" + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } } diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md index dc76f0cb..7c4b56d4 100644 --- a/node_modules/strip-ansi/readme.md +++ b/node_modules/strip-ansi/readme.md @@ -1,6 +1,6 @@ # 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) +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string ## Install @@ -17,12 +17,23 @@ const stripAnsi = require('strip-ansi'); stripAnsi('\u001B[4mUnicorn\u001B[0m'); //=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' ``` +## strip-ansi for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + + ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of 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 @@ -33,7 +44,3 @@ stripAnsi('\u001B[4mUnicorn\u001B[0m'); - [Sindre Sorhus](https://github.com/sindresorhus) - [Josh Junon](https://github.com/qix-) - -## License - -MIT diff --git a/node_modules/strip-eof/index.js b/node_modules/strip-eof/index.js deleted file mode 100644 index a17d0afd..00000000 --- a/node_modules/strip-eof/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -module.exports = function (x) { - var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); - var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); - - if (x[x.length - 1] === lf) { - x = x.slice(0, x.length - 1); - } - - if (x[x.length - 1] === cr) { - x = x.slice(0, x.length - 1); - } - - return x; -}; diff --git a/node_modules/strip-eof/license b/node_modules/strip-eof/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/strip-eof/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/strip-eof/package.json b/node_modules/strip-eof/package.json deleted file mode 100644 index a2ab2f36..00000000 --- a/node_modules/strip-eof/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "strip-eof@1.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "strip-eof@1.0.0", - "_id": "strip-eof@1.0.0", - "_inBundle": false, - "_integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "_location": "/strip-eof", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "strip-eof@1.0.0", - "name": "strip-eof", - "escapedName": "strip-eof", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-eof/issues" - }, - "description": "Strip the End-Of-File (EOF) character from a string/buffer", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/strip-eof#readme", - "keywords": [ - "strip", - "trim", - "remove", - "delete", - "eof", - "end", - "file", - "newline", - "linebreak", - "character", - "string", - "buffer" - ], - "license": "MIT", - "name": "strip-eof", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-eof.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.0" -} diff --git a/node_modules/strip-eof/readme.md b/node_modules/strip-eof/readme.md deleted file mode 100644 index 45ffe043..00000000 --- a/node_modules/strip-eof/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) - -> Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer - - -## Install - -``` -$ npm install --save strip-eof -``` - - -## Usage - -```js -const stripEof = require('strip-eof'); - -stripEof('foo\nbar\n\n'); -//=> 'foo\nbar\n' - -stripEof(new Buffer('foo\nbar\n\n')).toString(); -//=> 'foo\nbar\n' -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/strip-json-comments/index.js b/node_modules/strip-json-comments/index.js index 4e6576e6..bb00b38b 100644 --- a/node_modules/strip-json-comments/index.js +++ b/node_modules/strip-json-comments/index.js @@ -1,32 +1,39 @@ 'use strict'; -var singleComment = 1; -var multiComment = 2; +const singleComment = Symbol('singleComment'); +const multiComment = Symbol('multiComment'); +const stripWithoutWhitespace = () => ''; +const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, ' '); -function stripWithoutWhitespace() { - return ''; -} +const isEscaped = (jsonString, quotePosition) => { + let index = quotePosition - 1; + let backslashCount = 0; -function stripWithWhitespace(str, start, end) { - return str.slice(start, end).replace(/\S/g, ' '); -} + while (jsonString[index] === '\\') { + index -= 1; + backslashCount += 1; + } + + return Boolean(backslashCount % 2); +}; + +module.exports = (jsonString, options = {}) => { + if (typeof jsonString !== 'string') { + throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``); + } -module.exports = function (str, opts) { - opts = opts || {}; + const strip = options.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; - var currentChar; - var nextChar; - var insideString = false; - var insideComment = false; - var offset = 0; - var ret = ''; - var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; + let insideString = false; + let insideComment = false; + let offset = 0; + let result = ''; - for (var i = 0; i < str.length; i++) { - currentChar = str[i]; - nextChar = str[i + 1]; + for (let i = 0; i < jsonString.length; i++) { + const currentCharacter = jsonString[i]; + const nextCharacter = jsonString[i + 1]; - if (!insideComment && currentChar === '"') { - var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!insideComment && currentCharacter === '"') { + const escaped = isEscaped(jsonString, i); if (!escaped) { insideString = !insideString; } @@ -36,35 +43,35 @@ module.exports = function (str, opts) { continue; } - if (!insideComment && currentChar + nextChar === '//') { - ret += str.slice(offset, i); + if (!insideComment && currentCharacter + nextCharacter === '//') { + result += jsonString.slice(offset, i); offset = i; insideComment = singleComment; i++; - } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { + } else if (insideComment === singleComment && currentCharacter + nextCharacter === '\r\n') { i++; insideComment = false; - ret += strip(str, offset, i); + result += strip(jsonString, offset, i); offset = i; continue; - } else if (insideComment === singleComment && currentChar === '\n') { + } else if (insideComment === singleComment && currentCharacter === '\n') { insideComment = false; - ret += strip(str, offset, i); + result += strip(jsonString, offset, i); offset = i; - } else if (!insideComment && currentChar + nextChar === '/*') { - ret += str.slice(offset, i); + } else if (!insideComment && currentCharacter + nextCharacter === '/*') { + result += jsonString.slice(offset, i); offset = i; insideComment = multiComment; i++; continue; - } else if (insideComment === multiComment && currentChar + nextChar === '*/') { + } else if (insideComment === multiComment && currentCharacter + nextCharacter === '*/') { i++; insideComment = false; - ret += strip(str, offset, i + 1); + result += strip(jsonString, offset, i + 1); offset = i + 1; continue; } } - return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset)); + return result + (insideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset)); }; diff --git a/node_modules/strip-json-comments/license b/node_modules/strip-json-comments/license index 654d0bfe..fa7ceba3 100644 --- a/node_modules/strip-json-comments/license +++ b/node_modules/strip-json-comments/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://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/strip-json-comments/package.json b/node_modules/strip-json-comments/package.json index 501dbba1..ce7875aa 100644 --- a/node_modules/strip-json-comments/package.json +++ b/node_modules/strip-json-comments/package.json @@ -1,78 +1,47 @@ { - "_args": [ - [ - "strip-json-comments@2.0.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "strip-json-comments@2.0.1", - "_id": "strip-json-comments@2.0.1", - "_inBundle": false, - "_integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "_location": "/strip-json-comments", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "strip-json-comments@2.0.1", - "name": "strip-json-comments", - "escapedName": "strip-json-comments", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-json-comments/issues" - }, - "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", - "keywords": [ - "json", - "strip", - "remove", - "delete", - "trim", - "comments", - "multiline", - "parse", - "config", - "configuration", - "conf", - "settings", - "util", - "env", - "environment" - ], - "license": "MIT", - "name": "strip-json-comments", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-json-comments.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.1" + "name": "strip-json-comments", + "version": "3.1.1", + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", + "license": "MIT", + "repository": "sindresorhus/strip-json-comments", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "bench": "matcha benchmark.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "json", + "strip", + "comments", + "remove", + "delete", + "trim", + "multiline", + "parse", + "config", + "configuration", + "settings", + "util", + "env", + "environment", + "jsonc" + ], + "devDependencies": { + "ava": "^1.4.1", + "matcha": "^0.7.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } } diff --git a/node_modules/strip-json-comments/readme.md b/node_modules/strip-json-comments/readme.md index 0ee58dfe..cc542e50 100644 --- a/node_modules/strip-json-comments/readme.md +++ b/node_modules/strip-json-comments/readme.md @@ -1,4 +1,4 @@ -# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments) +# strip-json-comments [![Build Status](https://travis-ci.com/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.com/github/sindresorhus/strip-json-comments) > Strip comments from JSON. Lets you use comments in your JSON files! @@ -6,38 +6,38 @@ This is now possible: ```js { - // rainbows + // Rainbows "unicorn": /* ❤ */ "cake" } ``` It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. -Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. - +Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[Grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[Broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. ## Install ``` -$ npm install --save strip-json-comments +$ npm install strip-json-comments ``` - ## Usage ```js -const json = '{/*rainbows*/"unicorn":"cake"}'; +const json = `{ + // Rainbows + "unicorn": /* ❤ */ "cake" +}`; JSON.parse(stripJsonComments(json)); //=> {unicorn: 'cake'} ``` - ## API -### stripJsonComments(input, [options]) +### stripJsonComments(jsonString, options?) -#### input +#### jsonString Type: `string` @@ -45,20 +45,34 @@ Accepts a string with JSON and returns a string without comments. #### options +Type: `object` + ##### whitespace -Type: `boolean` +Type: `boolean`\ Default: `true` Replace comments with whitespace instead of stripping them entirely. +## Benchmark + +``` +$ npm run bench +``` ## Related - [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module - [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) +--- + +
        + + 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. +
        +
        diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js index 62afa3a7..f097aecd 100644 --- a/node_modules/supports-color/browser.js +++ b/node_modules/supports-color/browser.js @@ -1,5 +1,24 @@ +/* eslint-env browser */ 'use strict'; + +function getChromeVersion() { + const matches = /(Chrome|Chromium)\/(?\d+)\./.exec(navigator.userAgent); + + if (!matches) { + return; + } + + return Number.parseInt(matches.groups.chromeVersion, 10); +} + +const colorSupport = getChromeVersion() >= 69 ? { + level: 1, + hasBasic: true, + has256: false, + has16m: false +} : false; + module.exports = { - stdout: false, - stderr: false + stdout: colorSupport, + stderr: colorSupport }; diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js index 6aacf5b4..2dd2fcb0 100644 --- a/node_modules/supports-color/index.js +++ b/node_modules/supports-color/index.js @@ -1,27 +1,34 @@ 'use strict'; const os = require('os'); +const tty = require('tty'); const hasFlag = require('has-flag'); const {env} = process; -let forceColor; +let flagForceColor; if (hasFlag('no-color') || hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = 0; + hasFlag('color=false') || + hasFlag('color=never')) { + flagForceColor = 0; } else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { - forceColor = 1; + flagForceColor = 1; } -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + +function envForceColor() { + if ('FORCE_COLOR' in env) { + if (env.FORCE_COLOR === 'true') { + return 1; + } + + if (env.FORCE_COLOR === 'false') { + return 0; + } + + return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); } } @@ -38,22 +45,31 @@ function translateLevel(level) { }; } -function supportsColor(stream) { +function supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) { + const noFlagForceColor = envForceColor(); + if (noFlagForceColor !== undefined) { + flagForceColor = noFlagForceColor; + } + + const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; + if (forceColor === 0) { return 0; } - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } + if (sniffFlags) { + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } - if (hasFlag('color=256')) { - return 2; + if (hasFlag('color=256')) { + return 2; + } } - if (stream && !stream.isTTY && forceColor === undefined) { + if (haveStream && !streamIsTTY && forceColor === undefined) { return 0; } @@ -64,15 +80,10 @@ function supportsColor(stream) { } if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. + // Windows 10 build 10586 is the first Windows release that supports 256 colors. + // Windows 10 build 14931 is the first release that supports 16m/TrueColor. const osRelease = os.release().split('.'); if ( - Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ) { @@ -83,7 +94,7 @@ function supportsColor(stream) { } if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { return 1; } @@ -99,7 +110,7 @@ function supportsColor(stream) { } if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); switch (env.TERM_PROGRAM) { case 'iTerm.app': @@ -125,13 +136,17 @@ function supportsColor(stream) { return min; } -function getSupportLevel(stream) { - const level = supportsColor(stream); +function getSupportLevel(stream, options = {}) { + const level = supportsColor(stream, { + streamIsTTY: stream && stream.isTTY, + ...options + }); + return translateLevel(level); } module.exports = { supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) + stdout: getSupportLevel({isTTY: tty.isatty(1)}), + stderr: getSupportLevel({isTTY: tty.isatty(2)}) }; diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license index e7af2f77..fa7ceba3 100644 --- a/node_modules/supports-color/license +++ b/node_modules/supports-color/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://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: diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json index 8a586199..a97bf2a1 100644 --- a/node_modules/supports-color/package.json +++ b/node_modules/supports-color/package.json @@ -1,89 +1,58 @@ { - "_args": [ - [ - "supports-color@6.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "supports-color@6.0.0", - "_id": "supports-color@6.0.0", - "_inBundle": false, - "_integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "_location": "/supports-color", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "supports-color@6.0.0", - "name": "supports-color", - "escapedName": "supports-color", - "rawSpec": "6.0.0", - "saveSpec": null, - "fetchSpec": "6.0.0" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "_spec": "6.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "dependencies": { - "has-flag": "^3.0.0" - }, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "ava": "^0.25.0", - "import-fresh": "^2.0.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/chalk/supports-color#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "license": "MIT", - "name": "supports-color", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "6.0.0" + "name": "supports-color", + "version": "8.1.1", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "funding": "https://github.com/chalk/supports-color?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js", + "browser.js" + ], + "exports": { + "node": "./index.js", + "default": "./browser.js" + }, + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "dependencies": { + "has-flag": "^4.0.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "import-fresh": "^3.2.2", + "xo": "^0.35.0" + }, + "browser": "browser.js" } diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md index ff29b2c1..3eedd1ca 100644 --- a/node_modules/supports-color/readme.md +++ b/node_modules/supports-color/readme.md @@ -1,29 +1,13 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) +# supports-color > Detect whether a terminal supports color ---- - -
        - - 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. -
        -
        - ---- - - ## Install ``` $ npm install supports-color ``` - ## Usage ```js @@ -42,7 +26,6 @@ if (supportsColor.stderr.has16m) { } ``` - ## API Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. @@ -53,6 +36,13 @@ The `stdout`/`stderr` objects specifies a level of support for color through a ` - `.level = 2` and `.has256 = true`: 256 color support - `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) +### `require('supports-color').supportsColor(stream, options?)` + +Additionally, `supports-color` exposes the `.supportsColor()` function that takes an arbitrary write stream (e.g. `process.stdout`) and an optional options object to (re-)evaluate color support for an arbitrary stream. + +For example, `require('supports-color').stdout` is the equivalent of `require('supports-color').supportsColor(process.stdout)`. + +The options object supports a single boolean property `sniffFlags`. By default it is `true`, which instructs `supportsColor()` to sniff `process.argv` for the multitude of `--color` flags (see _Info_ below). If `false`, then `process.argv` is not considered when determining color support. ## Info @@ -62,19 +52,26 @@ For situations where using `--color` is not possible, use the environment variab Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - ## Related - [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module - [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 +
        + + 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. +
        +
        -MIT +--- diff --git a/node_modules/tough-cookie/README.md b/node_modules/tough-cookie/README.md index d28bd460..656a2555 100644 --- a/node_modules/tough-cookie/README.md +++ b/node_modules/tough-cookie/README.md @@ -198,7 +198,7 @@ compute the TTL relative to `now` (milliseconds). The same precedence rules as 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()` +### `.canonicalizedDomain()` ### `.cdomain()` @@ -354,6 +354,16 @@ The `store` argument is optional, but must be a _synchronous_ `Store` instance i 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. +### `.removeAllCookies(cb(err))` + +Removes all cookies from the jar. + +This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned. + +### `.removeAllCookiesSync()` + +Sync version of `.removeAllCookies()` + ## Store Base class for CookieJar stores. Available as `tough.Store`. @@ -418,19 +428,29 @@ Removes matching cookies from the store. The `path` parameter is optional, and Pass an error ONLY if removing any existing cookies failed. +### `store.removeAllCookies(cb(err))` + +_Optional_. Removes all cookies from the store. + +Pass an error if one or more cookies can't be removed. + +**Note**: New method as of `tough-cookie` version 2.5, so not all Stores will implement this, plus some stores may choose not to implement this. + ### `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. +_Optional_. 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. +**Note**: not all Stores can implement this due to technical limitations, so it is optional. + ## 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. +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. Supports serialization, `getAllCookies`, and `removeAllCookies`. ## Community Cookie Stores @@ -473,7 +493,7 @@ These are some Store implementations authored and maintained by the community. T # Copyright and License -(tl;dr: BSD-3-Clause with some MPL/2.0) +BSD-3-Clause: ```text Copyright (c) 2015, Salesforce.com, Inc. diff --git a/node_modules/tough-cookie/lib/cookie.js b/node_modules/tough-cookie/lib/cookie.js index 039a0e71..32dc0f8d 100644 --- a/node_modules/tough-cookie/lib/cookie.js +++ b/node_modules/tough-cookie/lib/cookie.js @@ -36,7 +36,7 @@ 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 VERSION = require('./version'); var punycode; try { @@ -1371,7 +1371,6 @@ CookieJar.deserializeSync = function(strOrObj, store) { }; CookieJar.fromJSON = CookieJar.deserializeSync; -CAN_BE_SYNC.push('clone'); CookieJar.prototype.clone = function(newStore, cb) { if (arguments.length === 1) { cb = newStore; @@ -1382,10 +1381,61 @@ CookieJar.prototype.clone = function(newStore, cb) { if (err) { return cb(err); } - CookieJar.deserialize(newStore, serialized, cb); + CookieJar.deserialize(serialized, newStore, cb); }); }; +CAN_BE_SYNC.push('removeAllCookies'); +CookieJar.prototype.removeAllCookies = function(cb) { + var store = this.store; + + // Check that the store implements its own removeAllCookies(). The default + // implementation in Store will immediately call the callback with a "not + // implemented" Error. + if (store.removeAllCookies instanceof Function && + store.removeAllCookies !== Store.prototype.removeAllCookies) + { + return store.removeAllCookies(cb); + } + + store.getAllCookies(function(err, cookies) { + if (err) { + return cb(err); + } + + if (cookies.length === 0) { + return cb(null); + } + + var completedCount = 0; + var removeErrors = []; + + function removeCookieCb(removeErr) { + if (removeErr) { + removeErrors.push(removeErr); + } + + completedCount++; + + if (completedCount === cookies.length) { + return cb(removeErrors.length ? removeErrors[0] : null); + } + } + + cookies.forEach(function(cookie) { + store.removeCookie(cookie.domain, cookie.path, cookie.key, removeCookieCb); + }); + }); +}; + +CookieJar.prototype._cloneSync = syncWrap('clone'); +CookieJar.prototype.cloneSync = function(newStore) { + if (!newStore.synchronous) { + throw new Error('CookieJar clone destination store is not synchronous; use async API instead.'); + } + return this._cloneSync(newStore); +}; + // Use a closure to provide a true imperative API for synchronous stores. function syncWrap(method) { return function() { @@ -1413,6 +1463,7 @@ CAN_BE_SYNC.forEach(function(method) { CookieJar.prototype[method+'Sync'] = syncWrap(method); }); +exports.version = VERSION; exports.CookieJar = CookieJar; exports.Cookie = Cookie; exports.Store = Store; diff --git a/node_modules/tough-cookie/lib/memstore.js b/node_modules/tough-cookie/lib/memstore.js index bf306ba7..d2b915c9 100644 --- a/node_modules/tough-cookie/lib/memstore.js +++ b/node_modules/tough-cookie/lib/memstore.js @@ -149,6 +149,11 @@ MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) { return cb(null); }; +MemoryCookieStore.prototype.removeAllCookies = function(cb) { + this.idx = {}; + return cb(null); +} + MemoryCookieStore.prototype.getAllCookies = function(cb) { var cookies = []; var idx = this.idx; diff --git a/node_modules/tough-cookie/lib/store.js b/node_modules/tough-cookie/lib/store.js index bce52925..859208fc 100644 --- a/node_modules/tough-cookie/lib/store.js +++ b/node_modules/tough-cookie/lib/store.js @@ -66,6 +66,10 @@ Store.prototype.removeCookies = function(domain, path, cb) { throw new Error('removeCookies is not implemented'); }; +Store.prototype.removeAllCookies = function(cb) { + throw new Error('removeAllCookies is not implemented'); +} + Store.prototype.getAllCookies = function(cb) { throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)'); }; diff --git a/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/tough-cookie/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/tough-cookie/node_modules/punycode/README.md b/node_modules/tough-cookie/node_modules/punycode/README.md deleted file mode 100644 index 7ad7d1fa..00000000 --- a/node_modules/tough-cookie/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/tough-cookie/node_modules/punycode/package.json b/node_modules/tough-cookie/node_modules/punycode/package.json deleted file mode 100644 index 56898142..00000000 --- a/node_modules/tough-cookie/node_modules/punycode/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "punycode@1.4.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "punycode@1.4.1", - "_id": "punycode@1.4.1", - "_inBundle": false, - "_integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "_location": "/tough-cookie/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": [ - "/tough-cookie" - ], - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "_spec": "1.4.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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/tough-cookie/node_modules/punycode/punycode.js b/node_modules/tough-cookie/node_modules/punycode/punycode.js deleted file mode 100644 index 2c87f6cc..00000000 --- a/node_modules/tough-cookie/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/tough-cookie/package.json b/node_modules/tough-cookie/package.json index c0ec6104..8af9909e 100644 --- a/node_modules/tough-cookie/package.json +++ b/node_modules/tough-cookie/package.json @@ -1,77 +1,38 @@ { - "_args": [ - [ - "tough-cookie@2.4.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_from": "tough-cookie@2.4.3", - "_id": "tough-cookie@2.4.3", - "_inBundle": false, - "_integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "_location": "/tough-cookie", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "tough-cookie@2.4.3", - "name": "tough-cookie", - "escapedName": "tough-cookie", - "rawSpec": "2.4.3", - "saveSpec": null, - "fetchSpec": "2.4.3" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "_spec": "2.4.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", "author": { "name": "Jeremy Stashewsky", - "email": "jstash@gmail.com" - }, - "bugs": { - "url": "https://github.com/salesforce/tough-cookie/issues" + "email": "jstash@gmail.com", + "website": "https://github.com/stash" }, "contributors": [ { - "name": "Alexander Savin" + "name": "Alexander Savin", + "website": "https://github.com/apsavin" }, { - "name": "Ian Livingstone" + "name": "Ian Livingstone", + "website": "https://github.com/ianlivingstone" }, { - "name": "Ivan Nikulin" + "name": "Ivan Nikulin", + "website": "https://github.com/inikulin" }, { - "name": "Lalit Kapoor" + "name": "Lalit Kapoor", + "website": "https://github.com/lalitkapoor" }, { - "name": "Sam Thompson" + "name": "Sam Thompson", + "website": "https://github.com/sambthompson" }, { - "name": "Sebastian Mayr" + "name": "Sebastian Mayr", + "website": "https://github.com/Sebmaster" } ], - "dependencies": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, + "license": "BSD-3-Clause", + "name": "tough-cookie", "description": "RFC6265 Cookies and Cookie Jar for node.js", - "devDependencies": { - "async": "^1.4.2", - "nyc": "^11.6.0", - "string.prototype.repeat": "^0.2.0", - "vows": "^0.8.1" - }, - "engines": { - "node": ">=0.8" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/salesforce/tough-cookie", "keywords": [ "HTTP", "cookie", @@ -82,16 +43,36 @@ "RFC6265", "RFC2965" ], - "license": "BSD-3-Clause", - "main": "./lib/cookie", - "name": "tough-cookie", + "version": "2.5.0", + "homepage": "https://github.com/salesforce/tough-cookie", "repository": { "type": "git", "url": "git://github.com/salesforce/tough-cookie.git" }, + "bugs": { + "url": "https://github.com/salesforce/tough-cookie/issues" + }, + "main": "./lib/cookie", + "files": [ + "lib" + ], "scripts": { - "cover": "nyc --reporter=lcov --reporter=html vows test/*_test.js", - "test": "vows test/*_test.js" + "version": "genversion lib/version.js && git add lib/version.js", + "test": "vows test/*_test.js", + "cover": "nyc --reporter=lcov --reporter=html vows test/*_test.js" + }, + "engines": { + "node": ">=0.8" + }, + "devDependencies": { + "async": "^1.4.2", + "genversion": "^2.1.0", + "nyc": "^11.6.0", + "string.prototype.repeat": "^0.2.0", + "vows": "^0.8.2" }, - "version": "2.4.3" + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } } diff --git a/node_modules/wide-align/LICENSE b/node_modules/wide-align/LICENSE deleted file mode 100644 index f4be44d8..00000000 --- a/node_modules/wide-align/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -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/wide-align/README.md b/node_modules/wide-align/README.md deleted file mode 100644 index 32f1be04..00000000 --- a/node_modules/wide-align/README.md +++ /dev/null @@ -1,47 +0,0 @@ -wide-align ----------- - -A wide-character aware text alignment function for use in terminals / on the -console. - -### Usage - -``` -var align = require('wide-align') - -// Note that if you view this on a unicode console, all of the slashes are -// aligned. This is because on a console, all narrow characters are -// an en wide and all wide characters are an em. In browsers, this isn't -// held to and wide characters like "古" can be less than two narrow -// characters even with a fixed width font. - -console.log(align.center('abc', 10)) // ' abc ' -console.log(align.center('古古古', 10)) // ' 古古古 ' -console.log(align.left('abc', 10)) // 'abc ' -console.log(align.left('古古古', 10)) // '古古古 ' -console.log(align.right('abc', 10)) // ' abc' -console.log(align.right('古古古', 10)) // ' 古古古' -``` - -### Functions - -#### `align.center(str, length)` → `str` - -Returns *str* with spaces added to both sides such that that it is *length* -chars long and centered in the spaces. - -#### `align.left(str, length)` → `str` - -Returns *str* with spaces to the right such that it is *length* chars long. - -### `align.right(str, length)` → `str` - -Returns *str* with spaces to the left such that it is *length* chars long. - -### Origins - -These functions were originally taken from -[cliui](https://npmjs.com/package/cliui). Changes include switching to the -MUCH faster pad generation function from -[lodash](https://npmjs.com/package/lodash), making center alignment pad -both sides and adding left alignment. diff --git a/node_modules/wide-align/align.js b/node_modules/wide-align/align.js deleted file mode 100644 index 4f94ca4c..00000000 --- a/node_modules/wide-align/align.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict' -var stringWidth = require('string-width') - -exports.center = alignCenter -exports.left = alignLeft -exports.right = alignRight - -// lodash's way of generating pad characters. - -function createPadding (width) { - var result = '' - var string = ' ' - var n = width - do { - if (n % 2) { - result += string; - } - n = Math.floor(n / 2); - string += string; - } while (n); - - return result; -} - -function alignLeft (str, width) { - var trimmed = str.trimRight() - if (trimmed.length === 0 && str.length >= width) return str - var padding = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - padding = createPadding(width - strWidth) - } - - return trimmed + padding -} - -function alignRight (str, width) { - var trimmed = str.trimLeft() - if (trimmed.length === 0 && str.length >= width) return str - var padding = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - padding = createPadding(width - strWidth) - } - - return padding + trimmed -} - -function alignCenter (str, width) { - var trimmed = str.trim() - if (trimmed.length === 0 && str.length >= width) return str - var padLeft = '' - var padRight = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - var padLeftBy = parseInt((width - strWidth) / 2, 10) - padLeft = createPadding(padLeftBy) - padRight = createPadding(width - (strWidth + padLeftBy)) - } - - return padLeft + trimmed + padRight -} diff --git a/node_modules/wide-align/package.json b/node_modules/wide-align/package.json deleted file mode 100644 index 061c8a24..00000000 --- a/node_modules/wide-align/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "wide-align@1.1.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "wide-align@1.1.3", - "_id": "wide-align@1.1.3", - "_inBundle": false, - "_integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "_location": "/wide-align", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "wide-align@1.1.3", - "name": "wide-align", - "escapedName": "wide-align", - "rawSpec": "1.1.3", - "saveSpec": null, - "fetchSpec": "1.1.3" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "_spec": "1.1.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/iarna/wide-align/issues" - }, - "dependencies": { - "string-width": "^1.0.2 || 2" - }, - "description": "A wide-character aware text alignment function for use on the console or with fixed width fonts.", - "devDependencies": { - "tap": "10 || 11 || 12" - }, - "files": [ - "align.js" - ], - "homepage": "https://github.com/iarna/wide-align#readme", - "keywords": [ - "wide", - "double", - "unicode", - "cjkv", - "pad", - "align" - ], - "license": "ISC", - "main": "align.js", - "name": "wide-align", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/wide-align.git" - }, - "scripts": { - "test": "tap --coverage test/*.js", - "version": "perl -pi -e 's/^( \"version\": $ENV{npm_config_node_version}\").*?\",/$1abc\",/' package-lock.json ; git add package-lock.json" - }, - "version": "1.1.3" -} diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js index ff625435..5038bb0c 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 654d0bfe..e7af2f77 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 index b9574ed7..9e37ec3d 100644 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +++ b/node_modules/wrap-ansi/node_modules/ansi-regex/index.js @@ -1,4 +1,14 @@ 'use strict'; -module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; + +module.exports = options => { + options = Object.assign({ + onlyFirst: false + }, options); + + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); }; diff --git a/node_modules/wrap-ansi/node_modules/ansi-regex/license b/node_modules/wrap-ansi/node_modules/ansi-regex/license index 654d0bfe..e7af2f77 100644 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/license +++ b/node_modules/wrap-ansi/node_modules/ansi-regex/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/package.json b/node_modules/wrap-ansi/node_modules/ansi-regex/package.json index 4ddb4710..66a43e1f 100644 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +++ b/node_modules/wrap-ansi/node_modules/ansi-regex/package.json @@ -1,112 +1,53 @@ { - "_args": [ - [ - "ansi-regex@2.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 - } - } + "name": "ansi-regex", + "version": "4.1.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js" + ], + "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" + ], + "devDependencies": { + "ava": "^0.25.0", + "xo": "^0.23.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 index 6a928edf..d19c4466 100644 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +++ b/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md @@ -1,12 +1,26 @@ # 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) +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + +--- + +
        + + 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. +
        +
        + +--- ## Install ``` -$ npm install --save ansi-regex +$ npm install ansi-regex ``` @@ -15,25 +29,59 @@ $ npm install --save ansi-regex ```js const ansiRegex = require('ansi-regex'); -ansiRegex().test('\u001b[4mcake\u001b[0m'); +ansiRegex().test('\u001B[4mcake\u001B[0m'); //=> true ansiRegex().test('cake'); //=> false -'\u001b[4mcake\u001b[0m'.match(ansiRegex()); -//=> ['\u001b[4m', '\u001b[0m'] +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] ``` + +## API + +### ansiRegex([options]) + +Returns a regex for matching ANSI escape codes. + +#### options + +##### onlyFirst + +Type: `boolean`
        +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + ## 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. +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. +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT 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 a7d3e385..00000000 --- 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 654d0bfe..00000000 --- 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 233ae044..00000000 --- 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/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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 4936464b..00000000 --- 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 index b9bec624..33c9d6c0 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/index.js +++ b/node_modules/wrap-ansi/node_modules/string-width/index.js @@ -1,36 +1,38 @@ 'use strict'; -var stripAnsi = require('strip-ansi'); -var codePointAt = require('code-point-at'); -var isFullwidthCodePoint = require('is-fullwidth-code-point'); +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); -// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345 -module.exports = function (str) { - if (typeof str !== 'string' || str.length === 0) { +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { return 0; } - var width = 0; + input = stripAnsi(input); - str = stripAnsi(str); + let width = 0; - for (var i = 0; i < str.length; i++) { - var code = codePointAt(str, i); + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); - // ignore control characters - if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { continue; } - // surrogates - if (code >= 0x10000) { - i++; + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; } - if (isFullwidthCodePoint(code)) { - width += 2; - } else { - width++; + // Surrogates + if (code > 0xFFFF) { + i++; } + + width += isFullwidthCodePoint(code) ? 2 : 1; } return width; diff --git a/node_modules/wrap-ansi/node_modules/string-width/license b/node_modules/wrap-ansi/node_modules/string-width/license index 654d0bfe..e7af2f77 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/license +++ b/node_modules/wrap-ansi/node_modules/string-width/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/string-width/package.json b/node_modules/wrap-ansi/node_modules/string-width/package.json index 767207be..e040183e 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/package.json +++ b/node_modules/wrap-ansi/node_modules/string-width/package.json @@ -1,92 +1,56 @@ { - "_args": [ - [ - "string-width@1.0.2", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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" + "name": "string-width", + "version": "3.1.0", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "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" + ], + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + } } diff --git a/node_modules/wrap-ansi/node_modules/string-width/readme.md b/node_modules/wrap-ansi/node_modules/string-width/readme.md index 1ab42c93..d39d95f5 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/readme.md +++ b/node_modules/wrap-ansi/node_modules/string-width/readme.md @@ -2,7 +2,7 @@ > 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. +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://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. @@ -10,7 +10,7 @@ Useful to be able to measure the actual width of command-line output. ## Install ``` -$ npm install --save string-width +$ npm install string-width ``` @@ -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/wrap-ansi/node_modules/strip-ansi/index.js b/node_modules/wrap-ansi/node_modules/strip-ansi/index.js index 099480fb..9788c96d 100644 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +++ b/node_modules/wrap-ansi/node_modules/strip-ansi/index.js @@ -1,6 +1,7 @@ 'use strict'; -var ansiRegex = require('ansi-regex')(); +const ansiRegex = require('ansi-regex'); -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; +const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +module.exports = stripAnsi; +module.exports.default = stripAnsi; diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/license b/node_modules/wrap-ansi/node_modules/strip-ansi/license index 654d0bfe..e7af2f77 100644 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/license +++ b/node_modules/wrap-ansi/node_modules/strip-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/strip-ansi/package.json b/node_modules/wrap-ansi/node_modules/strip-ansi/package.json index 3c55eb85..7494fd7e 100644 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +++ b/node_modules/wrap-ansi/node_modules/strip-ansi/package.json @@ -1,106 +1,54 @@ { - "_args": [ - [ - "strip-ansi@3.0.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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/nickmerwin/www/coveralls-github-action", - "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" + "name": "strip-ansi", + "version": "5.2.0", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + } } diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md b/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md index cb7d9ff7..8681fe8a 100644 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +++ b/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md @@ -1,33 +1,61 @@ # 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) +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string +--- + +
        + + Get professional support for 'strip-ansi' 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 --save strip-ansi +$ npm install strip-ansi ``` ## Usage ```js -var stripAnsi = require('strip-ansi'); +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' -stripAnsi('\u001b[4mcake\u001b[0m'); -//=> 'cake' +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' ``` +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of 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 © [Sindre Sorhus](http://sindresorhus.com) +MIT diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json index f0b7ab87..dcbb7f6e 100644 --- a/node_modules/wrap-ansi/package.json +++ b/node_modules/wrap-ansi/package.json @@ -1,123 +1,61 @@ { - "_args": [ - [ - "wrap-ansi@2.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "wrap-ansi@2.1.0", - "_id": "wrap-ansi@2.1.0", - "_inBundle": false, - "_integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "_location": "/wrap-ansi", - "_phantomChildren": { - "code-point-at": "1.1.0", - "number-is-nan": "1.0.1" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "wrap-ansi@2.1.0", - "name": "wrap-ansi", - "escapedName": "wrap-ansi", - "rawSpec": "2.1.0", - "saveSpec": null, - "fetchSpec": "2.1.0" - }, - "_requiredBy": [ - "/cliui" - ], - "_resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/wrap-ansi/issues" - }, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "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": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/wrap-ansi#readme", - "keywords": [ - "wrap", - "break", - "wordwrap", - "wordbreak", - "linewrap", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "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 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" + "name": "wrap-ansi", + "version": "5.1.0", + "description": "Wordwrap a string with ANSI escape codes", + "license": "MIT", + "repository": "chalk/wrap-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "wrap", + "break", + "wordwrap", + "wordbreak", + "linewrap", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "devDependencies": { + "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" + } } diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md index 59fc96bd..73b87de2 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/y18n/CHANGELOG.md b/node_modules/y18n/CHANGELOG.md index c259076a..a3d5bcd5 100644 --- a/node_modules/y18n/CHANGELOG.md +++ b/node_modules/y18n/CHANGELOG.md @@ -2,6 +2,13 @@ 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. + +### 4.0.1 (2020-11-30) + +### Bug Fixes + +* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)) + # [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) diff --git a/node_modules/y18n/index.js b/node_modules/y18n/index.js index d7206816..727362aa 100644 --- a/node_modules/y18n/index.js +++ b/node_modules/y18n/index.js @@ -11,7 +11,7 @@ function Y18N (opts) { this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true // internal stuff. - this.cache = {} + this.cache = Object.create(null) this.writeQueue = [] } diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json index f8066213..2050c9e6 100644 --- a/node_modules/y18n/package.json +++ b/node_modules/y18n/package.json @@ -1,42 +1,32 @@ { - "_args": [ - [ - "y18n@4.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "y18n@4.0.0", - "_id": "y18n@4.0.0", - "_inBundle": false, - "_integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "_location": "/y18n", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "y18n@4.0.0", - "name": "y18n", - "escapedName": "y18n", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" + "name": "y18n", + "version": "4.0.1", + "description": "the bare-bones internationalization library used by yargs", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc mocha", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" }, - "_requiredBy": [ - "/yargs", - "/yargs-unparser/yargs" - ], - "_resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" + "repository": { + "type": "git", + "url": "git@github.com:yargs/y18n.git" }, + "files": [ + "index.js" + ], + "keywords": [ + "i18n", + "internationalization", + "yargs" + ], + "author": "Ben Coe ", + "license": "ISC", "bugs": { "url": "https://github.com/yargs/y18n/issues" }, - "description": "the bare-bones internationalization library used by yargs", + "homepage": "https://github.com/yargs/y18n", "devDependencies": { "chai": "^4.0.1", "coveralls": "^3.0.0", @@ -45,28 +35,5 @@ "rimraf": "^2.5.0", "standard": "^10.0.0-beta.0", "standard-version": "^4.2.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/yargs/y18n", - "keywords": [ - "i18n", - "internationalization", - "yargs" - ], - "license": "ISC", - "main": "index.js", - "name": "y18n", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/yargs/y18n.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "release": "standard-version", - "test": "nyc mocha" - }, - "version": "4.0.0" + } } diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md index 79de745b..df11c002 100644 --- a/node_modules/yargs-parser/CHANGELOG.md +++ b/node_modules/yargs-parser/CHANGELOG.md @@ -1,7 +1,26 @@ -# 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) diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md index e1f8abe1..dde9f84d 100644 --- a/node_modules/yargs-parser/README.md +++ b/node_modules/yargs-parser/README.md @@ -58,21 +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.string`: keys should be treated as strings (even if they resemble a number `-x 33`). **returns:** @@ -324,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 20d472d1..f9ee8241 100644 --- a/node_modules/yargs-parser/index.js +++ b/node_modules/yargs-parser/index.js @@ -12,7 +12,7 @@ function parse (args, opts) { // 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, @@ -24,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 || [] @@ -33,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: {}, @@ -177,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] @@ -188,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)) && @@ -333,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) { @@ -404,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) @@ -642,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] = {} } @@ -661,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]) @@ -687,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 @@ -856,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 @@ -889,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 569f61ad..fe05e27f 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,7 +27,6 @@ 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 } else if ((c === "'" || c === '"') && !opening) { opening = c diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json index cb0a4659..6300abf5 100644 --- a/node_modules/yargs-parser/package.json +++ b/node_modules/yargs-parser/package.json @@ -1,63 +1,17 @@ { - "_args": [ - [ - "yargs-parser@13.0.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "yargs-parser@13.0.0", - "_id": "yargs-parser@13.0.0", - "_inBundle": false, - "_integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", - "_location": "/yargs-parser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "yargs-parser@13.0.0", - "name": "yargs-parser", - "escapedName": "yargs-parser", - "rawSpec": "13.0.0", - "saveSpec": null, - "fetchSpec": "13.0.0" - }, - "_requiredBy": [ - "/mocha", - "/nyc", - "/yargs" - ], - "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "_spec": "13.0.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/yargs/yargs-parser/issues" - }, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, + "name": "yargs-parser", + "version": "13.1.2", "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", - "standard": "^12.0.1", - "standard-version": "^4.4.0" + "main": "index.js", + "scripts": { + "test": "nyc mocha test/*.js", + "posttest": "standard", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" }, - "engine": { - "node": ">=6" + "repository": { + "url": "git@github.com:yargs/yargs-parser.git" }, - "files": [ - "lib", - "index.js" - ], - "homepage": "https://github.com/yargs/yargs-parser#readme", "keywords": [ "argument", "parser", @@ -69,17 +23,25 @@ "args", "argument" ], + "author": "Ben Coe ", "license": "ISC", - "main": "index.js", - "name": "yargs-parser", - "repository": { - "url": "git+ssh://git@github.com/yargs/yargs-parser.git" + "devDependencies": { + "chai": "^4.2.0", + "coveralls": "^3.0.2", + "mocha": "^5.2.0", + "nyc": "^14.1.0", + "standard": "^12.0.1", + "standard-version": "^6.0.0" }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "posttest": "standard", - "release": "standard-version", - "test": "nyc mocha test/*.js" + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" }, - "version": "13.0.0" + "files": [ + "lib", + "index.js" + ], + "engine": { + "node": ">=6" + } } diff --git a/node_modules/yargs-unparser/CHANGELOG.md b/node_modules/yargs-unparser/CHANGELOG.md index 0d7fc921..02119823 100644 --- a/node_modules/yargs-unparser/CHANGELOG.md +++ b/node_modules/yargs-unparser/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. +## [2.0.0](https://www.github.com/yargs/yargs-unparser/compare/v1.6.4...v2.0.0) (2020-10-02) + + +### ⚠ BREAKING CHANGES + +* upgrade deps drop Node 6/8 (#71) + +### Code Refactoring + +* upgrade deps drop Node 6/8 ([#71](https://www.github.com/yargs/yargs-unparser/issues/71)) ([c686882](https://www.github.com/yargs/yargs-unparser/commit/c686882f5ad554be44169e3745e741cb4ec898d0)) + +### [1.6.4](https://www.github.com/yargs/yargs-unparser/compare/v1.6.3...v1.6.4) (2020-10-01) + + +### Bug Fixes + +* **security:** upgraded flat to version ^5.0.2 ([9bd7c67](https://www.github.com/yargs/yargs-unparser/commit/9bd7c672e12417319c5d4de79070d9c7cd5107f2)) + +### [1.6.3](https://www.github.com/yargs/yargs-unparser/compare/v1.6.2...v1.6.3) (2020-06-17) + + +### Bug Fixes + +* test automatic publish ([209a487](https://www.github.com/yargs/yargs-unparser/commit/209a4870af799f4b200c2a89d7b7e50c9fd5fd1f)) + +### [1.6.2](https://www.github.com/yargs/yargs-unparser/compare/v1.6.1...v1.6.2) (2020-06-17) + + +### Bug Fixes + +* **readme:** marketing was injected dubiously into README ([#60](https://www.github.com/yargs/yargs-unparser/issues/60)) ([1167667](https://www.github.com/yargs/yargs-unparser/commit/1167667886fcb103c747e3c9855f353ee0e41c03)) + +### [1.6.1](https://www.github.com/yargs/yargs-unparser/compare/v1.6.0...v1.6.1) (2020-06-17) + + +### Bug Fixes + +* **deps:** downgrade yargs, such that we continue supporting Node 6 ([#57](https://www.github.com/yargs/yargs-unparser/issues/57)) ([f69406c](https://www.github.com/yargs/yargs-unparser/commit/f69406c34bead63011590f7b51a24a6f311c1a48)) + +## 1.6.0 (2019-07-30) + + +### Bug Fixes + +* **security:** update deps addressing recent audit vulnerabilities ([#40](https://github.com/yargs/yargs-unparser/issues/40)) ([2e74f1b](https://github.com/yargs/yargs-unparser/commit/2e74f1b)) +* address bug with camelCased flattened keys ([#32](https://github.com/yargs/yargs-unparser/issues/32)) ([981533a](https://github.com/yargs/yargs-unparser/commit/981533a)) +* **deps:** updated the lodash version to fix vulnerability ([#39](https://github.com/yargs/yargs-unparser/issues/39)) ([7375966](https://github.com/yargs/yargs-unparser/commit/7375966)) +* **package:** update yargs to version 10.0.3 ([f1eb4cb](https://github.com/yargs/yargs-unparser/commit/f1eb4cb)) +* **package:** update yargs to version 11.0.0 ([6aa7c91](https://github.com/yargs/yargs-unparser/commit/6aa7c91)) + + +### Features + +* add interoperation with minimist ([ba477f5](https://github.com/yargs/yargs-unparser/commit/ba477f5)) + # 1.5.0 (2018-11-30) diff --git a/node_modules/yargs-unparser/README.md b/node_modules/yargs-unparser/README.md index 27cc7b5a..a47cc4b2 100644 --- a/node_modules/yargs-unparser/README.md +++ b/node_modules/yargs-unparser/README.md @@ -1,20 +1,10 @@ # yargs-unparser -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [npm-url]:https://npmjs.org/package/yargs-unparser [npm-image]:http://img.shields.io/npm/v/yargs-unparser.svg [downloads-image]:http://img.shields.io/npm/dm/yargs-unparser.svg -[travis-url]:https://travis-ci.org/yargs/yargs-unparser -[travis-image]:http://img.shields.io/travis/yargs/yargs-unparser/master.svg -[codecov-url]:https://codecov.io/gh/yargs/yargs-unparser -[codecov-image]:https://img.shields.io/codecov/c/github/yargs/yargs-unparser/master.svg -[david-dm-url]:https://david-dm.org/yargs/yargs-unparser -[david-dm-image]:https://img.shields.io/david/yargs/yargs-unparser.svg -[david-dm-dev-url]:https://david-dm.org/yargs/yargs-unparser?type=dev -[david-dm-dev-image]:https://img.shields.io/david/dev/yargs/yargs-unparser.svg -[greenkeeper-image]:https://badges.greenkeeper.io/yargs/yargs-unparser.svg -[greenkeeper-url]:https://greenkeeper.io Converts back a `yargs` argv object to its original array form. @@ -55,7 +45,7 @@ The second argument of `unparse` accepts an options object: ```js const yargs = require('yargs'); -const unparse = require('yargs-unparse'); +const unparse = require('yargs-unparser'); const argv = yargs .command('my-command ', 'My awesome command', (yargs) => @@ -85,6 +75,11 @@ If you `coerce` in weird ways, things might not work correctly. `$ npm test` `$ npm test -- --watch` during development +## 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). ## License diff --git a/node_modules/yargs-unparser/index.js b/node_modules/yargs-unparser/index.js index b774c31e..c2b75819 100644 --- a/node_modules/yargs-unparser/index.js +++ b/node_modules/yargs-unparser/index.js @@ -1,16 +1,13 @@ 'use strict'; -const yargs = require('yargs/yargs'); const flatten = require('flat'); -const castArray = require('lodash/castArray'); -const some = require('lodash/some'); -const isPlainObject = require('lodash/isPlainObject'); -const camelCase = require('lodash/camelCase'); -const kebabCase = require('lodash/kebabCase'); -const omitBy = require('lodash/omitBy'); +const camelcase = require('camelcase'); +const decamelize = require('decamelize'); +const isPlainObj = require('is-plain-obj'); function isAlias(key, alias) { - return some(alias, (aliases) => castArray(aliases).indexOf(key) !== -1); + // TODO Switch to Object.values one Node.js 6 is dropped + return Object.keys(alias).some((id) => [].concat(alias[id]).indexOf(key) !== -1); } function hasDefaultValue(key, value, defaults) { @@ -18,14 +15,48 @@ function hasDefaultValue(key, value, defaults) { } function isCamelCased(key, argv) { - return /[A-Z]/.test(key) && camelCase(key) === key && // Is it camel case? - argv[kebabCase(key)] != null; // Is the standard version defined? + return /[A-Z]/.test(key) && camelcase(key) === key && // Is it camel case? + argv[decamelize(key, '-')] != null; // Is the standard version defined? } function keyToFlag(key) { return key.length === 1 ? `-${key}` : `--${key}`; } +function parseCommand(cmd) { + const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); + const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); + const bregex = /\.*[\][<>]/g; + const firstCommand = splitCommand.shift(); + + if (!firstCommand) { throw new Error(`No command found in: ${cmd}`); } + const parsedCommand = { + cmd: firstCommand.replace(bregex, ''), + demanded: [], + optional: [], + }; + + splitCommand.forEach((cmd, i) => { + let variadic = false; + + cmd = cmd.replace(/\s/g, ''); + if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) { variadic = true; } + if (/^\[/.test(cmd)) { + parsedCommand.optional.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic, + }); + } else { + parsedCommand.demanded.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic, + }); + } + }); + + return parsedCommand; +} + function unparseOption(key, value, unparsed) { if (typeof value === 'string') { unparsed.push(keyToFlag(key), value); @@ -35,11 +66,13 @@ function unparseOption(key, value, unparsed) { unparsed.push(`--no-${key}`); } else if (Array.isArray(value)) { value.forEach((item) => unparseOption(key, item, unparsed)); - } else if (isPlainObject(value)) { + } else if (isPlainObj(value)) { const flattened = flatten(value, { safe: true }); for (const flattenedKey in flattened) { - unparseOption(`${key}.${flattenedKey}`, flattened[flattenedKey], unparsed); + if (!isCamelCased(flattenedKey, flattened)) { + unparseOption(`${key}.${flattenedKey}`, flattened[flattenedKey], unparsed); + } } // Fallback case (numbers and other types) } else if (value != null) { @@ -54,9 +87,7 @@ function unparsePositional(argv, options, unparsed) { // e.g.: build if (options.command) { const { 0: cmd, index } = options.command.match(/[^<[]*/); - const { demanded, optional } = yargs() - .getCommandInstance() - .parseCommand(`foo ${options.command.substr(index + cmd.length)}`); + const { demanded, optional } = parseCommand(`foo ${options.command.substr(index + cmd.length)}`); // Push command (can be a deep command) unparsed.push(...cmd.trim().split(/\s+/)); @@ -81,20 +112,25 @@ function unparsePositional(argv, options, unparsed) { } function unparseOptions(argv, options, knownPositional, unparsed) { - const optionsArgv = omitBy(argv, (value, key) => - // Remove positional arguments - knownPositional.includes(key) || - // Remove special _, -- and $0 - ['_', '--', '$0'].includes(key) || - // Remove aliases - isAlias(key, options.alias) || - // Remove default values - hasDefaultValue(key, value, options.default) || - // Remove camel-cased - isCamelCased(key, argv)); - - for (const key in optionsArgv) { - unparseOption(key, optionsArgv[key], unparsed); + for (const key of Object.keys(argv)) { + const value = argv[key]; + + if ( + // Remove positional arguments + knownPositional.includes(key) || + // Remove special _, -- and $0 + ['_', '--', '$0'].includes(key) || + // Remove aliases + isAlias(key, options.alias) || + // Remove default values + hasDefaultValue(key, value, options.default) || + // Remove camel-cased + isCamelCased(key, argv) + ) { + continue; + } + + unparseOption(key, argv[key], unparsed); } } diff --git a/node_modules/yargs-unparser/node_modules/get-caller-file/LICENSE.md b/node_modules/yargs-unparser/node_modules/get-caller-file/LICENSE.md deleted file mode 100644 index bf3e1c07..00000000 --- a/node_modules/yargs-unparser/node_modules/get-caller-file/LICENSE.md +++ /dev/null @@ -1,6 +0,0 @@ -ISC License (ISC) -Copyright 2018 Stefan Penner - -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-unparser/node_modules/get-caller-file/README.md b/node_modules/yargs-unparser/node_modules/get-caller-file/README.md deleted file mode 100644 index 19449273..00000000 --- a/node_modules/yargs-unparser/node_modules/get-caller-file/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# get-caller-file - -[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) -[![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master) diff --git a/node_modules/yargs-unparser/node_modules/get-caller-file/index.js b/node_modules/yargs-unparser/node_modules/get-caller-file/index.js deleted file mode 100644 index 03e7dfc3..00000000 --- a/node_modules/yargs-unparser/node_modules/get-caller-file/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -// Call this function in a another function to find out the file from -// which that function was called from. (Inspects the v8 stack trace) -// -// Inspired by http://stackoverflow.com/questions/13227489 - -module.exports = function getCallerFile(_position) { - var oldPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function(err, stack) { return stack; }; - var stack = new Error().stack; - Error.prepareStackTrace = oldPrepareStackTrace; - - var position = _position ? _position : 2; - - // stack[0] holds this file - // stack[1] holds where this function was called - // stack[2] holds the file we're interested in - return stack[position] ? stack[position].getFileName() : undefined; -}; diff --git a/node_modules/yargs-unparser/node_modules/get-caller-file/package.json b/node_modules/yargs-unparser/node_modules/get-caller-file/package.json deleted file mode 100644 index 61b4d84e..00000000 --- a/node_modules/yargs-unparser/node_modules/get-caller-file/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_args": [ - [ - "get-caller-file@1.0.3", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "get-caller-file@1.0.3", - "_id": "get-caller-file@1.0.3", - "_inBundle": false, - "_integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "_location": "/yargs-unparser/get-caller-file", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "get-caller-file@1.0.3", - "name": "get-caller-file", - "escapedName": "get-caller-file", - "rawSpec": "1.0.3", - "saveSpec": null, - "fetchSpec": "1.0.3" - }, - "_requiredBy": [ - "/yargs-unparser/yargs" - ], - "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "_spec": "1.0.3", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Stefan Penner" - }, - "bugs": { - "url": "https://github.com/stefanpenner/get-caller-file/issues" - }, - "description": "[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)", - "devDependencies": { - "chai": "^4.1.2", - "ensure-posix-path": "^1.0.1", - "mocha": "^5.2.0" - }, - "directories": { - "test": "tests" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/stefanpenner/get-caller-file#readme", - "license": "ISC", - "main": "index.js", - "name": "get-caller-file", - "repository": { - "type": "git", - "url": "git+https://github.com/stefanpenner/get-caller-file.git" - }, - "scripts": { - "test": "mocha test", - "test:debug": "mocha test" - }, - "version": "1.0.3" -} diff --git a/node_modules/yargs-unparser/node_modules/require-main-filename/.npmignore b/node_modules/yargs-unparser/node_modules/require-main-filename/.npmignore deleted file mode 100644 index 6f9fe6ba..00000000 --- a/node_modules/yargs-unparser/node_modules/require-main-filename/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -.DS_Store -.nyc_output diff --git a/node_modules/yargs-unparser/node_modules/require-main-filename/.travis.yml b/node_modules/yargs-unparser/node_modules/require-main-filename/.travis.yml deleted file mode 100644 index ab61ce77..00000000 --- a/node_modules/yargs-unparser/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-unparser/node_modules/require-main-filename/LICENSE.txt b/node_modules/yargs-unparser/node_modules/require-main-filename/LICENSE.txt deleted file mode 100644 index 836440be..00000000 --- a/node_modules/yargs-unparser/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-unparser/node_modules/require-main-filename/README.md b/node_modules/yargs-unparser/node_modules/require-main-filename/README.md deleted file mode 100644 index 820d9f58..00000000 --- a/node_modules/yargs-unparser/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-unparser/node_modules/require-main-filename/index.js b/node_modules/yargs-unparser/node_modules/require-main-filename/index.js deleted file mode 100644 index dca7f0cc..00000000 --- a/node_modules/yargs-unparser/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-unparser/node_modules/require-main-filename/package.json b/node_modules/yargs-unparser/node_modules/require-main-filename/package.json deleted file mode 100644 index 31bb68e3..00000000 --- a/node_modules/yargs-unparser/node_modules/require-main-filename/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_args": [ - [ - "require-main-filename@1.0.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_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-unparser/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-unparser/yargs" - ], - "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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-unparser/node_modules/require-main-filename/test.js b/node_modules/yargs-unparser/node_modules/require-main-filename/test.js deleted file mode 100644 index d89e7dcb..00000000 --- a/node_modules/yargs-unparser/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-unparser/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-unparser/node_modules/yargs-parser/CHANGELOG.md deleted file mode 100644 index 06c42c3c..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs-parser/CHANGELOG.md +++ /dev/null @@ -1,412 +0,0 @@ -# Change Log - -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. - - -## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) - - -### Bug Fixes - -* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98)) - - -### Reverts - -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063)) - - - - -# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10) - - -### Bug Fixes - -* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31)) - - -### Features - -* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce)) - - - - -# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06) - - -### Bug Fixes - -* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f)) -* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da)) -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4)) - - -### Chores - -* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1)) - - -### Features - -* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117)) -* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce)) - - -### BREAKING CHANGES - -* drops Node 4 support -* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction. - - - - -# [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) - - -### 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'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -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 -``` - - - - -## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) - - -### Bug Fixes - -* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad)) - - - - -## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20) - - -### Bug Fixes - -* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206)) - - - - -# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20) - - -### 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) - - -### 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)) - - -### 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)) - - - - -# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) - - -### 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)) - - -### 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 - -* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. - - - - -# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) - - -### Chores - -* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) - - -### BREAKING CHANGES - -* populate-- now defaults to false. - - - - -## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) - - -### 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)) - - - - -# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) - - -### 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)) - - -### 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)) - - -### 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) - - -### 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)) - - -### BREAKING CHANGES - -* environment variables will now override config files (args, env, config-file, config-object) - - - - -## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) - - -### 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) - - -### 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)) - - - - -# [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) - - -### Bug Fixes - -* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) - - - - -## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) - - -### Bug Fixes - -* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) - - - - -# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) - - -### 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 - -* coerce is no longer applied to individual arguments in an implicit array. - - - - -# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) - - -### 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 - -* 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)) - - -### 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)) - - - - -# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) - - -### 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)) - -### 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._ - - - - -## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) - - -### 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)) - - - - -# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) - - -### 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)) - - - - -# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) - - -### 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)) diff --git a/node_modules/yargs-unparser/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-unparser/node_modules/yargs-parser/LICENSE.txt deleted file mode 100644 index 836440be..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs-parser/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-unparser/node_modules/yargs-parser/README.md b/node_modules/yargs-unparser/node_modules/yargs-parser/README.md deleted file mode 100644 index 5847dffe..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs-parser/README.md +++ /dev/null @@ -1,351 +0,0 @@ -# yargs-parser - -[![Build Status](https://travis-ci.org/yargs/yargs-parser.svg)](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) -[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - - -The mighty option parser used by [yargs](https://github.com/yargs/yargs). - -visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. - - - -## Example - -```sh -npm i yargs-parser --save -``` - -```js -var argv = require('yargs-parser')(process.argv.slice(2)) -console.log(argv) -``` - -```sh -node example.js --foo=33 --bar hello -{ _: [], foo: 33, bar: 'hello' } -``` - -_or parse a string!_ - -```js -var argv = require('./')('--foo=99 --bar=33') -console.log(argv) -``` - -```sh -{ _: [], foo: 99, bar: 33 } -``` - -Convert an array of mixed types before passing to `yargs-parser`: - -```js -var parse = require('yargs-parser') -parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string -parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings -``` - -## API - -### require('yargs-parser')(args, opts={}) - -Parses command line arguments returning a simple mapping of keys and values. - -**expects:** - -* `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.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}}}`. - * `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. - -**returns:** - -* `obj`: 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 `--`. - -### require('yargs-parser').detailed(args, opts={}) - -Parses a command line string, returning detailed information required by the -yargs engine. - -**expects:** - -* `args`: a string or array of strings representing options to parse. -* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. - -**returns:** - -* `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. -* `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. - - - -### Configuration - -The yargs-parser applies several automated transformations on the keys provided -in `args`. These features can be turned on and off using the `configuration` field -of `opts`. - -```js -var parsed = parser(['--no-dice'], { - configuration: { - 'boolean-negation': false - } -}) -``` - -### short option groups - -* default: `true`. -* key: `short-option-groups`. - -Should a group of short-options be treated as boolean flags? - -```sh -node example.js -abc -{ _: [], a: true, b: true, c: true } -``` - -_if disabled:_ - -```sh -node example.js -abc -{ _: [], abc: true } -``` - -### camel-case expansion - -* default: `true`. -* key: `camel-case-expansion`. - -Should hyphenated arguments be expanded into camel-case aliases? - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true, fooBar: true } -``` - -_if disabled:_ - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true } -``` - -### dot-notation - -* default: `true` -* key: `dot-notation` - -Should keys that contain `.` be treated as objects? - -```sh -node example.js --foo.bar -{ _: [], foo: { bar: true } } -``` - -_if disabled:_ - -```sh -node example.js --foo.bar -{ _: [], "foo.bar": true } -``` - -### parse numbers - -* default: `true` -* key: `parse-numbers` - -Should keys that look like numbers be treated as such? - -```sh -node example.js --foo=99.3 -{ _: [], foo: 99.3 } -``` - -_if disabled:_ - -```sh -node example.js --foo=99.3 -{ _: [], foo: "99.3" } -``` - -### boolean negation - -* default: `true` -* key: `boolean-negation` - -Should variables prefixed with `--no` be treated as negations? - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if disabled:_ - -```sh -node example.js --no-foo -{ _: [], "no-foo": true } -``` - -### combine arrays - -* default: `false` -* key: `combine-arrays` - -Should arrays be combined when provided by both command line arguments and -a configuration file. - -### duplicate arguments array - -* default: `true` -* key: `duplicate-arguments-array` - -Should arguments be coerced into an array when duplicated: - -```sh -node example.js -x 1 -x 2 -{ _: [], x: [1, 2] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 -x 2 -{ _: [], x: 2 } -``` - -### flatten duplicate arrays - -* default: `true` -* key: `flatten-duplicate-arrays` - -Should array arguments be coerced into a single array when duplicated: - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [1, 2, 3, 4] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [[1, 2], [3, 4]] } -``` - -### negation prefix - -* default: `no-` -* key: `negation-prefix` - -The prefix to use for negated boolean variables. - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if set to `quux`:_ - -```sh -node example.js --quuxfoo -{ _: [], foo: false } -``` - -### populate -- - -* default: `false`. -* key: `populate--` - -Should unparsed flags be stored in `--` or `_`. - -_If disabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a', 'x', 'y' ], b: true } -``` - -_If enabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } -``` - -### set placeholder key - -* default: `false`. -* key: `set-placeholder-key`. - -Should a placeholder be added for keys not set via the corresponding CLI argument? - -_If disabled:_ - -```sh -node example.js -a 1 -c 2 -{ _: [], a: 1, c: 2 } -``` - -_If enabled:_ - -```sh -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 text 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 } -``` - -_If enabled:_ - -```sh -node example.js -a run b -x y -{ _: [ 'run', 'b', '-x', 'y' ], a: true } -``` - -## Special Thanks - -The yargs project evolves from optimist and minimist. It owes its -existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ - -## License - -ISC diff --git a/node_modules/yargs-unparser/node_modules/yargs-parser/index.js b/node_modules/yargs-unparser/node_modules/yargs-parser/index.js deleted file mode 100644 index 69fa72dc..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs-parser/index.js +++ /dev/null @@ -1,866 +0,0 @@ -var camelCase = require('camelcase') -var decamelize = require('decamelize') -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, - 'halt-at-non-option': 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 (opt) { - var key = opt.key || opt - - // assign to flags[bools|strings|numbers] - const assignment = Object.keys(opt).map(function (key) { - return ({ - boolean: 'bools', - string: 'strings', - number: 'numbers' - })[key] - }).filter(Boolean).pop() - - // assign key to be coerced - if (assignment) { - flags[assignment][key] = true - } - - 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 = [] - - for (var i = 0; i < args.length; i++) { - var arg = args[i] - var broken - var key - var letters - var m - var next - var value - - // -- separated 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 if (arg === '--') { - notFlags = args.slice(i + 1) - break - } else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i) - break - } 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']) { - var alias = key.split('.').map(function (prop) { - return camelCase(prop) - }).join('.') - addNewAlias(key, alias) - } - - 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) : (Array.isArray(o[key][0]) ? o[key] : [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 - } - } - }) - // For "--optionName", also set argv['option-name'] - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - var c = decamelize(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/yargs-unparser/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/yargs-unparser/node_modules/yargs-parser/lib/tokenize-arg-string.js deleted file mode 100644 index 73e14cd6..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs-parser/lib/tokenize-arg-string.js +++ /dev/null @@ -1,41 +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) { - if (!args[i]) args[i] = '' - 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/yargs-unparser/node_modules/yargs-parser/package.json b/node_modules/yargs-unparser/node_modules/yargs-parser/package.json deleted file mode 100644 index 9904a385..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs-parser/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - "yargs-parser@11.1.1", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "yargs-parser@11.1.1", - "_id": "yargs-parser@11.1.1", - "_inBundle": false, - "_integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "_location": "/yargs-unparser/yargs-parser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "yargs-parser@11.1.1", - "name": "yargs-parser", - "escapedName": "yargs-parser", - "rawSpec": "11.1.1", - "saveSpec": null, - "fetchSpec": "11.1.1" - }, - "_requiredBy": [ - "/yargs-unparser/yargs" - ], - "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "_spec": "11.1.1", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/yargs/yargs-parser/issues" - }, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "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", - "standard": "^12.0.1", - "standard-version": "^4.4.0" - }, - "engine": { - "node": ">=6" - }, - "files": [ - "lib", - "index.js" - ], - "homepage": "https://github.com/yargs/yargs-parser#readme", - "keywords": [ - "argument", - "parser", - "yargs", - "command", - "cli", - "parsing", - "option", - "args", - "argument" - ], - "license": "ISC", - "main": "index.js", - "name": "yargs-parser", - "repository": { - "url": "git+ssh://git@github.com/yargs/yargs-parser.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "posttest": "standard", - "release": "standard-version", - "test": "nyc mocha test/*.js" - }, - "version": "11.1.1" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/CHANGELOG.md b/node_modules/yargs-unparser/node_modules/yargs/CHANGELOG.md deleted file mode 100644 index 506764c1..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/CHANGELOG.md +++ /dev/null @@ -1,1231 +0,0 @@ -# Change Log - -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. - - -## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19) - - -### Bug Fixes - -* allows camel-case, variadic arguments, and strict mode to be combined ([#1247](https://github.com/yargs/yargs/issues/1247)) ([eacc035](https://github.com/yargs/yargs/commit/eacc035)) - - - - -## [12.0.4](https://github.com/yargs/yargs/compare/v12.0.3...v12.0.4) (2018-11-10) - - -### Bug Fixes - -* don't load config when processing positionals ([5d0dc92](https://github.com/yargs/yargs/commit/5d0dc92)) - - - - -## [12.0.3](https://github.com/yargs/yargs/compare/v12.0.2...v12.0.3) (2018-10-06) - - -### Bug Fixes - -* $0 contains first arg in bundled electron apps ([#1206](https://github.com/yargs/yargs/issues/1206)) ([567820b](https://github.com/yargs/yargs/commit/567820b)) -* accept single function for middleware ([66fd6f7](https://github.com/yargs/yargs/commit/66fd6f7)), closes [#1214](https://github.com/yargs/yargs/issues/1214) [#1214](https://github.com/yargs/yargs/issues/1214) -* hide `hidden` options from help output even if they are in a group ([#1221](https://github.com/yargs/yargs/issues/1221)) ([da54028](https://github.com/yargs/yargs/commit/da54028)) -* improve Norwegian Bokmål translations ([#1208](https://github.com/yargs/yargs/issues/1208)) ([a458fa4](https://github.com/yargs/yargs/commit/a458fa4)) -* improve Norwegian Nynorsk translations ([#1207](https://github.com/yargs/yargs/issues/1207)) ([d422eb5](https://github.com/yargs/yargs/commit/d422eb5)) - - - - -## [12.0.2](https://github.com/yargs/yargs/compare/v12.0.1...v12.0.2) (2018-09-04) - - -### Bug Fixes - -* middleware should work regardless of when method is called ([664b265](https://github.com/yargs/yargs/commit/664b265)), closes [#1178](https://github.com/yargs/yargs/issues/1178) -* translation not working when using __ with a single parameter ([#1183](https://github.com/yargs/yargs/issues/1183)) ([f449aea](https://github.com/yargs/yargs/commit/f449aea)) -* upgrade os-locale to version that addresses license issue ([#1195](https://github.com/yargs/yargs/issues/1195)) ([efc0970](https://github.com/yargs/yargs/commit/efc0970)) - - - - -## [12.0.1](https://github.com/yargs/yargs/compare/v12.0.0...v12.0.1) (2018-06-29) - - - - -# [12.0.0](https://github.com/yargs/yargs/compare/v11.1.0...v12.0.0) (2018-06-26) - - -### Bug Fixes - -* .argv and .parse() now invoke identical code path ([#1126](https://github.com/yargs/yargs/issues/1126)) ([f13ebf4](https://github.com/yargs/yargs/commit/f13ebf4)) -* remove the trailing white spaces from the help output ([#1090](https://github.com/yargs/yargs/issues/1090)) ([3f0746c](https://github.com/yargs/yargs/commit/3f0746c)) -* **completion:** Avoid default command and recommendations during completion ([#1123](https://github.com/yargs/yargs/issues/1123)) ([036e7c5](https://github.com/yargs/yargs/commit/036e7c5)) - - -### Chores - -* test Node.js 6, 8 and 10 ([#1160](https://github.com/yargs/yargs/issues/1160)) ([84f9d2b](https://github.com/yargs/yargs/commit/84f9d2b)) -* upgrade to version of yargs-parser that does not populate value for unset boolean ([#1104](https://github.com/yargs/yargs/issues/1104)) ([d4705f4](https://github.com/yargs/yargs/commit/d4705f4)) - - -### Features - -* add support for global middleware, useful for shared tasks like metrics ([#1119](https://github.com/yargs/yargs/issues/1119)) ([9d71ac7](https://github.com/yargs/yargs/commit/9d71ac7)) -* allow setting scriptName $0 ([#1143](https://github.com/yargs/yargs/issues/1143)) ([a2f2eae](https://github.com/yargs/yargs/commit/a2f2eae)) -* remove `setPlaceholderKeys` ([#1105](https://github.com/yargs/yargs/issues/1105)) ([6ee2c82](https://github.com/yargs/yargs/commit/6ee2c82)) - - -### BREAKING CHANGES - -* Options absent from `argv` (not set via CLI argument) are now absent from the parsed result object rather than being set with `undefined` -* drop Node 4 from testing matrix, such that we'll gradually start drifting away from supporting Node 4. -* yargs-parser does not populate 'false' when boolean flag is not passed -* tests that assert against help output will need to be updated - - - - -# [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04) - - -### Bug Fixes - -* choose correct config directory when require.main does not exist ([#1056](https://github.com/yargs/yargs/issues/1056)) ([a04678c](https://github.com/yargs/yargs/commit/a04678c)) - - -### Features - -* allow hidden options to be displayed with --show-hidden ([#1061](https://github.com/yargs/yargs/issues/1061)) ([ea862ae](https://github.com/yargs/yargs/commit/ea862ae)) -* extend *.rc files in addition to json ([#1080](https://github.com/yargs/yargs/issues/1080)) ([11691a6](https://github.com/yargs/yargs/commit/11691a6)) - - - - -# [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22) - - -### Bug Fixes - -* Set implicit nargs=1 when type=number requiresArg=true ([#1050](https://github.com/yargs/yargs/issues/1050)) ([2b56812](https://github.com/yargs/yargs/commit/2b56812)) - - -### Features - -* requiresArg is now simply an alias for nargs(1) ([#1054](https://github.com/yargs/yargs/issues/1054)) ([a3ddacc](https://github.com/yargs/yargs/commit/a3ddacc)) - - -### BREAKING CHANGES - -* requiresArg now has significantly different error output, matching nargs. - - - - -## [10.1.2](https://github.com/yargs/yargs/compare/v10.1.1...v10.1.2) (2018-01-17) - - -### Bug Fixes - -* requiresArg should only be enforced if argument exists ([#1043](https://github.com/yargs/yargs/issues/1043)) ([fbf41ae](https://github.com/yargs/yargs/commit/fbf41ae)) - - - - -## [10.1.1](https://github.com/yargs/yargs/compare/v10.1.0...v10.1.1) (2018-01-09) - - -### Bug Fixes - -* Add `dirname` sanity check on `findUp` ([#1036](https://github.com/yargs/yargs/issues/1036)) ([331d103](https://github.com/yargs/yargs/commit/331d103)) - - - - -# [10.1.0](https://github.com/yargs/yargs/compare/v10.0.3...v10.1.0) (2018-01-01) - - -### Bug Fixes - -* 'undefined' should be taken to mean no argument was provided ([#1015](https://github.com/yargs/yargs/issues/1015)) ([c679e90](https://github.com/yargs/yargs/commit/c679e90)) - - -### Features - -* add missing simple chinese locale strings ([#1004](https://github.com/yargs/yargs/issues/1004)) ([3cc24ec](https://github.com/yargs/yargs/commit/3cc24ec)) -* add Norwegian Nynorsk translations ([#1028](https://github.com/yargs/yargs/issues/1028)) ([a5ac213](https://github.com/yargs/yargs/commit/a5ac213)) -* async command handlers ([#1001](https://github.com/yargs/yargs/issues/1001)) ([241124b](https://github.com/yargs/yargs/commit/241124b)) -* middleware ([#881](https://github.com/yargs/yargs/issues/881)) ([77b8dbc](https://github.com/yargs/yargs/commit/77b8dbc)) - - - - -## [10.0.3](https://github.com/yargs/yargs/compare/v10.0.2...v10.0.3) (2017-10-21) - - -### Bug Fixes - -* parse array rather than string, so that quotes are safe ([#993](https://github.com/yargs/yargs/issues/993)) ([c351685](https://github.com/yargs/yargs/commit/c351685)) - - - - -## [10.0.2](https://github.com/yargs/yargs/compare/v10.0.1...v10.0.2) (2017-10-21) - - -### Bug Fixes - -* fix tiny spacing issue with usage ([#992](https://github.com/yargs/yargs/issues/992)) ([7871327](https://github.com/yargs/yargs/commit/7871327)) - - - - -## [10.0.1](https://github.com/yargs/yargs/compare/v10.0.0...v10.0.1) (2017-10-19) - - -### Bug Fixes - -* help strings for nested commands were missing parent commands ([#990](https://github.com/yargs/yargs/issues/990)) ([cd1ca15](https://github.com/yargs/yargs/commit/cd1ca15)) -* use correct completion command in generated completion script ([#988](https://github.com/yargs/yargs/issues/988)) ([3c8ac1d](https://github.com/yargs/yargs/commit/3c8ac1d)) - - - - -# [10.0.0](https://github.com/yargs/yargs/compare/v9.1.0...v10.0.0) (2017-10-18) - - -### Bug Fixes - -* config and normalize can be disabled with false ([#952](https://github.com/yargs/yargs/issues/952)) ([3bb8771](https://github.com/yargs/yargs/commit/3bb8771)) -* less eager help command execution ([#972](https://github.com/yargs/yargs/issues/972)) ([8c1d7bf](https://github.com/yargs/yargs/commit/8c1d7bf)) -* the positional argument parse was clobbering global flag arguments ([#984](https://github.com/yargs/yargs/issues/984)) ([7e58453](https://github.com/yargs/yargs/commit/7e58453)) - - -### Features - -* .usage() can now be used to configure a default command ([#975](https://github.com/yargs/yargs/issues/975)) ([7269531](https://github.com/yargs/yargs/commit/7269531)) -* hidden options are now explicitly indicated using "hidden" flag ([#962](https://github.com/yargs/yargs/issues/962)) ([280d0d6](https://github.com/yargs/yargs/commit/280d0d6)) -* introduce .positional() for configuring positional arguments ([#967](https://github.com/yargs/yargs/issues/967)) ([cb16460](https://github.com/yargs/yargs/commit/cb16460)) -* replace $0 with file basename ([#983](https://github.com/yargs/yargs/issues/983)) ([20bb99b](https://github.com/yargs/yargs/commit/20bb99b)) - - -### BREAKING CHANGES - -* .usage() no longer accepts an options object as the second argument. It can instead be used as an alias for configuring a default command. -* previously hidden options were simply implied using a falsy description -* help command now only executes if it's the last positional in argv._ - - - - -# [9.1.0](https://github.com/yargs/yargs/compare/v9.0.1...v9.1.0) (2017-09-25) - - -### Bug Fixes - -* **command:** Run default cmd even if the only cmd ([#950](https://github.com/yargs/yargs/issues/950)) ([7b22203](https://github.com/yargs/yargs/commit/7b22203)) - - -### Features - -* multiple usage calls are now collected, not replaced ([#958](https://github.com/yargs/yargs/issues/958)) ([74a38b2](https://github.com/yargs/yargs/commit/74a38b2)) - - - - -## [9.0.1](https://github.com/yargs/yargs/compare/v9.0.0...v9.0.1) (2017-09-17) - - -### Bug Fixes - -* implications fails only displayed once ([#954](https://github.com/yargs/yargs/issues/954)) ([ac8088b](https://github.com/yargs/yargs/commit/ac8088b)) - - - - -# [9.0.0](https://github.com/yargs/yargs/compare/v8.0.2...v9.0.0) (2017-09-03) - - -### Bug Fixes - -* 'undefined' default value for choices resulted in validation failing ([782b896](https://github.com/yargs/yargs/commit/782b896)) -* address bug with handling of arrays of implications ([c240661](https://github.com/yargs/yargs/commit/c240661)) -* defaulting keys to 'undefined' interfered with conflicting key logic ([a8e0cff](https://github.com/yargs/yargs/commit/a8e0cff)) -* don't bother calling JSON.stringify() on string default values ([#891](https://github.com/yargs/yargs/issues/891)) ([628be21](https://github.com/yargs/yargs/commit/628be21)) -* exclude positional arguments from completion output ([#927](https://github.com/yargs/yargs/issues/927)) ([71c7ec7](https://github.com/yargs/yargs/commit/71c7ec7)) -* strict mode should not fail for hidden options ([#949](https://github.com/yargs/yargs/issues/949)) ([0e0c58d](https://github.com/yargs/yargs/commit/0e0c58d)) - - -### Features - -* allow implies and conflicts to accept array values ([#922](https://github.com/yargs/yargs/issues/922)) ([abdc7da](https://github.com/yargs/yargs/commit/abdc7da)) -* allow parse with no arguments as alias for yargs.argv ([#944](https://github.com/yargs/yargs/issues/944)) ([a9f03e7](https://github.com/yargs/yargs/commit/a9f03e7)) -* enable .help() and .version() by default ([#912](https://github.com/yargs/yargs/issues/912)) ([1ef44e0](https://github.com/yargs/yargs/commit/1ef44e0)) -* to allow both undefined and nulls, for benefit of TypeScript ([#945](https://github.com/yargs/yargs/issues/945)) ([792564d](https://github.com/yargs/yargs/commit/792564d)) - - -### BREAKING CHANGES - -* version() and help() are now enabled by default, and show up in help output; the implicit help command can no longer be enabled/disabled independently from the help command itself (which can now be disabled). -* parse() now behaves as an alias for .argv, unless a parseCallback is provided. - - - - -## [8.0.2](https://github.com/yargs/yargs/compare/v8.0.1...v8.0.2) (2017-06-12) - - - - -## [8.0.1](https://github.com/yargs/yargs/compare/v8.0.0...v8.0.1) (2017-05-02) - - - - -# [8.0.0](https://github.com/yargs/yargs/compare/v7.1.0...v8.0.0) (2017-05-01) - - -### Bug Fixes - -* commands are now applied in order, from left to right ([#857](https://github.com/yargs/yargs/issues/857)) ([baba863](https://github.com/yargs/yargs/commit/baba863)) -* help now takes precedence over command recommendation ([#866](https://github.com/yargs/yargs/issues/866)) ([17e3567](https://github.com/yargs/yargs/commit/17e3567)) -* positional arguments now work if no handler is provided to inner command ([#864](https://github.com/yargs/yargs/issues/864)) ([e28ded3](https://github.com/yargs/yargs/commit/e28ded3)) - - -### Chores - -* upgrade yargs-parser ([#867](https://github.com/yargs/yargs/issues/867)) ([8f9c6c6](https://github.com/yargs/yargs/commit/8f9c6c6)) - - -### Features - -* allow extends to inherit from a module ([#865](https://github.com/yargs/yargs/issues/865)) ([89456d9](https://github.com/yargs/yargs/commit/89456d9)) -* allow strict mode to be disabled ([#840](https://github.com/yargs/yargs/issues/840)) ([6f78c05](https://github.com/yargs/yargs/commit/6f78c05)) - - -### BREAKING CHANGES - -* extends functionality now always loads the JSON provided, rather than reading from a specific key -* Node 4+ is now required; this will allow us to start updating our dependencies. -* the first argument to strict() is now used to enable/disable its functionality, rather than controlling whether or not it is global. - - - - -# [7.1.0](https://github.com/yargs/yargs/compare/v7.0.2...v7.1.0) (2017-04-13) - - -### Bug Fixes - -* fix demandOption no longer treats 'false' as truthy ([#829](https://github.com/yargs/yargs/issues/829)) ([c748dd2](https://github.com/yargs/yargs/commit/c748dd2)) -* get terminalWidth in non interactive mode no longer causes a validation exception ([#837](https://github.com/yargs/yargs/issues/837)) ([360e301](https://github.com/yargs/yargs/commit/360e301)) -* we shouldn't output help if we've printed a prior help-like message ([#847](https://github.com/yargs/yargs/issues/847)) ([17e89bd](https://github.com/yargs/yargs/commit/17e89bd)) - - -### Features - -* add support for numeric commands ([#825](https://github.com/yargs/yargs/issues/825)) ([fde0564](https://github.com/yargs/yargs/commit/fde0564)) - - - - -## [7.0.2](https://github.com/yargs/yargs/compare/v7.0.1...v7.0.2) (2017-03-10) - - -### Bug Fixes - -* populating placeholder arguments broke validation ([b3eb2fe](https://github.com/yargs/yargs/commit/b3eb2fe)) - - - - -## [7.0.1](https://github.com/yargs/yargs/compare/v7.0.0...v7.0.1) (2017-03-03) - - -### Bug Fixes - -* --help with default command should print top-level help ([#810](https://github.com/yargs/yargs/issues/810)) ([9c03fa4](https://github.com/yargs/yargs/commit/9c03fa4)) - - - - -# [7.0.0](https://github.com/yargs/yargs/compare/v6.6.0...v7.0.0) (2017-02-26) - - -### Bug Fixes - -* address min/max validation message regression ([#750](https://github.com/yargs/yargs/issues/750)) ([2e5ce0f](https://github.com/yargs/yargs/commit/2e5ce0f)) -* address positional argument strict() bug introduced in [#766](https://github.com/yargs/yargs/issues/766) ([#784](https://github.com/yargs/yargs/issues/784)) ([a8528e6](https://github.com/yargs/yargs/commit/a8528e6)) -* console.warn() rather than throwing errors when api signatures are incorrect ([#804](https://github.com/yargs/yargs/issues/804)) ([a607061](https://github.com/yargs/yargs/commit/a607061)) -* context should override parsed argv ([#786](https://github.com/yargs/yargs/issues/786)) ([0997288](https://github.com/yargs/yargs/commit/0997288)) -* context variables are now recognized in strict() mode ([#796](https://github.com/yargs/yargs/issues/796)) ([48575cd](https://github.com/yargs/yargs/commit/48575cd)) -* errors were not bubbling appropriately from sub-commands to top-level ([#802](https://github.com/yargs/yargs/issues/802)) ([8a992f5](https://github.com/yargs/yargs/commit/8a992f5)) -* positional arguments of sub-commands threw strict() exception ([#805](https://github.com/yargs/yargs/issues/805)) ([f3f074b](https://github.com/yargs/yargs/commit/f3f074b)) -* pull in yargs-parser with modified env precedence ([#787](https://github.com/yargs/yargs/issues/787)) ([e0fbbe5](https://github.com/yargs/yargs/commit/e0fbbe5)) -* running parse() multiple times on the same yargs instance caused exception if help() enabled ([#790](https://github.com/yargs/yargs/issues/790)) ([07e39b7](https://github.com/yargs/yargs/commit/07e39b7)) -* use path.resolve() to support node 0.10 ([#797](https://github.com/yargs/yargs/issues/797)) ([49a93fc](https://github.com/yargs/yargs/commit/49a93fc)) - - -### Features - -* add conflicts and implies shorthands. ([#753](https://github.com/yargs/yargs/issues/753)) ([bd1472b](https://github.com/yargs/yargs/commit/bd1472b)) -* add traditional Chinese translation ([#780](https://github.com/yargs/yargs/issues/780)) ([6ab6a95](https://github.com/yargs/yargs/commit/6ab6a95)) -* allow provided config object to extend other configs ([#779](https://github.com/yargs/yargs/issues/779)) ([3280dd0](https://github.com/yargs/yargs/commit/3280dd0)) -* function argument validation ([#773](https://github.com/yargs/yargs/issues/773)) ([22ed9bb](https://github.com/yargs/yargs/commit/22ed9bb)) -* if only one column is provided for examples, allow it to take up the entire line ([#749](https://github.com/yargs/yargs/issues/749)) ([7931652](https://github.com/yargs/yargs/commit/7931652)) -* introduce custom yargs error object ([#765](https://github.com/yargs/yargs/issues/765)) ([8308efa](https://github.com/yargs/yargs/commit/8308efa)) -* introduces support for default commands, using the '*' identifier ([#785](https://github.com/yargs/yargs/issues/785)) ([d78a0f5](https://github.com/yargs/yargs/commit/d78a0f5)) -* rethink how options are inherited by commands ([#766](https://github.com/yargs/yargs/issues/766)) ([ab1fa4b](https://github.com/yargs/yargs/commit/ab1fa4b)) - - -### BREAKING CHANGES - -* `extends` key in config file is now used for extending other config files -* environment variables now take precedence over config files. -* context now takes precedence over argv and defaults -* the arguments passed to functions are now validated, there's a good chance this will throw exceptions for a few folks who are using the API in an unexpected way. -* by default options, and many of yargs' parsing helpers will now default to being applied globally; such that they are no-longer reset before being passed into commands. -* yargs will no longer aggressively suppress errors, allowing errors that are not generated internally to bubble. - - - - -# [6.6.0](https://github.com/yargs/yargs/compare/v6.5.0...v6.6.0) (2016-12-29) - - -### Bug Fixes - -* [object Object] was accidentally being populated on options object ([#736](https://github.com/yargs/yargs/issues/736)) ([f755e27](https://github.com/yargs/yargs/commit/f755e27)) -* do not use cwd when resolving package.json for yargs parsing config ([#726](https://github.com/yargs/yargs/issues/726)) ([9bdaab7](https://github.com/yargs/yargs/commit/9bdaab7)) - - -### Features - -* implement conflicts() for defining mutually exclusive arguments; thanks [@madcampos](https://github.com/madcampos)! ([#741](https://github.com/yargs/yargs/issues/741)) ([5883779](https://github.com/yargs/yargs/commit/5883779)) -* split demand() into demandCommand()/demandOption() ([#740](https://github.com/yargs/yargs/issues/740)) ([66573c8](https://github.com/yargs/yargs/commit/66573c8)) -* support for positional argument aliases ([#727](https://github.com/yargs/yargs/issues/727)) ([27e1a57](https://github.com/yargs/yargs/commit/27e1a57)) - - - - -# [6.5.0](https://github.com/yargs/yargs/compare/v6.4.0...v6.5.0) (2016-12-01) - - -### Bug Fixes - -* still freeze/unfreeze if parse() is called in isolation ([#717](https://github.com/yargs/yargs/issues/717)) ([30a9492](https://github.com/yargs/yargs/commit/30a9492)) - - -### Features - -* pull in yargs-parser introducing additional settings ([#688](https://github.com/yargs/yargs/issues/688)), and fixing [#716](https://github.com/yargs/yargs/issues/716) ([#722](https://github.com/yargs/yargs/issues/722)) ([702995a](https://github.com/yargs/yargs/commit/702995a)) - - - - -# [6.4.0](https://github.com/yargs/yargs/compare/v6.3.0...v6.4.0) (2016-11-13) - - -### Bug Fixes - -* **locales:** correct some Russian translations ([#691](https://github.com/yargs/yargs/issues/691)) ([a980671](https://github.com/yargs/yargs/commit/a980671)) - - -### Features - -* **locales:** Added Belarusian translation ([#690](https://github.com/yargs/yargs/issues/690)) ([68dac1f](https://github.com/yargs/yargs/commit/68dac1f)) -* **locales:** Create nl.json ([#687](https://github.com/yargs/yargs/issues/687)) ([46ce1bb](https://github.com/yargs/yargs/commit/46ce1bb)) -* update to yargs-parser that addresses [#598](https://github.com/yargs/yargs/issues/598), [#617](https://github.com/yargs/yargs/issues/617) ([#700](https://github.com/yargs/yargs/issues/700)) ([54cb31d](https://github.com/yargs/yargs/commit/54cb31d)) -* yargs is now passed as the third-argument to fail handler ([#613](https://github.com/yargs/yargs/issues/613)) ([21b74f9](https://github.com/yargs/yargs/commit/21b74f9)) - - -### Performance Improvements - -* normalizing package data is an expensive operation ([#705](https://github.com/yargs/yargs/issues/705)) ([49cf533](https://github.com/yargs/yargs/commit/49cf533)) - - - - -# [6.3.0](https://github.com/yargs/yargs/compare/v6.2.0...v6.3.0) (2016-10-19) - - -### Bug Fixes - -* **command:** subcommands via commandDir() now supported for parse(msg, cb) ([#678](https://github.com/yargs/yargs/issues/678)) ([6b85cc6](https://github.com/yargs/yargs/commit/6b85cc6)) - - -### Features - -* **locales:** Add Thai locale file ([#679](https://github.com/yargs/yargs/issues/679)) ([c05e36b](https://github.com/yargs/yargs/commit/c05e36b)) - - - - -# [6.2.0](https://github.com/yargs/yargs/compare/v6.1.1...v6.2.0) (2016-10-16) - - -### Bug Fixes - -* stop applying parser to context object ([#675](https://github.com/yargs/yargs/issues/675)) ([3fe9b8f](https://github.com/yargs/yargs/commit/3fe9b8f)) - - -### Features - -* add new pt_BR translations ([#674](https://github.com/yargs/yargs/issues/674)) ([5615a82](https://github.com/yargs/yargs/commit/5615a82)) -* Italian translations for 'did you mean' and 'aliases' ([#673](https://github.com/yargs/yargs/issues/673)) ([81984e6](https://github.com/yargs/yargs/commit/81984e6)) - - - - -## [6.1.1](https://github.com/yargs/yargs/compare/v6.1.0...v6.1.1) (2016-10-15) - - -### Bug Fixes - -* freeze was not resetting configObjects to initial state; addressed performance issue raised by [@nexdrew](https://github.com/nexdrew). ([#670](https://github.com/yargs/yargs/issues/670)) ([ae4bcd4](https://github.com/yargs/yargs/commit/ae4bcd4)) - - - - -# [6.1.0](https://github.com/yargs/yargs/compare/v6.0.0...v6.1.0) (2016-10-15) - - -### Bug Fixes - -* **locales:** change some translations ([#667](https://github.com/yargs/yargs/issues/667)) ([aa966c5](https://github.com/yargs/yargs/commit/aa966c5)) -* **locales:** conform hi locale to y18n.__n expectations ([#666](https://github.com/yargs/yargs/issues/666)) ([22adb18](https://github.com/yargs/yargs/commit/22adb18)) - - -### Features - -* initial support for command aliases ([#647](https://github.com/yargs/yargs/issues/647)) ([127a040](https://github.com/yargs/yargs/commit/127a040)) -* **command:** add camelcase commands to argv ([#658](https://github.com/yargs/yargs/issues/658)) ([b1cabae](https://github.com/yargs/yargs/commit/b1cabae)) -* **locales:** add Hindi translations ([9290912](https://github.com/yargs/yargs/commit/9290912)) -* **locales:** add Hungarian translations ([be92327](https://github.com/yargs/yargs/commit/be92327)) -* **locales:** Japanese translations for 'did you mean' and 'aliases' ([#651](https://github.com/yargs/yargs/issues/651)) ([5eb78fc](https://github.com/yargs/yargs/commit/5eb78fc)) -* **locales:** Polish translations for 'did you mean' and 'aliases' ([#650](https://github.com/yargs/yargs/issues/650)) ([c951c0e](https://github.com/yargs/yargs/commit/c951c0e)) -* reworking yargs API to make it easier to run in headless environments, e.g., Slack ([#646](https://github.com/yargs/yargs/issues/646)) ([f284c29](https://github.com/yargs/yargs/commit/f284c29)) -* Turkish translations for 'did you mean' and 'aliases' ([#660](https://github.com/yargs/yargs/issues/660)) ([072fd45](https://github.com/yargs/yargs/commit/072fd45)) - - - - -# [6.0.0](https://github.com/yargs/yargs/compare/v5.0.0...v6.0.0) (2016-09-30) - - -### Bug Fixes - -* changed parsing of the command string to ignore extra spaces ([#600](https://github.com/yargs/yargs/issues/600)) ([e8e5a72](https://github.com/yargs/yargs/commit/e8e5a72)) -* drop lodash.assign ([#641](https://github.com/yargs/yargs/issues/641)) ([ad3146f](https://github.com/yargs/yargs/commit/ad3146f)) -* for args that have skipValidation set to `true`, check if the parsed arg is `true` ([#619](https://github.com/yargs/yargs/issues/619)) ([658a34c](https://github.com/yargs/yargs/commit/658a34c)) -* upgrade standard, and fix appveyor config so that it works with newest standard ([#607](https://github.com/yargs/yargs/issues/607)) ([c301f42](https://github.com/yargs/yargs/commit/c301f42)) - - -### Chores - -* upgrade yargs-parser ([#633](https://github.com/yargs/yargs/issues/633)) ([cc1224e](https://github.com/yargs/yargs/commit/cc1224e)) - - -### Features - -* make opts object optional for .option() ([#624](https://github.com/yargs/yargs/issues/624)) ([4f29de6](https://github.com/yargs/yargs/commit/4f29de6)) - - -### Performance Improvements - -* defer windowWidth() to improve perf for non-help usage ([#610](https://github.com/yargs/yargs/issues/610)) ([cbc3636](https://github.com/yargs/yargs/commit/cbc3636)) - - -### BREAKING CHANGES - -* coerce is now applied as a final step after other parsing is complete - - - - -# [5.0.0](https://github.com/yargs/yargs/compare/v4.8.1...v5.0.0) (2016-08-14) - - -### Bug Fixes - -* **default:** Remove undocumented alias of default() ([#469](https://github.com/yargs/yargs/issues/469)) ([b8591b2](https://github.com/yargs/yargs/commit/b8591b2)) -* remove deprecated zh.json ([#578](https://github.com/yargs/yargs/issues/578)) ([317c62c](https://github.com/yargs/yargs/commit/317c62c)) - - -### Features - -* .help() API can now enable implicit help command ([#574](https://github.com/yargs/yargs/issues/574)) ([7645019](https://github.com/yargs/yargs/commit/7645019)) -* **command:** builder function no longer needs to return the yargs instance ([#549](https://github.com/yargs/yargs/issues/549)) ([eaa2873](https://github.com/yargs/yargs/commit/eaa2873)) -* add coerce api ([#586](https://github.com/yargs/yargs/issues/586)) ([1d53ccb](https://github.com/yargs/yargs/commit/1d53ccb)) -* adds recommendCommands() for command suggestions ([#580](https://github.com/yargs/yargs/issues/580)) ([59474dc](https://github.com/yargs/yargs/commit/59474dc)) -* apply .env() globally ([#553](https://github.com/yargs/yargs/issues/553)) ([be65728](https://github.com/yargs/yargs/commit/be65728)) -* apply default builder to command() and apply fail() handlers globally ([#583](https://github.com/yargs/yargs/issues/583)) ([0aaa68b](https://github.com/yargs/yargs/commit/0aaa68b)) -* update yargs-parser to version 3.1.0 ([#581](https://github.com/yargs/yargs/issues/581)) ([882a127](https://github.com/yargs/yargs/commit/882a127)) - - -### Performance Improvements - -* defer requiring most external libs until needed ([#584](https://github.com/yargs/yargs/issues/584)) ([f9b0ed4](https://github.com/yargs/yargs/commit/f9b0ed4)) - - -### BREAKING CHANGES - -* fail is now applied globally. -* we now default to an empty builder function when command is executed with no builder. -* yargs-parser now better handles negative integer values, at the cost of handling numeric option names, e.g., -1 hello -* default: removed undocumented `defaults` alias for `default`. -* introduces a default `help` command which outputs help, as an alternative to a help flag. -* interpret demand() numbers as relative to executing command ([#582](https://github.com/yargs/yargs/issues/582)) ([927810c](https://github.com/yargs/yargs/commit/927810c)) - - - - -## [4.8.1](https://github.com/yargs/yargs/compare/v4.8.0...v4.8.1) (2016-07-16) - - -### Bug Fixes - -* **commandDir:** make dir relative to caller instead of require.main.filename ([#548](https://github.com/yargs/yargs/issues/548)) ([3c2e479](https://github.com/yargs/yargs/commit/3c2e479)) -* add config lookup for .implies() ([#556](https://github.com/yargs/yargs/issues/556)) ([8d7585c](https://github.com/yargs/yargs/commit/8d7585c)) -* cache pkg lookups by path to avoid returning the wrong one ([#552](https://github.com/yargs/yargs/issues/552)) ([fea7e0b](https://github.com/yargs/yargs/commit/fea7e0b)) -* positional arguments were not being handled appropriately by parse() ([#559](https://github.com/yargs/yargs/issues/559)) ([063a866](https://github.com/yargs/yargs/commit/063a866)) -* pull in [@nexdrew](https://github.com/nexdrew)'s fixes to yargs-parser ([#560](https://github.com/yargs/yargs/issues/560)) ([c77c080](https://github.com/yargs/yargs/commit/c77c080)), closes [#560](https://github.com/yargs/yargs/issues/560) - - - - -# [4.8.0](https://github.com/yargs/yargs/compare/v4.7.1...v4.8.0) (2016-07-09) - - -### Bug Fixes - -* drop unused camelcase dependency fixes [#516](https://github.com/yargs/yargs/issues/516) ([#525](https://github.com/yargs/yargs/issues/525)) ([365fb9a](https://github.com/yargs/yargs/commit/365fb9a)), closes [#516](https://github.com/yargs/yargs/issues/516) [#525](https://github.com/yargs/yargs/issues/525) -* fake a tty in tests, so that we can use the new set-blocking ([#512](https://github.com/yargs/yargs/issues/512)) ([a54c742](https://github.com/yargs/yargs/commit/a54c742)) -* ignore invalid package.json during read-pkg-up ([#546](https://github.com/yargs/yargs/issues/546)) ([e058c87](https://github.com/yargs/yargs/commit/e058c87)) -* keep both zh and zh_CN until yargs[@5](https://github.com/5).x ([0f8faa7](https://github.com/yargs/yargs/commit/0f8faa7)) -* lazy-load package.json and cache. get rid of pkg-conf dependency. ([#544](https://github.com/yargs/yargs/issues/544)) ([2609b2e](https://github.com/yargs/yargs/commit/2609b2e)) -* we now respect the order of _ when applying commands ([#537](https://github.com/yargs/yargs/issues/537)) ([ed86b78](https://github.com/yargs/yargs/commit/ed86b78)) - - -### Features - -* add .commandDir(dir) to API to apply all command modules from a relative directory ([#494](https://github.com/yargs/yargs/issues/494)) ([b299dff](https://github.com/yargs/yargs/commit/b299dff)) -* **command:** derive missing command string from module filename ([#527](https://github.com/yargs/yargs/issues/527)) ([20d4b8a](https://github.com/yargs/yargs/commit/20d4b8a)) -* builder is now optional for a command module ([#545](https://github.com/yargs/yargs/issues/545)) ([8d6ad6e](https://github.com/yargs/yargs/commit/8d6ad6e)) - - - - -## [4.7.1](https://github.com/yargs/yargs/compare/v4.7.0...v4.7.1) (2016-05-15) - - -### Bug Fixes - -* switch to using `const` rather than `var` ([#499](https://github.com/yargs/yargs/pull/499)) -* make stdout flush on newer versions of Node.js ([#501](https://github.com/yargs/yargs/issues/501)) ([9f8c6f4](https://github.com/yargs/yargs/commit/9f8c6f4)) - - - - -# [4.7.0](https://github.com/yargs/yargs/compare/v4.6.0...v4.7.0) (2016-05-02) - - -### Bug Fixes - -* **pkgConf:** fix aliases issues in .pkgConf() ([#478](https://github.com/yargs/yargs/issues/478))([b900502](https://github.com/yargs/yargs/commit/b900502)) - - -### Features - -* **completion:** allow to get completions for any string, not just process.argv ([#470](https://github.com/yargs/yargs/issues/470))([74fcfbc](https://github.com/yargs/yargs/commit/74fcfbc)) -* **configuration:** Allow to directly pass a configuration object to .config() ([#480](https://github.com/yargs/yargs/issues/480))([e0a7e05](https://github.com/yargs/yargs/commit/e0a7e05)) -* **validation:** Add .skipValidation() method ([#471](https://github.com/yargs/yargs/issues/471))([d72badb](https://github.com/yargs/yargs/commit/d72badb)) - - - - -# [4.6.0](https://github.com/yargs/yargs/compare/v4.5.0...v4.6.0) (2016-04-11) - - -### Bug Fixes - -* **my brand!:** I agree with [@osher](https://github.com/osher) lightweight isn't a huge selling point of ours any longer, see [#468](https://github.com/yargs/yargs/issues/468) ([c46d7e1](https://github.com/yargs/yargs/commit/c46d7e1)) - -### Features - -* switch to standard-version for release management ([f70f801](https://github.com/yargs/yargs/commit/f70f801)) -* upgrade to version of yargs-parser that introduces some slick new features, great work [@elas7](https://github.com/elas7). update cliui, replace win-spawn, replace badge. ([#475](https://github.com/yargs/yargs/issues/475)) ([f915dd4](https://github.com/yargs/yargs/commit/f915dd4)) - - - - -# [4.5.0](https://github.com/yargs/yargs/compare/v4.4.0...v4.5.0) (2016-04-05) - - -### Bug Fixes - -* **windows:** handle $0 better on Windows platforms ([eb6e03f](https://github.com/yargs/yargs/commit/eb6e03f)) - -### Features - -* **commands:** implemented variadic positional arguments ([51d926e](https://github.com/yargs/yargs/commit/51d926e)) -* **completion:** completion now better handles aliases, and avoids duplicating keys. ([86416c8](https://github.com/yargs/yargs/commit/86416c8)) -* **config:** If invoking .config() without parameters, set a default option ([0413dd1](https://github.com/yargs/yargs/commit/0413dd1)) -* **conventional-changelog:** switching to using conventional-changelog for generating the changelog ([a2b5a2a](https://github.com/yargs/yargs/commit/a2b5a2a)) - - - -### v4.4.0 (2016/04/03 21:10 +07:00) - -- [#454](https://github.com/yargs/yargs/pull/454) fix demand() when second argument is an array (@elas7) -- [#452](https://github.com/yargs/yargs/pull/452) fix code example for `.help()` docs (@maxrimue) -- [#450](https://github.com/yargs/yargs/pull/450) fix for bash completion trailing space edge-case (@elas7) -- [#448](https://github.com/yargs/yargs/pull/448) allow a method to be passed to `showHelp`, rather than a log-level (@osher) -- [#446](https://github.com/yargs/yargs/pull/446) update yargs-parser, y18n, nyc, cliui, pkg-conf (@bcoe) -- [#436](https://github.com/yargs/yargs/pull/436) the rebase method is only used by tests, do not export it in two places (@elas7) -- [#428](https://github.com/yargs/yargs/pull/428) initial support for subcommands (@nexdrew) - -### v4.3.2 (2016/3/20 15:07 +07:00) - -- [#445](https://github.com/yargs/yargs/pull/445) strict mode was failing if no commands were registered (@nexdrew) -- [#443](https://github.com/yargs/yargs/pull/443) adds Italian translation \o/ (@madrisan) -- [#441](https://github.com/yargs/yargs/pull/441) remove duplicate keys from array options configuration (@elas7) -- [#437](https://github.com/yargs/yargs/pull/437) standardize tests for .command() (@lrlna) - -### v4.3.0 (2016/3/12 14:19 +07:00) - -- [#432](https://github.com/yargs/yargs/pull/432) non-singleton version of yargs (@bcoe) -- [#422, #425, #420] translations for number (@zkat, @rilut, @maxrimue, @watilde) -- [#414](https://github.com/yargs/yargs/pull/414) all command options can be defined in module now (@nexdrew) - -### v4.2.0 (2016/2/22 11:02 +07:00) - -- [#395](https://github.com/yargs/yargs/pull/395) do not reset groups if they contain - global keys (@novemberborn) -- [#393](https://github.com/yargs/yargs/pull/393) use sane default for usage strings (@nexdrew) -- [#392](https://github.com/yargs/yargs/pull/392) resetting wrap() was causing layout issues - with commands (@nexdrew) -- [#391](https://github.com/yargs/yargs/pull/391) commands were being added multiple times (@nexdrew) - -### v4.0.0 (2016/2/14 1:27 +07:00) - -- [#384](https://github.com/bcoe/yargs/pull/384) add new number type to yargs (@lrlna, @maxrimue) -- [#382](https://github.com/bcoe/yargs/pull/382) pass error as extra parameter to fail (@gajus) -- [#378](https://github.com/bcoe/yargs/pull/378) introduces the pkgConf feature, which tells - yargs to load default argument values from a key on a project's package.json (@bcoe) -- [#376](https://github.com/bcoe/yargs/pull/376) **breaking change**, make help() method signature - more consistent with other commands (@maxrimue) -- [#368](https://github.com/bcoe/yargs/pull/368) **breaking change**, overhaul to command handling API: - introducing named positional arguments, commands as modules, introduces the concept of global options (options that don't reset). (@nexdrew, @bcoe). -- [#364](https://github.com/bcoe/yargs/pull/364) add the slick new yargs website to the package.json (@iarna). -- [#357](https://github.com/bcoe/yargs/pull/357) .strict() now requires that a valid command is provided (@lrlna) -- [#356](https://github.com/bcoe/yargs/pull/356) pull the parsing bits of yargs into the separate module yargs-parser. Various parsing options can now be turned on and off using configuration (@bcoe). -- [#330](https://github.com/bcoe/yargs/pull/330) **breaking change**, fix inconsistencies with `.version()` API. (@maxrimue). - -### v3.32.0 (2016/1/14 10:13 +07:00) - -- [#344](https://github.com/bcoe/yargs/pull/344) yargs now has a code of conduct and contributor guidelines (@bcoe) -- [#341](https://github.com/bcoe/yargs/issues/341) Fix edge-case with camel-case arguments (@davibe) -- [#331](https://github.com/bcoe/yargs/pull/331) Handle parsing a raw argument string (@kellyselden) -- [#325](https://github.com/bcoe/yargs/pull/325) Tweaks to make tests pass again on Windows (@isaacs) -- [#321](https://github.com/bcoe/yargs/pull/321) Custom config parsing function (@bcoe) - -### v3.31.0 (2015/12/03 10:15 +07:00) - -- [#239](https://github.com/bcoe/yargs/pull/239) Pass argv to commands (@bcoe) -- [#308](https://github.com/bcoe/yargs/pull/308) Yargs now handles environment variables (@nexdrew) -- [#302](https://github.com/bcoe/yargs/pull/302) Add Indonesian translation (@rilut) -- [#300](https://github.com/bcoe/yargs/pull/300) Add Turkish translation (@feyzo) -- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian Bokmål translation (@sindresorhus) -- [#297](https://github.com/bcoe/yargs/pull/297) Fix for layout of cjk characters (@disjukr) -- [#296](https://github.com/bcoe/yargs/pull/296) Add Korean translation (@disjukr) - -### v3.30.0 (2015/11/13 16:29 +07:00) - -- [#293](https://github.com/bcoe/yargs/pull/293) Polish language support (@kamilogorek) -- [#291](https://github.com/bcoe/yargs/pull/291) fix edge-cases with `.alias()` (@bcoe) -- [#289](https://github.com/bcoe/yargs/pull/289) group options in custom groups (@bcoe) - -### v3.29.0 (2015/10/16 21:51 +07:00) - -- [#282](https://github.com/bcoe/yargs/pull/282) completions now accept promises (@LinusU) -- [#281](https://github.com/bcoe/yargs/pull/281) fix parsing issues with dot notation (@bcoe) - -### v3.28.0 (2015/10/16 1:55 +07:00) - -- [#277](https://github.com/bcoe/yargs/pull/277) adds support for ansi escape codes (@bcoe) - -### v3.27.0 (2015/10/08 1:55 +00:00) - -- [#271](https://github.com/bcoe/yargs/pull/273) skips validation for help or version flags with exitProcess(false) (@tepez) -- [#273](https://github.com/bcoe/yargs/pull/273) implements single output for errors with exitProcess(false) (@nexdrew) -- [#269](https://github.com/bcoe/yargs/pull/269) verifies single output for errors with exitProcess(false) (@tepez) -- [#268](https://github.com/bcoe/yargs/pull/268) adds Chinese translation (@qiu8310) -- [#266](https://github.com/bcoe/yargs/pull/266) adds case for -- after -- in parser test (@geophree) - -### v3.26.0 (2015/09/25 2:14 +00:00) - -- [#263](https://github.com/bcoe/yargs/pull/263) document count() and option() object keys (@nexdrew) -- [#259](https://github.com/bcoe/yargs/pull/259) remove util in readme (@38elements) -- [#258](https://github.com/bcoe/yargs/pull/258) node v4 builds, update deps (@nexdrew) -- [#257](https://github.com/bcoe/yargs/pull/257) fix spelling errors (@dkoleary88) - -### v3.25.0 (2015/09/13 7:38 -07:00) - -- [#254](https://github.com/bcoe/yargs/pull/254) adds Japanese translation (@oti) -- [#253](https://github.com/bcoe/yargs/pull/253) fixes for tests on Windows (@bcoe) - -### v3.24.0 (2015/09/04 12:02 +00:00) - -- [#248](https://github.com/bcoe/yargs/pull/248) reinstate os-locale, no spawning (@nexdrew) -- [#249](https://github.com/bcoe/yargs/pull/249) use travis container-based infrastructure (@nexdrew) -- [#247](https://github.com/bcoe/yargs/pull/247) upgrade standard (@nexdrew) - -### v3.23.0 (2015/08/30 23:00 +00:00) - -- [#246](https://github.com/bcoe/yargs/pull/246) detect locale based only on environment variables (@bcoe) -- [#244](https://github.com/bcoe/yargs/pull/244) adds Windows CI testing (@bcoe) -- [#245](https://github.com/bcoe/yargs/pull/245) adds OSX CI testing (@bcoe, @nexdrew) - -### v3.22.0 (2015/08/28 22:26 +00:00) -- [#242](https://github.com/bcoe/yargs/pull/242) adds detectLocale config option (@bcoe) - -### v3.21.1 (2015/08/28 20:58 +00:00) -- [#240](https://github.com/bcoe/yargs/pull/240) hot-fix for Atom on Windows (@bcoe) - -### v3.21.0 (2015/08/21 21:20 +00:00) -- [#238](https://github.com/bcoe/yargs/pull/238) upgrade camelcase, window-size, chai, mocha (@nexdrew) -- [#237](https://github.com/bcoe/yargs/pull/237) adds defaultDescription to option() (@nexdrew) - -### v3.20.0 (2015/08/20 01:29 +00:00) -- [#231](https://github.com/bcoe/yargs/pull/231) Merge pull request #231 from bcoe/detect-locale (@sindresorhus) -- [#235](https://github.com/bcoe/yargs/pull/235) adds german translation to yargs (@maxrimue) - -### v3.19.0 (2015/08/14 05:12 +00:00) -- [#224](https://github.com/bcoe/yargs/pull/224) added Portuguese translation (@codemonkey3045) - -### v3.18.1 (2015/08/12 05:53 +00:00) - -- [#228](https://github.com/bcoe/yargs/pull/228) notes about embedding yargs in Electron (@etiktin) -- [#223](https://github.com/bcoe/yargs/pull/223) make booleans work in config files (@sgentle) - -### v3.18.0 (2015/08/06 20:05 +00:00) -- [#222](https://github.com/bcoe/yargs/pull/222) updates fr locale (@nexdrew) -- [#221](https://github.com/bcoe/yargs/pull/221) adds missing locale strings (@nexdrew) -- [#220](https://github.com/bcoe/yargs/pull/220) adds es locale (@zkat) - -### v3.17.1 (2015/08/02 19:35 +00:00) -- [#218](https://github.com/bcoe/yargs/pull/218) upgrades nyc (@bcoe) - -### v3.17.0 (2015/08/02 18:39 +00:00) -- [#217](https://github.com/bcoe/yargs/pull/217) sort methods in README.md (@nexdrew) -- [#215](https://github.com/bcoe/yargs/pull/215) adds fr locale (@LoicMahieu) - -### v3.16.0 (2015/07/30 04:35 +00:00) -- [#210](https://github.com/bcoe/yargs/pull/210) adds i18n support to yargs (@bcoe) -- [#209](https://github.com/bcoe/yargs/pull/209) adds choices type to yargs (@nexdrew) -- [#207](https://github.com/bcoe/yargs/pull/207) pretty new shields from shields.io (@SimenB) -- [#208](https://github.com/bcoe/yargs/pull/208) improvements to README.md (@nexdrew) -- [#205](https://github.com/bcoe/yargs/pull/205) faster build times on Travis (@ChristianMurphy) - -### v3.15.0 (2015/07/06 06:01 +00:00) -- [#197](https://github.com/bcoe/yargs/pull/197) tweaks to how errors bubble up from parser.js (@bcoe) -- [#193](https://github.com/bcoe/yargs/pull/193) upgraded nyc, reporting now happens by default (@bcoe) - -### v3.14.0 (2015/06/28 02:12 +00:00) - -- [#192](https://github.com/bcoe/yargs/pull/192) standard style nits (@bcoe) -- [#190](https://github.com/bcoe/yargs/pull/190) allow for hidden commands, e.g., - .completion('completion', false) (@tschaub) - -### v3.13.0 (2015/06/24 04:12 +00:00) - -- [#187](https://github.com/bcoe/yargs/pull/187) completion now behaves differently - if it is being run in the context of a command (@tschaub) -- [#186](https://github.com/bcoe/yargs/pull/186) if no matches are found for a completion - default to filename completion (@tschaub) - -### v3.12.0 (2015/06/19 03:23 +00:00) -- [#183](https://github.com/bcoe/yargs/pull/183) don't complete commands if they've already been completed (@tschaub) -- [#181](https://github.com/bcoe/yargs/pull/181) various fixes for completion. (@bcoe, @tschaub) -- [#182](https://github.com/bcoe/yargs/pull/182) you can now set a maximum # of of required arguments (@bcoe) - -### v3.11.0 (2015/06/15 05:15 +00:00) - -- [#173](https://github.com/bcoe/yargs/pull/173) update standard, window-size, chai (@bcoe) -- [#171](https://github.com/bcoe/yargs/pull/171) a description can now be set - when providing a config option. (@5c077yP) - -### v3.10.0 (2015/05/29 04:25 +00:00) - -- [#165](https://github.com/bcoe/yargs/pull/165) expose yargs.terminalWidth() thanks @ensonic (@bcoe) -- [#164](https://github.com/bcoe/yargs/pull/164) better array handling thanks @getify (@bcoe) - -### v3.9.1 (2015/05/20 05:14 +00:00) -- [b6662b6](https://github.com/bcoe/yargs/commit/b6662b6774cfeab4876f41ec5e2f67b7698f4e2f) clarify .config() docs (@linclark) -- [0291360](https://github.com/bcoe/yargs/commit/02913606285ce31ce81d7f12c48d8a3029776ec7) fixed tests, switched to nyc for coverage, fixed security issue, added Lin as collaborator (@bcoe) - -### v3.9.0 (2015/05/10 18:32 +00:00) -- [#157](https://github.com/bcoe/yargs/pull/157) Merge pull request #157 from bcoe/command-yargs. allows handling of command specific arguments. Thanks for the suggestion @ohjames (@bcoe) -- [#158](https://github.com/bcoe/yargs/pull/158) Merge pull request #158 from kemitchell/spdx-license. Update license format (@kemitchell) - -### v3.8.0 (2015/04/24 23:10 +00:00) -- [#154](https://github.com/bcoe/yargs/pull/154) showHelp's method signature was misleading fixes #153 (@bcoe) -- [#151](https://github.com/bcoe/yargs/pull/151) refactor yargs' table layout logic to use new helper library (@bcoe) -- [#150](https://github.com/bcoe/yargs/pull/150) Fix README example in argument requirements (@annonymouse) - -### v3.7.2 (2015/04/13 11:52 -07:00) - -* [679fbbf](https://github.com/bcoe/yargs/commit/679fbbf55904030ccee8a2635e8e5f46551ab2f0) updated yargs to use the [standard](https://github.com/feross/standard) style guide (agokjr) -* [22382ee](https://github.com/bcoe/yargs/commit/22382ee9f5b495bc2586c1758cd1091cec3647f9 various bug fixes for $0 (@nylen) - -### v3.7.1 (2015/04/10 11:06 -07:00) - -* [89e1992](https://github.com/bcoe/yargs/commit/89e1992a004ba73609b5f9ee6890c4060857aba4) detect iojs bin along with node bin. (@bcoe) -* [755509e](https://github.com/bcoe/yargs/commit/755509ea90041e5f7833bba3b8c5deffe56f0aab) improvements to example documentation in README.md (@rstacruz) -* [0d2dfc8](https://github.com/bcoe/yargs/commit/0d2dfc822a43418242908ad97ddd5291a1b35dc6) showHelp() no longer requires that .argv has been called (@bcoe) - -### v3.7.0 (2015/04/04 02:29 -07:00) - -* [56cbe2d](https://github.com/bcoe/yargs/commit/56cbe2ddd33dc176dcbf97ba40559864a9f114e4) make .requiresArg() work with type hints. (@bcoe). -* [2f5d562](https://github.com/bcoe/yargs/commit/2f5d5624f736741deeedf6a664d57bc4d857bdd0) serialize arrays and objects in usage strings. (@bcoe). -* [5126304](https://github.com/bcoe/yargs/commit/5126304dd18351fc28f10530616fdd9361e0af98) be more lenient about alias/primary key ordering in chaining API. (@bcoe) - -### v3.6.0 (2015/03/21 01:00 +00:00) -- [4e24e22](https://github.com/bcoe/yargs/commit/4e24e22e6a195e55ab943ede704a0231ac33b99c) support for .js configuration files. (@pirxpilot) - -### v3.5.4 (2015/03/12 05:56 +00:00) -- [c16cc08](https://github.com/bcoe/yargs/commit/c16cc085501155cf7fd853ccdf8584b05ab92b78) message for non-option arguments is now optional, thanks to (@raine) - -### v3.5.3 (2015/03/09 06:14 +00:00) -- [870b428](https://github.com/bcoe/yargs/commit/870b428cf515d560926ca392555b7ad57dba9e3d) completion script was missing in package.json (@bcoe) - -### v3.5.2 (2015/03/09 06:11 +00:00) -- [58a4b24](https://github.com/bcoe/yargs/commit/58a4b2473ebbb326713d522be53e32d3aabb08d2) parse was being called multiple times, resulting in strange behavior (@bcoe) - -### v3.5.1 (2015/03/09 04:55 +00:00) -- [4e588e0](https://github.com/bcoe/yargs/commit/4e588e055afbeb9336533095f051496e3977f515) accidentally left testing logic in (@bcoe) - -### v3.5.0 (2015/03/09 04:49 +00:00) -- [718bacd](https://github.com/bcoe/yargs/commit/718bacd81b9b44f786af76b2afe491fe06274f19) added support for bash completions see #4 (@bcoe) -- [a192882](https://github.com/bcoe/yargs/commit/a19288270fc431396c42af01125eeb4443664528) downgrade to mocha 2.1.0 until https://github.com/mochajs/mocha/issues/1585 can be sorted out (@bcoe) - -### v3.4.7 (2015/03/09 04:09 +00:00) -- [9845e5c](https://github.com/bcoe/yargs/commit/9845e5c1a9c684ba0be3f0bfb40e7b62ab49d9c8) the Argv singleton was not being updated when manually parsing arguments, fixes #114 (@bcoe) - -### v3.4.6 (2015/03/09 04:01 +00:00) -- [45b4c80](https://github.com/bcoe/yargs/commit/45b4c80b890d02770b0a94f326695a8a566e8fe9) set placeholders for all keys fixes #115 (@bcoe) - -### v3.4.5 (2015/03/01 20:31 +00:00) -- [a758e0b](https://github.com/bcoe/yargs/commit/a758e0b2556184f067cf3d9c4ef886d39817ebd2) fix for count consuming too many arguments (@bcoe) - -### v3.4.4 (2015/02/28 04:52 +00:00) -- [0476af7](https://github.com/bcoe/yargs/commit/0476af757966acf980d998b45108221d4888cfcb) added nargs feature, allowing you to specify the number of arguments after an option (@bcoe) -- [092477d](https://github.com/bcoe/yargs/commit/092477d7ab3efbf0ba11cede57f7d8cfc70b024f) updated README with full example of v3.0 API (@bcoe) - -### v3.3.3 (2015/02/28 04:23 +00:00) -- [0c4b769](https://github.com/bcoe/yargs/commit/0c4b769516cd8d93a7c4e5e675628ae0049aa9a8) remove string dependency, which conflicted with other libraries see #106 (@bcoe) - -### v3.3.2 (2015/02/28 04:11 +00:00) -- [2a98906](https://github.com/bcoe/yargs/commit/2a9890675821c0e7a12f146ce008b0562cb8ec9a) add $0 to epilog (@schnittstabil) - -### v3.3.1 (2015/02/24 03:28 +00:00) -- [ad485ce](https://github.com/bcoe/yargs/commit/ad485ce748ebdfce25b88ef9d6e83d97a2f68987) fix for applying defaults to camel-case args (@bcoe) - -### v3.3.0 (2015/02/24 00:49 +00:00) -- [8bfe36d](https://github.com/bcoe/yargs/commit/8bfe36d7fb0f93a799ea3f4c756a7467c320f8c0) fix and document restart() command, as a tool for building nested CLIs (@bcoe) - -### v3.2.1 (2015/02/22 05:45 +00:00) -- [49a6d18](https://github.com/bcoe/yargs/commit/49a6d1822a4ef9b1ea6f90cc366be60912628885) you can now provide a function that generates a default value (@bcoe) - -### v3.2.0 (2015/02/22 05:24 +00:00) -- [7a55886](https://github.com/bcoe/yargs/commit/7a55886c9343cf71a20744ca5cdd56d2ea7412d5) improvements to yargs two-column text layout (@bcoe) -- [b6ab513](https://github.com/bcoe/yargs/commit/b6ab5136a4c3fa6aa496f6b6360382e403183989) Tweak NPM version badge (@nylen) - -### v3.1.0 (2015/02/19 19:37 +00:00) -- [9bd2379](https://github.com/bcoe/yargs/commit/9bd237921cf1b61fd9f32c0e6d23f572fc225861) version now accepts a function, making it easy to load version #s from a package.json (@bcoe) - -### v3.0.4 (2015/02/14 01:40 +00:00) -- [0b7c19b](https://github.com/bcoe/yargs/commit/0b7c19beaecb747267ca4cc10e5cb2a8550bc4b7) various fixes for dot-notation handling (@bcoe) - -### v3.0.3 (2015/02/14 00:59 +00:00) -- [c3f35e9](https://github.com/bcoe/yargs/commit/c3f35e99bd5a0d278073fcadd95e2d778616cc17) make sure dot-notation is applied to aliases (@bcoe) - -### 3.0.2 (2015/02/13 16:50 +00:00) -- [74c8967](https://github.com/bcoe/yargs/commit/74c8967c340c204a0a7edf8a702b6f46c2705435) document epilog shorthand of epilogue. (@bcoe) -- [670110f](https://github.com/bcoe/yargs/commit/670110fc01bedc4831b6fec6afac54517d5a71bc) any non-truthy value now causes check to fail see #76 (@bcoe) -- [0d8f791](https://github.com/bcoe/yargs/commit/0d8f791a33c11ced4cd431ea8d3d3a337d456b56) finished implementing my wish-list of fetures for yargs 3.0. see #88 (@bcoe) -- [5768447](https://github.com/bcoe/yargs/commit/5768447447c4c8e8304f178846206ce86540f063) fix coverage. (@bcoe) -- [82e793f](https://github.com/bcoe/yargs/commit/82e793f3f61c41259eaacb67f0796aea2cf2aaa0) detect console width and perform word-wrapping. (@bcoe) -- [67476b3](https://github.com/bcoe/yargs/commit/67476b37eea07fee55f23f35b9e0c7d76682b86d) refactor two-column table layout so that we can use it for examples and usage (@bcoe) -- [4724cdf](https://github.com/bcoe/yargs/commit/4724cdfcc8e37ae1ca3dcce9d762f476e9ef4bb4) major refactor of index.js, in prep for 3.x release. (@bcoe) - -### v2.3.0 (2015/02/08 20:41 +00:00) -- [d824620](https://github.com/bcoe/yargs/commit/d824620493df4e63664af1fe320764dd1a9244e6) allow for undefined boolean defaults (@ashi009) - -### v2.2.0 (2015/02/08 20:07 +00:00) -- [d6edd98](https://github.com/bcoe/yargs/commit/d6edd9848826e7389ed1393858c45d03961365fd) in-prep for further refactoring, and a 3.x release I've shuffled some things around and gotten test-coverage to 100%. (@bcoe) - -### v2.1.2 (2015/02/08 06:05 +00:00) -- [d640745](https://github.com/bcoe/yargs/commit/d640745a7b9f8d476e0223879d056d18d9c265c4) switch to path.relative (@bcoe) -- [3bfd41f](https://github.com/bcoe/yargs/commit/3bfd41ff262a041f29d828b88936a79c63cad594) remove mocha.opts. (@bcoe) -- [47a2f35](https://github.com/bcoe/yargs/commit/47a2f357091db70903a402d6765501c1d63f15fe) document using .string('_') for string ids. see #56 (@bcoe) -- [#57](https://github.com/bcoe/yargs/pull/57) Merge pull request #57 from eush77/option-readme (@eush77) - -### v2.1.1 (2015/02/06 08:08 +00:00) -- [01c6c61](https://github.com/bcoe/yargs/commit/01c6c61d67b4ebf88f41f0b32a345ec67f0ac17d) fix for #71, 'newAliases' of undefined (@bcoe) - -### v2.1.0 (2015/02/06 07:59 +00:00) -- [6a1a3fa](https://github.com/bcoe/yargs/commit/6a1a3fa731958e26ccd56885f183dd8985cc828f) try to guess argument types, and apply sensible defaults see #73 (@bcoe) - -### v2.0.1 (2015/02/06 07:54 +00:00) -- [96a06b2](https://github.com/bcoe/yargs/commit/96a06b2650ff1d085a52b7328d8bba614c20cc12) Fix for strange behavior with --sort option, see #51 (@bcoe) - -### v2.0.0 (2015/02/06 07:45 +00:00) -- [0250517](https://github.com/bcoe/yargs/commit/0250517c9643e53f431b824e8ccfa54937414011) - [108fb84](https://github.com/bcoe/yargs/commit/108fb8409a3a63dcaf99d917fe4dfcfaa1de236d) fixed bug with boolean parsing, when bools separated by = see #66 (@bcoe) -- [a465a59](https://github.com/bcoe/yargs/commit/a465a5915f912715738de890982e4f8395958b10) Add `files` field to the package.json (@shinnn) -- [31043de](https://github.com/bcoe/yargs/commit/31043de7a38a17c4c97711f1099f5fb164334db3) fix for yargs.argv having the same keys added multiple times see #63 (@bcoe) -- [2d68c5b](https://github.com/bcoe/yargs/commit/2d68c5b91c976431001c4863ce47c9297850f1ad) Disable process.exit calls using .exitProcess(false) (@cianclarke) -- [45da9ec](https://github.com/bcoe/yargs/commit/45da9ec4c55a7bd394721bc6a1db0dabad7bc52a) Mention .option in README (@eush77) - -### v1.3.2 (2014/10/06 21:56 +00:00) -- [b8d3472](https://github.com/bcoe/yargs/commit/b8d34725482e5821a3cc809c0df71378f282f526) 1.3.2 (@chevex) - -### list (2014/08/30 18:41 +00:00) -- [fbc777f](https://github.com/bcoe/yargs/commit/fbc777f416eeefd37c84e44d27d7dfc7c1925721) Now that yargs is the successor to optimist, I'm changing the README language to be more universal. Pirate speak isn't very accessible to non-native speakers. (@chevex) -- [a54d068](https://github.com/bcoe/yargs/commit/a54d0682ae2efc2394d407ab171cc8a8bbd135ea) version output will not print extra newline (@boneskull) -- [1cef5d6](https://github.com/bcoe/yargs/commit/1cef5d62a9d6d61a3948a49574892e01932cc6ae) Added contributors section to package.json (@chrisn) -- [cc295c0](https://github.com/bcoe/yargs/commit/cc295c0a80a2de267e0155b60d315fc4b6f7c709) Added 'require' and 'required' as synonyms for 'demand' (@chrisn) -- [d0bf951](https://github.com/bcoe/yargs/commit/d0bf951d949066b6280101ed606593d079ee15c8) Updating minimist. (@chevex) -- [c15f8e7](https://github.com/bcoe/yargs/commit/c15f8e7f245b261e542cf205ce4f4313630cbdb4) Fix #31 (bad interaction between camelCase options and strict mode) (@nylen) -- [d991b9b](https://github.com/bcoe/yargs/commit/d991b9be687a68812dee1e3b185ba64b7778b82d) Added .help() and .version() methods (@chrisn) -- [e8c8aa4](https://github.com/bcoe/yargs/commit/e8c8aa46268379357cb11e9fc34b8c403037724b) Added .showHelpOnFail() method (@chrisn) -- [e855af4](https://github.com/bcoe/yargs/commit/e855af4a933ea966b5bbdd3c4c6397a4bac1a053) Allow boolean flag with .demand() (@chrisn) -- [14dbec2](https://github.com/bcoe/yargs/commit/14dbec24fb7380683198e2b20c4deb8423e64bea) Fixes issue #22. Arguments are no longer printed to the console when using .config. (@chevex) -- [bef74fc](https://github.com/bcoe/yargs/commit/bef74fcddc1544598a804f80d0a3728459f196bf) Informing users that Yargs is the official optimist successor. (@chevex) -- [#24](https://github.com/bcoe/yargs/pull/24) Merge pull request #24 from chrisn/strict (@chrisn) -- [889a2b2](https://github.com/bcoe/yargs/commit/889a2b28eb9768801b05163360a470d0fd6c8b79) Added requiresArg option, for options that require values (@chrisn) -- [eb16369](https://github.com/bcoe/yargs/commit/eb163692262be1fe80b992fd8803d5923c5a9b18) Added .strict() method, to report error if unknown arguments are given (@chrisn) -- [0471c3f](https://github.com/bcoe/yargs/commit/0471c3fd999e1ad4e6cded88b8aa02013b66d14f) Changed optimist to yargs in usage-options.js example (@chrisn) -- [5c88f74](https://github.com/bcoe/yargs/commit/5c88f74e3cf031b17c54b4b6606c83e485ff520e) Change optimist to yargs in examples (@chrisn) -- [66f12c8](https://github.com/bcoe/yargs/commit/66f12c82ba3c943e4de8ca862980e835da8ecb3a) Fix a couple of bad interactions between aliases and defaults (@nylen) -- [8fa1d80](https://github.com/bcoe/yargs/commit/8fa1d80f14b03eb1f2898863a61f1d1615bceb50) Document second argument of usage(message, opts) (@Gobie) -- [56e6528](https://github.com/bcoe/yargs/commit/56e6528cf674ff70d63083fb044ff240f608448e) For "--some-option", also set argv.someOption (@nylen) -- [ed5f6d3](https://github.com/bcoe/yargs/commit/ed5f6d33f57ad1086b11c91b51100f7c6c7fa8ee) Finished porting unit tests to Mocha. (@chevex) - -### v1.0.15 (2014/02/05 23:18 +00:00) -- [e2b1fc0](https://github.com/bcoe/yargs/commit/e2b1fc0c4a59cf532ae9b01b275e1ef57eeb64d2) 1.0.15 update to badges (@chevex) - -### v1.0.14 (2014/02/05 23:17 +00:00) -- [f33bbb0](https://github.com/bcoe/yargs/commit/f33bbb0f00fe18960f849cc8e15a7428a4cd59b8) Revert "Fixed issue which caused .demand function not to work correctly." (@chevex) - -### v1.0.13 (2014/02/05 22:13 +00:00) -- [6509e5e](https://github.com/bcoe/yargs/commit/6509e5e7dee6ef1a1f60eea104be0faa1a045075) Fixed issue which caused .demand function not to work correctly. (@chevex) - -### v1.0.12 (2013/12/13 00:09 +00:00) -- [05eb267](https://github.com/bcoe/yargs/commit/05eb26741c9ce446b33ff006e5d33221f53eaceb) 1.0.12 (@chevex) - -### v1.0.11 (2013/12/13 00:07 +00:00) -- [c1bde46](https://github.com/bcoe/yargs/commit/c1bde46e37318a68b87d17a50c130c861d6ce4a9) 1.0.11 (@chevex) - -### v1.0.10 (2013/12/12 23:57 +00:00) -- [dfebf81](https://github.com/bcoe/yargs/commit/dfebf8164c25c650701528ee581ca483a99dc21c) Fixed formatting in README (@chevex) - -### v1.0.9 (2013/12/12 23:47 +00:00) -- [0b4e34a](https://github.com/bcoe/yargs/commit/0b4e34af5e6d84a9dbb3bb6d02cd87588031c182) Update README.md (@chevex) - -### v1.0.8 (2013/12/06 16:36 +00:00) -- [#1](https://github.com/bcoe/yargs/pull/1) fix error caused by check() see #1 (@martinheidegger) - -### v1.0.7 (2013/11/24 18:01 +00:00) -- [a247d88](https://github.com/bcoe/yargs/commit/a247d88d6e46644cbb7303c18b1bb678fc132d72) Modified Pirate Joe image. (@chevex) - -### v1.0.6 (2013/11/23 19:21 +00:00) -- [d7f69e1](https://github.com/bcoe/yargs/commit/d7f69e1d34bc929736a8bdccdc724583e21b7eab) Updated Pirate Joe image. (@chevex) - -### v1.0.5 (2013/11/23 19:09 +00:00) -- [ece809c](https://github.com/bcoe/yargs/commit/ece809cf317cc659175e1d66d87f3ca68c2760be) Updated readme notice again. (@chevex) - -### v1.0.4 (2013/11/23 19:05 +00:00) -- [9e81e81](https://github.com/bcoe/yargs/commit/9e81e81654028f83ba86ffc3ac772a0476084e5e) Updated README with a notice about yargs being a fork of optimist and what that implies. (@chevex) - -### v1.0.3 (2013/11/23 17:43 +00:00) -- [65e7a78](https://github.com/bcoe/yargs/commit/65e7a782c86764944d63d084416aba9ee6019c5f) Changed some small wording in README.md. (@chevex) -- [459e20e](https://github.com/bcoe/yargs/commit/459e20e539b366b85128dd281ccd42221e96c7da) Fix a bug in the options function, when string and boolean options weren't applied to aliases. (@shockone) - -### v1.0.2 (2013/11/23 09:46 +00:00) -- [3d80ebe](https://github.com/bcoe/yargs/commit/3d80ebed866d3799224b6f7d596247186a3898a9) 1.0.2 (@chevex) - -### v1.0.1 (2013/11/23 09:39 +00:00) -- [f80ff36](https://github.com/bcoe/yargs/commit/f80ff3642d580d4b68bf9f5a94277481bd027142) Updated image. (@chevex) - -### v1.0.0 (2013/11/23 09:33 +00:00) -- [54e31d5](https://github.com/bcoe/yargs/commit/54e31d505f820b80af13644e460894b320bf25a3) Rebranded from optimist to yargs in the spirit of the fork :D (@chevex) -- [4ebb6c5](https://github.com/bcoe/yargs/commit/4ebb6c59f44787db7c24c5b8fe2680f01a23f498) Added documentation for demandCount(). (@chevex) -- [4561ce6](https://github.com/bcoe/yargs/commit/4561ce66dcffa95f49e8b4449b25b94cd68acb25) Simplified the error messages returned by .check(). (@chevex) -- [661c678](https://github.com/bcoe/yargs/commit/661c67886f479b16254a830b7e1db3be29e6b7a6) Fixed an issue with demand not accepting a zero value. (@chevex) -- [731dd3c](https://github.com/bcoe/yargs/commit/731dd3c37624790490bd6df4d5f1da8f4348279e) Add .fail(fn) so death isn't the only option. Should fix issue #39. (@chevex) -- [fa15417](https://github.com/bcoe/yargs/commit/fa15417ff9e70dace0d726627a5818654824c1d8) Added a few missing 'return self' (@chevex) -- [e655e4d](https://github.com/bcoe/yargs/commit/e655e4d99d1ae1d3695ef755d51c2de08d669761) Fix showing help in certain JS environments. (@chevex) -- [a746a31](https://github.com/bcoe/yargs/commit/a746a31cd47c87327028e6ea33762d6187ec5c87) Better string representation of default values. (@chevex) -- [6134619](https://github.com/bcoe/yargs/commit/6134619a7e90b911d5443230b644c5d447c1a68c) Implies: conditional demands (@chevex) -- [046b93b](https://github.com/bcoe/yargs/commit/046b93b5d40a27367af4cb29726e4d781d934639) Added support for JSON config files. (@chevex) -- [a677ec0](https://github.com/bcoe/yargs/commit/a677ec0a0ecccd99c75e571d03323f950688da03) Add .example(cmd, desc) feature. (@chevex) -- [1bd4375](https://github.com/bcoe/yargs/commit/1bd4375e11327ba1687d4bb6e5e9f3c30c1be2af) Added 'defaults' as alias to 'default' so as to avoid usage of a reserved keyword. (@chevex) -- [6b753c1](https://github.com/bcoe/yargs/commit/6b753c16ca09e723060e70b773b430323b29c45c) add .normalize(args..) support for normalizing paths (@chevex) -- [33d7d59](https://github.com/bcoe/yargs/commit/33d7d59341d364f03d3a25f0a55cb99004dbbe4b) Customize error messages with demand(key, msg) (@chevex) -- [647d37f](https://github.com/bcoe/yargs/commit/647d37f164c20f4bafbf67dd9db6cd6e2cd3b49f) Merge branch 'rewrite-duplicate-test' of github.com:isbadawi/node-optimist (@chevex) -- [9059d1a](https://github.com/bcoe/yargs/commit/9059d1ad5e8aea686c2a01c89a23efdf929fff2e) Pass aliases object to check functions for greater versatility. (@chevex) -- [623dc26](https://github.com/bcoe/yargs/commit/623dc26c7331abff2465ef8532e3418996d42fe6) Added ability to count boolean options and rolled minimist library back into project. (@chevex) -- [49f0dce](https://github.com/bcoe/yargs/commit/49f0dcef35de4db544c3966350d36eb5838703f6) Fixed small typo. (@chevex) -- [79ec980](https://github.com/bcoe/yargs/commit/79ec9806d9ca6eb0014cfa4b6d1849f4f004baf2) Removed dependency on wordwrap module. (@chevex) -- [ea14630](https://github.com/bcoe/yargs/commit/ea14630feddd69d1de99dd8c0e08948f4c91f00a) Merge branch 'master' of github.com:chbrown/node-optimist (@chevex) -- [2b75da2](https://github.com/bcoe/yargs/commit/2b75da2624061e0f4f3107d20303c06ec9054906) Merge branch 'master' of github.com:seanzhou1023/node-optimist (@chevex) -- [d9bda11](https://github.com/bcoe/yargs/commit/d9bda1116e26f3b40e833ca9ca19263afea53565) Merge branch 'patch-1' of github.com:thefourtheye/node-optimist (@chevex) -- [d6cc606](https://github.com/bcoe/yargs/commit/d6cc6064a4f1bea38a16a4430b8a1334832fbeff) Renamed README. (@chevex) -- [9498d3f](https://github.com/bcoe/yargs/commit/9498d3f59acfb5e102826503e681623c3a64b178) Renamed readme and added .gitignore. (@chevex) -- [bbd1fe3](https://github.com/bcoe/yargs/commit/bbd1fe37fefa366dde0fb3dc44d91fe8b28f57f5) Included examples for ```help``` and ```showHelp``` functions and fixed few formatting issues (@thefourtheye) -- [37fea04](https://github.com/bcoe/yargs/commit/37fea0470a5796a0294c1dcfff68d8041650e622) .alias({}) behaves differently based on mapping direction when generating descriptions (@chbrown) -- [855b20d](https://github.com/bcoe/yargs/commit/855b20d0be567ca121d06b30bea64001b74f3d6d) Documented function signatures are useful for dynamically typed languages. (@chbrown) - -### 0.6.0 (2013/06/25 08:48 +00:00) -- [d37bfe0](https://github.com/bcoe/yargs/commit/d37bfe05ae6d295a0ab481efe4881222412791f4) all tests passing using minimist (@substack) -- [76f1352](https://github.com/bcoe/yargs/commit/76f135270399d01f2bbc621e524a5966e5c422fd) all parse tests now passing (@substack) -- [a7b6754](https://github.com/bcoe/yargs/commit/a7b6754276c38d1565479a5685c3781aeb947816) using minimist, some tests passing (@substack) -- [6655688](https://github.com/bcoe/yargs/commit/66556882aa731cbbbe16cc4d42c85740a2e98099) Give credit where its due (@DeadAlready) -- [602a2a9](https://github.com/bcoe/yargs/commit/602a2a92a459f93704794ad51b115bbb08b535ce) v0.5.3 - Remove wordwrap as dependency (@DeadAlready) - -### 0.5.2 (2013/05/31 03:46 +00:00) -- [4497ca5](https://github.com/bcoe/yargs/commit/4497ca55e332760a37b866ec119ded347ca27a87) fixed the whitespace bug without breaking anything else (@substack) -- [5a3dd1a](https://github.com/bcoe/yargs/commit/5a3dd1a4e0211a38613c6e02f61328e1031953fa) failing test for whitespace arg (@substack) - -### 0.5.1 (2013/05/30 07:17 +00:00) -- [a20228f](https://github.com/bcoe/yargs/commit/a20228f62a454755dd07f628a7c5759113918327) fix parse() to work with functions before it (@substack) -- [b13bd4c](https://github.com/bcoe/yargs/commit/b13bd4cac856a9821d42fa173bdb58f089365a7d) failing test for parse() with modifiers (@substack) - -### 0.5.0 (2013/05/18 21:59 +00:00) -- [c474a64](https://github.com/bcoe/yargs/commit/c474a649231527915c222156e3b40806d365a87c) fixes for dash (@substack) - -### 0.4.0 (2013/04/13 19:03 +00:00) -- [dafe3e1](https://github.com/bcoe/yargs/commit/dafe3e18d7c6e7c2d68e06559df0e5cbea3adb14) failing short test (@substack) - -### 0.3.7 (2013/04/04 04:07 +00:00) -- [6c7a0ec](https://github.com/bcoe/yargs/commit/6c7a0ec94ce4199a505f0518b4d6635d4e47cc81) Fix for windows. On windows there is no _ in environment. (@hdf) - -### 0.3.6 (2013/04/04 04:04 +00:00) -- [e72346a](https://github.com/bcoe/yargs/commit/e72346a727b7267af5aa008b418db89970873f05) Add support for newlines in -a="" arguments (@danielbeardsley) -- [71e1fb5](https://github.com/bcoe/yargs/commit/71e1fb55ea9987110a669ac6ec12338cfff3821c) drop 0.4, add 0.8 to travis (@substack) - -### 0.3.5 (2012/10/10 11:09 +00:00) -- [ee692b3](https://github.com/bcoe/yargs/commit/ee692b37554c70a0bb16389a50a26b66745cbbea) Fix parsing booleans (@vojtajina) -- [5045122](https://github.com/bcoe/yargs/commit/5045122664c3f5b4805addf1be2148d5856f7ce8) set $0 properly in the tests (@substack) - -### 0.3.4 (2012/04/30 06:54 +00:00) -- [f28c0e6](https://github.com/bcoe/yargs/commit/f28c0e62ca94f6e0bb2e6d82fc3d91a55e69b903) bump for string "true" params (@substack) -- [8f44aeb](https://github.com/bcoe/yargs/commit/8f44aeb74121ddd689580e2bf74ef86a605e9bf2) Fix failing test for aliased booleans. (@coderarity) -- [b9f7b61](https://github.com/bcoe/yargs/commit/b9f7b613b1e68e11e6c23fbda9e555a517dcc976) Add failing test for short aliased booleans. (@coderarity) - -### 0.3.3 (2012/04/30 06:45 +00:00) -- [541bac8](https://github.com/bcoe/yargs/commit/541bac8dd787a5f1a5d28f6d8deb1627871705e7) Fixes #37. - -### 0.3.2 (2012/04/12 20:28 +00:00) -- [3a0f014](https://github.com/bcoe/yargs/commit/3a0f014c1451280ac1c9caa1f639d31675586eec) travis badge (@substack) -- [4fb60bf](https://github.com/bcoe/yargs/commit/4fb60bf17845f4ce3293f8ca49c9a1a7c736cfce) Fix boolean aliases. (@coderarity) -- [f14dda5](https://github.com/bcoe/yargs/commit/f14dda546efc4fe06ace04d36919bfbb7634f79b) Adjusted package.json to use tap (@jfhbrook) -- [88e5d32](https://github.com/bcoe/yargs/commit/88e5d32295be6e544c8d355ff84e355af38a1c74) test/usage.js no longer hangs (@jfhbrook) -- [e1e740c](https://github.com/bcoe/yargs/commit/e1e740c27082f3ce84deca2093d9db2ef735d0e5) two tests for combined boolean/alias opts parsing (@jfhbrook) - -### 0.3.1 (2011/12/31 08:44 +00:00) -- [d09b719](https://github.com/bcoe/yargs/commit/d09b71980ef711b6cf3918cd19beec8257e40e82) If "default" is set to false it was not passed on, fixed. (@wolframkriesing) - -### 0.3.0 (2011/12/09 06:03 +00:00) -- [6e74aa7](https://github.com/bcoe/yargs/commit/6e74aa7b46a65773e20c0cb68d2d336d4a0d553d) bump and documented dot notation (@substack) - -### 0.2.7 (2011/10/20 02:25 +00:00) -- [94adee2](https://github.com/bcoe/yargs/commit/94adee20e17b58d0836f80e8b9cdbe9813800916) argv._ can be told 'Hey! argv._! Don't be messing with my args.', and it WILL obey (@colinta) -- [c46fdd5](https://github.com/bcoe/yargs/commit/c46fdd56a05410ae4a1e724a4820c82e77ff5469) optimistic critter image (@substack) -- [5c95c73](https://github.com/bcoe/yargs/commit/5c95c73aedf4c7482bd423e10c545e86d7c8a125) alias options() to option() (@substack) -- [f7692ea](https://github.com/bcoe/yargs/commit/f7692ea8da342850af819367833abb685fde41d8) [fix] Fix for parsing boolean edge case (@indexzero) -- [d1f92d1](https://github.com/bcoe/yargs/commit/d1f92d1425bd7f356055e78621b30cdf9741a3c2) -- [b01bda8](https://github.com/bcoe/yargs/commit/b01bda8d86e455bbf74ce497864cb8ab5b9fb847) [fix test] Update to ensure optimist is aware of default booleans. Associated tests included (@indexzero) -- [aa753e7](https://github.com/bcoe/yargs/commit/aa753e7c54fb3a12f513769a0ff6d54aa0f63943) [dist test] Update devDependencies in package.json. Update test pathing to be more npm and require.paths future-proof (@indexzero) -- [7bfce2f](https://github.com/bcoe/yargs/commit/7bfce2f3b3c98e6539e7549d35fbabced7e9341e) s/sys/util/ (@substack) -- [d420a7a](https://github.com/bcoe/yargs/commit/d420a7a9c890d2cdb11acfaf3ea3f43bc3e39f41) update usage output (@substack) -- [cf86eed](https://github.com/bcoe/yargs/commit/cf86eede2e5fc7495b6ec15e6d137d9ac814f075) some sage readme protips about parsing rules (@substack) -- [5da9f7a](https://github.com/bcoe/yargs/commit/5da9f7a5c0e1758ec7c5801fb3e94d3f6e970513) documented all the methods finally (@substack) -- [8ca6879](https://github.com/bcoe/yargs/commit/8ca6879311224b25933642987300f6a29de5c21b) fenced syntax highlighting (@substack) -- [b72bacf](https://github.com/bcoe/yargs/commit/b72bacf1d02594778c1935405bc8137eb61761dc) right-alignment of wrapped extra params (@substack) -- [2b980bf](https://github.com/bcoe/yargs/commit/2b980bf2656b4ee8fc5134dc5f56a48855c35198) now with .wrap() (@substack) -- [d614f63](https://github.com/bcoe/yargs/commit/d614f639654057d1b7e35e3f5a306e88ec2ad1e4) don't show 'Options:' when there aren't any (@substack) -- [691eda3](https://github.com/bcoe/yargs/commit/691eda354df97b5a86168317abcbcaabdc08a0fb) failing test for multi-aliasing (@substack) -- [0826c9f](https://github.com/bcoe/yargs/commit/0826c9f462109feab2bc7a99346d22e72bf774b7) "Options:" > "options:" (@substack) -- [72f7490](https://github.com/bcoe/yargs/commit/72f749025d01b7f295738ed370a669d885fbada0) [minor] Update formatting for `.showHelp()` (@indexzero) -- [75aecce](https://github.com/bcoe/yargs/commit/75aeccea74329094072f95800e02c275e7d999aa) options works again, too lazy to write a proper test right now (@substack) -- [f742e54](https://github.com/bcoe/yargs/commit/f742e5439817c662dc3bd8734ddd6467e6018cfd) line_count_options example, which breaks (@substack) -- [4ca06b8](https://github.com/bcoe/yargs/commit/4ca06b8b4ea99b5d5714b315a2a8576bee6e5537) line count example (@substack) -- [eeb8423](https://github.com/bcoe/yargs/commit/eeb8423e0a5ecc9dc3eb1e6df9f3f8c1c88f920b) remove self.argv setting in boolean (@substack) -- [6903412](https://github.com/bcoe/yargs/commit/69034126804660af9cc20ea7f4457b50338ee3d7) removed camel case for now (@substack) -- [5a0d88b](https://github.com/bcoe/yargs/commit/5a0d88bf23e9fa79635dd034e2a1aa992acc83cd) remove dead longest checking code (@substack) -- [d782170](https://github.com/bcoe/yargs/commit/d782170babf7284b1aa34f5350df0dd49c373fa8) .help() too (@substack) -- [622ec17](https://github.com/bcoe/yargs/commit/622ec17379bb5374fdbb190404c82bc600975791) rm old help generator (@substack) -- [7c8baac](https://github.com/bcoe/yargs/commit/7c8baac4d66195e9f5158503ea9ebfb61153dab7) nub keys (@substack) -- [8197785](https://github.com/bcoe/yargs/commit/8197785ad4762465084485b041abd722f69bf344) generate help message based on the previous calls, todo: nub (@substack) -- [3ffbdc3](https://github.com/bcoe/yargs/commit/3ffbdc33c8f5e83d4ea2ac60575ce119570c7ede) stub out new showHelp, better checks (@substack) -- [d4e21f5](https://github.com/bcoe/yargs/commit/d4e21f56a4830f7de841900d3c79756fb9886184) let .options() take single options too (@substack) -- [3c4cf29](https://github.com/bcoe/yargs/commit/3c4cf2901a29bac119cca8e983028d8669230ec6) .options() is now heaps simpler (@substack) -- [89f0d04](https://github.com/bcoe/yargs/commit/89f0d043cbccd302f10ab30c2069e05d2bf817c9) defaults work again, all tests pass (@substack) -- [dd87333](https://github.com/bcoe/yargs/commit/dd8733365423006a6e4156372ebb55f98323af58) update test error messages, down to 2 failing tests (@substack) -- [53f7bc6](https://github.com/bcoe/yargs/commit/53f7bc626b9875f2abdfc5dd7a80bde7f14143a3) fix for bools doubling up, passes the parse test again, others fail (@substack) -- [2213e2d](https://github.com/bcoe/yargs/commit/2213e2ddc7263226fba717fb041dc3fde9bc2ee4) refactored for an argv getter, failing several tests (@substack) -- [d1e7379](https://github.com/bcoe/yargs/commit/d1e737970f15c6c006bebdd8917706827ff2f0f2) just rescan for now, alias test passes (@substack) -- [b2f8c99](https://github.com/bcoe/yargs/commit/b2f8c99cc477a8eb0fdf4cf178e1785b63185cfd) failing alias test (@substack) -- [d0c0174](https://github.com/bcoe/yargs/commit/d0c0174daa144bfb6dc7290fdc448c393c475e15) .alias() (@substack) -- [d85f431](https://github.com/bcoe/yargs/commit/d85f431ad7d07b058af3f2a57daa51495576c164) [api] Remove `.describe()` in favor of building upon the existing `.usage()` API (@indexzero) -- [edbd527](https://github.com/bcoe/yargs/commit/edbd5272a8e213e71acd802782135c7f9699913a) [doc api] Add `.describe()`, `.options()`, and `.showHelp()` methods along with example. (@indexzero) -- [be4902f](https://github.com/bcoe/yargs/commit/be4902ff0961ae8feb9093f2c0a4066463ded2cf) updates for coffee since it now does argv the node way (@substack) -- [e24cb23](https://github.com/bcoe/yargs/commit/e24cb23798ee64e53b60815e7fda78b87f42390c) more general coffeescript detection (@substack) -- [78ac753](https://github.com/bcoe/yargs/commit/78ac753e5d0ec32a96d39d893272afe989e42a4d) Don't trigger the CoffeeScript hack when running under node_g. (@papandreou) -- [bcfe973](https://github.com/bcoe/yargs/commit/bcfe9731d7f90d4632281b8a52e8d76eb0195ae6) .string() but failing test (@substack) -- [1987aca](https://github.com/bcoe/yargs/commit/1987aca28c7ba4e8796c07bbc547cb984804c826) test hex strings (@substack) -- [ef36db3](https://github.com/bcoe/yargs/commit/ef36db32259b0b0d62448dc907c760e5554fb7e7) more keywords (@substack) -- [cc53c56](https://github.com/bcoe/yargs/commit/cc53c56329960bed6ab077a79798e991711ba01d) Added camelCase function that converts --multi-word-option to camel case (so it becomes argv.multiWordOption). (@papandreou) -- [60b57da](https://github.com/bcoe/yargs/commit/60b57da36797716e5783a633c6d5c79099016d45) fixed boolean bug by rescanning (@substack) -- [dff6d07](https://github.com/bcoe/yargs/commit/dff6d078d97f8ac503c7d18dcc7b7a8c364c2883) boolean examples (@substack) -- [0e380b9](https://github.com/bcoe/yargs/commit/0e380b92c4ef4e3c8dac1da18b5c31d85b1d02c9) boolean() with passing test (@substack) -- [62644d4](https://github.com/bcoe/yargs/commit/62644d4bffbb8d1bbf0c2baf58a1d14a6359ef07) coffee compatibility with node regex for versions too (@substack) -- [430fafc](https://github.com/bcoe/yargs/commit/430fafcf1683d23774772826581acff84b456827) argv._ fixed by fixing the coffee detection (@substack) -- [343b8af](https://github.com/bcoe/yargs/commit/343b8afefd98af274ebe21b5a16b3a949ec5429f) whichNodeArgs test fails too (@substack) -- [63df2f3](https://github.com/bcoe/yargs/commit/63df2f371f31e63d7f1dec2cbf0022a5f08da9d2) replicated mnot's bug in whichNodeEmpty test (@substack) -- [35473a4](https://github.com/bcoe/yargs/commit/35473a4d93a45e5e7e512af8bb54ebb532997ae1) test for ./bin usage (@substack) -- [13df151](https://github.com/bcoe/yargs/commit/13df151e44228eed10e5441c7cd163e086c458a4) don't coerce booleans to numbers (@substack) -- [85f8007](https://github.com/bcoe/yargs/commit/85f8007e93b8be7124feea64b1f1916d8ba1894a) package bump for automatic number conversion (@substack) -- [8f17014](https://github.com/bcoe/yargs/commit/8f170141cded4ccc0c6d67a849c5bf996aa29643) updated readme and examples with new auto-numberification goodness (@substack) -- [73dc901](https://github.com/bcoe/yargs/commit/73dc9011ac968e39b55e19e916084a839391b506) auto number conversion works yay (@substack) -- [bcec56b](https://github.com/bcoe/yargs/commit/bcec56b3d031e018064cbb691539ccc4f28c14ad) failing test for not-implemented auto numification (@substack) -- [ebd2844](https://github.com/bcoe/yargs/commit/ebd2844d683feeac583df79af0e5124a7a7db04e) odd that eql doesn't check types careflly (@substack) -- [fd854b0](https://github.com/bcoe/yargs/commit/fd854b02e512ce854b76386d395672a7969c1bc4) package author + keywords (@substack) -- [656a1d5](https://github.com/bcoe/yargs/commit/656a1d5a1b7c0e49d72e80cb13f20671d56f76c6) updated readme with .default() stuff (@substack) -- [cd7f8c5](https://github.com/bcoe/yargs/commit/cd7f8c55f0b82b79b690d14c5f806851236998a1) passing tests for new .default() behavior (@substack) -- [932725e](https://github.com/bcoe/yargs/commit/932725e39ce65bc91a0385a5fab659a5fa976ac2) new default() thing for setting default key/values (@substack) -- [4e6c7ab](https://github.com/bcoe/yargs/commit/4e6c7aba6374ac9ebc6259ecf91f13af7bce40e3) test for coffee usage (@substack) -- [d54ffcc](https://github.com/bcoe/yargs/commit/d54ffccf2a5a905f51ed5108f7c647f35d64ae23) new --key value style with passing tests. NOTE: changes existing behavior (@substack) -- [ed2a2d5](https://github.com/bcoe/yargs/commit/ed2a2d5d828100ebeef6385c0fb88d146a5cfe9b) package bump for summatix's coffee script fix (@substack) -- [75a975e](https://github.com/bcoe/yargs/commit/75a975eed8430d28e2a79dc9e6d819ad545f4587) Added support for CoffeeScript (@summatix) -- [56b2b1d](https://github.com/bcoe/yargs/commit/56b2b1de8d11f8a2b91979d8ae2d6db02d8fe64d) test coverage for the falsy check() usage (@substack) -- [a4843a9](https://github.com/bcoe/yargs/commit/a4843a9f0e69ffb4afdf6a671d89eb6f218be35d) check bug fixed plus a handy string (@substack) -- [857bd2d](https://github.com/bcoe/yargs/commit/857bd2db933a5aaa9cfecba0ced2dc9b415f8111) tests for demandCount, back up to 100% coverage (@substack) -- [073b776](https://github.com/bcoe/yargs/commit/073b7768ebd781668ef05c13f9003aceca2f5c35) call demandCount from demand (@substack) -- [4bd4b7a](https://github.com/bcoe/yargs/commit/4bd4b7a085c8b6ce1d885a0f486cc9865cee2db1) add demandCount to check for the number of arguments in the _ list (@marshall) -- [b8689ac](https://github.com/bcoe/yargs/commit/b8689ac68dacf248119d242bba39a41cb0adfa07) Rebase checks. That will be its own module eventually. (@substack) -- [e688370](https://github.com/bcoe/yargs/commit/e688370b576f0aa733c3f46183df69e1b561668e) a $0 like in perl (@substack) -- [2e5e196](https://github.com/bcoe/yargs/commit/2e5e1960fc19afb21fb3293752316eaa8bcd3609) usage test hacking around process and console (@substack) -- [fcc3521](https://github.com/bcoe/yargs/commit/fcc352163fbec6a1dfe8caf47a0df39de24fe016) description pun (@substack) -- [87a1fe2](https://github.com/bcoe/yargs/commit/87a1fe29037ca2ca5fefda85141aaeb13e8ce761) mit/x11 license (@substack) -- [8d089d2](https://github.com/bcoe/yargs/commit/8d089d24cd687c0bde3640a96c09b78f884900dd) bool example is more consistent and also shows off short option grouping (@substack) -- [448d747](https://github.com/bcoe/yargs/commit/448d7473ac68e8e03d8befc9457b0d9e21725be0) start of the readme and examples (@substack) -- [da74dea](https://github.com/bcoe/yargs/commit/da74dea799a9b59dbf022cbb8001bfdb0d52eec9) more tests for long and short captures (@substack) -- [ab6387e](https://github.com/bcoe/yargs/commit/ab6387e6769ca4af82ca94c4c67c7319f0d9fcfa) silly bug in the tests with s/not/no/, all tests pass now (@substack) -- [102496a](https://github.com/bcoe/yargs/commit/102496a319e8e06f6550d828fc2f72992c7d9ecc) hack an instance for process.argv onto Argv so the export can be called to create an instance or used for argv, which is the most common case (@substack) -- [a01caeb](https://github.com/bcoe/yargs/commit/a01caeb532546d19f68f2b2b87f7036cfe1aaedd) divide example (@substack) -- [443da55](https://github.com/bcoe/yargs/commit/443da55736acbaf8ff8b04d1b9ce19ab016ddda2) start of the lib with a package.json (@substack) diff --git a/node_modules/yargs-unparser/node_modules/yargs/LICENSE b/node_modules/yargs-unparser/node_modules/yargs/LICENSE deleted file mode 100644 index 747ab114..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) -Modified work Copyright 2014 Contributors (ben@npmjs.com) - -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/yargs-unparser/node_modules/yargs/README.md b/node_modules/yargs-unparser/node_modules/yargs/README.md deleted file mode 100644 index b821f12c..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/README.md +++ /dev/null @@ -1,122 +0,0 @@ -

        - -

        -

        Yargs

        -

        - Yargs be a node.js library fer hearties tryin' ter parse optstrings -

        -
        - -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] -[![Conventional Commits][conventional-commits-image]][conventional-commits-url] -[![Slack][slack-image]][slack-url] - -## Description : -Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. - -It gives you: - -* commands and (grouped) options (`my-program.js serve --port=5000`). -* a dynamically generated help menu based on your arguments. - -> - -* bash-completion shortcuts for commands and options. -* and [tons more](/docs/api.md). - -## Installation - -Stable version: -```bash -npm i yargs --save -``` - -Bleeding edge version with the most recent features: -```bash -npm i yargs@next --save -``` - -## Usage : - -### Simple Example - -````javascript -#!/usr/bin/env node -const argv = require('yargs').argv - -if (argv.ships > 3 && argv.distance < 53.5) { - console.log('Plunder more riffiwobbles!') -} else { - console.log('Retreat from the xupptumblers!') -} -```` - -```bash -$ ./plunder.js --ships=4 --distance=22 -Plunder more riffiwobbles! - -$ ./plunder.js --ships 12 --distance 98.7 -Retreat from the xupptumblers! -``` - -### Complex Example - -```javascript -#!/usr/bin/env node -require('yargs') // eslint-disable-line - .command('serve [port]', 'start the server', (yargs) => { - yargs - .positional('port', { - describe: 'port to bind on', - default: 5000 - }) - }, (argv) => { - if (argv.verbose) console.info(`start server on :${argv.port}`) - serve(argv.port) - }) - .option('verbose', { - alias: 'v', - default: false - }) - .argv -``` - -Run the example above with `--help` to see the help for the application. - -## Community : - -Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). - -## Documentation : - -### Table of Contents - -* [Yargs' API](/docs/api.md) -* [Examples](/docs/examples.md) -* [Parsing Tricks](/docs/tricks.md) - * [Stop the Parser](/docs/tricks.md#stop) - * [Negating Boolean Arguments](/docs/tricks.md#negate) - * [Numbers](/docs/tricks.md#numbers) - * [Arrays](/docs/tricks.md#arrays) - * [Objects](/docs/tricks.md#objects) -* [Advanced Topics](/docs/advanced.md) - * [Composing Your App Using Commands](/docs/advanced.md#commands) - * [Building Configurable CLI Apps](/docs/advanced.md#configuration) - * [Customizing Yargs' Parser](/docs/advanced.md#customizing) -* [Contributing](/contributing.md) - -[travis-url]: https://travis-ci.org/yargs/yargs -[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg -[coveralls-url]: https://coveralls.io/github/yargs/yargs -[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg -[npm-url]: https://www.npmjs.com/package/yargs -[npm-image]: https://img.shields.io/npm/v/yargs.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: http://standardjs.com/ -[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg -[conventional-commits-url]: https://conventionalcommits.org/ -[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg -[slack-url]: http://devtoolscommunity.herokuapp.com diff --git a/node_modules/yargs-unparser/node_modules/yargs/completion.sh.hbs b/node_modules/yargs-unparser/node_modules/yargs/completion.sh.hbs deleted file mode 100644 index 819c8ae8..00000000 --- a/node_modules/yargs-unparser/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-unparser/node_modules/yargs/index.js b/node_modules/yargs-unparser/node_modules/yargs/index.js deleted file mode 100644 index dfed54bc..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' -// classic singleton yargs API, to use yargs -// without running as a singleton do: -// require('yargs/yargs')(process.argv.slice(2)) -const yargs = require('./yargs') - -Argv(process.argv.slice(2)) - -module.exports = Argv - -function Argv (processArgs, cwd) { - const argv = yargs(processArgs, cwd, require) - singletonify(argv) - return argv -} - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('yargs')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('yargs').argv - to get a parsed version of process.argv. -*/ -function singletonify (inst) { - Object.keys(inst).forEach((key) => { - if (key === 'argv') { - Argv.__defineGetter__(key, inst.__lookupGetter__(key)) - } else { - Argv[key] = typeof inst[key] === 'function' ? inst[key].bind(inst) : inst[key] - } - }) -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs-unparser/node_modules/yargs/lib/apply-extends.js deleted file mode 100644 index 1436b650..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/apply-extends.js +++ /dev/null @@ -1,53 +0,0 @@ - -'use strict' -const fs = require('fs') -const path = require('path') -const YError = require('./yerror') - -let previouslyVisitedConfigs = [] - -function checkForCircularExtends (cfgPath) { - if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { - throw new YError(`Circular extended configurations: '${cfgPath}'.`) - } -} - -function getPathToDefaultConfig (cwd, pathToExtend) { - return path.resolve(cwd, pathToExtend) -} - -function applyExtends (config, cwd) { - let defaultConfig = {} - - if (config.hasOwnProperty('extends')) { - if (typeof config.extends !== 'string') return defaultConfig - const isPath = /\.json|\..*rc$/.test(config.extends) - let pathToDefault = null - if (!isPath) { - try { - pathToDefault = require.resolve(config.extends) - } catch (err) { - // most likely this simply isn't a module. - } - } else { - pathToDefault = getPathToDefaultConfig(cwd, config.extends) - } - // maybe the module uses key for some other reason, - // err on side of caution. - if (!pathToDefault && !isPath) return config - - checkForCircularExtends(pathToDefault) - - previouslyVisitedConfigs.push(pathToDefault) - - defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends) - delete config.extends - defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault)) - } - - previouslyVisitedConfigs = [] - - return Object.assign({}, defaultConfig, config) -} - -module.exports = applyExtends diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/argsert.js b/node_modules/yargs-unparser/node_modules/yargs/lib/argsert.js deleted file mode 100644 index ed1d5987..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/argsert.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict' -const command = require('./command')() -const YError = require('./yerror') - -const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'] - -module.exports = 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: []} - if (typeof expected === 'object') { - length = callerArguments - callerArguments = expected - } else { - parsed = command.parseCommand(`cmd ${expected}`) - } - const args = [].slice.call(callerArguments) - - while (args.length && args[args.length - 1] === undefined) args.pop() - length = length || args.length - - if (length < parsed.demanded.length) { - throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`) - } - - const totalCommands = parsed.demanded.length + parsed.optional.length - if (length > totalCommands) { - throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`) - } - - parsed.demanded.forEach((demanded) => { - const arg = args.shift() - const observedType = guessType(arg) - const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*') - if (matchingTypes.length === 0) argumentTypeError(observedType, demanded.cmd, position, false) - position += 1 - }) - - parsed.optional.forEach((optional) => { - if (args.length === 0) return - const arg = args.shift() - const observedType = guessType(arg) - const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*') - if (matchingTypes.length === 0) argumentTypeError(observedType, optional.cmd, position, true) - position += 1 - }) - } catch (err) { - console.warn(err.stack) - } -} - -function guessType (arg) { - if (Array.isArray(arg)) { - return 'array' - } else if (arg === null) { - return 'null' - } - return typeof arg -} - -function argumentTypeError (observedType, allowedTypes, position, optional) { - throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`) -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/command.js b/node_modules/yargs-unparser/node_modules/yargs/lib/command.js deleted file mode 100644 index 65ffc4ea..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/command.js +++ /dev/null @@ -1,433 +0,0 @@ -'use strict' - -const inspect = require('util').inspect -const path = require('path') -const Parser = require('yargs-parser') - -const DEFAULT_MARKER = /(^\*)|(^\$0)/ - -// handles parsing positional arguments, -// and populating argv with said positional -// arguments. -module.exports = function command (yargs, usage, validation, globalMiddleware) { - const self = {} - let handlers = {} - let aliasMap = {} - let defaultCommand - globalMiddleware = globalMiddleware || [] - self.addHandler = function addHandler (cmd, description, builder, handler, middlewares) { - let aliases = [] - handler = handler || (() => {}) - middlewares = middlewares || [] - globalMiddleware.push(...middlewares) - middlewares = globalMiddleware - if (Array.isArray(cmd)) { - aliases = cmd.slice(1) - cmd = cmd[0] - } else if (typeof cmd === 'object') { - let command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd) - if (cmd.aliases) command = [].concat(command).concat(cmd.aliases) - self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares) - return - } - - // allow a module to be provided instead of separate builder and handler - if (typeof builder === 'object' && builder.builder && typeof builder.handler === 'function') { - self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares) - return - } - - // parse positionals out of cmd string - const parsedCommand = self.parseCommand(cmd) - - // remove positional args from aliases only - aliases = aliases.map(alias => self.parseCommand(alias).cmd) - - // check for default and filter out '*'' - let isDefault = false - const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => { - if (DEFAULT_MARKER.test(c)) { - isDefault = true - return false - } - return true - }) - - // standardize on $0 for default command. - if (parsedAliases.length === 0 && isDefault) parsedAliases.push('$0') - - // shift cmd and aliases after filtering out '*' - if (isDefault) { - parsedCommand.cmd = parsedAliases[0] - aliases = parsedAliases.slice(1) - cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd) - } - - // populate aliasMap - aliases.forEach((alias) => { - aliasMap[alias] = parsedCommand.cmd - }) - - if (description !== false) { - usage.command(cmd, description, isDefault, aliases) - } - - handlers[parsedCommand.cmd] = { - original: cmd, - description: description, - handler, - builder: builder || {}, - middlewares: middlewares || [], - demanded: parsedCommand.demanded, - optional: parsedCommand.optional - } - - if (isDefault) defaultCommand = handlers[parsedCommand.cmd] - } - - self.addDirectory = function addDirectory (dir, context, req, callerFile, opts) { - opts = opts || {} - // disable recursion to support nested directories of subcommands - if (typeof opts.recurse !== 'boolean') opts.recurse = false - // exclude 'json', 'coffee' from require-directory defaults - if (!Array.isArray(opts.extensions)) opts.extensions = ['js'] - // allow consumer to define their own visitor function - const parentVisit = typeof opts.visit === 'function' ? opts.visit : o => o - // call addHandler via visitor function - opts.visit = function visit (obj, joined, filename) { - const visited = parentVisit(obj, joined, filename) - // allow consumer to skip modules with their own visitor - if (visited) { - // check for cyclic reference - // each command file path should only be seen once per execution - if (~context.files.indexOf(joined)) return visited - // keep track of visited files in context.files - context.files.push(joined) - self.addHandler(visited) - } - return visited - } - require('require-directory')({ require: req, filename: callerFile }, dir, opts) - } - - // lookup module object from require()d command and derive name - // if module was not require()d and no name given, throw error - function moduleName (obj) { - const mod = require('which-module')(obj) - if (!mod) throw new Error(`No command name given for module: ${inspect(obj)}`) - return commandFromFilename(mod.filename) - } - - // derive command name from filename - function commandFromFilename (filename) { - return path.basename(filename, path.extname(filename)) - } - - function extractDesc (obj) { - for (let keys = ['describe', 'description', 'desc'], i = 0, l = keys.length, test; i < l; i++) { - test = obj[keys[i]] - if (typeof test === 'string' || typeof test === 'boolean') return test - } - return false - } - - self.parseCommand = function parseCommand (cmd) { - const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ') - const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/) - const bregex = /\.*[\][<>]/g - const parsedCommand = { - cmd: (splitCommand.shift()).replace(bregex, ''), - demanded: [], - optional: [] - } - splitCommand.forEach((cmd, i) => { - let variadic = false - cmd = cmd.replace(/\s/g, '') - if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) variadic = true - if (/^\[/.test(cmd)) { - parsedCommand.optional.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic - }) - } else { - parsedCommand.demanded.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic - }) - } - }) - return parsedCommand - } - - self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap)) - - self.getCommandHandlers = () => handlers - - self.hasDefaultCommand = () => !!defaultCommand - - self.runCommand = function runCommand (command, yargs, parsed, commandIndex) { - let aliases = parsed.aliases - const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand - const currentContext = yargs.getContext() - let numFiles = currentContext.files.length - const parentCommands = currentContext.commands.slice() - - // what does yargs look like after the buidler is run? - let innerArgv = parsed.argv - let innerYargs = null - let positionalMap = {} - if (command) { - currentContext.commands.push(command) - currentContext.fullCommands.push(commandHandler.original) - } - if (typeof commandHandler.builder === 'function') { - // a function can be provided, which builds - // up a yargs chain and possibly returns it. - innerYargs = commandHandler.builder(yargs.reset(parsed.aliases)) - // if the builder function did not yet parse argv with reset yargs - // and did not explicitly set a usage() string, then apply the - // original command string as usage() for consistent behavior with - // options object below. - if (yargs.parsed === false) { - if (shouldUpdateUsage(yargs)) { - yargs.getUsageInstance().usage( - usageFromParentCommandsCommandHandler(parentCommands, commandHandler), - commandHandler.description - ) - } - innerArgv = innerYargs ? innerYargs._parseArgs(null, null, true, commandIndex) : yargs._parseArgs(null, null, true, commandIndex) - } else { - innerArgv = yargs.parsed.argv - } - - if (innerYargs && yargs.parsed === false) aliases = innerYargs.parsed.aliases - else aliases = yargs.parsed.aliases - } else if (typeof commandHandler.builder === 'object') { - // as a short hand, an object can instead be provided, specifying - // the options that a command takes. - innerYargs = yargs.reset(parsed.aliases) - if (shouldUpdateUsage(innerYargs)) { - innerYargs.getUsageInstance().usage( - usageFromParentCommandsCommandHandler(parentCommands, commandHandler), - commandHandler.description - ) - } - Object.keys(commandHandler.builder).forEach((key) => { - innerYargs.option(key, commandHandler.builder[key]) - }) - innerArgv = innerYargs._parseArgs(null, null, true, commandIndex) - aliases = innerYargs.parsed.aliases - } - - if (!yargs._hasOutput()) { - positionalMap = populatePositionals(commandHandler, innerArgv, currentContext, yargs) - } - - // 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) - ) - } - } - - if (command) { - currentContext.commands.pop() - currentContext.fullCommands.pop() - } - numFiles = currentContext.files.length - numFiles - if (numFiles > 0) currentContext.files.splice(numFiles * -1, numFiles) - - return innerArgv - } - - function shouldUpdateUsage (yargs) { - return !yargs.getUsageInstance().getUsageDisabled() && - yargs.getUsageInstance().getUsage().length === 0 - } - - function usageFromParentCommandsCommandHandler (parentCommands, commandHandler) { - const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() : commandHandler.original - const pc = parentCommands.filter((c) => { return !DEFAULT_MARKER.test(c) }) - pc.push(c) - return `$0 ${pc.join(' ')}` - } - - self.runDefaultBuilderOn = function (yargs) { - if (shouldUpdateUsage(yargs)) { - // build the root-level command string from the default string. - const commandString = DEFAULT_MARKER.test(defaultCommand.original) - ? defaultCommand.original : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 ') - yargs.getUsageInstance().usage( - commandString, - defaultCommand.description - ) - } - const builder = defaultCommand.builder - if (typeof builder === 'function') { - builder(yargs) - } else { - Object.keys(builder).forEach((key) => { - yargs.option(key, builder[key]) - }) - } - } - - // transcribe all positional arguments "command [apple]" - // onto argv. - function populatePositionals (commandHandler, argv, context, yargs) { - argv._ = argv._.slice(context.commands.length) // nuke the current commands - const demanded = commandHandler.demanded.slice(0) - const optional = commandHandler.optional.slice(0) - const positionalMap = {} - - validation.positionalCount(demanded.length, argv._.length) - - while (demanded.length) { - const demand = demanded.shift() - populatePositional(demand, argv, positionalMap) - } - - while (optional.length) { - const maybe = optional.shift() - populatePositional(maybe, argv, positionalMap) - } - - argv._ = context.commands.concat(argv._) - - postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original)) - - return positionalMap - } - - function populatePositional (positional, argv, positionalMap, parseOptions) { - const cmd = positional.cmd[0] - if (positional.variadic) { - positionalMap[cmd] = argv._.splice(0).map(String) - } else { - if (argv._.length) positionalMap[cmd] = [String(argv._.shift())] - } - } - - // we run yargs-parser against the positional arguments - // applying the same parsing logic used for flags. - function postProcessPositionals (argv, positionalMap, parseOptions) { - // combine the parsing hints we've inferred from the command - // string with explicitly configured parsing hints. - const options = Object.assign({}, yargs.getOptions()) - options.default = Object.assign(parseOptions.default, options.default) - options.alias = Object.assign(parseOptions.alias, options.alias) - options.array = options.array.concat(parseOptions.array) - delete options.config // don't load config when processing positionals. - - const unparsed = [] - Object.keys(positionalMap).forEach((key) => { - positionalMap[key].map((value) => { - unparsed.push(`--${key}`) - unparsed.push(value) - }) - }) - - // short-circuit parse. - if (!unparsed.length) return - - const parsed = Parser.detailed(unparsed, options) - - if (parsed.error) { - yargs.getUsageInstance().fail(parsed.error.message, parsed.error) - } else { - // only copy over positional keys (don't overwrite - // flag arguments that were already parsed). - const positionalKeys = Object.keys(positionalMap) - Object.keys(positionalMap).forEach((key) => { - [].push.apply(positionalKeys, parsed.aliases[key]) - }) - - Object.keys(parsed.argv).forEach((key) => { - if (positionalKeys.indexOf(key) !== -1) { - // any new aliases need to be placed in positionalMap, which - // is used for validation. - if (!positionalMap[key]) positionalMap[key] = parsed.argv[key] - argv[key] = parsed.argv[key] - } - }) - } - } - - self.cmdToParseOptions = function (cmdString) { - const parseOptions = { - array: [], - default: {}, - alias: {}, - demand: {} - } - - const parsed = self.parseCommand(cmdString) - parsed.demanded.forEach((d) => { - const cmds = d.cmd.slice(0) - const cmd = cmds.shift() - if (d.variadic) { - parseOptions.array.push(cmd) - parseOptions.default[cmd] = [] - } - cmds.forEach((c) => { - parseOptions.alias[cmd] = c - }) - parseOptions.demand[cmd] = true - }) - - parsed.optional.forEach((o) => { - const cmds = o.cmd.slice(0) - const cmd = cmds.shift() - if (o.variadic) { - parseOptions.array.push(cmd) - parseOptions.default[cmd] = [] - } - cmds.forEach((c) => { - parseOptions.alias[cmd] = c - }) - }) - - return parseOptions - } - - self.reset = () => { - handlers = {} - aliasMap = {} - defaultCommand = undefined - return self - } - - // used by yargs.parse() to freeze - // the state of commands such that - // we can apply .parse() multiple times - // with the same yargs instance. - let frozen - self.freeze = () => { - frozen = {} - frozen.handlers = handlers - frozen.aliasMap = aliasMap - frozen.defaultCommand = defaultCommand - } - self.unfreeze = () => { - handlers = frozen.handlers - aliasMap = frozen.aliasMap - defaultCommand = frozen.defaultCommand - frozen = undefined - } - - return self -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/completion.js b/node_modules/yargs-unparser/node_modules/yargs/lib/completion.js deleted file mode 100644 index ad6969a2..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/completion.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -const fs = require('fs') -const path = require('path') - -// add bash completions to your -// yargs-powered applications. -module.exports = function completion (yargs, usage, command) { - const self = { - completionKey: 'get-yargs-completions' - } - - // get a list of completion commands. - // 'args' is the array of strings from the line to be completed - self.getCompletion = function getCompletion (args, done) { - const completions = [] - const current = args.length ? args[args.length - 1] : '' - const argv = yargs.parse(args, true) - const aliases = yargs.parsed.aliases - - // a custom completion function can be provided - // to completion(). - if (completionFunction) { - if (completionFunction.length < 3) { - const result = completionFunction(current, argv) - - // promise based completion function. - if (typeof result.then === 'function') { - return result.then((list) => { - process.nextTick(() => { done(list) }) - }).catch((err) => { - process.nextTick(() => { throw err }) - }) - } - - // synchronous completion function. - return done(result) - } else { - // asynchronous completion function - return completionFunction(current, argv, (completions) => { - done(completions) - }) - } - } - - const handlers = command.getCommandHandlers() - for (let i = 0, ii = args.length; i < ii; ++i) { - if (handlers[args[i]] && handlers[args[i]].builder) { - const builder = handlers[args[i]].builder - if (typeof builder === 'function') { - const y = yargs.reset() - builder(y) - return y.argv - } - } - } - - if (!current.match(/^-/)) { - usage.getCommands().forEach((usageCommand) => { - const commandName = command.parseCommand(usageCommand[0]).cmd - if (args.indexOf(commandName) === -1) { - completions.push(commandName) - } - }) - } - - if (current.match(/^-/)) { - 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}`) - } - }) - } - - done(completions) - } - - // 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 name = path.basename($0) - - // add ./to applications not yet installed as bin. - if ($0.match(/\.js$/)) $0 = `./${$0}` - - script = script.replace(/{{app_name}}/g, name) - script = script.replace(/{{completion_command}}/g, cmd) - return script.replace(/{{app_path}}/g, $0) - } - - // register a function to perform your own custom - // completions., this function can be either - // synchrnous or asynchronous. - let completionFunction = null - self.registerFunction = (fn) => { - completionFunction = fn - } - - return self -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs-unparser/node_modules/yargs/lib/levenshtein.js deleted file mode 100644 index dd310733..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/levenshtein.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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. -*/ - -// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. -// gist, which can be found here: https://gist.github.com/andrei-m/982927 -'use strict' -// Compute the edit distance between the two given strings -module.exports = function levenshtein (a, b) { - if (a.length === 0) return b.length - if (b.length === 0) return a.length - - const matrix = [] - - // increment along the first column of each row - let i - for (i = 0; i <= b.length; i++) { - matrix[i] = [i] - } - - // increment each column in the first row - let j - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j - } - - // Fill in the rest of the matrix - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) === a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1] - } else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution - Math.min(matrix[i][j - 1] + 1, // insertion - matrix[i - 1][j] + 1)) // deletion - } - } - } - - return matrix[b.length][a.length] -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/middleware.js b/node_modules/yargs-unparser/node_modules/yargs/lib/middleware.js deleted file mode 100644 index 567ba571..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/middleware.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function (globalMiddleware, context) { - return function (callback) { - if (Array.isArray(callback)) { - Array.prototype.push.apply(globalMiddleware, callback) - } else if (typeof callback === 'function') { - globalMiddleware.push(callback) - } - return context - } -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/obj-filter.js b/node_modules/yargs-unparser/node_modules/yargs/lib/obj-filter.js deleted file mode 100644 index c344ac58..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/obj-filter.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -module.exports = function objFilter (original, filter) { - const obj = {} - filter = filter || ((k, v) => true) - Object.keys(original || {}).forEach((key) => { - if (filter(key, original[key])) { - obj[key] = original[key] - } - }) - return obj -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/usage.js b/node_modules/yargs-unparser/node_modules/yargs/lib/usage.js deleted file mode 100644 index 9be8a995..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/usage.js +++ /dev/null @@ -1,535 +0,0 @@ -'use strict' -// this file handles outputting usage instructions, -// failures, etc. keeps logging in one place. -const stringWidth = require('string-width') -const objFilter = require('./obj-filter') -const path = require('path') -const setBlocking = require('set-blocking') -const YError = require('./yerror') - -module.exports = function usage (yargs, y18n) { - const __ = y18n.__ - const self = {} - - // methods for ouputting/building failure message. - const fails = [] - self.failFn = function failFn (f) { - fails.push(f) - } - - let failMessage = null - let showHelpOnFail = true - self.showHelpOnFail = function showHelpOnFailFn (enabled, message) { - if (typeof enabled === 'string') { - message = enabled - enabled = true - } else if (typeof enabled === 'undefined') { - enabled = true - } - failMessage = message - showHelpOnFail = enabled - return self - } - - let failureOutput = false - self.fail = function fail (msg, err) { - const logger = yargs._getLoggerInstance() - - if (fails.length) { - for (let i = fails.length - 1; i >= 0; --i) { - fails[i](msg, err, self) - } - } else { - if (yargs.getExitProcess()) setBlocking(true) - - // don't output failure message more than once - if (!failureOutput) { - failureOutput = true - if (showHelpOnFail) { - yargs.showHelp('error') - logger.error() - } - if (msg || err) logger.error(msg || err) - if (failMessage) { - if (msg || err) logger.error('') - logger.error(failMessage) - } - } - - err = err || new YError(msg) - if (yargs.getExitProcess()) { - return yargs.exit(1) - } else if (yargs._hasParseCallback()) { - return yargs.exit(1, err) - } else { - throw err - } - } - } - - // methods for ouputting/building help (usage) message. - let usages = [] - let usageDisabled = false - self.usage = (msg, description) => { - if (msg === null) { - usageDisabled = true - usages = [] - return - } - usageDisabled = false - usages.push([msg, description || '']) - return self - } - self.getUsage = () => { - return usages - } - self.getUsageDisabled = () => { - return usageDisabled - } - - self.getPositionalGroupName = () => { - return __('Positionals:') - } - - let examples = [] - self.example = (cmd, description) => { - examples.push([cmd, description || '']) - } - - let commands = [] - self.command = function command (cmd, description, isDefault, aliases) { - // the last default wins, so cancel out any previously set default - if (isDefault) { - commands = commands.map((cmdArray) => { - cmdArray[2] = false - return cmdArray - }) - } - commands.push([cmd, description || '', isDefault, aliases]) - } - self.getCommands = () => commands - - let descriptions = {} - self.describe = function describe (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.describe(k, key[k]) - }) - } else { - descriptions[key] = desc - } - } - self.getDescriptions = () => descriptions - - let epilog - self.epilog = (msg) => { - epilog = msg - } - - let wrapSet = false - let wrap - self.wrap = (cols) => { - wrapSet = true - wrap = cols - } - - function getWrap () { - if (!wrapSet) { - wrap = windowWidth() - wrapSet = true - } - - return wrap - } - - const deferY18nLookupPrefix = '__yargsString__:' - self.deferY18nLookup = str => deferY18nLookupPrefix + str - - const defaultGroup = 'Options:' - self.help = function help () { - normalizeAliases() - - // handle old demanded API - const base$0 = path.basename(yargs.$0) - const demandedOptions = yargs.getDemandedOptions() - const demandedCommands = yargs.getDemandedCommands() - const groups = yargs.getGroups() - const options = yargs.getOptions() - - let keys = [] - keys = keys.concat(Object.keys(descriptions)) - keys = keys.concat(Object.keys(demandedOptions)) - keys = keys.concat(Object.keys(demandedCommands)) - keys = keys.concat(Object.keys(options.default)) - keys = keys.filter(filterHiddenOptions) - keys = Object.keys(keys.reduce((acc, key) => { - if (key !== '_') acc[key] = true - return acc - }, {})) - - const theWrap = getWrap() - const ui = require('cliui')({ - width: theWrap, - wrap: !!theWrap - }) - - // the usage string. - if (!usageDisabled) { - if (usages.length) { - // user-defined usage. - 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() - } else if (commands.length) { - let u = null - // demonstrate how commands are used. - if (demandedCommands._) { - u = `${base$0} <${__('command')}>\n` - } else { - u = `${base$0} [${__('command')}]\n` - } - ui.div(`${u}`) - } - } - - // your application's commands, i.e., non-option - // arguments populated in '_'. - if (commands.length) { - ui.div(__('Commands:')) - - const context = yargs.getContext() - const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : '' - - commands.forEach((command) => { - const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands. - ui.span( - { - text: commandString, - padding: [0, 2, 0, 2], - width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 - }, - {text: command[1]} - ) - const hints = [] - if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here - if (command[3] && command[3].length) { - hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`) - } - if (hints.length) { - ui.div({text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right'}) - } else { - ui.div() - } - }) - - ui.div() - } - - // perform some cleanup on the keys array, making it - // only include top-level keys not their aliases. - const aliasKeys = (Object.keys(options.alias) || []) - .concat(Object.keys(yargs.parsed.newAliases) || []) - - keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)) - - // populate 'Options:' group with any keys that have not - // explicitly had a group set. - if (!groups[defaultGroup]) groups[defaultGroup] = [] - addUngroupedKeys(keys, options.alias, groups) - - // display 'Options:' table along with any custom tables: - Object.keys(groups).forEach((groupName) => { - if (!groups[groupName].length) return - - // if we've grouped the key 'f', but 'f' aliases 'foobar', - // normalizedKeys should contain only 'foobar'. - const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => { - if (~aliasKeys.indexOf(key)) return key - for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey - } - return key - }) - - if (normalizedKeys.length < 1) return - - ui.div(__(groupName)) - - // actually generate the switches string --foo, -f, --bar. - const switches = normalizedKeys.reduce((acc, key) => { - acc[key] = [ key ].concat(options.alias[key] || []) - .map(sw => { - // for the special positional group don't - // add '--' or '-' prefix. - if (groupName === self.getPositionalGroupName()) return sw - else return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - - return acc - }, {}) - - normalizedKeys.forEach((key) => { - const kswitch = switches[key] - let desc = descriptions[key] || '' - let type = null - - if (~desc.lastIndexOf(deferY18nLookupPrefix)) desc = __(desc.substring(deferY18nLookupPrefix.length)) - - if (~options.boolean.indexOf(key)) type = `[${__('boolean')}]` - if (~options.count.indexOf(key)) type = `[${__('count')}]` - if (~options.string.indexOf(key)) type = `[${__('string')}]` - if (~options.normalize.indexOf(key)) type = `[${__('string')}]` - if (~options.array.indexOf(key)) type = `[${__('array')}]` - if (~options.number.indexOf(key)) type = `[${__('number')}]` - - const extra = [ - type, - (key in demandedOptions) ? `[${__('required')}]` : null, - options.choices && options.choices[key] ? `[${__('choices:')} ${ - self.stringifiedValues(options.choices[key])}]` : null, - defaultString(options.default[key], options.defaultDescription[key]) - ].filter(Boolean).join(' ') - - ui.span( - {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'}) - else ui.div() - }) - - ui.div() - }) - - // describe some common use-cases for your application. - if (examples.length) { - ui.div(__('Examples:')) - - examples.forEach((example) => { - example[0] = example[0].replace(/\$0/g, base$0) - }) - - examples.forEach((example) => { - if (example[1] === '') { - ui.div( - { - text: example[0], - padding: [0, 2, 0, 2] - } - ) - } else { - ui.div( - { - text: example[0], - padding: [0, 2, 0, 2], - width: maxWidth(examples, theWrap) + 4 - }, { - text: example[1] - } - ) - } - }) - - ui.div() - } - - // the usage string. - if (epilog) { - const e = epilog.replace(/\$0/g, base$0) - ui.div(`${e}\n`) - } - - // Remove the trailing white spaces - return ui.toString().replace(/\s*$/, '') - } - - // return the maximum width of a string - // in the left-hand column of a table. - function maxWidth (table, theWrap, modifier) { - let width = 0 - - // table might be of the form [leftColumn], - // or {key: leftColumn} - if (!Array.isArray(table)) { - table = Object.keys(table).map(key => [table[key]]) - } - - table.forEach((v) => { - width = Math.max( - stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]), - width - ) - }) - - // if we've enabled 'wrap' we should limit - // the max-width of the left-column. - if (theWrap) width = Math.min(width, parseInt(theWrap * 0.5, 10)) - - return width - } - - // make sure any options set for aliases, - // are copied to the keys being aliased. - function normalizeAliases () { - // handle old demanded API - const demandedOptions = yargs.getDemandedOptions() - const options = yargs.getOptions() - - ;(Object.keys(options.alias) || []).forEach((key) => { - options.alias[key].forEach((alias) => { - // copy descriptions. - if (descriptions[alias]) self.describe(key, descriptions[alias]) - // copy demanded. - if (alias in demandedOptions) yargs.demandOption(key, demandedOptions[alias]) - // type messages. - if (~options.boolean.indexOf(alias)) yargs.boolean(key) - if (~options.count.indexOf(alias)) yargs.count(key) - if (~options.string.indexOf(alias)) yargs.string(key) - if (~options.normalize.indexOf(alias)) yargs.normalize(key) - if (~options.array.indexOf(alias)) yargs.array(key) - if (~options.number.indexOf(alias)) yargs.number(key) - }) - }) - } - - // given a set of keys, place any keys that are - // ungrouped under the 'Options:' grouping. - function addUngroupedKeys (keys, aliases, groups) { - let groupedKeys = [] - let toCheck = null - Object.keys(groups).forEach((group) => { - groupedKeys = groupedKeys.concat(groups[group]) - }) - - keys.forEach((key) => { - toCheck = [key].concat(aliases[key]) - if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { - groups[defaultGroup].push(key) - } - }) - return groupedKeys - } - - function filterHiddenOptions (key) { - return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt] - } - - self.showHelp = (level) => { - const logger = yargs._getLoggerInstance() - if (!level) level = 'error' - const emit = typeof level === 'function' ? level : logger[level] - emit(self.help()) - } - - self.functionDescription = (fn) => { - const description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value') - return ['(', description, ')'].join('') - } - - self.stringifiedValues = function stringifiedValues (values, separator) { - let string = '' - const sep = separator || ', ' - const array = [].concat(values) - - if (!values || !array.length) return string - - array.forEach((value) => { - if (string.length) string += sep - string += JSON.stringify(value) - }) - - return string - } - - // format the default-value-string displayed in - // the right-hand column. - function defaultString (value, defaultDescription) { - let string = `[${__('default:')} ` - - if (value === undefined && !defaultDescription) return null - - if (defaultDescription) { - string += defaultDescription - } else { - switch (typeof value) { - case 'string': - string += `"${value}"` - break - case 'object': - string += JSON.stringify(value) - break - default: - string += value - } - } - - return `${string}]` - } - - // guess the width of the console window, max-width 80. - function windowWidth () { - const maxWidth = 80 - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return Math.min(maxWidth, process.stdout.columns) - } else { - return maxWidth - } - } - - // logic for displaying application version. - let version = null - self.version = (ver) => { - version = ver - } - - self.showVersion = () => { - const logger = yargs._getLoggerInstance() - logger.log(version) - } - - self.reset = function reset (localLookup) { - // do not reset wrap here - // do not reset fails here - failMessage = null - failureOutput = false - usages = [] - usageDisabled = false - epilog = undefined - examples = [] - commands = [] - descriptions = objFilter(descriptions, (k, v) => !localLookup[k]) - return self - } - - let frozen - self.freeze = function freeze () { - frozen = {} - frozen.failMessage = failMessage - frozen.failureOutput = failureOutput - frozen.usages = usages - frozen.usageDisabled = usageDisabled - frozen.epilog = epilog - frozen.examples = examples - frozen.commands = commands - frozen.descriptions = descriptions - } - self.unfreeze = function unfreeze () { - failMessage = frozen.failMessage - failureOutput = frozen.failureOutput - usages = frozen.usages - usageDisabled = frozen.usageDisabled - epilog = frozen.epilog - examples = frozen.examples - commands = frozen.commands - descriptions = frozen.descriptions - frozen = undefined - } - - return self -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/validation.js b/node_modules/yargs-unparser/node_modules/yargs/lib/validation.js deleted file mode 100644 index e9bbb12b..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/validation.js +++ /dev/null @@ -1,341 +0,0 @@ -'use strict' -const argsert = require('./argsert') -const objFilter = require('./obj-filter') -const specialKeys = ['$0', '--', '_'] - -// validation-type-stuff, missing params, -// bad implications, custom checks. -module.exports = function validation (yargs, usage, y18n) { - const __ = y18n.__ - const __n = y18n.__n - const self = {} - - // validate appropriate # of non-option - // arguments were provided, i.e., '_'. - self.nonOptionCount = function nonOptionCount (argv) { - const demandedCommands = yargs.getDemandedCommands() - // don't count currently executing commands - const _s = argv._.length - yargs.getContext().commands.length - - if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) { - if (_s < demandedCommands._.min) { - if (demandedCommands._.minMsg !== undefined) { - usage.fail( - // replace $0 with observed, $1 with expected. - demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.min) : null - ) - } else { - usage.fail( - __('Not enough non-option arguments: got %s, need at least %s', _s, demandedCommands._.min) - ) - } - } else if (_s > demandedCommands._.max) { - if (demandedCommands._.maxMsg !== undefined) { - usage.fail( - // replace $0 with observed, $1 with expected. - demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.max) : null - ) - } else { - usage.fail( - __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max) - ) - } - } - } - } - - // validate the appropriate # of - // positional arguments were provided: - self.positionalCount = function positionalCount (required, observed) { - if (observed < required) { - usage.fail( - __('Not enough non-option arguments: got %s, need at least %s', observed, required) - ) - } - } - - // make sure all the required arguments are present. - self.requiredArguments = function requiredArguments (argv) { - const demandedOptions = yargs.getDemandedOptions() - let missing = null - - Object.keys(demandedOptions).forEach((key) => { - if (!argv.hasOwnProperty(key) || typeof argv[key] === 'undefined') { - missing = missing || {} - missing[key] = demandedOptions[key] - } - }) - - if (missing) { - const customMsgs = [] - Object.keys(missing).forEach((key) => { - const msg = missing[key] - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg) - } - }) - - const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : '' - - usage.fail(__n( - 'Missing required argument: %s', - 'Missing required arguments: %s', - Object.keys(missing).length, - Object.keys(missing).join(', ') + customMsg - )) - } - } - - // check for unknown arguments (strict-mode). - self.unknownArguments = function unknownArguments (argv, aliases, positionalMap) { - const commandKeys = yargs.getCommandInstance().getCommands() - const unknown = [] - const currentContext = yargs.getContext() - - Object.keys(argv).forEach((key) => { - if (specialKeys.indexOf(key) === -1 && - !positionalMap.hasOwnProperty(key) && - !yargs._getParseContext().hasOwnProperty(key) && - !aliases.hasOwnProperty(key) - ) { - unknown.push(key) - } - }) - - if (commandKeys.length > 0) { - argv._.slice(currentContext.commands.length).forEach((key) => { - if (commandKeys.indexOf(key) === -1) { - unknown.push(key) - } - }) - } - - if (unknown.length > 0) { - usage.fail(__n( - 'Unknown argument: %s', - 'Unknown arguments: %s', - unknown.length, - unknown.join(', ') - )) - } - } - - // validate arguments limited to enumerated choices - self.limitedChoices = function limitedChoices (argv) { - const options = yargs.getOptions() - const invalid = {} - - if (!Object.keys(options.choices).length) return - - Object.keys(argv).forEach((key) => { - if (specialKeys.indexOf(key) === -1 && - options.choices.hasOwnProperty(key)) { - [].concat(argv[key]).forEach((value) => { - // TODO case-insensitive configurability - if (options.choices[key].indexOf(value) === -1 && - value !== undefined) { - invalid[key] = (invalid[key] || []).concat(value) - } - }) - } - }) - - const invalidKeys = Object.keys(invalid) - - if (!invalidKeys.length) return - - let msg = __('Invalid values:') - invalidKeys.forEach((key) => { - msg += `\n ${__( - 'Argument: %s, Given: %s, Choices: %s', - key, - usage.stringifiedValues(invalid[key]), - usage.stringifiedValues(options.choices[key]) - )}` - }) - usage.fail(msg) - } - - // custom checks, added using the `check` option on yargs. - let checks = [] - self.check = function check (f, global) { - checks.push({ - func: f, - global - }) - } - - self.customChecks = function customChecks (argv, aliases) { - for (let i = 0, f; (f = checks[i]) !== undefined; i++) { - const func = f.func - let result = null - try { - result = func(argv, aliases) - } catch (err) { - usage.fail(err.message ? err.message : err, err) - continue - } - - if (!result) { - usage.fail(__('Argument check failed: %s', func.toString())) - } else if (typeof result === 'string' || result instanceof Error) { - usage.fail(result.toString(), result) - } - } - } - - // check implications, argument foo implies => argument bar. - let implied = {} - self.implies = function implies (key, value) { - argsert(' [array|number|string]', [key, value], arguments.length) - - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.implies(k, key[k]) - }) - } else { - yargs.global(key) - if (!implied[key]) { - implied[key] = [] - } - if (Array.isArray(value)) { - value.forEach((i) => self.implies(key, i)) - } else { - implied[key].push(value) - } - } - } - self.getImplied = function getImplied () { - return implied - } - - self.implications = function implications (argv) { - const implyFail = [] - - Object.keys(implied).forEach((key) => { - const origKey = key - ;(implied[key] || []).forEach((value) => { - let num - let key = origKey - const origValue = value - - // convert string '1' to number 1 - num = Number(key) - key = isNaN(num) ? key : num - - if (typeof key === 'number') { - // check length of argv._ - key = argv._.length >= key - } else if (key.match(/^--no-.+/)) { - // check if key doesn't exist - key = key.match(/^--no-(.+)/)[1] - key = !argv[key] - } else { - // check if key exists - key = argv[key] - } - - num = Number(value) - value = isNaN(num) ? value : num - - if (typeof value === 'number') { - value = argv._.length >= value - } else if (value.match(/^--no-.+/)) { - value = value.match(/^--no-(.+)/)[1] - value = !argv[value] - } else { - value = argv[value] - } - if (key && !value) { - implyFail.push(` ${origKey} -> ${origValue}`) - } - }) - }) - - if (implyFail.length) { - let msg = `${__('Implications failed:')}\n` - - implyFail.forEach((value) => { - msg += (value) - }) - - usage.fail(msg) - } - } - - let conflicting = {} - self.conflicts = function conflicts (key, value) { - argsert(' [array|string]', [key, value], arguments.length) - - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.conflicts(k, key[k]) - }) - } else { - yargs.global(key) - if (!conflicting[key]) { - conflicting[key] = [] - } - if (Array.isArray(value)) { - value.forEach((i) => self.conflicts(key, i)) - } else { - conflicting[key].push(value) - } - } - } - self.getConflicting = () => conflicting - - self.conflicting = function conflictingFn (argv) { - Object.keys(argv).forEach((key) => { - if (conflicting[key]) { - conflicting[key].forEach((value) => { - // we default keys to 'undefined' that have been configured, we should not - // apply conflicting check unless they are a value other than 'undefined'. - if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)) - } - }) - } - }) - } - - self.recommendCommands = function recommendCommands (cmd, potentialCommands) { - const distance = require('./levenshtein') - const threshold = 3 // if it takes more than three edits, let's move on. - potentialCommands = potentialCommands.sort((a, b) => b.length - a.length) - - let recommended = null - let bestDistance = Infinity - for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { - const d = distance(cmd, candidate) - if (d <= threshold && d < bestDistance) { - bestDistance = d - recommended = candidate - } - } - if (recommended) usage.fail(__('Did you mean %s?', recommended)) - } - - self.reset = function reset (localLookup) { - implied = objFilter(implied, (k, v) => !localLookup[k]) - conflicting = objFilter(conflicting, (k, v) => !localLookup[k]) - checks = checks.filter(c => c.global) - return self - } - - let frozen - self.freeze = function freeze () { - frozen = {} - frozen.implied = implied - frozen.checks = checks - frozen.conflicting = conflicting - } - self.unfreeze = function unfreeze () { - implied = frozen.implied - checks = frozen.checks - conflicting = frozen.conflicting - frozen = undefined - } - - return self -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/lib/yerror.js b/node_modules/yargs-unparser/node_modules/yargs/lib/yerror.js deleted file mode 100644 index 53375a0f..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/lib/yerror.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -function YError (msg) { - this.name = 'YError' - this.message = msg || 'yargs error' - Error.captureStackTrace(this, YError) -} - -YError.prototype = Object.create(Error.prototype) -YError.prototype.constructor = YError - -module.exports = YError diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/be.json b/node_modules/yargs-unparser/node_modules/yargs/locales/be.json deleted file mode 100644 index 141ebe1e..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/be.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Каманды:", - "Options:": "Опцыі:", - "Examples:": "Прыклады:", - "boolean": "булевы тып", - "count": "падлік", - "string": "радковы тып", - "number": "лік", - "array": "масіў", - "required": "неабходна", - "default:": "па змаўчанні:", - "choices:": "магчымасці:", - "aliases:": "аліасы:", - "generated-value": "згенераванае значэнне", - "Not enough non-option arguments: got %s, need at least %s": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", - "Too many non-option arguments: got %s, maximum of %s": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", - "Missing argument value: %s": { - "one": "Не хапае значэння аргументу: %s", - "other": "Не хапае значэнняў аргументаў: %s" - }, - "Missing required argument: %s": { - "one": "Не хапае неабходнага аргументу: %s", - "other": "Не хапае неабходных аргументаў: %s" - }, - "Unknown argument: %s": { - "one": "Невядомы аргумент: %s", - "other": "Невядомыя аргументы: %s" - }, - "Invalid values:": "Несапраўдныя значэння:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", - "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", - "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", - "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", - "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", - "Path to JSON config file": "Шлях да файла канфігурацыі JSON", - "Show help": "Паказаць дапамогу", - "Show version number": "Паказаць нумар версіі", - "Did you mean %s?": "Вы мелі на ўвазе %s?" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/de.json b/node_modules/yargs-unparser/node_modules/yargs/locales/de.json deleted file mode 100644 index d805710b..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/de.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Kommandos:", - "Options:": "Optionen:", - "Examples:": "Beispiele:", - "boolean": "boolean", - "count": "Zähler", - "string": "string", - "number": "Zahl", - "array": "array", - "required": "erforderlich", - "default:": "Standard:", - "choices:": "Möglichkeiten:", - "aliases:": "Aliase:", - "generated-value": "Generierter-Wert", - "Not enough non-option arguments: got %s, need at least %s": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", - "Too many non-option arguments: got %s, maximum of %s": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", - "Missing argument value: %s": { - "one": "Fehlender Argumentwert: %s", - "other": "Fehlende Argumentwerte: %s" - }, - "Missing required argument: %s": { - "one": "Fehlendes Argument: %s", - "other": "Fehlende Argumente: %s" - }, - "Unknown argument: %s": { - "one": "Unbekanntes Argument: %s", - "other": "Unbekannte Argumente: %s" - }, - "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:", - "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", - "Show help": "Hilfe anzeigen", - "Show version number": "Version anzeigen", - "Did you mean %s?": "Meintest du %s?" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/en.json b/node_modules/yargs-unparser/node_modules/yargs/locales/en.json deleted file mode 100644 index fc65c2a0..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/en.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Commands:", - "Options:": "Options:", - "Examples:": "Examples:", - "boolean": "boolean", - "count": "count", - "string": "string", - "number": "number", - "array": "array", - "required": "required", - "default:": "default:", - "choices:": "choices:", - "aliases:": "aliases:", - "generated-value": "generated-value", - "Not enough non-option arguments: got %s, need at least %s": "Not enough non-option arguments: got %s, need at least %s", - "Too many non-option arguments: got %s, maximum of %s": "Too many non-option arguments: got %s, maximum of %s", - "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" - }, - "Missing required argument: %s": { - "one": "Missing required argument: %s", - "other": "Missing required arguments: %s" - }, - "Unknown argument: %s": { - "one": "Unknown argument: %s", - "other": "Unknown arguments: %s" - }, - "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:", - "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", - "Show help": "Show help", - "Show version number": "Show version number", - "Did you mean %s?": "Did you mean %s?", - "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", - "Positionals:": "Positionals:", - "command": "command" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/es.json b/node_modules/yargs-unparser/node_modules/yargs/locales/es.json deleted file mode 100644 index d7c8af9f..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/es.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opciones:", - "Examples:": "Ejemplos:", - "boolean": "booleano", - "count": "cuenta", - "string": "cadena de caracteres", - "number": "número", - "array": "tabla", - "required": "requerido", - "default:": "defecto:", - "choices:": "selección:", - "aliases:": "alias:", - "generated-value": "valor-generado", - "Not enough non-option arguments: got %s, need at least %s": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", - "Missing argument value: %s": { - "one": "Falta argumento: %s", - "other": "Faltan argumentos: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento requerido: %s", - "other": "Faltan argumentos requeridos: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconocido: %s", - "other": "Argumentos desconocidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", - "Argument check failed: %s": "Verificación de argumento ha fallado: %s", - "Implications failed:": "Implicaciones fallidas:", - "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", - "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", - "Path to JSON config file": "Ruta al archivo de configuración JSON", - "Show help": "Muestra ayuda", - "Show version number": "Muestra número de versión", - "Did you mean %s?": "Quisiste decir %s?" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/fr.json b/node_modules/yargs-unparser/node_modules/yargs/locales/fr.json deleted file mode 100644 index 481f47e3..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/fr.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Commands:": "Commandes:", - "Options:": "Options:", - "Examples:": "Exemples:", - "boolean": "booléen", - "count": "comptage", - "string": "chaine de caractère", - "number": "nombre", - "array": "tableau", - "required": "requis", - "default:": "défaut:", - "choices:": "choix:", - "generated-value": "valeur générée", - "Not enough non-option arguments: got %s, need at least %s": "Pas assez d'arguments non-option: reçu %s, besoin d'au moins %s", - "Too many non-option arguments: got %s, maximum of %s": "Trop d'arguments non-option: reçu %s, maximum %s", - "Missing argument value: %s": { - "one": "Argument manquant: %s", - "other": "Arguments manquants: %s" - }, - "Missing required argument: %s": { - "one": "Argument requis manquant: %s", - "other": "Arguments requis manquants: %s" - }, - "Unknown argument: %s": { - "one": "Argument inconnu: %s", - "other": "Arguments inconnus: %s" - }, - "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:", - "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", - "Show help": "Affiche de l'aide", - "Show version number": "Affiche le numéro de version" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/hi.json b/node_modules/yargs-unparser/node_modules/yargs/locales/hi.json deleted file mode 100644 index 2cd677ac..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/hi.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "आदेश:", - "Options:": "विकल्प:", - "Examples:": "उदाहरण:", - "boolean": "सत्यता", - "count": "संख्या", - "string": "वर्णों का तार ", - "number": "अंक", - "array": "सरणी", - "required": "आवश्यक", - "default:": "डिफॉल्ट:", - "choices:": "विकल्प:", - "aliases:": "उपनाम:", - "generated-value": "उत्पन्न-मूल्य", - "Not enough non-option arguments: got %s, need at least %s": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", - "Too many non-option arguments: got %s, maximum of %s": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", - "Missing argument value: %s": { - "one": "कुछ तर्को के मूल्य गुम हैं: %s", - "other": "कुछ तर्को के मूल्य गुम हैं: %s" - }, - "Missing required argument: %s": { - "one": "आवश्यक तर्क गुम हैं: %s", - "other": "आवश्यक तर्क गुम हैं: %s" - }, - "Unknown argument: %s": { - "one": "अज्ञात तर्क प्राप्त: %s", - "other": "अज्ञात तर्क प्राप्त: %s" - }, - "Invalid values:": "अमान्य मूल्य:", - "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", - "Argument check failed: %s": "तर्क जांच विफल: %s", - "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", - "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", - "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", - "Path to JSON config file": "JSON config फाइल का पथ", - "Show help": "सहायता दिखाएँ", - "Show version number": "Version संख्या दिखाएँ", - "Did you mean %s?": "क्या आपका मतलब है %s?", - "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", - "Positionals:": "स्थानीय:", - "command": "आदेश" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/hu.json b/node_modules/yargs-unparser/node_modules/yargs/locales/hu.json deleted file mode 100644 index 7b7d1660..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/hu.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Parancsok:", - "Options:": "Opciók:", - "Examples:": "Példák:", - "boolean": "boolean", - "count": "számláló", - "string": "szöveg", - "number": "szám", - "array": "tömb", - "required": "kötelező", - "default:": "alapértelmezett:", - "choices:": "lehetőségek:", - "aliases:": "aliaszok:", - "generated-value": "generált-érték", - "Not enough non-option arguments: got %s, need at least %s": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", - "Too many non-option arguments: got %s, maximum of %s": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", - "Missing argument value: %s": { - "one": "Hiányzó argumentum érték: %s", - "other": "Hiányzó argumentum értékek: %s" - }, - "Missing required argument: %s": { - "one": "Hiányzó kötelező argumentum: %s", - "other": "Hiányzó kötelező argumentumok: %s" - }, - "Unknown argument: %s": { - "one": "Ismeretlen argumentum: %s", - "other": "Ismeretlen argumentumok: %s" - }, - "Invalid values:": "Érvénytelen érték:", - "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", - "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", - "Implications failed:": "Implikációk sikertelenek:", - "Not enough arguments following: %s": "Nem elég argumentum követi: %s", - "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", - "Path to JSON config file": "JSON konfigurációs file helye", - "Show help": "Súgo megjelenítése", - "Show version number": "Verziószám megjelenítése", - "Did you mean %s?": "Erre gondoltál %s?" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/id.json b/node_modules/yargs-unparser/node_modules/yargs/locales/id.json deleted file mode 100644 index 87e441cd..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/id.json +++ /dev/null @@ -1,43 +0,0 @@ - -{ - "Commands:": "Perintah:", - "Options:": "Pilihan:", - "Examples:": "Contoh:", - "boolean": "boolean", - "count": "jumlah", - "number": "nomor", - "string": "string", - "array": "larik", - "required": "diperlukan", - "default:": "bawaan:", - "aliases:": "istilah lain:", - "choices:": "pilihan:", - "generated-value": "nilai-yang-dihasilkan", - "Not enough non-option arguments: got %s, need at least %s": "Argumen wajib kurang: hanya %s, minimal %s", - "Too many non-option arguments: got %s, maximum of %s": "Terlalu banyak argumen wajib: ada %s, maksimal %s", - "Missing argument value: %s": { - "one": "Kurang argumen: %s", - "other": "Kurang argumen: %s" - }, - "Missing required argument: %s": { - "one": "Kurang argumen wajib: %s", - "other": "Kurang argumen wajib: %s" - }, - "Unknown argument: %s": { - "one": "Argumen tak diketahui: %s", - "other": "Argumen tak diketahui: %s" - }, - "Invalid values:": "Nilai-nilai tidak valid:", - "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", - "Argument check failed: %s": "Pemeriksaan argument gagal: %s", - "Implications failed:": "Implikasi gagal:", - "Not enough arguments following: %s": "Kurang argumen untuk: %s", - "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", - "Path to JSON config file": "Alamat berkas konfigurasi JSON", - "Show help": "Lihat bantuan", - "Show version number": "Lihat nomor versi", - "Did you mean %s?": "Maksud Anda: %s?", - "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", - "Positionals:": "Posisional-posisional:", - "command": "perintah" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/it.json b/node_modules/yargs-unparser/node_modules/yargs/locales/it.json deleted file mode 100644 index f9eb3756..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/it.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Comandi:", - "Options:": "Opzioni:", - "Examples:": "Esempi:", - "boolean": "booleano", - "count": "contatore", - "string": "stringa", - "number": "numero", - "array": "vettore", - "required": "richiesto", - "default:": "predefinito:", - "choices:": "scelte:", - "aliases:": "alias:", - "generated-value": "valore generato", - "Not enough non-option arguments: got %s, need at least %s": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", - "Too many non-option arguments: got %s, maximum of %s": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", - "Missing argument value: %s": { - "one": "Argomento mancante: %s", - "other": "Argomenti mancanti: %s" - }, - "Missing required argument: %s": { - "one": "Argomento richiesto mancante: %s", - "other": "Argomenti richiesti mancanti: %s" - }, - "Unknown argument: %s": { - "one": "Argomento sconosciuto: %s", - "other": "Argomenti sconosciuti: %s" - }, - "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:", - "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", - "Show help": "Mostra la schermata di aiuto", - "Show version number": "Mostra il numero di versione", - "Did you mean %s?": "Intendi forse %s?" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/ja.json b/node_modules/yargs-unparser/node_modules/yargs/locales/ja.json deleted file mode 100644 index 64ee6d3f..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/ja.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "コマンド:", - "Options:": "オプション:", - "Examples:": "例:", - "boolean": "真偽", - "count": "カウント", - "string": "文字列", - "number": "数値", - "array": "配列", - "required": "必須", - "default:": "デフォルト:", - "choices:": "選択してください:", - "aliases:": "エイリアス:", - "generated-value": "生成された値", - "Not enough non-option arguments: got %s, need at least %s": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", - "Too many non-option arguments: got %s, maximum of %s": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", - "Missing argument value: %s": { - "one": "引数が見つかりません: %s", - "other": "引数が見つかりません: %s" - }, - "Missing required argument: %s": { - "one": "必須の引数が見つかりません: %s", - "other": "必須の引数が見つかりません: %s" - }, - "Unknown argument: %s": { - "one": "未知の引数です: %s", - "other": "未知の引数です: %s" - }, - "Invalid values:": "不正な値です:", - "Argument: %s, Given: %s, Choices: %s": "引数は %s です。指定できるのは %s つです。選択してください: %s", - "Argument check failed: %s": "引数のチェックに失敗しました: %s", - "Implications failed:": "オプションの組み合わせで不正が生じました:", - "Not enough arguments following: %s": "次の引数が不足しています。: %s", - "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", - "Path to JSON config file": "JSONの設定ファイルまでのpath", - "Show help": "ヘルプを表示", - "Show version number": "バージョンを表示", - "Did you mean %s?": "もしかして %s?", - "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", - "Positionals:": "位置:", - "command": "コマンド" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/ko.json b/node_modules/yargs-unparser/node_modules/yargs/locales/ko.json deleted file mode 100644 index 0eaeab2f..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/ko.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "명령:", - "Options:": "옵션:", - "Examples:": "예시:", - "boolean": "여부", - "count": "개수", - "string": "문자열", - "number": "숫자", - "array": "배열", - "required": "필수", - "default:": "기본:", - "choices:": "선택:", - "aliases:": "별칭:", - "generated-value": "생성된 값", - "Not enough non-option arguments: got %s, need at least %s": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다", - "Too many non-option arguments: got %s, maximum of %s": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다", - "Missing argument value: %s": { - "one": "인자값을 받지 못했습니다: %s", - "other": "인자값들을 받지 못했습니다: %s" - }, - "Missing required argument: %s": { - "one": "필수 인자를 받지 못했습니다: %s", - "other": "필수 인자들을 받지 못했습니다: %s" - }, - "Unknown argument: %s": { - "one": "알 수 없는 인자입니다: %s", - "other": "알 수 없는 인자들입니다: %s" - }, - "Invalid values:": "잘못된 값입니다:", - "Argument: %s, Given: %s, Choices: %s": "인자: %s, 입력받은 값: %s, 선택지: %s", - "Argument check failed: %s": "유효하지 않은 인자입니다: %s", - "Implications failed:": "옵션의 조합이 잘못되었습니다:", - "Not enough arguments following: %s": "인자가 충분하게 주어지지 않았습니다: %s", - "Invalid JSON config file: %s": "유효하지 않은 JSON 설정파일입니다: %s", - "Path to JSON config file": "JSON 설정파일 경로", - "Show help": "도움말을 보여줍니다", - "Show version number": "버전 넘버를 보여줍니다", - "Did you mean %s?": "찾고계신게 %s입니까?", - "Arguments %s and %s are mutually exclusive" : "%s와 %s 인자는 같이 사용될 수 없습니다", - "Positionals:": "위치:", - "command": "명령" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/nb.json b/node_modules/yargs-unparser/node_modules/yargs/locales/nb.json deleted file mode 100644 index 55be1fbe..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/nb.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Commands:": "Kommandoer:", - "Options:": "Alternativer:", - "Examples:": "Eksempler:", - "boolean": "boolsk", - "count": "antall", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default:": "standard:", - "choices:": "valg:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", - "Too many non-option arguments: got %s, maximum of %s": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", - "Missing argument value: %s": { - "one": "Mangler argument verdi: %s", - "other": "Mangler argument verdier: %s" - }, - "Missing required argument: %s": { - "one": "Mangler obligatorisk argument: %s", - "other": "Mangler obligatoriske argumenter: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjente argumenter: %s" - }, - "Invalid values:": "Ugyldige verdier:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", - "Argument check failed: %s": "Argumentsjekk mislyktes: %s", - "Implications failed:": "Konsekvensene mislyktes:", - "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/nl.json b/node_modules/yargs-unparser/node_modules/yargs/locales/nl.json deleted file mode 100644 index 1d144724..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/nl.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Opdrachten:", - "Options:": "Opties:", - "Examples:": "Voorbeelden:", - "boolean": "boolean", - "count": "aantal", - "string": "text", - "number": "nummer", - "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", - "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" - }, - "Missing required argument: %s": { - "one": "Missend verplichte argument: %s", - "other": "Missende verplichte argumenten: %s" - }, - "Unknown argument: %s": { - "one": "Onbekend argument: %s", - "other": "Onbekende argumenten: %s" - }, - "Invalid values:": "Ongeldige waardes:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", - "Argument check failed: %s": "Argument check mislukt: %s", - "Implications failed:": "Implicaties mislukt:", - "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", - "Show help": "Toon help", - "Show version number": "Toon versie nummer", - "Did you mean %s?": "Bedoelde u misschien %s?", - "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s zijn onderling uitsluitend", - "Positionals:": "Positie-afhankelijke argumenten", - "command": "commando" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/nn.json b/node_modules/yargs-unparser/node_modules/yargs/locales/nn.json deleted file mode 100644 index 5a3c9514..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/nn.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Kommandoar:", - "Options:": "Alternativ:", - "Examples:": "Døme:", - "boolean": "boolsk", - "count": "mengd", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default:": "standard:", - "choices:": "val:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": - "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", - "Too many non-option arguments: got %s, maximum of %s": - "For mange ikkje-alternativ argument: fekk %s, maksimum %s", - "Missing argument value: %s": { - "one": "Manglar argumentverdi: %s", - "other": "Manglar argumentverdiar: %s" - }, - "Missing required argument: %s": { - "one": "Manglar obligatorisk argument: %s", - "other": "Manglar obligatoriske argument: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjende argument: %s" - }, - "Invalid values:": "Ugyldige verdiar:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", - "Argument check failed: %s": "Argumentsjekk mislukkast: %s", - "Implications failed:": "Konsekvensane mislukkast:", - "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/pirate.json b/node_modules/yargs-unparser/node_modules/yargs/locales/pirate.json deleted file mode 100644 index dcb5cb75..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/pirate.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Commands:": "Choose yer command:", - "Options:": "Options for me hearties!", - "Examples:": "Ex. marks the spot:", - "required": "requi-yar-ed", - "Missing required argument: %s": { - "one": "Ye be havin' to set the followin' argument land lubber: %s", - "other": "Ye be havin' to set the followin' arguments land lubber: %s" - }, - "Show help": "Parlay this here code of conduct", - "Show version number": "'Tis the version ye be askin' fer", - "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/pl.json b/node_modules/yargs-unparser/node_modules/yargs/locales/pl.json deleted file mode 100644 index 6926a454..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/pl.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Polecenia:", - "Options:": "Opcje:", - "Examples:": "Przykłady:", - "boolean": "boolean", - "count": "ilość", - "string": "ciąg znaków", - "number": "liczba", - "array": "tablica", - "required": "wymagany", - "default:": "domyślny:", - "choices:": "dostępne:", - "aliases:": "aliasy:", - "generated-value": "wygenerowana-wartość", - "Not enough non-option arguments: got %s, need at least %s": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", - "Too many non-option arguments: got %s, maximum of %s": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", - "Missing argument value: %s": { - "one": "Brak wartości dla argumentu: %s", - "other": "Brak wartości dla argumentów: %s" - }, - "Missing required argument: %s": { - "one": "Brak wymaganego argumentu: %s", - "other": "Brak wymaganych argumentów: %s" - }, - "Unknown argument: %s": { - "one": "Nieznany argument: %s", - "other": "Nieznane argumenty: %s" - }, - "Invalid values:": "Nieprawidłowe wartości:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", - "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", - "Implications failed:": "Założenia nie zostały spełnione:", - "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", - "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", - "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", - "Show help": "Pokaż pomoc", - "Show version number": "Pokaż numer wersji", - "Did you mean %s?": "Czy chodziło Ci o %s?", - "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", - "Positionals:": "Pozycyjne:", - "command": "polecenie" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/pt.json b/node_modules/yargs-unparser/node_modules/yargs/locales/pt.json deleted file mode 100644 index 75c3921c..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/pt.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "boolean", - "count": "contagem", - "string": "cadeia de caracteres", - "number": "número", - "array": "arranjo", - "required": "requerido", - "default:": "padrão:", - "choices:": "escolhas:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", - "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", - "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", - "Show help": "Mostra ajuda", - "Show version number": "Mostra número de versão", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs-unparser/node_modules/yargs/locales/pt_BR.json deleted file mode 100644 index 904cb66e..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/pt_BR.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "booleano", - "count": "contagem", - "string": "string", - "number": "número", - "array": "array", - "required": "obrigatório", - "default:": "padrão:", - "choices:": "opções:", - "aliases:": "sinônimos:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos: recebido %s, máximo de %s", - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", - "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", - "Path to JSON config file": "Caminho para o arquivo JSON de configuração", - "Show help": "Exibe ajuda", - "Show version number": "Exibe a versão", - "Did you mean %s?": "Você quis dizer %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", - "Positionals:": "Posicionais:", - "command": "comando" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/ru.json b/node_modules/yargs-unparser/node_modules/yargs/locales/ru.json deleted file mode 100644 index cb7b88b4..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/ru.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Команды:", - "Options:": "Опции:", - "Examples:": "Примеры:", - "boolean": "булевый тип", - "count": "подсчет", - "string": "строковой тип", - "number": "число", - "array": "массив", - "required": "необходимо", - "default:": "по умолчанию:", - "choices:": "возможности:", - "aliases:": "алиасы:", - "generated-value": "генерированное значение", - "Not enough non-option arguments: got %s, need at least %s": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", - "Too many non-option arguments: got %s, maximum of %s": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", - "Missing argument value: %s": { - "one": "Не хватает значения аргумента: %s", - "other": "Не хватает значений аргументов: %s" - }, - "Missing required argument: %s": { - "one": "Не хватает необходимого аргумента: %s", - "other": "Не хватает необходимых аргументов: %s" - }, - "Unknown argument: %s": { - "one": "Неизвестный аргумент: %s", - "other": "Неизвестные аргументы: %s" - }, - "Invalid values:": "Недействительные значения:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", - "Argument check failed: %s": "Проверка аргументов не удалась: %s", - "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", - "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", - "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", - "Path to JSON config file": "Путь к файлу конфигурации JSON", - "Show help": "Показать помощь", - "Show version number": "Показать номер версии", - "Did you mean %s?": "Вы имели в виду %s?" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/th.json b/node_modules/yargs-unparser/node_modules/yargs/locales/th.json deleted file mode 100644 index 3f08dcd2..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/th.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "คอมมาน", - "Options:": "ออฟชั่น", - "Examples:": "ตัวอย่าง", - "boolean": "บูลีน", - "count": "นับ", - "string": "สตริง", - "number": "ตัวเลข", - "array": "อาเรย์", - "required": "จำเป็น", - "default:": "ค่าเริ่มต้น", - "choices:": "ตัวเลือก", - "aliases:": "เอเลียส", - "generated-value": "ค่าที่ถูกสร้างขึ้น", - "Not enough non-option arguments: got %s, need at least %s": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", - "Too many non-option arguments: got %s, maximum of %s": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", - "Missing argument value: %s": { - "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", - "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" - }, - "Missing required argument: %s": { - "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", - "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" - }, - "Unknown argument: %s": { - "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", - "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" - }, - "Invalid values:": "ค่าไม่ถูกต้อง:", - "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", - "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", - "Implications failed:": "Implications ไม่สำเร็จ:", - "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", - "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", - "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", - "Show help": "ขอความช่วยเหลือ", - "Show version number": "แสดงตัวเลขเวอร์ชั่น", - "Did you mean %s?": "คุณหมายถึง %s?" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/tr.json b/node_modules/yargs-unparser/node_modules/yargs/locales/tr.json deleted file mode 100644 index 9b06c52a..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/tr.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Commands:": "Komutlar:", - "Options:": "Seçenekler:", - "Examples:": "Örnekler:", - "boolean": "boolean", - "count": "sayı", - "string": "string", - "number": "numara", - "array": "array", - "required": "zorunlu", - "default:": "varsayılan:", - "choices:": "seçimler:", - "aliases:": "takma adlar:", - "generated-value": "oluşturulan-değer", - "Not enough non-option arguments: got %s, need at least %s": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", - "Too many non-option arguments: got %s, maximum of %s": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", - "Missing argument value: %s": { - "one": "Eksik argüman değeri: %s", - "other": "Eksik argüman değerleri: %s" - }, - "Missing required argument: %s": { - "one": "Eksik zorunlu argüman: %s", - "other": "Eksik zorunlu argümanlar: %s" - }, - "Unknown argument: %s": { - "one": "Bilinmeyen argüman: %s", - "other": "Bilinmeyen argümanlar: %s" - }, - "Invalid values:": "Geçersiz değerler:", - "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", - "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", - "Implications failed:": "Sonuçlar başarısız oldu:", - "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", - "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", - "Path to JSON config file": "JSON yapılandırma dosya konumu", - "Show help": "Yardım detaylarını göster", - "Show version number": "Versiyon detaylarını göster", - "Did you mean %s?": "Bunu mu demek istediniz: %s?", - "Positionals:": "Sıralılar:", - "command": "komut" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/zh_CN.json b/node_modules/yargs-unparser/node_modules/yargs/locales/zh_CN.json deleted file mode 100644 index 03a3d94f..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/zh_CN.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "选项:", - "Examples:": "示例:", - "boolean": "布尔", - "count": "计数", - "string": "字符串", - "number": "数字", - "array": "数组", - "required": "必需", - "default:": "默认值:", - "choices:": "可选值:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", - "Too many non-option arguments: got %s, maximum of %s": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", - "Missing argument value: %s": { - "one": "没有给此选项指定值:%s", - "other": "没有给这些选项指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必须的选项:%s", - "other": "缺少这些必须的选项:%s" - }, - "Unknown argument: %s": { - "one": "无法识别的选项:%s", - "other": "无法识别这些选项:%s" - }, - "Invalid values:": "无效的选项值:", - "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", - "Argument check failed: %s": "选项值验证失败:%s", - "Implications failed:": "缺少依赖的选项:", - "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", - "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", - "Path to JSON config file": "JSON 配置文件的路径", - "Show help": "显示帮助信息", - "Show version number": "显示版本号", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", - "Positionals:": "位置:", - "command": "命令" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/locales/zh_TW.json b/node_modules/yargs-unparser/node_modules/yargs/locales/zh_TW.json deleted file mode 100644 index 12498888..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/locales/zh_TW.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "選項:", - "Examples:": "例:", - "boolean": "布林", - "count": "次數", - "string": "字串", - "number": "數字", - "array": "陣列", - "required": "必須", - "default:": "預設值:", - "choices:": "可選值:", - "aliases:": "別名:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", - "Too many non-option arguments: got %s, maximum of %s": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", - "Missing argument value: %s": { - "one": "此引數無指定值:%s", - "other": "這些引數無指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必須的引數:%s", - "other": "缺少這些必須的引數:%s" - }, - "Unknown argument: %s": { - "one": "未知的引數:%s", - "other": "未知的這些引數:%s" - }, - "Invalid values:": "無效的選項值:", - "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", - "Argument check failed: %s": "引數驗證失敗:%s", - "Implications failed:": "缺少依賴的選項:", - "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", - "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", - "Path to JSON config file": "JSON 設置文件的路徑", - "Show help": "顯示說明", - "Show version number": "顯示版本", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 是互斥的" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/package.json b/node_modules/yargs-unparser/node_modules/yargs/package.json deleted file mode 100644 index fe965766..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - "yargs@12.0.5", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "yargs@12.0.5", - "_id": "yargs@12.0.5", - "_inBundle": false, - "_integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "_location": "/yargs-unparser/yargs", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "yargs@12.0.5", - "name": "yargs", - "escapedName": "yargs", - "rawSpec": "12.0.5", - "saveSpec": null, - "fetchSpec": "12.0.5" - }, - "_requiredBy": [ - "/yargs-unparser" - ], - "_resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "_spec": "12.0.5", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "bugs": { - "url": "https://github.com/yargs/yargs/issues" - }, - "contributors": [ - { - "name": "Yargs Contributors", - "url": "https://github.com/yargs/yargs/graphs/contributors" - } - ], - "dependencies": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - }, - "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", - "cross-spawn": "^6.0.4", - "es6-promise": "^4.0.2", - "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", - "yargs-test-extends": "^1.0.1" - }, - "engine": { - "node": ">=6" - }, - "files": [ - "index.js", - "yargs.js", - "lib", - "locales", - "completion.sh.hbs", - "LICENSE" - ], - "homepage": "https://yargs.js.org/", - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "license": "MIT", - "main": "./index.js", - "name": "yargs", - "repository": { - "type": "git", - "url": "git+https://github.com/yargs/yargs.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "release": "standard-version", - "test": "nyc --cache mocha --require ./test/before.js --timeout=8000 --check-leaks" - }, - "standard": { - "ignore": [ - "**/example/**" - ] - }, - "version": "12.0.5" -} diff --git a/node_modules/yargs-unparser/node_modules/yargs/yargs.js b/node_modules/yargs-unparser/node_modules/yargs/yargs.js deleted file mode 100644 index 24c8e99c..00000000 --- a/node_modules/yargs-unparser/node_modules/yargs/yargs.js +++ /dev/null @@ -1,1190 +0,0 @@ -'use strict' -const argsert = require('./lib/argsert') -const fs = require('fs') -const Command = require('./lib/command') -const Completion = require('./lib/completion') -const Parser = require('yargs-parser') -const path = require('path') -const Usage = require('./lib/usage') -const Validation = require('./lib/validation') -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 YError = require('./lib/yerror') - -exports = module.exports = Yargs -function Yargs (processArgs, cwd, parentRequire) { - processArgs = processArgs || [] // handle calling yargs(). - - const self = {} - let command = null - let completion = null - let groups = {} - let globalMiddleware = [] - let output = '' - let preservedGroups = {} - let usage = null - let validation = null - - const y18n = Y18n({ - directory: path.resolve(__dirname, './locales'), - updateFiles: false - }) - - self.middleware = middlewareFactory(globalMiddleware, self) - - if (!cwd) cwd = process.cwd() - - self.scriptName = function scriptName (scriptName) { - self.$0 = scriptName - return self - } - - // ignore the node bin, specify this in your - // bin file with #!/usr/bin/env node - if (/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])) { - self.$0 = process.argv.slice(1, 2) - } else { - self.$0 = process.argv.slice(0, 1) - } - - self.$0 = self.$0 - .map((x, i) => { - const b = rebase(cwd, x) - return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x - }) - .join(' ').trim() - - if (process.env._ !== undefined && process.argv[1] === process.env._) { - self.$0 = process.env._.replace( - `${path.dirname(process.execPath)}/`, '' - ) - } - - // use context object to keep track of resets, subcommand execution, etc - // submodules should modify and check the state of context as necessary - const context = { resets: -1, commands: [], fullCommands: [], files: [] } - self.getContext = () => context - - // puts yargs back into an initial state. any keys - // that have been set to "global" will not be reset - // by this action. - let options - self.resetOptions = self.reset = function resetOptions (aliases) { - context.resets++ - aliases = aliases || {} - options = options || {} - // put yargs back into an initial state, this - // logic is used to build a nested command - // hierarchy. - const tmpOptions = {} - tmpOptions.local = options.local ? options.local : [] - tmpOptions.configObjects = options.configObjects ? options.configObjects : [] - - // if a key has been explicitly set as local, - // we should reset it before passing options to command. - const localLookup = {} - tmpOptions.local.forEach((l) => { - localLookup[l] = true - ;(aliases[l] || []).forEach((a) => { - localLookup[a] = true - }) - }) - - // preserve all groups not set to local. - preservedGroups = Object.keys(groups).reduce((acc, groupName) => { - const keys = groups[groupName].filter(key => !(key in localLookup)) - if (keys.length > 0) { - acc[groupName] = keys - } - return acc - }, {}) - // groups can now be reset - groups = {} - - const arrayOptions = [ - 'array', 'boolean', 'string', 'skipValidation', - 'count', 'normalize', 'number', - 'hiddenOptions' - ] - - const objectOptions = [ - 'narg', 'key', 'alias', 'default', 'defaultDescription', - 'config', 'choices', 'demandedOptions', 'demandedCommands', 'coerce' - ] - - arrayOptions.forEach((k) => { - tmpOptions[k] = (options[k] || []).filter(k => !localLookup[k]) - }) - - objectOptions.forEach((k) => { - tmpOptions[k] = objFilter(options[k], (k, v) => !localLookup[k]) - }) - - tmpOptions.envPrefix = options.envPrefix - options = tmpOptions - - // if this is the first time being executed, create - // instances of all our helpers -- otherwise just reset. - usage = usage ? usage.reset(localLookup) : Usage(self, y18n) - validation = validation ? validation.reset(localLookup) : Validation(self, usage, y18n) - command = command ? command.reset() : Command(self, usage, validation, globalMiddleware) - if (!completion) completion = Completion(self, usage, command) - - completionCommand = null - output = '' - exitError = null - hasOutput = false - self.parsed = false - - return self - } - self.resetOptions() - - // temporary hack: allow "freezing" of reset-able state for parse(msg, cb) - let frozen - function freeze () { - frozen = {} - frozen.options = options - frozen.configObjects = options.configObjects.slice(0) - frozen.exitProcess = exitProcess - frozen.groups = groups - usage.freeze() - validation.freeze() - command.freeze() - frozen.strict = strict - frozen.completionCommand = completionCommand - frozen.output = output - frozen.exitError = exitError - frozen.hasOutput = hasOutput - frozen.parsed = self.parsed - } - function unfreeze () { - options = frozen.options - options.configObjects = frozen.configObjects - exitProcess = frozen.exitProcess - groups = frozen.groups - output = frozen.output - exitError = frozen.exitError - hasOutput = frozen.hasOutput - self.parsed = frozen.parsed - usage.unfreeze() - validation.unfreeze() - command.unfreeze() - strict = frozen.strict - completionCommand = frozen.completionCommand - parseFn = null - parseContext = null - frozen = undefined - } - - self.boolean = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('boolean', keys) - return self - } - - self.array = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('array', keys) - return self - } - - self.number = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('number', keys) - return self - } - - self.normalize = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('normalize', keys) - return self - } - - self.count = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('count', keys) - return self - } - - self.string = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('string', keys) - return self - } - - self.requiresArg = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintObject(self.nargs, false, 'narg', keys, 1) - return self - } - - self.skipValidation = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('skipValidation', keys) - return self - } - - function populateParserHintArray (type, keys, value) { - keys = [].concat(keys) - keys.forEach((key) => { - options[type].push(key) - }) - } - - self.nargs = function (key, value) { - argsert(' [number]', [key, value], arguments.length) - populateParserHintObject(self.nargs, false, 'narg', key, value) - return self - } - - self.choices = function (key, value) { - argsert(' [string|array]', [key, value], arguments.length) - populateParserHintObject(self.choices, true, 'choices', key, value) - return self - } - - self.alias = function (key, value) { - argsert(' [string|array]', [key, value], arguments.length) - populateParserHintObject(self.alias, true, 'alias', key, value) - return self - } - - // TODO: actually deprecate self.defaults. - self.default = self.defaults = function (key, value, defaultDescription) { - argsert(' [*] [string]', [key, value, defaultDescription], arguments.length) - if (defaultDescription) options.defaultDescription[key] = defaultDescription - if (typeof value === 'function') { - if (!options.defaultDescription[key]) options.defaultDescription[key] = usage.functionDescription(value) - value = value.call() - } - populateParserHintObject(self.default, false, 'default', key, value) - return self - } - - self.describe = function (key, desc) { - argsert(' [string]', [key, desc], arguments.length) - populateParserHintObject(self.describe, false, 'key', key, true) - usage.describe(key, desc) - return self - } - - self.demandOption = function (keys, msg) { - argsert(' [string]', [keys, msg], arguments.length) - populateParserHintObject(self.demandOption, false, 'demandedOptions', keys, msg) - return self - } - - self.coerce = function (keys, value) { - argsert(' [function]', [keys, value], arguments.length) - populateParserHintObject(self.coerce, false, 'coerce', keys, value) - return self - } - - function populateParserHintObject (builder, isArray, type, key, value) { - if (Array.isArray(key)) { - // an array of keys with one value ['x', 'y', 'z'], function parse () {} - const temp = {} - key.forEach((k) => { - temp[k] = value - }) - builder(temp) - } else if (typeof key === 'object') { - // an object of key value pairs: {'x': parse () {}, 'y': parse() {}} - Object.keys(key).forEach((k) => { - builder(k, key[k]) - }) - } else { - // a single key value pair 'x', parse() {} - if (isArray) { - options[type][key] = (options[type][key] || []).concat(value) - } else { - options[type][key] = value - } - } - } - - function deleteFromParserHintObject (optionKey) { - // delete from all parsing hints: - // boolean, array, key, alias, etc. - Object.keys(options).forEach((hintKey) => { - const hint = options[hintKey] - if (Array.isArray(hint)) { - if (~hint.indexOf(optionKey)) hint.splice(hint.indexOf(optionKey), 1) - } else if (typeof hint === 'object') { - delete hint[optionKey] - } - }) - // now delete the description from usage.js. - delete usage.getDescriptions()[optionKey] - } - - self.config = function config (key, msg, parseFn) { - argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length) - // allow a config object to be provided directly. - if (typeof key === 'object') { - key = applyExtends(key, cwd) - options.configObjects = (options.configObjects || []).concat(key) - return self - } - - // allow for a custom parsing function. - if (typeof msg === 'function') { - parseFn = msg - msg = null - } - - key = key || 'config' - self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file')) - ;(Array.isArray(key) ? key : [key]).forEach((k) => { - options.config[k] = parseFn || true - }) - - return self - } - - self.example = function (cmd, description) { - argsert(' [string]', [cmd, description], arguments.length) - usage.example(cmd, description) - return self - } - - self.command = function (cmd, description, builder, handler, middlewares) { - argsert(' [string|boolean] [function|object] [function] [array]', [cmd, description, builder, handler, middlewares], arguments.length) - command.addHandler(cmd, description, builder, handler, middlewares) - return self - } - - self.commandDir = function (dir, opts) { - argsert(' [object]', [dir, opts], arguments.length) - const req = parentRequire || require - command.addDirectory(dir, self.getContext(), req, require('get-caller-file')(), opts) - return self - } - - // TODO: deprecate self.demand in favor of - // .demandCommand() .demandOption(). - self.demand = self.required = self.require = function demand (keys, max, msg) { - // you can optionally provide a 'max' key, - // which will raise an exception if too many '_' - // options are provided. - if (Array.isArray(max)) { - max.forEach((key) => { - self.demandOption(key, msg) - }) - max = Infinity - } else if (typeof max !== 'number') { - msg = max - max = Infinity - } - - if (typeof keys === 'number') { - self.demandCommand(keys, max, msg, msg) - } else if (Array.isArray(keys)) { - keys.forEach((key) => { - self.demandOption(key, msg) - }) - } else { - if (typeof msg === 'string') { - self.demandOption(keys, msg) - } else if (msg === true || typeof msg === 'undefined') { - self.demandOption(keys) - } - } - - return self - } - - self.demandCommand = function demandCommand (min, max, minMsg, maxMsg) { - argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length) - - if (typeof min === 'undefined') min = 1 - - if (typeof max !== 'number') { - minMsg = max - max = Infinity - } - - self.global('_', false) - - options.demandedCommands._ = { - min, - max, - minMsg, - maxMsg - } - - return self - } - - self.getDemandedOptions = () => { - argsert([], 0) - return options.demandedOptions - } - - self.getDemandedCommands = () => { - argsert([], 0) - return options.demandedCommands - } - - self.implies = function (key, value) { - argsert(' [number|string|array]', [key, value], arguments.length) - validation.implies(key, value) - return self - } - - self.conflicts = function (key1, key2) { - argsert(' [string|array]', [key1, key2], arguments.length) - validation.conflicts(key1, key2) - return self - } - - self.usage = function (msg, description, builder, handler) { - argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length) - - if (description !== undefined) { - // .usage() can be used as an alias for defining - // a default command. - if ((msg || '').match(/^\$0( |$)/)) { - return self.command(msg, description, builder, handler) - } else { - throw new YError('.usage() description must start with $0 if being used as alias for .command()') - } - } else { - usage.usage(msg) - return self - } - } - - self.epilogue = self.epilog = function (msg) { - argsert('', [msg], arguments.length) - usage.epilog(msg) - return self - } - - self.fail = function (f) { - argsert('', [f], arguments.length) - usage.failFn(f) - return self - } - - self.check = function (f, _global) { - argsert(' [boolean]', [f, _global], arguments.length) - validation.check(f, _global !== false) - return self - } - - self.global = function global (globals, global) { - argsert(' [boolean]', [globals, global], arguments.length) - globals = [].concat(globals) - if (global !== false) { - options.local = options.local.filter(l => globals.indexOf(l) === -1) - } else { - globals.forEach((g) => { - if (options.local.indexOf(g) === -1) options.local.push(g) - }) - } - return self - } - - self.pkgConf = function pkgConf (key, rootPath) { - argsert(' [string]', [key, rootPath], arguments.length) - let conf = null - // prefer cwd to require-main-filename in this method - // since we're looking for e.g. "nyc" config in nyc consumer - // rather than "yargs" config in nyc (where nyc is the main filename) - const obj = pkgUp(rootPath || cwd) - - // If an object exists in the key, add it to options.configObjects - if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], rootPath || cwd) - options.configObjects = (options.configObjects || []).concat(conf) - } - - return self - } - - const pkgs = {} - function pkgUp (rootPath) { - const npath = rootPath || '*' - if (pkgs[npath]) return pkgs[npath] - const findUp = require('find-up') - - let obj = {} - try { - let startDir = rootPath || require('require-main-filename')(parentRequire || require) - - // When called in an environment that lacks require.main.filename, such as a jest test runner, - // startDir is already process.cwd(), and should not be shortened. - // Whether or not it is _actually_ a directory (e.g., extensionless bin) is irrelevant, find-up handles it. - if (!rootPath && path.extname(startDir)) { - startDir = path.dirname(startDir) - } - - const pkgJsonPath = findUp.sync('package.json', { - cwd: startDir - }) - obj = JSON.parse(fs.readFileSync(pkgJsonPath)) - } catch (noop) {} - - pkgs[npath] = obj || {} - return pkgs[npath] - } - - let parseFn = null - let parseContext = null - self.parse = function parse (args, shortCircuit, _parseFn) { - argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length) - if (typeof args === 'undefined') { - return self._parseArgs(processArgs) - } - - // a context object can optionally be provided, this allows - // additional information to be passed to a command handler. - if (typeof shortCircuit === 'object') { - parseContext = shortCircuit - shortCircuit = _parseFn - } - - // by providing a function as a second argument to - // parse you can capture output that would otherwise - // default to printing to stdout/stderr. - if (typeof shortCircuit === 'function') { - parseFn = shortCircuit - shortCircuit = null - } - // completion short-circuits the parsing process, - // skipping validation, etc. - if (!shortCircuit) processArgs = args - - freeze() - if (parseFn) exitProcess = false - - const parsed = self._parseArgs(args, shortCircuit) - if (parseFn) parseFn(exitError, parsed, output) - unfreeze() - - return parsed - } - - self._getParseContext = () => parseContext || {} - - self._hasParseCallback = () => !!parseFn - - self.option = self.options = function option (key, opt) { - argsert(' [object]', [key, opt], arguments.length) - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.options(k, key[k]) - }) - } else { - if (typeof opt !== 'object') { - opt = {} - } - - options.key[key] = true // track manually set keys. - - if (opt.alias) self.alias(key, opt.alias) - - const demand = opt.demand || opt.required || opt.require - - // deprecated, use 'demandOption' instead - if (demand) { - self.demand(key, demand) - } - - if (opt.demandOption) { - self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined) - } - - if ('conflicts' in opt) { - self.conflicts(key, opt.conflicts) - } - - if ('default' in opt) { - self.default(key, opt.default) - } - - if ('implies' in opt) { - self.implies(key, opt.implies) - } - - if ('nargs' in opt) { - self.nargs(key, opt.nargs) - } - - if (opt.config) { - self.config(key, opt.configParser) - } - - if (opt.normalize) { - self.normalize(key) - } - - if ('choices' in opt) { - self.choices(key, opt.choices) - } - - if ('coerce' in opt) { - self.coerce(key, opt.coerce) - } - - if ('group' in opt) { - self.group(key, opt.group) - } - - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key) - if (opt.alias) self.boolean(opt.alias) - } - - if (opt.array || opt.type === 'array') { - self.array(key) - if (opt.alias) self.array(opt.alias) - } - - if (opt.number || opt.type === 'number') { - self.number(key) - if (opt.alias) self.number(opt.alias) - } - - if (opt.string || opt.type === 'string') { - self.string(key) - if (opt.alias) self.string(opt.alias) - } - - if (opt.count || opt.type === 'count') { - self.count(key) - } - - if (typeof opt.global === 'boolean') { - self.global(key, opt.global) - } - - if (opt.defaultDescription) { - options.defaultDescription[key] = opt.defaultDescription - } - - if (opt.skipValidation) { - self.skipValidation(key) - } - - const desc = opt.describe || opt.description || opt.desc - self.describe(key, desc) - if (opt.hidden) { - self.hide(key) - } - - if (opt.requiresArg) { - self.requiresArg(key) - } - } - - return self - } - self.getOptions = () => options - - self.positional = function (key, opts) { - argsert(' ', [key, opts], arguments.length) - if (context.resets === 0) { - throw new YError(".positional() can only be called in a command's builder function") - } - - // .positional() only supports a subset of the configuration - // options availble to .option(). - const supportedOpts = ['default', 'implies', 'normalize', - 'choices', 'conflicts', 'coerce', 'type', 'describe', - 'desc', 'description', 'alias'] - opts = objFilter(opts, (k, v) => { - let accept = supportedOpts.indexOf(k) !== -1 - // type can be one of string|number|boolean. - if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) accept = false - return accept - }) - - // copy over any settings that can be inferred from the command string. - const fullCommand = context.fullCommands[context.fullCommands.length - 1] - const parseOptions = fullCommand ? command.cmdToParseOptions(fullCommand) : { - array: [], - alias: {}, - default: {}, - demand: {} - } - Object.keys(parseOptions).forEach((pk) => { - if (Array.isArray(parseOptions[pk])) { - if (parseOptions[pk].indexOf(key) !== -1) opts[pk] = true - } else { - if (parseOptions[pk][key] && !(pk in opts)) opts[pk] = parseOptions[pk][key] - } - }) - self.group(key, usage.getPositionalGroupName()) - return self.option(key, opts) - } - - self.group = function group (opts, groupName) { - argsert(' ', [opts, groupName], arguments.length) - const existing = preservedGroups[groupName] || groups[groupName] - if (preservedGroups[groupName]) { - // we now only need to track this group name in groups. - delete preservedGroups[groupName] - } - - const seen = {} - groups[groupName] = (existing || []).concat(opts).filter((key) => { - if (seen[key]) return false - return (seen[key] = true) - }) - return self - } - // combine explicit and preserved groups. explicit groups should be first - self.getGroups = () => Object.assign({}, groups, preservedGroups) - - // as long as options.envPrefix is not undefined, - // parser will apply env vars matching prefix to argv - self.env = function (prefix) { - argsert('[string|boolean]', [prefix], arguments.length) - if (prefix === false) options.envPrefix = undefined - else options.envPrefix = prefix || '' - return self - } - - self.wrap = function (cols) { - argsert('', [cols], arguments.length) - usage.wrap(cols) - return self - } - - let strict = false - self.strict = function (enabled) { - argsert('[boolean]', [enabled], arguments.length) - strict = enabled !== false - return self - } - self.getStrict = () => strict - - 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. - if (command.hasDefaultCommand()) { - context.resets++ // override the restriction on top-level positoinals. - command.runDefaultBuilderOn(self, true) - } - usage.showHelp(level) - return self - } - - let versionOpt = null - self.version = function version (opt, msg, ver) { - const defaultVersionOpt = 'version' - argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length) - - // nuke the key previously configured - // to return version #. - if (versionOpt) { - deleteFromParserHintObject(versionOpt) - usage.version(undefined) - versionOpt = null - } - - if (arguments.length === 0) { - ver = guessVersion() - opt = defaultVersionOpt - } else if (arguments.length === 1) { - if (opt === false) { // disable default 'version' key. - return self - } - ver = opt - opt = defaultVersionOpt - } else if (arguments.length === 2) { - ver = msg - msg = null - } - - versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt - msg = msg || usage.deferY18nLookup('Show version number') - - usage.version(ver || undefined) - self.boolean(versionOpt) - self.describe(versionOpt, msg) - return self - } - - function guessVersion () { - const obj = pkgUp() - - return obj.version || 'unknown' - } - - let helpOpt = null - self.addHelpOpt = self.help = function addHelpOpt (opt, msg) { - const defaultHelpOpt = 'help' - argsert('[string|boolean] [string]', [opt, msg], arguments.length) - - // nuke the key previously configured - // to return help. - if (helpOpt) { - deleteFromParserHintObject(helpOpt) - helpOpt = null - } - - if (arguments.length === 1) { - if (opt === false) return self - } - - // use arguments, fallback to defaults for opt and msg - helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt - self.boolean(helpOpt) - self.describe(helpOpt, msg || usage.deferY18nLookup('Show help')) - return self - } - - const defaultShowHiddenOpt = 'show-hidden' - options.showHiddenOpt = defaultShowHiddenOpt - self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt (opt, msg) { - argsert('[string|boolean] [string]', [opt, msg], arguments.length) - - if (arguments.length === 1) { - if (opt === false) return self - } - - const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt - self.boolean(showHiddenOpt) - self.describe(showHiddenOpt, msg || usage.deferY18nLookup('Show hidden options')) - options.showHiddenOpt = showHiddenOpt - return self - } - - self.hide = function hide (key) { - argsert('', [key], arguments.length) - options.hiddenOptions.push(key) - return self - } - - self.showHelpOnFail = function showHelpOnFail (enabled, message) { - argsert('[boolean|string] [string]', [enabled, message], arguments.length) - usage.showHelpOnFail(enabled, message) - return self - } - - var exitProcess = true - self.exitProcess = function (enabled) { - argsert('[boolean]', [enabled], arguments.length) - if (typeof enabled !== 'boolean') { - enabled = true - } - exitProcess = enabled - return self - } - self.getExitProcess = () => exitProcess - - var completionCommand = null - self.completion = function (cmd, desc, fn) { - argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length) - - // a function to execute when generating - // completions can be provided as the second - // or third argument to completion. - if (typeof desc === 'function') { - fn = desc - desc = null - } - - // register the completion command. - completionCommand = cmd || 'completion' - if (!desc && desc !== false) { - desc = 'generate bash completion script' - } - self.command(completionCommand, desc) - - // a function can be provided - if (fn) completion.registerFunction(fn) - - return self - } - - self.showCompletionScript = function ($0) { - argsert('[string]', [$0], arguments.length) - $0 = $0 || self.$0 - _logger.log(completion.generateCompletionScript($0, completionCommand)) - return self - } - - self.getCompletion = function (args, done) { - argsert(' ', [args, done], arguments.length) - completion.getCompletion(args, done) - } - - self.locale = function (locale) { - argsert('[string]', [locale], arguments.length) - if (arguments.length === 0) { - guessLocale() - return y18n.getLocale() - } - detectLocale = false - y18n.setLocale(locale) - return self - } - - self.updateStrings = self.updateLocale = function (obj) { - argsert('', [obj], arguments.length) - detectLocale = false - y18n.updateLocale(obj) - return self - } - - let detectLocale = true - self.detectLocale = function (detect) { - argsert('', [detect], arguments.length) - detectLocale = detect - return self - } - self.getDetectLocale = () => detectLocale - - var hasOutput = false - var exitError = null - // maybe exit, always capture - // context about why we wanted to exit. - self.exit = (code, err) => { - hasOutput = true - exitError = err - if (exitProcess) process.exit(code) - } - - // we use a custom logger that buffers output, - // so that we can print to non-CLIs, e.g., chat-bots. - const _logger = { - log () { - const args = [] - for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) - if (!self._hasParseCallback()) console.log.apply(console, args) - hasOutput = true - if (output.length) output += '\n' - output += args.join(' ') - }, - error () { - const args = [] - for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) - if (!self._hasParseCallback()) console.error.apply(console, args) - hasOutput = true - if (output.length) output += '\n' - output += args.join(' ') - } - } - self._getLoggerInstance = () => _logger - // has yargs output an error our help - // message in the current execution context. - self._hasOutput = () => hasOutput - - self._setHasOutput = () => { - hasOutput = true - } - - let recommendCommands - self.recommendCommands = function (recommend) { - argsert('[boolean]', [recommend], arguments.length) - recommendCommands = typeof recommend === 'boolean' ? recommend : true - return self - } - - self.getUsageInstance = () => usage - - self.getValidationInstance = () => validation - - self.getCommandInstance = () => command - - self.terminalWidth = () => { - argsert([], 0) - return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null - } - - Object.defineProperty(self, 'argv', { - get: () => self._parseArgs(processArgs), - enumerable: true - }) - - self._parseArgs = function parseArgs (args, shortCircuit, _skipValidation, commandIndex) { - let skipValidation = !!_skipValidation - args = args || processArgs - - options.__ = y18n.__ - options.configuration = pkgUp()['yargs'] || {} - - const parsed = Parser.detailed(args, options) - let argv = parsed.argv - if (parseContext) argv = Object.assign({}, argv, parseContext) - const aliases = parsed.aliases - - argv.$0 = self.$0 - self.parsed = parsed - - try { - guessLocale() // guess locale lazily, so that it can be turned off in chain. - - // while building up the argv object, there - // are two passes through the parser. If completion - // is being performed short-circuit on the first pass. - if (shortCircuit) { - return argv - } - - // if there's a handler associated with a - // command defer processing to it. - if (helpOpt) { - // consider any multi-char helpOpt alias as a valid help command - // unless all helpOpt aliases are single-char - // note that parsed.aliases is a normalized bidirectional map :) - const helpCmds = [helpOpt] - .concat(aliases[helpOpt] || []) - .filter(k => k.length > 1) - // check if help should trigger and strip it from _. - if (~helpCmds.indexOf(argv._[argv._.length - 1])) { - argv._.pop() - argv[helpOpt] = true - } - } - - const handlerKeys = command.getCommands() - const requestCompletions = completion.completionKey in argv - const skipRecommendation = argv[helpOpt] || requestCompletions - const skipDefaultCommand = skipRecommendation && (handlerKeys.length > 1 || handlerKeys[0] !== '$0') - - if (argv._.length) { - if (handlerKeys.length) { - let firstUnknownCommand - for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) { - cmd = String(argv._[i]) - if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { - // commands are executed using a recursive algorithm that executes - // the deepest command first; we keep track of the position in the - // argv._ array that is currently being executed. - return command.runCommand(cmd, self, parsed, i + 1) - } else if (!firstUnknownCommand && cmd !== completionCommand) { - firstUnknownCommand = cmd - break - } - } - - // run the default command, if defined - if (command.hasDefaultCommand() && !skipDefaultCommand) { - return command.runCommand(null, self, parsed) - } - - // recommend a command if recommendCommands() has - // been enabled, and no commands were found to execute - if (recommendCommands && firstUnknownCommand && !skipRecommendation) { - validation.recommendCommands(firstUnknownCommand, handlerKeys) - } - } - - // generate a completion script for adding to ~/.bashrc. - if (completionCommand && ~argv._.indexOf(completionCommand) && !requestCompletions) { - if (exitProcess) setBlocking(true) - self.showCompletionScript() - self.exit(0) - } - } else if (command.hasDefaultCommand() && !skipDefaultCommand) { - return command.runCommand(null, self, parsed) - } - - // we must run completions first, a user might - // want to complete the --help or --version option. - if (requestCompletions) { - if (exitProcess) setBlocking(true) - - // we allow for asynchronous completions, - // e.g., loading in a list of commands from an API. - const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1) - completion.getCompletion(completionArgs, (completions) => { - ;(completions || []).forEach((completion) => { - _logger.log(completion) - }) - - self.exit(0) - }) - return argv - } - - // Handle 'help' and 'version' options - // if we haven't already output help! - if (!hasOutput) { - Object.keys(argv).forEach((key) => { - if (key === helpOpt && argv[key]) { - if (exitProcess) setBlocking(true) - - skipValidation = true - self.showHelp('log') - self.exit(0) - } else if (key === versionOpt && argv[key]) { - if (exitProcess) setBlocking(true) - - skipValidation = true - usage.showVersion() - self.exit(0) - } - }) - } - - // Check if any of the options to skip validation were provided - if (!skipValidation && options.skipValidation.length > 0) { - skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true) - } - - // If the help or version options where used and exitProcess is false, - // or if explicitly skipped, we won't run validations. - if (!skipValidation) { - if (parsed.error) throw new YError(parsed.error.message) - - // if we're executed via bash completion, don't - // bother with validation. - if (!requestCompletions) { - self._runValidation(argv, aliases, {}, parsed.error) - } - } - } catch (err) { - if (err instanceof YError) usage.fail(err.message, err) - else throw err - } - - return argv - } - - self._runValidation = function runValidation (argv, aliases, positionalMap, parseErrors) { - if (parseErrors) throw new YError(parseErrors.message) - validation.nonOptionCount(argv) - validation.requiredArguments(argv) - if (strict) validation.unknownArguments(argv, aliases, positionalMap) - validation.customChecks(argv, aliases) - validation.limitedChoices(argv) - validation.implications(argv) - validation.conflicting(argv) - } - - function guessLocale () { - if (!detectLocale) return - - try { - const osLocale = require('os-locale') - self.locale(osLocale.sync({ spawn: false })) - } catch (err) { - // if we explode looking up locale just noop - // we'll keep using the default language 'en'. - } - } - - // an app should almost always have --version and --help, - // if you *really* want to disable this use .help(false)/.version(false). - self.help() - self.version() - - 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) { - return path.relative(base, dir) -} diff --git a/node_modules/yargs-unparser/package.json b/node_modules/yargs-unparser/package.json index 653434ce..1cd24a13 100644 --- a/node_modules/yargs-unparser/package.json +++ b/node_modules/yargs-unparser/package.json @@ -1,79 +1,7 @@ { - "_args": [ - [ - "yargs-unparser@1.5.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "yargs-unparser@1.5.0", - "_id": "yargs-unparser@1.5.0", - "_inBundle": false, - "_integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", - "_location": "/yargs-unparser", - "_phantomChildren": { - "camelcase": "5.3.1", - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "3.0.0", - "os-locale": "3.1.0", - "require-directory": "2.1.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "4.0.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "yargs-unparser@1.5.0", - "name": "yargs-unparser", - "escapedName": "yargs-unparser", - "rawSpec": "1.5.0", - "saveSpec": null, - "fetchSpec": "1.5.0" - }, - "_requiredBy": [ - "/mocha" - ], - "_resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "_spec": "1.5.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "author": { - "name": "André Cruz", - "email": "andre@moxy.studio" - }, - "bugs": { - "url": "https://github.com/yargs/yargs-unparser/issues" - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" - }, + "name": "yargs-unparser", "description": "Converts back a yargs argv object to its original array form", - "devDependencies": { - "@commitlint/cli": "^7.2.1", - "@commitlint/config-conventional": "^7.1.2", - "eslint": "^5.9.0", - "eslint-config-moxy": "^6.1.1", - "husky": "^1.2.0", - "jest": "^23.6.0", - "lint-staged": "^8.1.0", - "minimist": "^1.2.0", - "standard-version": "^4.4.0", - "yargs-parser": "^11.1.1" - }, - "engines": { - "node": ">=6" - }, - "files": [], - "homepage": "https://github.com/yargs/yargs-unparser", + "version": "2.0.0", "keywords": [ "yargs", "unparse", @@ -81,31 +9,41 @@ "inverse", "argv" ], + "author": "André Cruz ", + "engines": { + "node": ">=10" + }, + "homepage": "https://github.com/yargs/yargs-unparser", + "repository": "yargs/yargs-unparser", "license": "MIT", + "main": "index.js", + "files": [], + "scripts": { + "lint": "eslint .", + "fix": "eslint . --fix", + "test": "jest --env node --coverage", + "prerelease": "npm t && npm run lint", + "precommit": "lint-staged" + }, "lint-staged": { "*.js": [ "eslint --fix", "git add" ] }, - "main": "index.js", - "name": "yargs-unparser", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/yargs/yargs-unparser.git" - }, - "scripts": { - "commitmsg": "commitlint -e $GIT_PARAMS", - "lint": "eslint .", - "precommit": "lint-staged", - "prerelease": "npm t && npm run lint", - "release": "standard-version", - "test": "jest --env node --coverage" - }, - "standard-version": { - "scripts": { - "posttag": "git push --follow-tags origin master && npm publish" - } + "devDependencies": { + "eslint": "^6.1.0", + "eslint-config-moxy": "^7.1.0", + "husky": "^3.0.1", + "jest": "^24.9.0", + "lint-staged": "^9.5.0", + "minimist": "^1.2.5", + "yargs-parser": "^18.1.3" }, - "version": "1.5.0" + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + } } diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md index a502dd13..d7898700 100644 --- a/node_modules/yargs/CHANGELOG.md +++ b/node_modules/yargs/CHANGELOG.md @@ -1,7 +1,44 @@ -# 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) @@ -15,6 +52,13 @@ All notable changes to this project will be documented in this file. See [standa * 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) diff --git a/node_modules/yargs/completion.sh.hbs b/node_modules/yargs/completion.sh.hbs deleted file mode 100644 index 272540b1..00000000 --- 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=() - fi - - return 0 -} -complete -o default -F _yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### diff --git a/node_modules/yargs/completion.zsh.hbs b/node_modules/yargs/completion.zsh.hbs deleted file mode 100644 index 2a819e24..00000000 --- a/node_modules/yargs/completion.zsh.hbs +++ /dev/null @@ -1,17 +0,0 @@ -###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc -# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local reply - local si=$IFS - IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}")) - IFS=$si - _describe 'values' reply -} -compdef _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### \ No newline at end of file diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js index a8de5b04..e5cdd588 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 @@ -92,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, zshShell ? '../completion.zsh.hbs' : '../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/locales/de.json b/node_modules/yargs/locales/de.json index d805710b..05d98373 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 fc65c2a0..b32a63f2 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 481f47e3..cf9c74bf 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 f9eb3756..9ee900d3 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 1d144724..5d62e0fc 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/ansi-regex/index.js b/node_modules/yargs/node_modules/ansi-regex/index.js index c2544800..9e37ec3d 100644 --- a/node_modules/yargs/node_modules/ansi-regex/index.js +++ b/node_modules/yargs/node_modules/ansi-regex/index.js @@ -6,7 +6,7 @@ module.exports = options => { }, options); const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' ].join('|'); diff --git a/node_modules/yargs/node_modules/ansi-regex/package.json b/node_modules/yargs/node_modules/ansi-regex/package.json index 5c978c23..66a43e1f 100644 --- a/node_modules/yargs/node_modules/ansi-regex/package.json +++ b/node_modules/yargs/node_modules/ansi-regex/package.json @@ -1,89 +1,53 @@ { - "_args": [ - [ - "ansi-regex@4.1.0", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "ansi-regex@4.1.0", - "_id": "ansi-regex@4.1.0", - "_inBundle": false, - "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "_location": "/yargs/ansi-regex", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ansi-regex@4.1.0", - "name": "ansi-regex", - "escapedName": "ansi-regex", - "rawSpec": "4.1.0", - "saveSpec": null, - "fetchSpec": "4.1.0" - }, - "_requiredBy": [ - "/yargs/strip-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "_spec": "4.1.0", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "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.25.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "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": "4.1.0" + "name": "ansi-regex", + "version": "4.1.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js" + ], + "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" + ], + "devDependencies": { + "ava": "^0.25.0", + "xo": "^0.23.0" + } } diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json index d4dbae99..283d1f9b 100644 --- a/node_modules/yargs/package.json +++ b/node_modules/yargs/package.json @@ -1,89 +1,67 @@ { - "_args": [ - [ - "yargs@13.2.2", - "/Users/nickmerwin/www/coveralls-github-action" - ] - ], - "_development": true, - "_from": "yargs@13.2.2", - "_id": "yargs@13.2.2", - "_inBundle": false, - "_integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", - "_location": "/yargs", - "_phantomChildren": { - "emoji-regex": "7.0.3", - "is-fullwidth-code-point": "2.0.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "yargs@13.2.2", - "name": "yargs", - "escapedName": "yargs", - "rawSpec": "13.2.2", - "saveSpec": null, - "fetchSpec": "13.2.2" - }, - "_requiredBy": [ - "/mocha", - "/nyc" - ], - "_resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "_spec": "13.2.2", - "_where": "/Users/nickmerwin/www/coveralls-github-action", - "bugs": { - "url": "https://github.com/yargs/yargs/issues" - }, + "name": "yargs", + "version": "13.3.2", + "description": "yargs the modern, pirate-themed, successor to optimist.", + "main": "./index.js", "contributors": [ { "name": "Yargs Contributors", "url": "https://github.com/yargs/yargs/graphs/contributors" } ], + "files": [ + "index.js", + "yargs.js", + "lib", + "locales", + "completion.sh.hbs", + "completion.zsh.hbs", + "LICENSE" + ], "dependencies": { - "cliui": "^4.0.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", "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.0.0" + "yargs-parser": "^13.1.2" }, - "description": "yargs the modern, pirate-themed, successor to optimist.", "devDependencies": { "chai": "^4.2.0", "chalk": "^2.4.2", - "coveralls": "^3.0.2", + "coveralls": "^3.0.3", "cpr": "^3.0.1", "cross-spawn": "^6.0.4", "es6-promise": "^4.2.5", "hashish": "0.0.4", "mocha": "^5.2.0", - "nyc": "^13.2.0", + "nyc": "^14.1.0", "rimraf": "^2.6.3", "standard": "^12.0.1", - "standard-version": "^5.0.0", + "standard-version": "^6.0.1", "which": "^1.3.1", "yargs-test-extends": "^1.0.1" }, - "engine": { - "node": ">=6" + "scripts": { + "pretest": "standard", + "test": "nyc --cache mocha --require ./test/before.js --timeout=12000 --check-leaks", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs.git" }, - "files": [ - "index.js", - "yargs.js", - "lib", - "locales", - "completion.sh.hbs", - "completion.zsh.hbs", - "LICENSE" - ], "homepage": "https://yargs.js.org/", + "standard": { + "ignore": [ + "**/example/**" + ] + }, "keywords": [ "argument", "args", @@ -94,22 +72,7 @@ "command" ], "license": "MIT", - "main": "./index.js", - "name": "yargs", - "repository": { - "type": "git", - "url": "git+https://github.com/yargs/yargs.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "release": "standard-version", - "test": "nyc --cache mocha --require ./test/before.js --timeout=12000 --check-leaks" - }, - "standard": { - "ignore": [ - "**/example/**" - ] - }, - "version": "13.2.2" + "engine": { + "node": ">=6" + } } diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js index ea1f15fa..81d21936 100644 --- a/node_modules/yargs/yargs.js +++ b/node_modules/yargs/yargs.js @@ -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) => { @@ -1181,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 9a93cf00..50a75397 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,3163 @@ { "name": "coveralls-action", - "version": "1.1.1", - "lockfileVersion": 1, + "version": "1.1.3", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "coveralls-action", + "version": "1.1.3", + "license": "MIT", + "dependencies": { + "@actions/core": "^1.2.6", + "@actions/exec": "^1.0.4", + "coveralls": "^3.1.1", + "request": "^2.88.0" + }, + "devDependencies": { + "@types/chai": "^4.1.7", + "@types/dedent": "^0.7.0", + "@types/mocha": "^5.2.7", + "@types/node": "^13.9.2", + "@types/request": "^2.48.4", + "chai": "^4.2.0", + "dedent": "^0.7.0", + "mocha": "^10.2.0", + "nyc": "^14.1.1", + "sinon": "^7.4.1", + "source-map-support": "^0.5.13", + "ts-node": "^8.3.0", + "typescript": "^3.5.3" + } + }, + "node_modules/@actions/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/core/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@actions/exec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", + "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@actions/io": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", + "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" + }, + "node_modules/@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.0.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", + "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.5.5", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "node_modules/@babel/generator/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/types": "^7.4.4" + } + }, + "node_modules/@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "dependencies": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@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, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "node_modules/@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, + "dependencies": { + "@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" + } + }, + "node_modules/@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, + "dependencies": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", + "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/formatio": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz", + "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.2.tgz", + "integrity": "sha512-ILO/rR8LfAb60Y1Yfp9vxfYAASK43NFC2mLzpvLUbCQY/Qu8YwReboseu8aheCEkyElZF2L2T9mHcR2bgdvZyA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.0.2", + "array-from": "^2.1.1", + "lodash": "^4.17.11" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "node_modules/@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", + "dev": true + }, + "node_modules/@types/chai": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.7.tgz", + "integrity": "sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA==", + "dev": true + }, + "node_modules/@types/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@types/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-EGlKlgMhnLt/cM4DbUSafFdrkeJoC9Mvnj0PUCU7tFmTjMjNRT957kXCx0wYm3JuEq4o4ZsS5vG+NlkM2DMd2A==", + "dev": true + }, + "node_modules/@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "13.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.2.tgz", + "integrity": "sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg==", + "dev": true + }, + "node_modules/@types/request": { + "version": "2.48.4", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.4.tgz", + "integrity": "sha512-W1t1MTKYR8PxICH+A4HgEIPuAC3sbljoEVfyZbeFJJDbr30guDspJri2XOaM2E+Un7ZjrihaDi7cf6fPa2tbgw==", + "dev": true, + "dependencies": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "node_modules/@types/request/node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/@types/tough-cookie": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.6.tgz", + "integrity": "sha512-wHNBMnkoEBiRAd3s8KTKwIuO9biFtTf0LehITzBhSco+HQI0xkXZbLOD55SW3Aqw3oUkHstkm5SPv58yaAdFPQ==", + "dev": true + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "dependencies": { + "default-require-extensions": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "node_modules/arg": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", + "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "node_modules/caching-transform": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", + "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "dev": true, + "dependencies": { + "hasha": "^3.0.0", + "make-dir": "^2.0.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.4.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "node_modules/chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true, + "optional": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/convert-source-map/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "node_modules/coveralls": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", + "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", + "dependencies": { + "js-yaml": "^3.13.1", + "lcov-parse": "^1.0.0", + "log-driver": "^1.2.7", + "minimist": "^1.2.5", + "request": "^2.88.2" + }, + "bin": { + "coveralls": "bin/coveralls.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cp-file": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", + "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "make-dir": "^2.0.0", + "nested-error-stacks": "^2.0.0", + "pify": "^4.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "dependencies": { + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/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==" + }, + "node_modules/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=" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "dependencies": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "node_modules/foreground-child/node_modules/cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "engines": { + "node": "*" + } + }, + "node_modules/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==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.1.tgz", + "integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw==", + "dev": true + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "engines": { + "node": ">=4" + } + }, + "node_modules/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==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "dependencies": { + "is-stream": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "node_modules/istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "dev": true, + "dependencies": { + "append-transform": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "dependencies": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/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, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/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, + "dependencies": { + "handlebars": "^4.1.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/just-extend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", + "dev": true + }, + "node_modules/lcov-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", + "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", + "bin": { + "lcov-parse": "bin/cli.js" + } + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "node_modules/log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "engines": { + "node": ">=0.8.6" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/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, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/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 + }, + "node_modules/log-symbols/node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lolex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "node_modules/merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/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==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "dependencies": { + "mime-db": "1.40.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/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, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/mocha/node_modules/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 + }, + "node_modules/mocha/node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/mocha/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/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, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "node_modules/nested-error-stacks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", + "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", + "dev": true + }, + "node_modules/nise": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.1.tgz", + "integrity": "sha512-edFWm0fsFG2n318rfEnKlTZTkjlbVOFF9XIA+fj+Ed+Qz1laYW2lobwavWoMzGrYDHH1EpiNJgDfvGnkZztR/g==", + "dev": true, + "dependencies": { + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^4.1.0", + "path-to-regexp": "^1.7.0" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nyc": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", + "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "caching-transform": "^3.0.2", + "convert-source-map": "^1.6.0", + "cp-file": "^6.2.0", + "find-cache-dir": "^2.1.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "make-dir": "^2.1.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.2.3", + "uuid": "^3.3.2", + "yargs": "^13.2.2", + "yargs-parser": "^13.0.0" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-type/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/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, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "node_modules/sinon": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.4.1.tgz", + "integrity": "sha512-7s9buHGHN/jqoy/v4bJgmt0m1XEkCEd/tqdHXumpBp0JSujaT4Ng84JU5wDdK4E85ZMq78NuDe0I3NAqXY8TFg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.2", + "diff": "^3.5.0", + "lolex": "^4.2.0", + "nise": "^1.5.1", + "supports-color": "^5.5.0" + } + }, + "node_modules/sinon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spawn-wrap": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", + "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", + "dev": true, + "dependencies": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/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==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-color/node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "dependencies": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ts-node": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", + "integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==", + "dev": true, + "dependencies": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "^3.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + }, + "peerDependencies": { + "typescript": ">=2.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", + "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uglify-js": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "dev": true, + "optional": true, + "dependencies": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/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==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "node_modules/y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, "dependencies": { "@actions/core": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", - "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "requires": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } }, "@actions/exec": { "version": "1.0.4", @@ -17,6 +3167,14 @@ "@actions/io": "^1.0.1" } }, + "@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "requires": { + "tunnel": "^0.0.6" + } + }, "@actions/io": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", @@ -124,17 +3282,6 @@ "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" - } - } } }, "@babel/types": { @@ -246,26 +3393,26 @@ "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==", "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" } }, "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -277,6 +3424,16 @@ "color-convert": "^1.9.0" } }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "append-transform": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", @@ -360,6 +3517,12 @@ "tweetnacl": "^0.14.3" } }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -370,6 +3533,15 @@ "concat-map": "0.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" + } + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -447,22 +3619,60 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" } }, - "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 + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } }, "color-convert": { "version": "1.9.3", @@ -529,15 +3739,15 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "coveralls": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.13.tgz", - "integrity": "sha512-Bch6FJI4ebK6Mwr+DjFCJbb/RayNwn5pscSDE4Ux6cgjNkAcjdgGZBRfQnuYTt5tY81MqGK8m2r+xc5FDF513A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", + "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", "requires": { "js-yaml": "^3.13.1", "lcov-parse": "^1.0.0", "log-driver": "^1.2.7", "minimist": "^1.2.5", - "request": "^2.88.0" + "request": "^2.88.2" } }, "cp-file": { @@ -553,19 +3763,6 @@ "safe-buffer": "^5.0.1" } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -575,12 +3772,20 @@ } }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "dependencies": { + "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 + } } }, "decamelize": { @@ -613,15 +3818,6 @@ "strip-bom": "^3.0.0" } }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -648,15 +3844,6 @@ "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==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -666,37 +3853,18 @@ "is-arrayish": "^0.2.1" } }, - "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -714,21 +3882,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -740,15 +3893,24 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "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==" }, "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=" }, + "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" + } + }, "find-cache-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", @@ -770,13 +3932,10 @@ } }, "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true }, "foreground-child": { "version": "1.5.6", @@ -821,11 +3980,12 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true }, "get-caller-file": { "version": "2.0.5", @@ -839,15 +3999,6 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -857,9 +4008,9 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -870,6 +4021,15 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -882,12 +4042,6 @@ "integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw==", "dev": true }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -915,27 +4069,12 @@ "har-schema": "^2.0.0" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, "hasha": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", @@ -989,34 +4128,25 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "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-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", - "dev": true - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { @@ -1025,35 +4155,44 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { - "has": "^1.0.1" + "is-extglob": "^2.1.1" } }, + "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 + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -1142,17 +4281,6 @@ "make-dir": "^2.1.0", "rimraf": "^2.6.3", "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } } }, "istanbul-reports": { @@ -1197,9 +4325,9 @@ "dev": true }, "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "json-schema-traverse": { "version": "0.4.1", @@ -1212,13 +4340,13 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" } }, @@ -1228,15 +4356,6 @@ "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", "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" - } - }, "lcov-parse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", @@ -1290,12 +4409,64 @@ "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" }, "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "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" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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 + }, + "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 + }, + "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" + } + } } }, "lolex": { @@ -1330,26 +4501,6 @@ "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", "dev": true }, - "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" - } - }, - "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-source-map": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", @@ -1372,78 +4523,231 @@ "mime-db": "1.40.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", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", "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" } }, "mocha": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", - "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "requires": { - "ansi-colors": "3.2.3", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "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" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.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": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "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 + } } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, "neo-async": { @@ -1458,12 +4762,6 @@ "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", "dev": true }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "nise": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.1.tgz", @@ -1477,16 +4775,6 @@ "path-to-regexp": "^1.7.0" } }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -1499,19 +4787,10 @@ "validate-npm-package-license": "^3.0.1" } }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "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=", + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "nyc": { @@ -1552,34 +4831,6 @@ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1595,35 +4846,6 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, - "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-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "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", @@ -1682,16 +4904,10 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-to-regexp": { @@ -1721,9 +4937,9 @@ } }, "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "performance-now": { @@ -1731,6 +4947,12 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -1753,19 +4975,9 @@ "dev": true }, "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==" - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "punycode": { "version": "2.1.1", @@ -1773,9 +4985,18 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } }, "read-pkg": { "version": "3.0.0", @@ -1798,6 +5019,15 @@ "read-pkg": "^3.0.0" } }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", @@ -1808,9 +5038,9 @@ } }, "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==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -1819,7 +5049,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", @@ -1829,7 +5059,7 @@ "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" } @@ -1886,25 +5116,19 @@ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "randombytes": "^2.1.0" } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "signal-exit": { @@ -2023,22 +5247,37 @@ } }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + } } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.1" } }, "strip-bom": { @@ -2047,25 +5286,27 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" + }, + "dependencies": { + "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 + } } }, "test-exclude": { @@ -2086,20 +5327,22 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, + "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": { + "is-number": "^7.0.0" + } + }, "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==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - } + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "trim-right": { @@ -2129,6 +5372,11 @@ } } }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2213,64 +5461,53 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "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" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "dependencies": { "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "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=", + "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": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^4.1.0" } } } @@ -2305,28 +5542,27 @@ "dev": true }, "yargs": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", + "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", + "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", "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.0.0" + "yargs-parser": "^13.1.2" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "string-width": { @@ -2352,9 +5588,9 @@ } }, "yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", + "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", @@ -2362,57 +5598,28 @@ } }, "yargs-unparser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" }, "dependencies": { - "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==", + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -2421,6 +5628,12 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 3bf78895..7c70c0ce 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@types/request": "^2.48.4", "chai": "^4.2.0", "dedent": "^0.7.0", - "mocha": "^6.2.0", + "mocha": "^10.2.0", "nyc": "^14.1.1", "sinon": "^7.4.1", "source-map-support": "^0.5.13", diff --git a/src/run.spec.ts b/src/run.spec.ts index bb4d4136..1a291708 100644 --- a/src/run.spec.ts +++ b/src/run.spec.ts @@ -65,6 +65,7 @@ describe('Run', () => { setup(); getInput.withArgs('parallel-finished').returns(1); + getInput.withArgs('carryforward').returns('job1,job2'); getInput.withArgs('coveralls-endpoint').returns('https://coveralls.io'); sandbox.stub(request, 'post'); diff --git a/src/run.ts b/src/run.ts index 2821806a..0ceae2d7 100644 --- a/src/run.ts +++ b/src/run.ts @@ -58,9 +58,15 @@ export async function run() { const runId = process.env.GITHUB_RUN_ID; process.env.COVERALLS_SERVICE_JOB_ID = runId; + const carryforward = core.getInput('carryforward'); + if (carryforward != '') { + process.env.COVERALLS_CARRYFORWARD_FLAGS = carryforward + } + if(core.getInput('parallel-finished') != '') { const payload = { "repo_token": githubToken, + "carryforward": process.env.COVERALLS_CARRYFORWARD_FLAGS, "repo_name": process.env.GITHUB_REPOSITORY, "payload": { "build_num": runId, "status": "done" } };