Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
commit
28ccc3db2d
13974 changed files with 2618436 additions and 0 deletions
21
node_modules/jest-config/LICENSE
generated
vendored
Normal file
21
node_modules/jest-config/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
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.
|
||||
10
node_modules/jest-config/build/Defaults.d.ts
generated
vendored
Normal file
10
node_modules/jest-config/build/Defaults.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
declare const defaultOptions: Config.DefaultOptions;
|
||||
export default defaultOptions;
|
||||
//# sourceMappingURL=Defaults.d.ts.map
|
||||
1
node_modules/jest-config/build/Defaults.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/Defaults.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../src/Defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOxC,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,cAyD5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
||||
94
node_modules/jest-config/build/Defaults.js
generated
vendored
Normal file
94
node_modules/jest-config/build/Defaults.js
generated
vendored
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestRegexUtil() {
|
||||
const data = require('jest-regex-util');
|
||||
|
||||
_jestRegexUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _constants = require('./constants');
|
||||
|
||||
var _getCacheDirectory = _interopRequireDefault(require('./getCacheDirectory'));
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const NODE_MODULES_REGEXP = (0, _jestRegexUtil().replacePathSepForRegex)(
|
||||
_constants.NODE_MODULES
|
||||
);
|
||||
const defaultOptions = {
|
||||
automock: false,
|
||||
bail: 0,
|
||||
browser: false,
|
||||
cache: true,
|
||||
cacheDirectory: (0, _getCacheDirectory.default)(),
|
||||
changedFilesWithAncestor: false,
|
||||
clearMocks: false,
|
||||
collectCoverage: false,
|
||||
coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
|
||||
coverageProvider: 'babel',
|
||||
coverageReporters: ['json', 'text', 'lcov', 'clover'],
|
||||
errorOnDeprecated: false,
|
||||
expand: false,
|
||||
forceCoverageMatch: [],
|
||||
globals: {},
|
||||
haste: {
|
||||
computeSha1: false,
|
||||
providesModuleNodeModules: [],
|
||||
throwOnModuleCollision: false
|
||||
},
|
||||
maxConcurrency: 5,
|
||||
maxWorkers: '50%',
|
||||
moduleDirectories: ['node_modules'],
|
||||
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
|
||||
moduleNameMapper: {},
|
||||
modulePathIgnorePatterns: [],
|
||||
noStackTrace: false,
|
||||
notify: false,
|
||||
notifyMode: 'failure-change',
|
||||
prettierPath: 'prettier',
|
||||
resetMocks: false,
|
||||
resetModules: false,
|
||||
restoreMocks: false,
|
||||
roots: ['<rootDir>'],
|
||||
runTestsByPath: false,
|
||||
runner: 'jest-runner',
|
||||
setupFiles: [],
|
||||
setupFilesAfterEnv: [],
|
||||
skipFilter: false,
|
||||
snapshotSerializers: [],
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
testEnvironmentOptions: {},
|
||||
testFailureExitCode: 1,
|
||||
testLocationInResults: false,
|
||||
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
|
||||
testPathIgnorePatterns: [NODE_MODULES_REGEXP],
|
||||
testRegex: [],
|
||||
testRunner: 'jasmine2',
|
||||
testSequencer: '@jest/test-sequencer',
|
||||
testURL: 'http://localhost',
|
||||
timers: 'real',
|
||||
transformIgnorePatterns: [NODE_MODULES_REGEXP],
|
||||
useStderr: false,
|
||||
watch: false,
|
||||
watchPathIgnorePatterns: [],
|
||||
watchman: true
|
||||
};
|
||||
var _default = defaultOptions;
|
||||
exports.default = _default;
|
||||
9
node_modules/jest-config/build/Deprecated.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/Deprecated.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const _default: Record<string, Function>;
|
||||
export default _default;
|
||||
//# sourceMappingURL=Deprecated.d.ts.map
|
||||
1
node_modules/jest-config/build/Deprecated.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/Deprecated.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"Deprecated.d.ts","sourceRoot":"","sources":["../src/Deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,wBAgE8B"}
|
||||
98
node_modules/jest-config/build/Deprecated.js
generated
vendored
Normal file
98
node_modules/jest-config/build/Deprecated.js
generated
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _prettyFormat() {
|
||||
const data = _interopRequireDefault(require('pretty-format'));
|
||||
|
||||
_prettyFormat = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const format = value =>
|
||||
(0, _prettyFormat().default)(value, {
|
||||
min: true
|
||||
});
|
||||
|
||||
var _default = {
|
||||
mapCoverage: () => ` Option ${_chalk().default.bold(
|
||||
'"mapCoverage"'
|
||||
)} has been removed, as it's no longer necessary.
|
||||
|
||||
Please update your configuration.`,
|
||||
preprocessorIgnorePatterns: options => ` Option ${_chalk().default.bold(
|
||||
'"preprocessorIgnorePatterns"'
|
||||
)} was replaced by ${_chalk().default.bold(
|
||||
'"transformIgnorePatterns"'
|
||||
)}, which support multiple preprocessors.
|
||||
|
||||
Jest now treats your current configuration as:
|
||||
{
|
||||
${_chalk().default.bold(
|
||||
'"transformIgnorePatterns"'
|
||||
)}: ${_chalk().default.bold(format(options.preprocessorIgnorePatterns))}
|
||||
}
|
||||
|
||||
Please update your configuration.`,
|
||||
scriptPreprocessor: options => ` Option ${_chalk().default.bold(
|
||||
'"scriptPreprocessor"'
|
||||
)} was replaced by ${_chalk().default.bold(
|
||||
'"transform"'
|
||||
)}, which support multiple preprocessors.
|
||||
|
||||
Jest now treats your current configuration as:
|
||||
{
|
||||
${_chalk().default.bold('"transform"')}: ${_chalk().default.bold(
|
||||
`{".*": ${format(options.scriptPreprocessor)}}`
|
||||
)}
|
||||
}
|
||||
|
||||
Please update your configuration.`,
|
||||
setupTestFrameworkScriptFile: _options => ` Option ${_chalk().default.bold(
|
||||
'"setupTestFrameworkScriptFile"'
|
||||
)} was replaced by configuration ${_chalk().default.bold(
|
||||
'"setupFilesAfterEnv"'
|
||||
)}, which supports multiple paths.
|
||||
|
||||
Please update your configuration.`,
|
||||
testPathDirs: options => ` Option ${_chalk().default.bold(
|
||||
'"testPathDirs"'
|
||||
)} was replaced by ${_chalk().default.bold('"roots"')}.
|
||||
|
||||
Jest now treats your current configuration as:
|
||||
{
|
||||
${_chalk().default.bold('"roots"')}: ${_chalk().default.bold(
|
||||
format(options.testPathDirs)
|
||||
)}
|
||||
}
|
||||
|
||||
Please update your configuration.
|
||||
`
|
||||
};
|
||||
exports.default = _default;
|
||||
12
node_modules/jest-config/build/Descriptions.d.ts
generated
vendored
Normal file
12
node_modules/jest-config/build/Descriptions.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
declare const descriptions: {
|
||||
[key in keyof Config.InitialOptions]: string;
|
||||
};
|
||||
export default descriptions;
|
||||
//# sourceMappingURL=Descriptions.d.ts.map
|
||||
1
node_modules/jest-config/build/Descriptions.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/Descriptions.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"Descriptions.d.ts","sourceRoot":"","sources":["../src/Descriptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,YAAY,EAAE;KAAE,GAAG,IAAI,MAAM,MAAM,CAAC,cAAc,GAAG,MAAM;CAsFhE,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
||||
102
node_modules/jest-config/build/Descriptions.js
generated
vendored
Normal file
102
node_modules/jest-config/build/Descriptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const descriptions = {
|
||||
automock: 'All imported modules in your tests should be mocked automatically',
|
||||
bail: 'Stop running tests after `n` failures',
|
||||
browser: 'Respect "browser" field in package.json when resolving modules',
|
||||
cacheDirectory:
|
||||
'The directory where Jest should store its cached dependency information',
|
||||
clearMocks: 'Automatically clear mock calls and instances between every test',
|
||||
collectCoverage:
|
||||
'Indicates whether the coverage information should be collected while executing the test',
|
||||
collectCoverageFrom:
|
||||
'An array of glob patterns indicating a set of files for which coverage information should be collected',
|
||||
coverageDirectory:
|
||||
'The directory where Jest should output its coverage files',
|
||||
coveragePathIgnorePatterns:
|
||||
'An array of regexp pattern strings used to skip coverage collection',
|
||||
coverageReporters:
|
||||
'A list of reporter names that Jest uses when writing coverage reports',
|
||||
coverageThreshold:
|
||||
'An object that configures minimum threshold enforcement for coverage results',
|
||||
dependencyExtractor: 'A path to a custom dependency extractor',
|
||||
errorOnDeprecated:
|
||||
'Make calling deprecated APIs throw helpful error messages',
|
||||
forceCoverageMatch:
|
||||
'Force coverage collection from ignored files using an array of glob patterns',
|
||||
globalSetup:
|
||||
'A path to a module which exports an async function that is triggered once before all test suites',
|
||||
globalTeardown:
|
||||
'A path to a module which exports an async function that is triggered once after all test suites',
|
||||
globals:
|
||||
'A set of global variables that need to be available in all test environments',
|
||||
maxWorkers:
|
||||
'The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.',
|
||||
moduleDirectories:
|
||||
"An array of directory names to be searched recursively up from the requiring module's location",
|
||||
moduleFileExtensions: 'An array of file extensions your modules use',
|
||||
moduleNameMapper:
|
||||
'A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module',
|
||||
modulePathIgnorePatterns:
|
||||
"An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader",
|
||||
notify: 'Activates notifications for test results',
|
||||
notifyMode:
|
||||
'An enum that specifies notification mode. Requires { notify: true }',
|
||||
preset: "A preset that is used as a base for Jest's configuration",
|
||||
projects: 'Run tests from one or more projects',
|
||||
reporters: 'Use this configuration option to add custom reporters to Jest',
|
||||
resetMocks: 'Automatically reset mock state between every test',
|
||||
resetModules: 'Reset the module registry before running each individual test',
|
||||
resolver: 'A path to a custom resolver',
|
||||
restoreMocks: 'Automatically restore mock state between every test',
|
||||
rootDir:
|
||||
'The root directory that Jest should scan for tests and modules within',
|
||||
roots:
|
||||
'A list of paths to directories that Jest should use to search for files in',
|
||||
runner:
|
||||
"Allows you to use a custom runner instead of Jest's default test runner",
|
||||
setupFiles:
|
||||
'The paths to modules that run some code to configure or set up the testing environment before each test',
|
||||
setupFilesAfterEnv:
|
||||
'A list of paths to modules that run some code to configure or set up the testing framework before each test',
|
||||
snapshotSerializers:
|
||||
'A list of paths to snapshot serializer modules Jest should use for snapshot testing',
|
||||
testEnvironment: 'The test environment that will be used for testing',
|
||||
testEnvironmentOptions: 'Options that will be passed to the testEnvironment',
|
||||
testLocationInResults: 'Adds a location field to test results',
|
||||
testMatch: 'The glob patterns Jest uses to detect test files',
|
||||
testPathIgnorePatterns:
|
||||
'An array of regexp pattern strings that are matched against all test paths, matched tests are skipped',
|
||||
testRegex:
|
||||
'The regexp pattern or array of patterns that Jest uses to detect test files',
|
||||
testResultsProcessor:
|
||||
'This option allows the use of a custom results processor',
|
||||
testRunner: 'This option allows use of a custom test runner',
|
||||
testURL:
|
||||
'This option sets the URL for the jsdom environment. It is reflected in properties such as location.href',
|
||||
timers:
|
||||
'Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"',
|
||||
transform: 'A map from regular expressions to paths to transformers',
|
||||
transformIgnorePatterns:
|
||||
'An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation',
|
||||
unmockedModulePathPatterns:
|
||||
'An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them',
|
||||
verbose:
|
||||
'Indicates whether each individual test should be reported during the run',
|
||||
watchPathIgnorePatterns:
|
||||
'An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode',
|
||||
watchman: 'Whether to use watchman for file crawling'
|
||||
};
|
||||
var _default = descriptions;
|
||||
exports.default = _default;
|
||||
20
node_modules/jest-config/build/ReporterValidationErrors.d.ts
generated
vendored
Normal file
20
node_modules/jest-config/build/ReporterValidationErrors.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
import { ValidationError } from 'jest-validate';
|
||||
/**
|
||||
* Reporter Validation Error is thrown if the given arguments
|
||||
* within the reporter are not valid.
|
||||
*
|
||||
* This is a highly specific reporter error and in the future will be
|
||||
* merged with jest-validate. Till then, we can make use of it. It works
|
||||
* and that's what counts most at this time.
|
||||
*/
|
||||
export declare function createReporterError(reporterIndex: number, reporterValue: Array<Config.ReporterConfig> | string): ValidationError;
|
||||
export declare function createArrayReporterError(arrayReporter: Config.ReporterConfig, reporterIndex: number, valueIndex: number, value: string | Record<string, any>, expectedType: string, valueName: string): ValidationError;
|
||||
export declare function validateReporters(reporterConfig: Array<Config.ReporterConfig | string>): boolean;
|
||||
//# sourceMappingURL=ReporterValidationErrors.d.ts.map
|
||||
1
node_modules/jest-config/build/ReporterValidationErrors.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/ReporterValidationErrors.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ReporterValidationErrors.d.ts","sourceRoot":"","sources":["../src/ReporterValidationErrors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAQ9C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,GACnD,eAAe,CAQjB;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,CAAC,cAAc,EACpC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,eAAe,CAcjB;AAED,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,GACpD,OAAO,CAUT"}
|
||||
138
node_modules/jest-config/build/ReporterValidationErrors.js
generated
vendored
Normal file
138
node_modules/jest-config/build/ReporterValidationErrors.js
generated
vendored
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.createReporterError = createReporterError;
|
||||
exports.createArrayReporterError = createArrayReporterError;
|
||||
exports.validateReporters = validateReporters;
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestGetType() {
|
||||
const data = _interopRequireDefault(require('jest-get-type'));
|
||||
|
||||
_jestGetType = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _utils = require('./utils');
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const validReporterTypes = ['array', 'string'];
|
||||
const ERROR = `${_utils.BULLET}Reporter Validation Error`;
|
||||
/**
|
||||
* Reporter Validation Error is thrown if the given arguments
|
||||
* within the reporter are not valid.
|
||||
*
|
||||
* This is a highly specific reporter error and in the future will be
|
||||
* merged with jest-validate. Till then, we can make use of it. It works
|
||||
* and that's what counts most at this time.
|
||||
*/
|
||||
|
||||
function createReporterError(reporterIndex, reporterValue) {
|
||||
const errorMessage =
|
||||
` Reporter at index ${reporterIndex} must be of type:\n` +
|
||||
` ${_chalk().default.bold.green(validReporterTypes.join(' or '))}\n` +
|
||||
` but instead received:\n` +
|
||||
` ${_chalk().default.bold.red(
|
||||
(0, _jestGetType().default)(reporterValue)
|
||||
)}`;
|
||||
return new (_jestValidate().ValidationError)(
|
||||
ERROR,
|
||||
errorMessage,
|
||||
_utils.DOCUMENTATION_NOTE
|
||||
);
|
||||
}
|
||||
|
||||
function createArrayReporterError(
|
||||
arrayReporter,
|
||||
reporterIndex,
|
||||
valueIndex,
|
||||
value,
|
||||
expectedType,
|
||||
valueName
|
||||
) {
|
||||
const errorMessage =
|
||||
` Unexpected value for ${valueName} ` +
|
||||
`at index ${valueIndex} of reporter at index ${reporterIndex}\n` +
|
||||
' Expected:\n' +
|
||||
` ${_chalk().default.bold.red(expectedType)}\n` +
|
||||
' Got:\n' +
|
||||
` ${_chalk().default.bold.green((0, _jestGetType().default)(value))}\n` +
|
||||
` Reporter configuration:\n` +
|
||||
` ${_chalk().default.bold.green(
|
||||
JSON.stringify(arrayReporter, null, 2).split('\n').join('\n ')
|
||||
)}`;
|
||||
return new (_jestValidate().ValidationError)(
|
||||
ERROR,
|
||||
errorMessage,
|
||||
_utils.DOCUMENTATION_NOTE
|
||||
);
|
||||
}
|
||||
|
||||
function validateReporters(reporterConfig) {
|
||||
return reporterConfig.every((reporter, index) => {
|
||||
if (Array.isArray(reporter)) {
|
||||
validateArrayReporter(reporter, index);
|
||||
} else if (typeof reporter !== 'string') {
|
||||
throw createReporterError(index, reporter);
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
function validateArrayReporter(arrayReporter, reporterIndex) {
|
||||
const [path, options] = arrayReporter;
|
||||
|
||||
if (typeof path !== 'string') {
|
||||
throw createArrayReporterError(
|
||||
arrayReporter,
|
||||
reporterIndex,
|
||||
0,
|
||||
path,
|
||||
'string',
|
||||
'Path'
|
||||
);
|
||||
} else if (typeof options !== 'object') {
|
||||
throw createArrayReporterError(
|
||||
arrayReporter,
|
||||
reporterIndex,
|
||||
1,
|
||||
options,
|
||||
'object',
|
||||
'Reporter Configuration'
|
||||
);
|
||||
}
|
||||
}
|
||||
10
node_modules/jest-config/build/ValidConfig.d.ts
generated
vendored
Normal file
10
node_modules/jest-config/build/ValidConfig.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
declare const initialOptions: Config.InitialOptions;
|
||||
export default initialOptions;
|
||||
//# sourceMappingURL=ValidConfig.d.ts.map
|
||||
1
node_modules/jest-config/build/ValidConfig.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/ValidConfig.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ValidConfig.d.ts","sourceRoot":"","sources":["../src/ValidConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOxC,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,cA+H5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
||||
179
node_modules/jest-config/build/ValidConfig.js
generated
vendored
Normal file
179
node_modules/jest-config/build/ValidConfig.js
generated
vendored
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestRegexUtil() {
|
||||
const data = require('jest-regex-util');
|
||||
|
||||
_jestRegexUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _constants = require('./constants');
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const NODE_MODULES_REGEXP = (0, _jestRegexUtil().replacePathSepForRegex)(
|
||||
_constants.NODE_MODULES
|
||||
);
|
||||
const initialOptions = {
|
||||
automock: false,
|
||||
bail: (0, _jestValidate().multipleValidOptions)(false, 0),
|
||||
browser: false,
|
||||
cache: true,
|
||||
cacheDirectory: '/tmp/user/jest',
|
||||
changedFilesWithAncestor: false,
|
||||
changedSince: 'master',
|
||||
clearMocks: false,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src', '!public'],
|
||||
collectCoverageOnlyFrom: {
|
||||
'<rootDir>/this-directory-is-covered/Covered.js': true
|
||||
},
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
|
||||
coverageProvider: 'v8',
|
||||
coverageReporters: ['json', 'text', 'lcov', 'clover'],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
branches: 50,
|
||||
functions: 100,
|
||||
lines: 100,
|
||||
statements: 100
|
||||
}
|
||||
},
|
||||
dependencyExtractor: '<rootDir>/dependencyExtractor.js',
|
||||
displayName: (0, _jestValidate().multipleValidOptions)('test-config', {
|
||||
color: 'blue',
|
||||
name: 'test-config'
|
||||
}),
|
||||
errorOnDeprecated: false,
|
||||
expand: false,
|
||||
extraGlobals: [],
|
||||
filter: '<rootDir>/filter.js',
|
||||
forceCoverageMatch: ['**/*.t.js'],
|
||||
forceExit: false,
|
||||
globalSetup: 'setup.js',
|
||||
globalTeardown: 'teardown.js',
|
||||
globals: {
|
||||
__DEV__: true
|
||||
},
|
||||
haste: {
|
||||
computeSha1: true,
|
||||
defaultPlatform: 'ios',
|
||||
hasteImplModulePath: '<rootDir>/haste_impl.js',
|
||||
platforms: ['ios', 'android'],
|
||||
providesModuleNodeModules: ['react', 'react-native'],
|
||||
throwOnModuleCollision: false
|
||||
},
|
||||
json: false,
|
||||
lastCommit: false,
|
||||
logHeapUsage: true,
|
||||
maxConcurrency: 5,
|
||||
maxWorkers: '50%',
|
||||
moduleDirectories: ['node_modules'],
|
||||
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
|
||||
moduleLoader: '<rootDir>',
|
||||
moduleNameMapper: {
|
||||
'^React$': '<rootDir>/node_modules/react'
|
||||
},
|
||||
modulePathIgnorePatterns: ['<rootDir>/build/'],
|
||||
modulePaths: ['/shared/vendor/modules'],
|
||||
name: 'string',
|
||||
noStackTrace: false,
|
||||
notify: false,
|
||||
notifyMode: 'failure-change',
|
||||
onlyChanged: false,
|
||||
preset: 'react-native',
|
||||
prettierPath: '<rootDir>/node_modules/prettier',
|
||||
projects: ['project-a', 'project-b/'],
|
||||
reporters: [
|
||||
'default',
|
||||
'custom-reporter-1',
|
||||
[
|
||||
'custom-reporter-2',
|
||||
{
|
||||
configValue: true
|
||||
}
|
||||
]
|
||||
],
|
||||
resetMocks: false,
|
||||
resetModules: false,
|
||||
resolver: '<rootDir>/resolver.js',
|
||||
restoreMocks: false,
|
||||
rootDir: '/',
|
||||
roots: ['<rootDir>'],
|
||||
runTestsByPath: false,
|
||||
runner: 'jest-runner',
|
||||
setupFiles: ['<rootDir>/setup.js'],
|
||||
setupFilesAfterEnv: ['<rootDir>/testSetupFile.js'],
|
||||
silent: true,
|
||||
skipFilter: false,
|
||||
skipNodeResolution: false,
|
||||
snapshotResolver: '<rootDir>/snapshotResolver.js',
|
||||
snapshotSerializers: ['my-serializer-module'],
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
testEnvironmentOptions: {
|
||||
userAgent: 'Agent/007'
|
||||
},
|
||||
testFailureExitCode: 1,
|
||||
testLocationInResults: false,
|
||||
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
testNamePattern: 'test signature',
|
||||
testPathIgnorePatterns: [NODE_MODULES_REGEXP],
|
||||
testRegex: (0,
|
||||
_jestValidate()
|
||||
.multipleValidOptions)('(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$', [
|
||||
'/__tests__/\\.test\\.[jt]sx?$',
|
||||
'/__tests__/\\.spec\\.[jt]sx?$'
|
||||
]),
|
||||
testResultsProcessor: 'processor-node-module',
|
||||
testRunner: 'jasmine2',
|
||||
testSequencer: '@jest/test-sequencer',
|
||||
testTimeout: 5000,
|
||||
testURL: 'http://localhost',
|
||||
timers: 'real',
|
||||
transform: {
|
||||
'^.+\\.js$': '<rootDir>/preprocessor.js'
|
||||
},
|
||||
transformIgnorePatterns: [NODE_MODULES_REGEXP],
|
||||
unmockedModulePathPatterns: ['mock'],
|
||||
updateSnapshot: true,
|
||||
useStderr: false,
|
||||
verbose: false,
|
||||
watch: false,
|
||||
watchPathIgnorePatterns: ['<rootDir>/e2e/'],
|
||||
watchPlugins: [
|
||||
'path/to/yourWatchPlugin',
|
||||
[
|
||||
'jest-watch-typeahead/filename',
|
||||
{
|
||||
key: 'k',
|
||||
prompt: 'do something with my custom prompt'
|
||||
}
|
||||
]
|
||||
],
|
||||
watchman: true
|
||||
};
|
||||
var _default = initialOptions;
|
||||
exports.default = _default;
|
||||
8
node_modules/jest-config/build/color.d.ts
generated
vendored
Normal file
8
node_modules/jest-config/build/color.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export declare const getDisplayNameColor: (seed?: string | undefined) => "hex" | "bold" | "reset" | "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright" | "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright" | "dim" | "italic" | "underline" | "inverse" | "hidden" | "strikethrough" | "visible" | "Instance" | "level" | "keyword" | "rgb" | "hsl" | "hsv" | "hwb" | "ansi" | "ansi256" | "bgHex" | "bgKeyword" | "bgRgb" | "bgHsl" | "bgHsv" | "bgHwb" | "bgAnsi" | "bgAnsi256" | "supportsColor" | "Level" | "Color" | "ForegroundColor" | "BackgroundColor" | "Modifiers" | "stderr";
|
||||
//# sourceMappingURL=color.d.ts.map
|
||||
1
node_modules/jest-config/build/color.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/color.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../src/color.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,eAAO,MAAM,mBAAmB,24BAS/B,CAAC"}
|
||||
51
node_modules/jest-config/build/color.js
generated
vendored
Normal file
51
node_modules/jest-config/build/color.js
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.getDisplayNameColor = void 0;
|
||||
|
||||
function _crypto() {
|
||||
const data = require('crypto');
|
||||
|
||||
_crypto = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white'];
|
||||
|
||||
const getDisplayNameColor = seed => {
|
||||
if (seed === undefined) {
|
||||
return 'white';
|
||||
}
|
||||
|
||||
const hash = (0, _crypto().createHash)('sha256');
|
||||
hash.update(seed);
|
||||
const num = hash.digest().readUInt32LE(0);
|
||||
return colors[num % colors.length];
|
||||
};
|
||||
|
||||
exports.getDisplayNameColor = getDisplayNameColor;
|
||||
17
node_modules/jest-config/build/constants.d.ts
generated
vendored
Normal file
17
node_modules/jest-config/build/constants.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export declare const NODE_MODULES: string;
|
||||
export declare const DEFAULT_JS_PATTERN = "^.+\\.[jt]sx?$";
|
||||
export declare const DEFAULT_REPORTER_LABEL = "default";
|
||||
export declare const PACKAGE_JSON = "package.json";
|
||||
export declare const JEST_CONFIG_BASE_NAME = "jest.config";
|
||||
export declare const JEST_CONFIG_EXT_CJS = ".cjs";
|
||||
export declare const JEST_CONFIG_EXT_MJS = ".mjs";
|
||||
export declare const JEST_CONFIG_EXT_JS = ".js";
|
||||
export declare const JEST_CONFIG_EXT_JSON = ".json";
|
||||
export declare const JEST_CONFIG_EXT_ORDER: readonly string[];
|
||||
//# sourceMappingURL=constants.d.ts.map
|
||||
1
node_modules/jest-config/build/constants.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/constants.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,YAAY,QAAuC,CAAC;AACjE,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAC1C,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAC1C,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAC5C,eAAO,MAAM,qBAAqB,mBAKhC,CAAC"}
|
||||
90
node_modules/jest-config/build/constants.js
generated
vendored
Normal file
90
node_modules/jest-config/build/constants.js
generated
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.JEST_CONFIG_EXT_ORDER = exports.JEST_CONFIG_EXT_JSON = exports.JEST_CONFIG_EXT_JS = exports.JEST_CONFIG_EXT_MJS = exports.JEST_CONFIG_EXT_CJS = exports.JEST_CONFIG_BASE_NAME = exports.PACKAGE_JSON = exports.DEFAULT_REPORTER_LABEL = exports.DEFAULT_JS_PATTERN = exports.NODE_MODULES = void 0;
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const NODE_MODULES = path().sep + 'node_modules' + path().sep;
|
||||
exports.NODE_MODULES = NODE_MODULES;
|
||||
const DEFAULT_JS_PATTERN = '^.+\\.[jt]sx?$';
|
||||
exports.DEFAULT_JS_PATTERN = DEFAULT_JS_PATTERN;
|
||||
const DEFAULT_REPORTER_LABEL = 'default';
|
||||
exports.DEFAULT_REPORTER_LABEL = DEFAULT_REPORTER_LABEL;
|
||||
const PACKAGE_JSON = 'package.json';
|
||||
exports.PACKAGE_JSON = PACKAGE_JSON;
|
||||
const JEST_CONFIG_BASE_NAME = 'jest.config';
|
||||
exports.JEST_CONFIG_BASE_NAME = JEST_CONFIG_BASE_NAME;
|
||||
const JEST_CONFIG_EXT_CJS = '.cjs';
|
||||
exports.JEST_CONFIG_EXT_CJS = JEST_CONFIG_EXT_CJS;
|
||||
const JEST_CONFIG_EXT_MJS = '.mjs';
|
||||
exports.JEST_CONFIG_EXT_MJS = JEST_CONFIG_EXT_MJS;
|
||||
const JEST_CONFIG_EXT_JS = '.js';
|
||||
exports.JEST_CONFIG_EXT_JS = JEST_CONFIG_EXT_JS;
|
||||
const JEST_CONFIG_EXT_JSON = '.json';
|
||||
exports.JEST_CONFIG_EXT_JSON = JEST_CONFIG_EXT_JSON;
|
||||
const JEST_CONFIG_EXT_ORDER = Object.freeze([
|
||||
JEST_CONFIG_EXT_JS,
|
||||
JEST_CONFIG_EXT_MJS,
|
||||
JEST_CONFIG_EXT_CJS,
|
||||
JEST_CONFIG_EXT_JSON
|
||||
]);
|
||||
exports.JEST_CONFIG_EXT_ORDER = JEST_CONFIG_EXT_ORDER;
|
||||
9
node_modules/jest-config/build/getCacheDirectory.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/getCacheDirectory.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const getCacheDirectory: () => string;
|
||||
export default getCacheDirectory;
|
||||
//# sourceMappingURL=getCacheDirectory.d.ts.map
|
||||
1
node_modules/jest-config/build/getCacheDirectory.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/getCacheDirectory.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getCacheDirectory.d.ts","sourceRoot":"","sources":["../src/getCacheDirectory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,QAAA,MAAM,iBAAiB,cAWtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
||||
104
node_modules/jest-config/build/getCacheDirectory.js
generated
vendored
Normal file
104
node_modules/jest-config/build/getCacheDirectory.js
generated
vendored
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _os() {
|
||||
const data = require('os');
|
||||
|
||||
_os = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _realpathNative() {
|
||||
const data = require('realpath-native');
|
||||
|
||||
_realpathNative = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const getCacheDirectory = () => {
|
||||
const {getuid} = process;
|
||||
const tmpdirPath = path().join(
|
||||
(0, _realpathNative().sync)((0, _os().tmpdir)()),
|
||||
'jest'
|
||||
);
|
||||
|
||||
if (getuid == null) {
|
||||
return tmpdirPath;
|
||||
} else {
|
||||
// On some platforms tmpdir() is `/tmp`, causing conflicts between different
|
||||
// users and permission issues. Adding an additional subdivision by UID can
|
||||
// help.
|
||||
return `${tmpdirPath}_${getuid.call(process).toString(36)}`;
|
||||
}
|
||||
};
|
||||
|
||||
var _default = getCacheDirectory;
|
||||
exports.default = _default;
|
||||
9
node_modules/jest-config/build/getMaxWorkers.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/getMaxWorkers.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
export default function getMaxWorkers(argv: Partial<Pick<Config.Argv, 'maxWorkers' | 'runInBand' | 'watch' | 'watchAll'>>, defaultOptions?: Partial<Pick<Config.Argv, 'maxWorkers'>>): number;
|
||||
//# sourceMappingURL=getMaxWorkers.d.ts.map
|
||||
1
node_modules/jest-config/build/getMaxWorkers.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/getMaxWorkers.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getMaxWorkers.d.ts","sourceRoot":"","sources":["../src/getMaxWorkers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAAI,EAAE,OAAO,CACX,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,CACrE,EACD,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,GACxD,MAAM,CAgBR"}
|
||||
57
node_modules/jest-config/build/getMaxWorkers.js
generated
vendored
Normal file
57
node_modules/jest-config/build/getMaxWorkers.js
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getMaxWorkers;
|
||||
|
||||
function _os() {
|
||||
const data = require('os');
|
||||
|
||||
_os = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
function getMaxWorkers(argv, defaultOptions) {
|
||||
if (argv.runInBand) {
|
||||
return 1;
|
||||
} else if (argv.maxWorkers) {
|
||||
return parseWorkers(argv.maxWorkers);
|
||||
} else if (defaultOptions && defaultOptions.maxWorkers) {
|
||||
return parseWorkers(defaultOptions.maxWorkers);
|
||||
} else {
|
||||
// In watch mode, Jest should be unobtrusive and not use all available CPUs.
|
||||
const numCpus = (0, _os().cpus)() ? (0, _os().cpus)().length : 1;
|
||||
const isWatchModeEnabled = argv.watch || argv.watchAll;
|
||||
return Math.max(
|
||||
isWatchModeEnabled ? Math.floor(numCpus / 2) : numCpus - 1,
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const parseWorkers = maxWorkers => {
|
||||
const parsed = parseInt(maxWorkers.toString(), 10);
|
||||
|
||||
if (
|
||||
typeof maxWorkers === 'string' &&
|
||||
maxWorkers.trim().endsWith('%') &&
|
||||
parsed > 0 &&
|
||||
parsed <= 100
|
||||
) {
|
||||
const numCpus = (0, _os().cpus)().length;
|
||||
const workers = Math.floor((parsed / 100) * numCpus);
|
||||
return workers >= 1 ? workers : 1;
|
||||
}
|
||||
|
||||
return parsed > 0 ? parsed : 1;
|
||||
};
|
||||
11
node_modules/jest-config/build/importEsm.d.ts
generated
vendored
Normal file
11
node_modules/jest-config/build/importEsm.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const _default: (specifier: string) => Promise<{
|
||||
default: unknown;
|
||||
}>;
|
||||
export default _default;
|
||||
//# sourceMappingURL=importEsm.d.ts.map
|
||||
1
node_modules/jest-config/build/importEsm.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/importEsm.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"importEsm.d.ts","sourceRoot":"","sources":["../src/importEsm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;AAMH,wBAEwC"}
|
||||
30
node_modules/jest-config/build/importEsm.js
generated
vendored
Normal file
30
node_modules/jest-config/build/importEsm.js
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _url() {
|
||||
const data = require('url');
|
||||
|
||||
_url = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
// this is in a separate file so that node 8 don't explode with a syntax error.
|
||||
// Remove this file when we drop support for Node 8
|
||||
var _default = (
|
||||
specifier // node `import()` supports URL, but TypeScript doesn't know that
|
||||
) => import((0, _url().pathToFileURL)(specifier).href);
|
||||
|
||||
exports.default = _default;
|
||||
28
node_modules/jest-config/build/index.d.ts
generated
vendored
Normal file
28
node_modules/jest-config/build/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
export { getTestEnvironment, isJSONString } from './utils';
|
||||
export { default as normalize } from './normalize';
|
||||
export { default as deprecationEntries } from './Deprecated';
|
||||
export { replaceRootDirInPath } from './utils';
|
||||
export { default as defaults } from './Defaults';
|
||||
export { default as descriptions } from './Descriptions';
|
||||
import * as constants from './constants';
|
||||
export { constants };
|
||||
declare type ReadConfig = {
|
||||
configPath: Config.Path | null | undefined;
|
||||
globalConfig: Config.GlobalConfig;
|
||||
hasDeprecationWarnings: boolean;
|
||||
projectConfig: Config.ProjectConfig;
|
||||
};
|
||||
export declare function readConfig(argv: Config.Argv, packageRootOrConfig: Config.Path | Config.InitialOptions, skipArgvConfigOption?: boolean, parentConfigPath?: Config.Path | null, projectIndex?: number): Promise<ReadConfig>;
|
||||
export declare function readConfigs(argv: Config.Argv, projectPaths: Array<Config.Path>): Promise<{
|
||||
globalConfig: Config.GlobalConfig;
|
||||
configs: Array<Config.ProjectConfig>;
|
||||
hasDeprecationWarnings: boolean;
|
||||
}>;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/jest-config/build/index.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOxC,OAAO,EAAC,kBAAkB,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,CAAC;AAEnB,aAAK,UAAU,GAAG;IAChB,UAAU,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC;CACrC,CAAC;AAEF,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,mBAAmB,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,cAAc,EAKxD,oBAAoB,CAAC,EAAE,OAAO,EAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EACrC,YAAY,GAAE,MAAiB,GAC9B,OAAO,CAAC,UAAU,CAAC,CAwDrB;AAuKD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAC/B,OAAO,CAAC;IACT,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACrC,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAAC,CAmFD"}
|
||||
474
node_modules/jest-config/build/index.js
generated
vendored
Normal file
474
node_modules/jest-config/build/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,474 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.readConfig = readConfig;
|
||||
exports.readConfigs = readConfigs;
|
||||
Object.defineProperty(exports, 'getTestEnvironment', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.getTestEnvironment;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'isJSONString', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.isJSONString;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'replaceRootDirInPath', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.replaceRootDirInPath;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'normalize', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _normalize.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'deprecationEntries', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Deprecated.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'defaults', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Defaults.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'descriptions', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Descriptions.default;
|
||||
}
|
||||
});
|
||||
exports.constants = void 0;
|
||||
|
||||
function fs() {
|
||||
const data = _interopRequireWildcard(require('fs'));
|
||||
|
||||
fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _realpathNative() {
|
||||
const data = require('realpath-native');
|
||||
|
||||
_realpathNative = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _utils = require('./utils');
|
||||
|
||||
var _normalize = _interopRequireDefault(require('./normalize'));
|
||||
|
||||
var _resolveConfigPath = _interopRequireDefault(require('./resolveConfigPath'));
|
||||
|
||||
var _readConfigFileAndSetRootDir = _interopRequireDefault(
|
||||
require('./readConfigFileAndSetRootDir')
|
||||
);
|
||||
|
||||
var _Deprecated = _interopRequireDefault(require('./Deprecated'));
|
||||
|
||||
var _Defaults = _interopRequireDefault(require('./Defaults'));
|
||||
|
||||
var _Descriptions = _interopRequireDefault(require('./Descriptions'));
|
||||
|
||||
var constants = _interopRequireWildcard(require('./constants'));
|
||||
|
||||
exports.constants = constants;
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
async function readConfig(
|
||||
argv,
|
||||
packageRootOrConfig, // Whether it needs to look into `--config` arg passed to CLI.
|
||||
// It only used to read initial config. If the initial config contains
|
||||
// `project` property, we don't want to read `--config` value and rather
|
||||
// read individual configs for every project.
|
||||
skipArgvConfigOption,
|
||||
parentConfigPath,
|
||||
projectIndex = Infinity
|
||||
) {
|
||||
let rawOptions;
|
||||
let configPath = null;
|
||||
|
||||
if (typeof packageRootOrConfig !== 'string') {
|
||||
if (parentConfigPath) {
|
||||
const parentConfigDirname = path().dirname(parentConfigPath);
|
||||
rawOptions = packageRootOrConfig;
|
||||
rawOptions.rootDir = rawOptions.rootDir
|
||||
? (0, _utils.replaceRootDirInPath)(
|
||||
parentConfigDirname,
|
||||
rawOptions.rootDir
|
||||
)
|
||||
: parentConfigDirname;
|
||||
} else {
|
||||
throw new Error(
|
||||
'Jest: Cannot use configuration as an object without a file path.'
|
||||
);
|
||||
}
|
||||
} else if ((0, _utils.isJSONString)(argv.config)) {
|
||||
// A JSON string was passed to `--config` argument and we can parse it
|
||||
// and use as is.
|
||||
let config;
|
||||
|
||||
try {
|
||||
config = JSON.parse(argv.config);
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
'There was an error while parsing the `--config` argument as a JSON string.'
|
||||
);
|
||||
} // NOTE: we might need to resolve this dir to an absolute path in the future
|
||||
|
||||
config.rootDir = config.rootDir || packageRootOrConfig;
|
||||
rawOptions = config; // A string passed to `--config`, which is either a direct path to the config
|
||||
// or a path to directory containing `package.json` or `jest.config.js`
|
||||
} else if (!skipArgvConfigOption && typeof argv.config == 'string') {
|
||||
configPath = (0, _resolveConfigPath.default)(argv.config, process.cwd());
|
||||
rawOptions = await (0, _readConfigFileAndSetRootDir.default)(configPath);
|
||||
} else {
|
||||
// Otherwise just try to find config in the current rootDir.
|
||||
configPath = (0, _resolveConfigPath.default)(
|
||||
packageRootOrConfig,
|
||||
process.cwd()
|
||||
);
|
||||
rawOptions = await (0, _readConfigFileAndSetRootDir.default)(configPath);
|
||||
}
|
||||
|
||||
const {options, hasDeprecationWarnings} = (0, _normalize.default)(
|
||||
rawOptions,
|
||||
argv,
|
||||
configPath,
|
||||
projectIndex
|
||||
);
|
||||
const {globalConfig, projectConfig} = groupOptions(options);
|
||||
return {
|
||||
configPath,
|
||||
globalConfig,
|
||||
hasDeprecationWarnings,
|
||||
projectConfig
|
||||
};
|
||||
}
|
||||
|
||||
const groupOptions = options => ({
|
||||
globalConfig: Object.freeze({
|
||||
bail: options.bail,
|
||||
changedFilesWithAncestor: options.changedFilesWithAncestor,
|
||||
changedSince: options.changedSince,
|
||||
collectCoverage: options.collectCoverage,
|
||||
collectCoverageFrom: options.collectCoverageFrom,
|
||||
collectCoverageOnlyFrom: options.collectCoverageOnlyFrom,
|
||||
coverageDirectory: options.coverageDirectory,
|
||||
coverageProvider: options.coverageProvider,
|
||||
coverageReporters: options.coverageReporters,
|
||||
coverageThreshold: options.coverageThreshold,
|
||||
detectLeaks: options.detectLeaks,
|
||||
detectOpenHandles: options.detectOpenHandles,
|
||||
enabledTestsMap: options.enabledTestsMap,
|
||||
errorOnDeprecated: options.errorOnDeprecated,
|
||||
expand: options.expand,
|
||||
filter: options.filter,
|
||||
findRelatedTests: options.findRelatedTests,
|
||||
forceExit: options.forceExit,
|
||||
globalSetup: options.globalSetup,
|
||||
globalTeardown: options.globalTeardown,
|
||||
json: options.json,
|
||||
lastCommit: options.lastCommit,
|
||||
listTests: options.listTests,
|
||||
logHeapUsage: options.logHeapUsage,
|
||||
maxConcurrency: options.maxConcurrency,
|
||||
maxWorkers: options.maxWorkers,
|
||||
noSCM: undefined,
|
||||
noStackTrace: options.noStackTrace,
|
||||
nonFlagArgs: options.nonFlagArgs,
|
||||
notify: options.notify,
|
||||
notifyMode: options.notifyMode,
|
||||
onlyChanged: options.onlyChanged,
|
||||
onlyFailures: options.onlyFailures,
|
||||
outputFile: options.outputFile,
|
||||
passWithNoTests: options.passWithNoTests,
|
||||
projects: options.projects,
|
||||
replname: options.replname,
|
||||
reporters: options.reporters,
|
||||
rootDir: options.rootDir,
|
||||
runTestsByPath: options.runTestsByPath,
|
||||
silent: options.silent,
|
||||
skipFilter: options.skipFilter,
|
||||
testFailureExitCode: options.testFailureExitCode,
|
||||
testNamePattern: options.testNamePattern,
|
||||
testPathPattern: options.testPathPattern,
|
||||
testResultsProcessor: options.testResultsProcessor,
|
||||
testSequencer: options.testSequencer,
|
||||
testTimeout: options.testTimeout,
|
||||
updateSnapshot: options.updateSnapshot,
|
||||
useStderr: options.useStderr,
|
||||
verbose: options.verbose,
|
||||
watch: options.watch,
|
||||
watchAll: options.watchAll,
|
||||
watchPlugins: options.watchPlugins,
|
||||
watchman: options.watchman
|
||||
}),
|
||||
projectConfig: Object.freeze({
|
||||
automock: options.automock,
|
||||
browser: options.browser,
|
||||
cache: options.cache,
|
||||
cacheDirectory: options.cacheDirectory,
|
||||
clearMocks: options.clearMocks,
|
||||
coveragePathIgnorePatterns: options.coveragePathIgnorePatterns,
|
||||
cwd: options.cwd,
|
||||
dependencyExtractor: options.dependencyExtractor,
|
||||
detectLeaks: options.detectLeaks,
|
||||
detectOpenHandles: options.detectOpenHandles,
|
||||
displayName: options.displayName,
|
||||
errorOnDeprecated: options.errorOnDeprecated,
|
||||
extraGlobals: options.extraGlobals,
|
||||
filter: options.filter,
|
||||
forceCoverageMatch: options.forceCoverageMatch,
|
||||
globalSetup: options.globalSetup,
|
||||
globalTeardown: options.globalTeardown,
|
||||
globals: options.globals,
|
||||
haste: options.haste,
|
||||
moduleDirectories: options.moduleDirectories,
|
||||
moduleFileExtensions: options.moduleFileExtensions,
|
||||
moduleLoader: options.moduleLoader,
|
||||
moduleNameMapper: options.moduleNameMapper,
|
||||
modulePathIgnorePatterns: options.modulePathIgnorePatterns,
|
||||
modulePaths: options.modulePaths,
|
||||
name: options.name,
|
||||
prettierPath: options.prettierPath,
|
||||
resetMocks: options.resetMocks,
|
||||
resetModules: options.resetModules,
|
||||
resolver: options.resolver,
|
||||
restoreMocks: options.restoreMocks,
|
||||
rootDir: options.rootDir,
|
||||
roots: options.roots,
|
||||
runner: options.runner,
|
||||
setupFiles: options.setupFiles,
|
||||
setupFilesAfterEnv: options.setupFilesAfterEnv,
|
||||
skipFilter: options.skipFilter,
|
||||
skipNodeResolution: options.skipNodeResolution,
|
||||
snapshotResolver: options.snapshotResolver,
|
||||
snapshotSerializers: options.snapshotSerializers,
|
||||
testEnvironment: options.testEnvironment,
|
||||
testEnvironmentOptions: options.testEnvironmentOptions,
|
||||
testLocationInResults: options.testLocationInResults,
|
||||
testMatch: options.testMatch,
|
||||
testPathIgnorePatterns: options.testPathIgnorePatterns,
|
||||
testRegex: options.testRegex,
|
||||
testRunner: options.testRunner,
|
||||
testURL: options.testURL,
|
||||
timers: options.timers,
|
||||
transform: options.transform,
|
||||
transformIgnorePatterns: options.transformIgnorePatterns,
|
||||
unmockedModulePathPatterns: options.unmockedModulePathPatterns,
|
||||
watchPathIgnorePatterns: options.watchPathIgnorePatterns
|
||||
})
|
||||
});
|
||||
|
||||
const ensureNoDuplicateConfigs = (parsedConfigs, projects) => {
|
||||
if (projects.length <= 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
const configPathMap = new Map();
|
||||
|
||||
for (const config of parsedConfigs) {
|
||||
const {configPath} = config;
|
||||
|
||||
if (configPathMap.has(configPath)) {
|
||||
const message = `Whoops! Two projects resolved to the same config path: ${_chalk().default.bold(
|
||||
String(configPath)
|
||||
)}:
|
||||
|
||||
Project 1: ${_chalk().default.bold(
|
||||
projects[parsedConfigs.findIndex(x => x === config)]
|
||||
)}
|
||||
Project 2: ${_chalk().default.bold(
|
||||
projects[parsedConfigs.findIndex(x => x === configPathMap.get(configPath))]
|
||||
)}
|
||||
|
||||
This usually means that your ${_chalk().default.bold(
|
||||
'"projects"'
|
||||
)} config includes a directory that doesn't have any configuration recognizable by Jest. Please fix it.
|
||||
`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
if (configPath !== null) {
|
||||
configPathMap.set(configPath, config);
|
||||
}
|
||||
}
|
||||
}; // Possible scenarios:
|
||||
// 1. jest --config config.json
|
||||
// 2. jest --projects p1 p2
|
||||
// 3. jest --projects p1 p2 --config config.json
|
||||
// 4. jest --projects p1
|
||||
// 5. jest
|
||||
//
|
||||
// If no projects are specified, process.cwd() will be used as the default
|
||||
// (and only) project.
|
||||
|
||||
async function readConfigs(argv, projectPaths) {
|
||||
let globalConfig;
|
||||
let hasDeprecationWarnings;
|
||||
let configs = [];
|
||||
let projects = projectPaths;
|
||||
let configPath;
|
||||
|
||||
if (projectPaths.length === 1) {
|
||||
const parsedConfig = await readConfig(argv, projects[0]);
|
||||
configPath = parsedConfig.configPath;
|
||||
hasDeprecationWarnings = parsedConfig.hasDeprecationWarnings;
|
||||
globalConfig = parsedConfig.globalConfig;
|
||||
configs = [parsedConfig.projectConfig];
|
||||
|
||||
if (globalConfig.projects && globalConfig.projects.length) {
|
||||
// Even though we had one project in CLI args, there might be more
|
||||
// projects defined in the config.
|
||||
// In other words, if this was a single project,
|
||||
// and its config has `projects` settings, use that value instead.
|
||||
projects = globalConfig.projects;
|
||||
}
|
||||
}
|
||||
|
||||
if (projects.length > 0) {
|
||||
const projectIsCwd =
|
||||
process.platform === 'win32'
|
||||
? projects[0] === (0, _realpathNative().sync)(process.cwd())
|
||||
: projects[0] === process.cwd();
|
||||
const parsedConfigs = await Promise.all(
|
||||
projects
|
||||
.filter(root => {
|
||||
// Ignore globbed files that cannot be `require`d.
|
||||
if (
|
||||
typeof root === 'string' &&
|
||||
fs().existsSync(root) &&
|
||||
!fs().lstatSync(root).isDirectory() &&
|
||||
!constants.JEST_CONFIG_EXT_ORDER.some(ext => root.endsWith(ext))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
.map((root, projectIndex) => {
|
||||
const projectIsTheOnlyProject =
|
||||
projectIndex === 0 && projects.length === 1;
|
||||
const skipArgvConfigOption = !(
|
||||
projectIsTheOnlyProject && projectIsCwd
|
||||
);
|
||||
return readConfig(
|
||||
argv,
|
||||
root,
|
||||
skipArgvConfigOption,
|
||||
configPath,
|
||||
projectIndex
|
||||
);
|
||||
})
|
||||
);
|
||||
ensureNoDuplicateConfigs(parsedConfigs, projects);
|
||||
configs = parsedConfigs.map(({projectConfig}) => projectConfig);
|
||||
|
||||
if (!hasDeprecationWarnings) {
|
||||
hasDeprecationWarnings = parsedConfigs.some(
|
||||
({hasDeprecationWarnings}) => !!hasDeprecationWarnings
|
||||
);
|
||||
} // If no config was passed initially, use the one from the first project
|
||||
|
||||
if (!globalConfig) {
|
||||
globalConfig = parsedConfigs[0].globalConfig;
|
||||
}
|
||||
}
|
||||
|
||||
if (!globalConfig || !configs.length) {
|
||||
throw new Error('jest: No configuration found for any project.');
|
||||
}
|
||||
|
||||
return {
|
||||
configs,
|
||||
globalConfig,
|
||||
hasDeprecationWarnings: !!hasDeprecationWarnings
|
||||
};
|
||||
}
|
||||
14
node_modules/jest-config/build/normalize.d.ts
generated
vendored
Normal file
14
node_modules/jest-config/build/normalize.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
declare type AllOptions = Config.ProjectConfig & Config.GlobalConfig;
|
||||
export default function normalize(initialOptions: Config.InitialOptions, argv: Config.Argv, configPath?: Config.Path | null, projectIndex?: number): {
|
||||
hasDeprecationWarnings: boolean;
|
||||
options: AllOptions;
|
||||
};
|
||||
export {};
|
||||
//# sourceMappingURL=normalize.d.ts.map
|
||||
1
node_modules/jest-config/build/normalize.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/normalize.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAkCxC,aAAK,UAAU,GAAG,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AAub7D,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,cAAc,EAAE,MAAM,CAAC,cAAc,EACrC,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EAC/B,YAAY,GAAE,MAAiB,GAC9B;IACD,sBAAsB,EAAE,OAAO,CAAC;IAChC,OAAO,EAAE,UAAU,CAAC;CACrB,CAumBA"}
|
||||
1311
node_modules/jest-config/build/normalize.js
generated
vendored
Normal file
1311
node_modules/jest-config/build/normalize.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
9
node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
export default function readConfigFileAndSetRootDir(configPath: Config.Path): Promise<Config.InitialOptions>;
|
||||
//# sourceMappingURL=readConfigFileAndSetRootDir.d.ts.map
|
||||
1
node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"readConfigFileAndSetRootDir.d.ts","sourceRoot":"","sources":["../src/readConfigFileAndSetRootDir.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAUxC,wBAA8B,2BAA2B,CACvD,UAAU,EAAE,MAAM,CAAC,IAAI,GACtB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CA0DhC"}
|
||||
157
node_modules/jest-config/build/readConfigFileAndSetRootDir.js
generated
vendored
Normal file
157
node_modules/jest-config/build/readConfigFileAndSetRootDir.js
generated
vendored
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = readConfigFileAndSetRootDir;
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function fs() {
|
||||
const data = _interopRequireWildcard(require('fs'));
|
||||
|
||||
fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _jsonlint = _interopRequireDefault(require('./vendor/jsonlint'));
|
||||
|
||||
var _constants = require('./constants');
|
||||
|
||||
function _importEsm() {
|
||||
const data = _interopRequireDefault(require('./importEsm'));
|
||||
|
||||
_importEsm = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
// @ts-ignore: vendored
|
||||
// Read the configuration and set its `rootDir`
|
||||
// 1. If it's a `package.json` file, we look into its "jest" property
|
||||
// 2. For any other file, we just require it. If we receive an 'ERR_REQUIRE_ESM'
|
||||
// from node, perform a dynamic import instead.
|
||||
async function readConfigFileAndSetRootDir(configPath) {
|
||||
const isJSON = configPath.endsWith(_constants.JEST_CONFIG_EXT_JSON);
|
||||
let configObject;
|
||||
|
||||
try {
|
||||
configObject = require(configPath);
|
||||
} catch (error) {
|
||||
if (error.code === 'ERR_REQUIRE_ESM') {
|
||||
try {
|
||||
const importedConfig = await (0, _importEsm().default)(configPath);
|
||||
|
||||
if (!importedConfig.default) {
|
||||
throw new Error(
|
||||
`Jest: Failed to load mjs config file ${configPath} - did you use a default export?`
|
||||
);
|
||||
}
|
||||
|
||||
configObject = importedConfig.default;
|
||||
} catch (innerError) {
|
||||
if (innerError.message === 'Not supported') {
|
||||
throw new Error(
|
||||
`Jest: Your version of Node does not support dynamic import - please enable it or use a .cjs file extension for file ${configPath}`
|
||||
);
|
||||
}
|
||||
|
||||
throw innerError;
|
||||
}
|
||||
} else if (isJSON) {
|
||||
throw new Error(
|
||||
`Jest: Failed to parse config file ${configPath}\n` +
|
||||
` ${_jsonlint.default.errors(fs().readFileSync(configPath, 'utf8'))}`
|
||||
);
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
if (configPath.endsWith(_constants.PACKAGE_JSON)) {
|
||||
// Event if there's no "jest" property in package.json we will still use
|
||||
// an empty object.
|
||||
configObject = configObject.jest || {};
|
||||
}
|
||||
|
||||
if (configObject.rootDir) {
|
||||
// We don't touch it if it has an absolute path specified
|
||||
if (!path().isAbsolute(configObject.rootDir)) {
|
||||
// otherwise, we'll resolve it relative to the file's __dirname
|
||||
configObject.rootDir = path().resolve(
|
||||
path().dirname(configPath),
|
||||
configObject.rootDir
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// If rootDir is not there, we'll set it to this file's __dirname
|
||||
configObject.rootDir = path().dirname(configPath);
|
||||
}
|
||||
|
||||
return configObject;
|
||||
}
|
||||
9
node_modules/jest-config/build/resolveConfigPath.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/resolveConfigPath.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const _default: (pathToResolve: string, cwd: string) => string;
|
||||
export default _default;
|
||||
//# sourceMappingURL=resolveConfigPath.d.ts.map
|
||||
1
node_modules/jest-config/build/resolveConfigPath.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/resolveConfigPath.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"resolveConfigPath.d.ts","sourceRoot":"","sources":["../src/resolveConfigPath.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAgBH,wBA+BE"}
|
||||
153
node_modules/jest-config/build/resolveConfigPath.js
generated
vendored
Normal file
153
node_modules/jest-config/build/resolveConfigPath.js
generated
vendored
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function fs() {
|
||||
const data = _interopRequireWildcard(require('fs'));
|
||||
|
||||
fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _constants = require('./constants');
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const isFile = filePath =>
|
||||
fs().existsSync(filePath) && !fs().lstatSync(filePath).isDirectory();
|
||||
|
||||
const getConfigFilename = ext => _constants.JEST_CONFIG_BASE_NAME + ext;
|
||||
|
||||
var _default = (pathToResolve, cwd) => {
|
||||
if (!path().isAbsolute(cwd)) {
|
||||
throw new Error(`"cwd" must be an absolute path. cwd: ${cwd}`);
|
||||
}
|
||||
|
||||
const absolutePath = path().isAbsolute(pathToResolve)
|
||||
? pathToResolve
|
||||
: path().resolve(cwd, pathToResolve);
|
||||
|
||||
if (isFile(absolutePath)) {
|
||||
return absolutePath;
|
||||
} // This is a guard against passing non existing path as a project/config,
|
||||
// that will otherwise result in a very confusing situation.
|
||||
// e.g.
|
||||
// With a directory structure like this:
|
||||
// my_project/
|
||||
// packcage.json
|
||||
//
|
||||
// Passing a `my_project/some_directory_that_doesnt_exist` as a project
|
||||
// name will resolve into a (possibly empty) `my_project/package.json` and
|
||||
// try to run all tests it finds under `my_project` directory.
|
||||
|
||||
if (!fs().existsSync(absolutePath)) {
|
||||
throw new Error(
|
||||
`Can't find a root directory while resolving a config file path.\n` +
|
||||
`Provided path to resolve: ${pathToResolve}\n` +
|
||||
`cwd: ${cwd}`
|
||||
);
|
||||
}
|
||||
|
||||
return resolveConfigPathByTraversing(absolutePath, pathToResolve, cwd);
|
||||
};
|
||||
|
||||
exports.default = _default;
|
||||
|
||||
const resolveConfigPathByTraversing = (pathToResolve, initialPath, cwd) => {
|
||||
const jestConfig = _constants.JEST_CONFIG_EXT_ORDER.map(ext =>
|
||||
path().resolve(pathToResolve, getConfigFilename(ext))
|
||||
).find(isFile);
|
||||
|
||||
if (jestConfig) {
|
||||
return jestConfig;
|
||||
}
|
||||
|
||||
const packageJson = path().resolve(pathToResolve, _constants.PACKAGE_JSON);
|
||||
|
||||
if (isFile(packageJson)) {
|
||||
return packageJson;
|
||||
} // This is the system root.
|
||||
// We tried everything, config is nowhere to be found ¯\_(ツ)_/¯
|
||||
|
||||
if (pathToResolve === path().dirname(pathToResolve)) {
|
||||
throw new Error(makeResolutionErrorMessage(initialPath, cwd));
|
||||
} // go up a level and try it again
|
||||
|
||||
return resolveConfigPathByTraversing(
|
||||
path().dirname(pathToResolve),
|
||||
initialPath,
|
||||
cwd
|
||||
);
|
||||
};
|
||||
|
||||
const makeResolutionErrorMessage = (initialPath, cwd) =>
|
||||
'Could not find a config file based on provided values:\n' +
|
||||
`path: "${initialPath}"\n` +
|
||||
`cwd: "${cwd}"\n` +
|
||||
'Config paths must be specified by either a direct path to a config\n' +
|
||||
'file, or a path to a directory. If directory is given, Jest will try to\n' +
|
||||
`traverse directory tree up, until it finds one of those files in exact order: ${_constants.JEST_CONFIG_EXT_ORDER.map(
|
||||
ext => `"${getConfigFilename(ext)}"`
|
||||
).join(' or ')}.`;
|
||||
9
node_modules/jest-config/build/setFromArgv.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/setFromArgv.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
export default function setFromArgv(options: Config.InitialOptions, argv: Config.Argv): Config.InitialOptions;
|
||||
//# sourceMappingURL=setFromArgv.d.ts.map
|
||||
1
node_modules/jest-config/build/setFromArgv.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/setFromArgv.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"setFromArgv.d.ts","sourceRoot":"","sources":["../src/setFromArgv.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKxC,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,OAAO,EAAE,MAAM,CAAC,cAAc,EAC9B,IAAI,EAAE,MAAM,CAAC,IAAI,GAChB,MAAM,CAAC,cAAc,CAyCvB"}
|
||||
119
node_modules/jest-config/build/setFromArgv.js
generated
vendored
Normal file
119
node_modules/jest-config/build/setFromArgv.js
generated
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = setFromArgv;
|
||||
|
||||
var _utils = require('./utils');
|
||||
|
||||
function ownKeys(object, enumerableOnly) {
|
||||
var keys = Object.keys(object);
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(object);
|
||||
if (enumerableOnly)
|
||||
symbols = symbols.filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||||
});
|
||||
keys.push.apply(keys, symbols);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
if (i % 2) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(
|
||||
target,
|
||||
key,
|
||||
Object.getOwnPropertyDescriptor(source, key)
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const specialArgs = ['_', '$0', 'h', 'help', 'config'];
|
||||
|
||||
function setFromArgv(options, argv) {
|
||||
const argvToOptions = Object.keys(argv)
|
||||
.filter(key => argv[key] !== undefined && specialArgs.indexOf(key) === -1)
|
||||
.reduce((options, key) => {
|
||||
switch (key) {
|
||||
case 'coverage':
|
||||
options.collectCoverage = argv[key];
|
||||
break;
|
||||
|
||||
case 'json':
|
||||
options.useStderr = argv[key];
|
||||
break;
|
||||
|
||||
case 'watchAll':
|
||||
options.watch = false;
|
||||
options.watchAll = argv[key];
|
||||
break;
|
||||
|
||||
case 'env':
|
||||
options.testEnvironment = argv[key];
|
||||
break;
|
||||
|
||||
case 'config':
|
||||
break;
|
||||
|
||||
case 'coverageThreshold':
|
||||
case 'globals':
|
||||
case 'moduleNameMapper':
|
||||
case 'transform':
|
||||
case 'haste':
|
||||
const str = argv[key];
|
||||
|
||||
if ((0, _utils.isJSONString)(str)) {
|
||||
options[key] = JSON.parse(str);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
options[key] = argv[key];
|
||||
}
|
||||
|
||||
return options;
|
||||
}, {});
|
||||
return _objectSpread(
|
||||
{},
|
||||
options,
|
||||
{},
|
||||
(0, _utils.isJSONString)(argv.config) ? JSON.parse(argv.config) : null,
|
||||
{},
|
||||
argvToOptions
|
||||
);
|
||||
}
|
||||
10
node_modules/jest-config/build/ts3.4/Defaults.d.ts
generated
vendored
Normal file
10
node_modules/jest-config/build/ts3.4/Defaults.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare const defaultOptions: Config.DefaultOptions;
|
||||
export default defaultOptions;
|
||||
//# sourceMappingURL=Defaults.d.ts.map
|
||||
9
node_modules/jest-config/build/ts3.4/Deprecated.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/ts3.4/Deprecated.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const _default: Record<string, Function>;
|
||||
export default _default;
|
||||
//# sourceMappingURL=Deprecated.d.ts.map
|
||||
12
node_modules/jest-config/build/ts3.4/Descriptions.d.ts
generated
vendored
Normal file
12
node_modules/jest-config/build/ts3.4/Descriptions.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare const descriptions: {
|
||||
[key in keyof Config.InitialOptions]: string;
|
||||
};
|
||||
export default descriptions;
|
||||
//# sourceMappingURL=Descriptions.d.ts.map
|
||||
20
node_modules/jest-config/build/ts3.4/ReporterValidationErrors.d.ts
generated
vendored
Normal file
20
node_modules/jest-config/build/ts3.4/ReporterValidationErrors.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
import { ValidationError } from 'jest-validate';
|
||||
/**
|
||||
* Reporter Validation Error is thrown if the given arguments
|
||||
* within the reporter are not valid.
|
||||
*
|
||||
* This is a highly specific reporter error and in the future will be
|
||||
* merged with jest-validate. Till then, we can make use of it. It works
|
||||
* and that's what counts most at this time.
|
||||
*/
|
||||
export declare function createReporterError(reporterIndex: number, reporterValue: Array<Config.ReporterConfig> | string): ValidationError;
|
||||
export declare function createArrayReporterError(arrayReporter: Config.ReporterConfig, reporterIndex: number, valueIndex: number, value: string | Record<string, any>, expectedType: string, valueName: string): ValidationError;
|
||||
export declare function validateReporters(reporterConfig: Array<Config.ReporterConfig | string>): boolean;
|
||||
//# sourceMappingURL=ReporterValidationErrors.d.ts.map
|
||||
10
node_modules/jest-config/build/ts3.4/ValidConfig.d.ts
generated
vendored
Normal file
10
node_modules/jest-config/build/ts3.4/ValidConfig.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare const initialOptions: Config.InitialOptions;
|
||||
export default initialOptions;
|
||||
//# sourceMappingURL=ValidConfig.d.ts.map
|
||||
8
node_modules/jest-config/build/ts3.4/color.d.ts
generated
vendored
Normal file
8
node_modules/jest-config/build/ts3.4/color.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export declare const getDisplayNameColor: (seed?: string | undefined) => "hex" | "bold" | "reset" | "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright" | "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright" | "dim" | "italic" | "underline" | "inverse" | "hidden" | "strikethrough" | "visible" | "Instance" | "level" | "keyword" | "rgb" | "hsl" | "hsv" | "hwb" | "ansi" | "ansi256" | "bgHex" | "bgKeyword" | "bgRgb" | "bgHsl" | "bgHsv" | "bgHwb" | "bgAnsi" | "bgAnsi256" | "supportsColor" | "Level" | "Color" | "ForegroundColor" | "BackgroundColor" | "Modifiers" | "stderr";
|
||||
//# sourceMappingURL=color.d.ts.map
|
||||
17
node_modules/jest-config/build/ts3.4/constants.d.ts
generated
vendored
Normal file
17
node_modules/jest-config/build/ts3.4/constants.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export declare const NODE_MODULES: string;
|
||||
export declare const DEFAULT_JS_PATTERN = "^.+\\.[jt]sx?$";
|
||||
export declare const DEFAULT_REPORTER_LABEL = "default";
|
||||
export declare const PACKAGE_JSON = "package.json";
|
||||
export declare const JEST_CONFIG_BASE_NAME = "jest.config";
|
||||
export declare const JEST_CONFIG_EXT_CJS = ".cjs";
|
||||
export declare const JEST_CONFIG_EXT_MJS = ".mjs";
|
||||
export declare const JEST_CONFIG_EXT_JS = ".js";
|
||||
export declare const JEST_CONFIG_EXT_JSON = ".json";
|
||||
export declare const JEST_CONFIG_EXT_ORDER: readonly string[];
|
||||
//# sourceMappingURL=constants.d.ts.map
|
||||
9
node_modules/jest-config/build/ts3.4/getCacheDirectory.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/ts3.4/getCacheDirectory.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const getCacheDirectory: () => string;
|
||||
export default getCacheDirectory;
|
||||
//# sourceMappingURL=getCacheDirectory.d.ts.map
|
||||
9
node_modules/jest-config/build/ts3.4/getMaxWorkers.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/ts3.4/getMaxWorkers.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
export default function getMaxWorkers(argv: Partial<Pick<Config.Argv, 'maxWorkers' | 'runInBand' | 'watch' | 'watchAll'>>, defaultOptions?: Partial<Pick<Config.Argv, 'maxWorkers'>>): number;
|
||||
//# sourceMappingURL=getMaxWorkers.d.ts.map
|
||||
11
node_modules/jest-config/build/ts3.4/importEsm.d.ts
generated
vendored
Normal file
11
node_modules/jest-config/build/ts3.4/importEsm.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const _default: (specifier: string) => Promise<{
|
||||
default: unknown;
|
||||
}>;
|
||||
export default _default;
|
||||
//# sourceMappingURL=importEsm.d.ts.map
|
||||
28
node_modules/jest-config/build/ts3.4/index.d.ts
generated
vendored
Normal file
28
node_modules/jest-config/build/ts3.4/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
export { getTestEnvironment, isJSONString } from './utils';
|
||||
export { default as normalize } from './normalize';
|
||||
export { default as deprecationEntries } from './Deprecated';
|
||||
export { replaceRootDirInPath } from './utils';
|
||||
export { default as defaults } from './Defaults';
|
||||
export { default as descriptions } from './Descriptions';
|
||||
import * as constants from './constants';
|
||||
export { constants };
|
||||
declare type ReadConfig = {
|
||||
configPath: Config.Path | null | undefined;
|
||||
globalConfig: Config.GlobalConfig;
|
||||
hasDeprecationWarnings: boolean;
|
||||
projectConfig: Config.ProjectConfig;
|
||||
};
|
||||
export declare function readConfig(argv: Config.Argv, packageRootOrConfig: Config.Path | Config.InitialOptions, skipArgvConfigOption?: boolean, parentConfigPath?: Config.Path | null, projectIndex?: number): Promise<ReadConfig>;
|
||||
export declare function readConfigs(argv: Config.Argv, projectPaths: Array<Config.Path>): Promise<{
|
||||
globalConfig: Config.GlobalConfig;
|
||||
configs: Array<Config.ProjectConfig>;
|
||||
hasDeprecationWarnings: boolean;
|
||||
}>;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
14
node_modules/jest-config/build/ts3.4/normalize.d.ts
generated
vendored
Normal file
14
node_modules/jest-config/build/ts3.4/normalize.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare type AllOptions = Config.ProjectConfig & Config.GlobalConfig;
|
||||
export default function normalize(initialOptions: Config.InitialOptions, argv: Config.Argv, configPath?: Config.Path | null, projectIndex?: number): {
|
||||
hasDeprecationWarnings: boolean;
|
||||
options: AllOptions;
|
||||
};
|
||||
export {};
|
||||
//# sourceMappingURL=normalize.d.ts.map
|
||||
9
node_modules/jest-config/build/ts3.4/readConfigFileAndSetRootDir.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/ts3.4/readConfigFileAndSetRootDir.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
export default function readConfigFileAndSetRootDir(configPath: Config.Path): Promise<Config.InitialOptions>;
|
||||
//# sourceMappingURL=readConfigFileAndSetRootDir.d.ts.map
|
||||
9
node_modules/jest-config/build/ts3.4/resolveConfigPath.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/ts3.4/resolveConfigPath.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
declare const _default: (pathToResolve: string, cwd: string) => string;
|
||||
export default _default;
|
||||
//# sourceMappingURL=resolveConfigPath.d.ts.map
|
||||
9
node_modules/jest-config/build/ts3.4/setFromArgv.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/build/ts3.4/setFromArgv.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
export default function setFromArgv(options: Config.InitialOptions, argv: Config.Argv): Config.InitialOptions;
|
||||
//# sourceMappingURL=setFromArgv.d.ts.map
|
||||
75
node_modules/jest-config/build/ts3.4/utils.d.ts
generated
vendored
Normal file
75
node_modules/jest-config/build/ts3.4/utils.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare type ResolveOptions = {
|
||||
rootDir: Config.Path;
|
||||
key: string;
|
||||
filePath: Config.Path;
|
||||
optional?: boolean;
|
||||
};
|
||||
export declare const BULLET: string;
|
||||
export declare const DOCUMENTATION_NOTE: string;
|
||||
export declare const resolve: (resolver: string | null | undefined, { key, filePath, rootDir, optional }: ResolveOptions) => string;
|
||||
export declare const escapeGlobCharacters: (path: string) => string;
|
||||
export declare const replaceRootDirInPath: (rootDir: string, filePath: string) => string;
|
||||
declare type OrArray<T> = T | Array<T>;
|
||||
declare type ReplaceRootDirConfigObj = Record<string, Config.Path>;
|
||||
declare type ReplaceRootDirConfigValues = OrArray<ReplaceRootDirConfigObj> | OrArray<RegExp> | OrArray<Config.Path>;
|
||||
export declare const _replaceRootDirTags: <T extends ReplaceRootDirConfigValues>(rootDir: string, config: T) => T;
|
||||
export declare const resolveWithPrefix: (resolver: string | null | undefined, { filePath, humanOptionName, optionName, prefix, rootDir, }: {
|
||||
filePath: string;
|
||||
humanOptionName: string;
|
||||
optionName: string;
|
||||
prefix: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
/**
|
||||
* Finds the test environment to use:
|
||||
*
|
||||
* 1. looks for jest-environment-<name> relative to project.
|
||||
* 1. looks for jest-environment-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
export declare const getTestEnvironment: ({ rootDir, testEnvironment: filePath, }: {
|
||||
rootDir: string;
|
||||
testEnvironment: string;
|
||||
}) => string;
|
||||
/**
|
||||
* Finds the watch plugins to use:
|
||||
*
|
||||
* 1. looks for jest-watch-<name> relative to project.
|
||||
* 1. looks for jest-watch-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
export declare const getWatchPlugin: (resolver: string | null | undefined, { filePath, rootDir }: {
|
||||
filePath: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
/**
|
||||
* Finds the runner to use:
|
||||
*
|
||||
* 1. looks for jest-runner-<name> relative to project.
|
||||
* 1. looks for jest-runner-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
export declare const getRunner: (resolver: string | null | undefined, { filePath, rootDir }: {
|
||||
filePath: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
declare type JSONString = string & {
|
||||
readonly $$type: never;
|
||||
};
|
||||
export declare const isJSONString: (text?: string | JSONString | undefined) => text is JSONString;
|
||||
export declare const getSequencer: (resolver: string | null | undefined, { filePath, rootDir }: {
|
||||
filePath: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
export {};
|
||||
//# sourceMappingURL=utils.d.ts.map
|
||||
8
node_modules/jest-config/build/ts3.4/validatePattern.d.ts
generated
vendored
Normal file
8
node_modules/jest-config/build/ts3.4/validatePattern.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export default function validatePattern(pattern?: string): boolean;
|
||||
//# sourceMappingURL=validatePattern.d.ts.map
|
||||
75
node_modules/jest-config/build/utils.d.ts
generated
vendored
Normal file
75
node_modules/jest-config/build/utils.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
declare type ResolveOptions = {
|
||||
rootDir: Config.Path;
|
||||
key: string;
|
||||
filePath: Config.Path;
|
||||
optional?: boolean;
|
||||
};
|
||||
export declare const BULLET: string;
|
||||
export declare const DOCUMENTATION_NOTE: string;
|
||||
export declare const resolve: (resolver: string | null | undefined, { key, filePath, rootDir, optional }: ResolveOptions) => string;
|
||||
export declare const escapeGlobCharacters: (path: string) => string;
|
||||
export declare const replaceRootDirInPath: (rootDir: string, filePath: string) => string;
|
||||
declare type OrArray<T> = T | Array<T>;
|
||||
declare type ReplaceRootDirConfigObj = Record<string, Config.Path>;
|
||||
declare type ReplaceRootDirConfigValues = OrArray<ReplaceRootDirConfigObj> | OrArray<RegExp> | OrArray<Config.Path>;
|
||||
export declare const _replaceRootDirTags: <T extends ReplaceRootDirConfigValues>(rootDir: string, config: T) => T;
|
||||
export declare const resolveWithPrefix: (resolver: string | null | undefined, { filePath, humanOptionName, optionName, prefix, rootDir, }: {
|
||||
filePath: string;
|
||||
humanOptionName: string;
|
||||
optionName: string;
|
||||
prefix: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
/**
|
||||
* Finds the test environment to use:
|
||||
*
|
||||
* 1. looks for jest-environment-<name> relative to project.
|
||||
* 1. looks for jest-environment-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
export declare const getTestEnvironment: ({ rootDir, testEnvironment: filePath, }: {
|
||||
rootDir: string;
|
||||
testEnvironment: string;
|
||||
}) => string;
|
||||
/**
|
||||
* Finds the watch plugins to use:
|
||||
*
|
||||
* 1. looks for jest-watch-<name> relative to project.
|
||||
* 1. looks for jest-watch-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
export declare const getWatchPlugin: (resolver: string | null | undefined, { filePath, rootDir }: {
|
||||
filePath: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
/**
|
||||
* Finds the runner to use:
|
||||
*
|
||||
* 1. looks for jest-runner-<name> relative to project.
|
||||
* 1. looks for jest-runner-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
export declare const getRunner: (resolver: string | null | undefined, { filePath, rootDir }: {
|
||||
filePath: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
declare type JSONString = string & {
|
||||
readonly $$type: never;
|
||||
};
|
||||
export declare const isJSONString: (text?: string | JSONString | undefined) => text is JSONString;
|
||||
export declare const getSequencer: (resolver: string | null | undefined, { filePath, rootDir }: {
|
||||
filePath: string;
|
||||
rootDir: string;
|
||||
}) => string;
|
||||
export {};
|
||||
//# sourceMappingURL=utils.d.ts.map
|
||||
1
node_modules/jest-config/build/utils.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/utils.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKxC,aAAK,cAAc,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAA8B,CAAC;AACpD,eAAO,MAAM,kBAAkB,QAI9B,CAAC;AAKF,eAAO,MAAM,OAAO,uGAsBnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,0BACW,CAAC;AAE7C,eAAO,MAAM,oBAAoB,+CAYhC,CAAC;AAgBF,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAC/B,aAAK,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3D,aAAK,0BAA0B,GAC3B,OAAO,CAAC,uBAAuB,CAAC,GAChC,OAAO,CAAC,MAAM,CAAC,GACf,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAEzB,eAAO,MAAM,mBAAmB,yEAyB/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;YAgD7B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;YAa3B,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;YAUvB,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS;;;YAUlB,CAAC;AAEL,aAAK,UAAU,GAAG,MAAM,GAAG;IAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAA;CAAC,CAAC;AACpD,eAAO,MAAM,YAAY,gEAIL,CAAC;AAErB,eAAO,MAAM,YAAY;;;YAUrB,CAAC"}
|
||||
313
node_modules/jest-config/build/utils.js
generated
vendored
Normal file
313
node_modules/jest-config/build/utils.js
generated
vendored
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.getSequencer = exports.isJSONString = exports.getRunner = exports.getWatchPlugin = exports.getTestEnvironment = exports.resolveWithPrefix = exports._replaceRootDirTags = exports.replaceRootDirInPath = exports.escapeGlobCharacters = exports.resolve = exports.DOCUMENTATION_NOTE = exports.BULLET = void 0;
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestResolve() {
|
||||
const data = _interopRequireDefault(require('jest-resolve'));
|
||||
|
||||
_jestResolve = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const BULLET = _chalk().default.bold('\u25cf ');
|
||||
|
||||
exports.BULLET = BULLET;
|
||||
const DOCUMENTATION_NOTE = ` ${_chalk().default.bold(
|
||||
'Configuration Documentation:'
|
||||
)}
|
||||
https://jestjs.io/docs/configuration.html
|
||||
`;
|
||||
exports.DOCUMENTATION_NOTE = DOCUMENTATION_NOTE;
|
||||
|
||||
const createValidationError = message =>
|
||||
new (_jestValidate().ValidationError)(
|
||||
`${BULLET}Validation Error`,
|
||||
message,
|
||||
DOCUMENTATION_NOTE
|
||||
);
|
||||
|
||||
const resolve = (resolver, {key, filePath, rootDir, optional}) => {
|
||||
const module = _jestResolve().default.findNodeModule(
|
||||
replaceRootDirInPath(rootDir, filePath),
|
||||
{
|
||||
basedir: rootDir,
|
||||
resolver: resolver || undefined
|
||||
}
|
||||
);
|
||||
|
||||
if (!module && !optional) {
|
||||
throw createValidationError(` Module ${_chalk().default.bold(
|
||||
filePath
|
||||
)} in the ${_chalk().default.bold(key)} option was not found.
|
||||
${_chalk().default.bold('<rootDir>')} is: ${rootDir}`);
|
||||
} /// can cast as string since nulls will be thrown
|
||||
|
||||
return module;
|
||||
};
|
||||
|
||||
exports.resolve = resolve;
|
||||
|
||||
const escapeGlobCharacters = path => path.replace(/([()*{}\[\]!?\\])/g, '\\$1');
|
||||
|
||||
exports.escapeGlobCharacters = escapeGlobCharacters;
|
||||
|
||||
const replaceRootDirInPath = (rootDir, filePath) => {
|
||||
if (!/^<rootDir>/.test(filePath)) {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
return path().resolve(
|
||||
rootDir,
|
||||
path().normalize('./' + filePath.substr('<rootDir>'.length))
|
||||
);
|
||||
};
|
||||
|
||||
exports.replaceRootDirInPath = replaceRootDirInPath;
|
||||
|
||||
const _replaceRootDirInObject = (rootDir, config) => {
|
||||
const newConfig = {};
|
||||
|
||||
for (const configKey in config) {
|
||||
newConfig[configKey] =
|
||||
configKey === 'rootDir'
|
||||
? config[configKey]
|
||||
: _replaceRootDirTags(rootDir, config[configKey]);
|
||||
}
|
||||
|
||||
return newConfig;
|
||||
};
|
||||
|
||||
const _replaceRootDirTags = (rootDir, config) => {
|
||||
if (config == null) {
|
||||
return config;
|
||||
}
|
||||
|
||||
switch (typeof config) {
|
||||
case 'object':
|
||||
if (Array.isArray(config)) {
|
||||
/// can be string[] or {}[]
|
||||
return config.map(item => _replaceRootDirTags(rootDir, item));
|
||||
}
|
||||
|
||||
if (config instanceof RegExp) {
|
||||
return config;
|
||||
}
|
||||
|
||||
return _replaceRootDirInObject(rootDir, config);
|
||||
|
||||
case 'string':
|
||||
return replaceRootDirInPath(rootDir, config);
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
exports._replaceRootDirTags = _replaceRootDirTags;
|
||||
|
||||
const resolveWithPrefix = (
|
||||
resolver,
|
||||
{filePath, humanOptionName, optionName, prefix, rootDir}
|
||||
) => {
|
||||
const fileName = replaceRootDirInPath(rootDir, filePath);
|
||||
|
||||
let module = _jestResolve().default.findNodeModule(`${prefix}${fileName}`, {
|
||||
basedir: rootDir,
|
||||
resolver: resolver || undefined
|
||||
});
|
||||
|
||||
if (module) {
|
||||
return module;
|
||||
}
|
||||
|
||||
try {
|
||||
return require.resolve(`${prefix}${fileName}`);
|
||||
} catch (e) {}
|
||||
|
||||
module = _jestResolve().default.findNodeModule(fileName, {
|
||||
basedir: rootDir,
|
||||
resolver: resolver || undefined
|
||||
});
|
||||
|
||||
if (module) {
|
||||
return module;
|
||||
}
|
||||
|
||||
try {
|
||||
return require.resolve(fileName);
|
||||
} catch (e) {}
|
||||
|
||||
throw createValidationError(
|
||||
` ${humanOptionName} ${_chalk().default.bold(
|
||||
fileName
|
||||
)} cannot be found. Make sure the ${_chalk().default.bold(
|
||||
optionName
|
||||
)} configuration option points to an existing node module.`
|
||||
);
|
||||
};
|
||||
/**
|
||||
* Finds the test environment to use:
|
||||
*
|
||||
* 1. looks for jest-environment-<name> relative to project.
|
||||
* 1. looks for jest-environment-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
|
||||
exports.resolveWithPrefix = resolveWithPrefix;
|
||||
|
||||
const getTestEnvironment = ({rootDir, testEnvironment: filePath}) =>
|
||||
resolveWithPrefix(undefined, {
|
||||
filePath,
|
||||
humanOptionName: 'Test environment',
|
||||
optionName: 'testEnvironment',
|
||||
prefix: 'jest-environment-',
|
||||
rootDir
|
||||
});
|
||||
/**
|
||||
* Finds the watch plugins to use:
|
||||
*
|
||||
* 1. looks for jest-watch-<name> relative to project.
|
||||
* 1. looks for jest-watch-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
|
||||
exports.getTestEnvironment = getTestEnvironment;
|
||||
|
||||
const getWatchPlugin = (resolver, {filePath, rootDir}) =>
|
||||
resolveWithPrefix(resolver, {
|
||||
filePath,
|
||||
humanOptionName: 'Watch plugin',
|
||||
optionName: 'watchPlugins',
|
||||
prefix: 'jest-watch-',
|
||||
rootDir
|
||||
});
|
||||
/**
|
||||
* Finds the runner to use:
|
||||
*
|
||||
* 1. looks for jest-runner-<name> relative to project.
|
||||
* 1. looks for jest-runner-<name> relative to Jest.
|
||||
* 1. looks for <name> relative to project.
|
||||
* 1. looks for <name> relative to Jest.
|
||||
*/
|
||||
|
||||
exports.getWatchPlugin = getWatchPlugin;
|
||||
|
||||
const getRunner = (resolver, {filePath, rootDir}) =>
|
||||
resolveWithPrefix(resolver, {
|
||||
filePath,
|
||||
humanOptionName: 'Jest Runner',
|
||||
optionName: 'runner',
|
||||
prefix: 'jest-runner-',
|
||||
rootDir
|
||||
});
|
||||
|
||||
exports.getRunner = getRunner;
|
||||
|
||||
// newtype
|
||||
const isJSONString = text =>
|
||||
text != null &&
|
||||
typeof text === 'string' &&
|
||||
text.startsWith('{') &&
|
||||
text.endsWith('}');
|
||||
|
||||
exports.isJSONString = isJSONString;
|
||||
|
||||
const getSequencer = (resolver, {filePath, rootDir}) =>
|
||||
resolveWithPrefix(resolver, {
|
||||
filePath,
|
||||
humanOptionName: 'Jest Sequencer',
|
||||
optionName: 'testSequencer',
|
||||
prefix: 'jest-sequencer-',
|
||||
rootDir
|
||||
});
|
||||
|
||||
exports.getSequencer = getSequencer;
|
||||
8
node_modules/jest-config/build/validatePattern.d.ts
generated
vendored
Normal file
8
node_modules/jest-config/build/validatePattern.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export default function validatePattern(pattern?: string): boolean;
|
||||
//# sourceMappingURL=validatePattern.d.ts.map
|
||||
1
node_modules/jest-config/build/validatePattern.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/build/validatePattern.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"validatePattern.d.ts","sourceRoot":"","sources":["../src/validatePattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAWjE"}
|
||||
25
node_modules/jest-config/build/validatePattern.js
generated
vendored
Normal file
25
node_modules/jest-config/build/validatePattern.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = validatePattern;
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
function validatePattern(pattern) {
|
||||
if (pattern) {
|
||||
try {
|
||||
// eslint-disable-next-line no-new
|
||||
new RegExp(pattern, 'i');
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
917
node_modules/jest-config/build/vendor/jsonlint.js
generated
vendored
Normal file
917
node_modules/jest-config/build/vendor/jsonlint.js
generated
vendored
Normal file
|
|
@ -0,0 +1,917 @@
|
|||
'use strict';
|
||||
|
||||
// From: https://github.com/zaach/jsonlint
|
||||
// Vendored in Jest to avoid jsonlint's transitive dependencies.
|
||||
|
||||
/* eslint-disable */
|
||||
var jsonlint = (function () {
|
||||
var parser = {
|
||||
trace: function trace() {},
|
||||
yy: {},
|
||||
symbols_: {
|
||||
error: 2,
|
||||
JSONString: 3,
|
||||
STRING: 4,
|
||||
JSONNumber: 5,
|
||||
NUMBER: 6,
|
||||
JSONNullLiteral: 7,
|
||||
NULL: 8,
|
||||
JSONBooleanLiteral: 9,
|
||||
TRUE: 10,
|
||||
FALSE: 11,
|
||||
JSONText: 12,
|
||||
JSONValue: 13,
|
||||
EOF: 14,
|
||||
JSONObject: 15,
|
||||
JSONArray: 16,
|
||||
'{': 17,
|
||||
'}': 18,
|
||||
JSONMemberList: 19,
|
||||
JSONMember: 20,
|
||||
':': 21,
|
||||
',': 22,
|
||||
'[': 23,
|
||||
']': 24,
|
||||
JSONElementList: 25,
|
||||
$accept: 0,
|
||||
$end: 1
|
||||
},
|
||||
terminals_: {
|
||||
2: 'error',
|
||||
4: 'STRING',
|
||||
6: 'NUMBER',
|
||||
8: 'NULL',
|
||||
10: 'TRUE',
|
||||
11: 'FALSE',
|
||||
14: 'EOF',
|
||||
17: '{',
|
||||
18: '}',
|
||||
21: ':',
|
||||
22: ',',
|
||||
23: '[',
|
||||
24: ']'
|
||||
},
|
||||
productions_: [
|
||||
0,
|
||||
[3, 1],
|
||||
[5, 1],
|
||||
[7, 1],
|
||||
[9, 1],
|
||||
[9, 1],
|
||||
[12, 2],
|
||||
[13, 1],
|
||||
[13, 1],
|
||||
[13, 1],
|
||||
[13, 1],
|
||||
[13, 1],
|
||||
[13, 1],
|
||||
[15, 2],
|
||||
[15, 3],
|
||||
[20, 3],
|
||||
[19, 1],
|
||||
[19, 3],
|
||||
[16, 2],
|
||||
[16, 3],
|
||||
[25, 1],
|
||||
[25, 3]
|
||||
],
|
||||
performAction: function anonymous(
|
||||
yytext,
|
||||
yyleng,
|
||||
yylineno,
|
||||
yy,
|
||||
yystate,
|
||||
$$,
|
||||
_$
|
||||
) {
|
||||
var $0 = $$.length - 1;
|
||||
|
||||
switch (yystate) {
|
||||
case 1:
|
||||
// replace escaped characters with actual character
|
||||
this.$ = yytext
|
||||
.replace(/\\(\\|")/g, '$' + '1')
|
||||
.replace(/\\n/g, '\n')
|
||||
.replace(/\\r/g, '\r')
|
||||
.replace(/\\t/g, '\t')
|
||||
.replace(/\\v/g, '\v')
|
||||
.replace(/\\f/g, '\f')
|
||||
.replace(/\\b/g, '\b');
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this.$ = Number(yytext);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
this.$ = null;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
this.$ = true;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
this.$ = false;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
return (this.$ = $$[$0 - 1]);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
this.$ = {};
|
||||
break;
|
||||
|
||||
case 14:
|
||||
this.$ = $$[$0 - 1];
|
||||
break;
|
||||
|
||||
case 15:
|
||||
this.$ = [$$[$0 - 2], $$[$0]];
|
||||
break;
|
||||
|
||||
case 16:
|
||||
this.$ = {};
|
||||
this.$[$$[$0][0]] = $$[$0][1];
|
||||
break;
|
||||
|
||||
case 17:
|
||||
this.$ = $$[$0 - 2];
|
||||
$$[$0 - 2][$$[$0][0]] = $$[$0][1];
|
||||
break;
|
||||
|
||||
case 18:
|
||||
this.$ = [];
|
||||
break;
|
||||
|
||||
case 19:
|
||||
this.$ = $$[$0 - 1];
|
||||
break;
|
||||
|
||||
case 20:
|
||||
this.$ = [$$[$0]];
|
||||
break;
|
||||
|
||||
case 21:
|
||||
this.$ = $$[$0 - 2];
|
||||
$$[$0 - 2].push($$[$0]);
|
||||
break;
|
||||
}
|
||||
},
|
||||
table: [
|
||||
{
|
||||
3: 5,
|
||||
4: [1, 12],
|
||||
5: 6,
|
||||
6: [1, 13],
|
||||
7: 3,
|
||||
8: [1, 9],
|
||||
9: 4,
|
||||
10: [1, 10],
|
||||
11: [1, 11],
|
||||
12: 1,
|
||||
13: 2,
|
||||
15: 7,
|
||||
16: 8,
|
||||
17: [1, 14],
|
||||
23: [1, 15]
|
||||
},
|
||||
{
|
||||
1: [3]
|
||||
},
|
||||
{
|
||||
14: [1, 16]
|
||||
},
|
||||
{
|
||||
14: [2, 7],
|
||||
18: [2, 7],
|
||||
22: [2, 7],
|
||||
24: [2, 7]
|
||||
},
|
||||
{
|
||||
14: [2, 8],
|
||||
18: [2, 8],
|
||||
22: [2, 8],
|
||||
24: [2, 8]
|
||||
},
|
||||
{
|
||||
14: [2, 9],
|
||||
18: [2, 9],
|
||||
22: [2, 9],
|
||||
24: [2, 9]
|
||||
},
|
||||
{
|
||||
14: [2, 10],
|
||||
18: [2, 10],
|
||||
22: [2, 10],
|
||||
24: [2, 10]
|
||||
},
|
||||
{
|
||||
14: [2, 11],
|
||||
18: [2, 11],
|
||||
22: [2, 11],
|
||||
24: [2, 11]
|
||||
},
|
||||
{
|
||||
14: [2, 12],
|
||||
18: [2, 12],
|
||||
22: [2, 12],
|
||||
24: [2, 12]
|
||||
},
|
||||
{
|
||||
14: [2, 3],
|
||||
18: [2, 3],
|
||||
22: [2, 3],
|
||||
24: [2, 3]
|
||||
},
|
||||
{
|
||||
14: [2, 4],
|
||||
18: [2, 4],
|
||||
22: [2, 4],
|
||||
24: [2, 4]
|
||||
},
|
||||
{
|
||||
14: [2, 5],
|
||||
18: [2, 5],
|
||||
22: [2, 5],
|
||||
24: [2, 5]
|
||||
},
|
||||
{
|
||||
14: [2, 1],
|
||||
18: [2, 1],
|
||||
21: [2, 1],
|
||||
22: [2, 1],
|
||||
24: [2, 1]
|
||||
},
|
||||
{
|
||||
14: [2, 2],
|
||||
18: [2, 2],
|
||||
22: [2, 2],
|
||||
24: [2, 2]
|
||||
},
|
||||
{
|
||||
3: 20,
|
||||
4: [1, 12],
|
||||
18: [1, 17],
|
||||
19: 18,
|
||||
20: 19
|
||||
},
|
||||
{
|
||||
3: 5,
|
||||
4: [1, 12],
|
||||
5: 6,
|
||||
6: [1, 13],
|
||||
7: 3,
|
||||
8: [1, 9],
|
||||
9: 4,
|
||||
10: [1, 10],
|
||||
11: [1, 11],
|
||||
13: 23,
|
||||
15: 7,
|
||||
16: 8,
|
||||
17: [1, 14],
|
||||
23: [1, 15],
|
||||
24: [1, 21],
|
||||
25: 22
|
||||
},
|
||||
{
|
||||
1: [2, 6]
|
||||
},
|
||||
{
|
||||
14: [2, 13],
|
||||
18: [2, 13],
|
||||
22: [2, 13],
|
||||
24: [2, 13]
|
||||
},
|
||||
{
|
||||
18: [1, 24],
|
||||
22: [1, 25]
|
||||
},
|
||||
{
|
||||
18: [2, 16],
|
||||
22: [2, 16]
|
||||
},
|
||||
{
|
||||
21: [1, 26]
|
||||
},
|
||||
{
|
||||
14: [2, 18],
|
||||
18: [2, 18],
|
||||
22: [2, 18],
|
||||
24: [2, 18]
|
||||
},
|
||||
{
|
||||
22: [1, 28],
|
||||
24: [1, 27]
|
||||
},
|
||||
{
|
||||
22: [2, 20],
|
||||
24: [2, 20]
|
||||
},
|
||||
{
|
||||
14: [2, 14],
|
||||
18: [2, 14],
|
||||
22: [2, 14],
|
||||
24: [2, 14]
|
||||
},
|
||||
{
|
||||
3: 20,
|
||||
4: [1, 12],
|
||||
20: 29
|
||||
},
|
||||
{
|
||||
3: 5,
|
||||
4: [1, 12],
|
||||
5: 6,
|
||||
6: [1, 13],
|
||||
7: 3,
|
||||
8: [1, 9],
|
||||
9: 4,
|
||||
10: [1, 10],
|
||||
11: [1, 11],
|
||||
13: 30,
|
||||
15: 7,
|
||||
16: 8,
|
||||
17: [1, 14],
|
||||
23: [1, 15]
|
||||
},
|
||||
{
|
||||
14: [2, 19],
|
||||
18: [2, 19],
|
||||
22: [2, 19],
|
||||
24: [2, 19]
|
||||
},
|
||||
{
|
||||
3: 5,
|
||||
4: [1, 12],
|
||||
5: 6,
|
||||
6: [1, 13],
|
||||
7: 3,
|
||||
8: [1, 9],
|
||||
9: 4,
|
||||
10: [1, 10],
|
||||
11: [1, 11],
|
||||
13: 31,
|
||||
15: 7,
|
||||
16: 8,
|
||||
17: [1, 14],
|
||||
23: [1, 15]
|
||||
},
|
||||
{
|
||||
18: [2, 17],
|
||||
22: [2, 17]
|
||||
},
|
||||
{
|
||||
18: [2, 15],
|
||||
22: [2, 15]
|
||||
},
|
||||
{
|
||||
22: [2, 21],
|
||||
24: [2, 21]
|
||||
}
|
||||
],
|
||||
defaultActions: {
|
||||
16: [2, 6]
|
||||
},
|
||||
parseError: function parseError(str, hash) {
|
||||
throw new Error(str);
|
||||
},
|
||||
parse: function parse(input) {
|
||||
var self = this,
|
||||
stack = [0],
|
||||
vstack = [null],
|
||||
// semantic value stack
|
||||
lstack = [],
|
||||
// location stack
|
||||
table = this.table,
|
||||
yytext = '',
|
||||
yylineno = 0,
|
||||
yyleng = 0,
|
||||
recovering = 0,
|
||||
TERROR = 2,
|
||||
EOF = 1; //this.reductionCount = this.shiftCount = 0;
|
||||
|
||||
this.lexer.setInput(input);
|
||||
this.lexer.yy = this.yy;
|
||||
this.yy.lexer = this.lexer;
|
||||
if (typeof this.lexer.yylloc == 'undefined') this.lexer.yylloc = {};
|
||||
var yyloc = this.lexer.yylloc;
|
||||
lstack.push(yyloc);
|
||||
if (typeof this.yy.parseError === 'function')
|
||||
this.parseError = this.yy.parseError;
|
||||
|
||||
function popStack(n) {
|
||||
stack.length = stack.length - 2 * n;
|
||||
vstack.length = vstack.length - n;
|
||||
lstack.length = lstack.length - n;
|
||||
}
|
||||
|
||||
function lex() {
|
||||
var token;
|
||||
token = self.lexer.lex() || 1; // $end = 1
|
||||
// if token isn't its numeric value, convert
|
||||
|
||||
if (typeof token !== 'number') {
|
||||
token = self.symbols_[token] || token;
|
||||
}
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
var symbol,
|
||||
preErrorSymbol,
|
||||
state,
|
||||
action,
|
||||
a,
|
||||
r,
|
||||
yyval = {},
|
||||
p,
|
||||
len,
|
||||
newState,
|
||||
expected;
|
||||
|
||||
while (true) {
|
||||
// retrieve state number from top of stack
|
||||
state = stack[stack.length - 1]; // use default actions if available
|
||||
|
||||
if (this.defaultActions[state]) {
|
||||
action = this.defaultActions[state];
|
||||
} else {
|
||||
if (symbol == null) symbol = lex(); // read action for current state and first input
|
||||
|
||||
action = table[state] && table[state][symbol];
|
||||
} // handle parse error
|
||||
|
||||
_handle_error: if (
|
||||
typeof action === 'undefined' ||
|
||||
!action.length ||
|
||||
!action[0]
|
||||
) {
|
||||
if (!recovering) {
|
||||
// Report error
|
||||
expected = [];
|
||||
|
||||
for (p in table[state])
|
||||
if (this.terminals_[p] && p > 2) {
|
||||
expected.push("'" + this.terminals_[p] + "'");
|
||||
}
|
||||
|
||||
var errStr = '';
|
||||
|
||||
if (this.lexer.showPosition) {
|
||||
errStr =
|
||||
'Parse error on line ' +
|
||||
(yylineno + 1) +
|
||||
':\n' +
|
||||
this.lexer.showPosition() +
|
||||
'\nExpecting ' +
|
||||
expected.join(', ') +
|
||||
", got '" +
|
||||
this.terminals_[symbol] +
|
||||
"'";
|
||||
} else {
|
||||
errStr =
|
||||
'Parse error on line ' +
|
||||
(yylineno + 1) +
|
||||
': Unexpected ' +
|
||||
(symbol == 1
|
||||
? /*EOF*/
|
||||
'end of input'
|
||||
: "'" + (this.terminals_[symbol] || symbol) + "'");
|
||||
}
|
||||
|
||||
this.parseError(errStr, {
|
||||
text: this.lexer.match,
|
||||
token: this.terminals_[symbol] || symbol,
|
||||
line: this.lexer.yylineno,
|
||||
loc: yyloc,
|
||||
expected: expected
|
||||
});
|
||||
} // just recovered from another error
|
||||
|
||||
if (recovering == 3) {
|
||||
if (symbol == EOF) {
|
||||
throw new Error(errStr || 'Parsing halted.');
|
||||
} // discard current lookahead and grab another
|
||||
|
||||
yyleng = this.lexer.yyleng;
|
||||
yytext = this.lexer.yytext;
|
||||
yylineno = this.lexer.yylineno;
|
||||
yyloc = this.lexer.yylloc;
|
||||
symbol = lex();
|
||||
} // try to recover from error
|
||||
|
||||
while (1) {
|
||||
// check for error recovery rule in this state
|
||||
if (TERROR.toString() in table[state]) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (state == 0) {
|
||||
throw new Error(errStr || 'Parsing halted.');
|
||||
}
|
||||
|
||||
popStack(1);
|
||||
state = stack[stack.length - 1];
|
||||
}
|
||||
|
||||
preErrorSymbol = symbol; // save the lookahead token
|
||||
|
||||
symbol = TERROR; // insert generic error symbol as new lookahead
|
||||
|
||||
state = stack[stack.length - 1];
|
||||
action = table[state] && table[state][TERROR];
|
||||
recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
|
||||
} // this shouldn't happen, unless resolve defaults are off
|
||||
|
||||
if (action[0] instanceof Array && action.length > 1) {
|
||||
throw new Error(
|
||||
'Parse Error: multiple actions possible at state: ' +
|
||||
state +
|
||||
', token: ' +
|
||||
symbol
|
||||
);
|
||||
}
|
||||
|
||||
switch (action[0]) {
|
||||
case 1:
|
||||
// shift
|
||||
//this.shiftCount++;
|
||||
stack.push(symbol);
|
||||
vstack.push(this.lexer.yytext);
|
||||
lstack.push(this.lexer.yylloc);
|
||||
stack.push(action[1]); // push state
|
||||
|
||||
symbol = null;
|
||||
|
||||
if (!preErrorSymbol) {
|
||||
// normal execution/no error
|
||||
yyleng = this.lexer.yyleng;
|
||||
yytext = this.lexer.yytext;
|
||||
yylineno = this.lexer.yylineno;
|
||||
yyloc = this.lexer.yylloc;
|
||||
if (recovering > 0) recovering--;
|
||||
} else {
|
||||
// error just occurred, resume old lookahead f/ before error
|
||||
symbol = preErrorSymbol;
|
||||
preErrorSymbol = null;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// reduce
|
||||
//this.reductionCount++;
|
||||
len = this.productions_[action[1]][1]; // perform semantic action
|
||||
|
||||
yyval.$ = vstack[vstack.length - len]; // default to $$ = $1
|
||||
// default location, uses first token for firsts, last for lasts
|
||||
|
||||
yyval._$ = {
|
||||
first_line: lstack[lstack.length - (len || 1)].first_line,
|
||||
last_line: lstack[lstack.length - 1].last_line,
|
||||
first_column: lstack[lstack.length - (len || 1)].first_column,
|
||||
last_column: lstack[lstack.length - 1].last_column
|
||||
};
|
||||
r = this.performAction.call(
|
||||
yyval,
|
||||
yytext,
|
||||
yyleng,
|
||||
yylineno,
|
||||
this.yy,
|
||||
action[1],
|
||||
vstack,
|
||||
lstack
|
||||
);
|
||||
|
||||
if (typeof r !== 'undefined') {
|
||||
return r;
|
||||
} // pop off stack
|
||||
|
||||
if (len) {
|
||||
stack = stack.slice(0, -1 * len * 2);
|
||||
vstack = vstack.slice(0, -1 * len);
|
||||
lstack = lstack.slice(0, -1 * len);
|
||||
}
|
||||
|
||||
stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
|
||||
|
||||
vstack.push(yyval.$);
|
||||
lstack.push(yyval._$); // goto new state = table[STATE][NONTERMINAL]
|
||||
|
||||
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
||||
stack.push(newState);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// accept
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
/* Jison generated lexer */
|
||||
|
||||
var lexer = (function () {
|
||||
var lexer = {
|
||||
EOF: 1,
|
||||
parseError: function parseError(str, hash) {
|
||||
if (this.yy.parseError) {
|
||||
this.yy.parseError(str, hash);
|
||||
} else {
|
||||
throw new Error(str);
|
||||
}
|
||||
},
|
||||
setInput: function (input) {
|
||||
this._input = input;
|
||||
this._more = this._less = this.done = false;
|
||||
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
|
||||
};
|
||||
return this;
|
||||
},
|
||||
input: function () {
|
||||
var ch = this._input[0];
|
||||
this.yytext += ch;
|
||||
this.yyleng++;
|
||||
this.match += ch;
|
||||
this.matched += ch;
|
||||
var lines = ch.match(/\n/);
|
||||
if (lines) this.yylineno++;
|
||||
this._input = this._input.slice(1);
|
||||
return ch;
|
||||
},
|
||||
unput: function (ch) {
|
||||
this._input = ch + this._input;
|
||||
return this;
|
||||
},
|
||||
more: function () {
|
||||
this._more = true;
|
||||
return this;
|
||||
},
|
||||
less: function (n) {
|
||||
this._input = this.match.slice(n) + this._input;
|
||||
},
|
||||
pastInput: function () {
|
||||
var past = this.matched.substr(
|
||||
0,
|
||||
this.matched.length - this.match.length
|
||||
);
|
||||
return (
|
||||
(past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, '')
|
||||
);
|
||||
},
|
||||
upcomingInput: function () {
|
||||
var next = this.match;
|
||||
|
||||
if (next.length < 20) {
|
||||
next += this._input.substr(0, 20 - next.length);
|
||||
}
|
||||
|
||||
return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(
|
||||
/\n/g,
|
||||
''
|
||||
);
|
||||
},
|
||||
showPosition: function () {
|
||||
var pre = this.pastInput();
|
||||
var c = new Array(pre.length + 1).join('-');
|
||||
return pre + this.upcomingInput() + '\n' + c + '^';
|
||||
},
|
||||
next: function () {
|
||||
if (this.done) {
|
||||
return this.EOF;
|
||||
}
|
||||
|
||||
if (!this._input) this.done = true;
|
||||
var token, match, tempMatch, index, col, lines;
|
||||
|
||||
if (!this._more) {
|
||||
this.yytext = '';
|
||||
this.match = '';
|
||||
}
|
||||
|
||||
var rules = this._currentRules();
|
||||
|
||||
for (var i = 0; i < rules.length; i++) {
|
||||
tempMatch = this._input.match(this.rules[rules[i]]);
|
||||
|
||||
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
||||
match = tempMatch;
|
||||
index = i;
|
||||
if (!this.options.flex) break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match) {
|
||||
lines = match[0].match(/\n.*/g);
|
||||
if (lines) this.yylineno += lines.length;
|
||||
this.yylloc = {
|
||||
first_line: this.yylloc.last_line,
|
||||
last_line: this.yylineno + 1,
|
||||
first_column: this.yylloc.last_column,
|
||||
last_column: lines
|
||||
? lines[lines.length - 1].length - 1
|
||||
: this.yylloc.last_column + match[0].length
|
||||
};
|
||||
this.yytext += match[0];
|
||||
this.match += match[0];
|
||||
this.yyleng = this.yytext.length;
|
||||
this._more = false;
|
||||
this._input = this._input.slice(match[0].length);
|
||||
this.matched += match[0];
|
||||
token = this.performAction.call(
|
||||
this,
|
||||
this.yy,
|
||||
this,
|
||||
rules[index],
|
||||
this.conditionStack[this.conditionStack.length - 1]
|
||||
);
|
||||
if (this.done && this._input) this.done = false;
|
||||
if (token) return token;
|
||||
else return;
|
||||
}
|
||||
|
||||
if (this._input === '') {
|
||||
return this.EOF;
|
||||
} else {
|
||||
this.parseError(
|
||||
'Lexical error on line ' +
|
||||
(this.yylineno + 1) +
|
||||
'. Unrecognized text.\n' +
|
||||
this.showPosition(),
|
||||
{
|
||||
text: '',
|
||||
token: null,
|
||||
line: this.yylineno
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
lex: function lex() {
|
||||
var r = this.next();
|
||||
|
||||
if (typeof r !== 'undefined') {
|
||||
return r;
|
||||
} else {
|
||||
return this.lex();
|
||||
}
|
||||
},
|
||||
begin: function begin(condition) {
|
||||
this.conditionStack.push(condition);
|
||||
},
|
||||
popState: function popState() {
|
||||
return this.conditionStack.pop();
|
||||
},
|
||||
_currentRules: function _currentRules() {
|
||||
return this.conditions[
|
||||
this.conditionStack[this.conditionStack.length - 1]
|
||||
].rules;
|
||||
},
|
||||
topState: function () {
|
||||
return this.conditionStack[this.conditionStack.length - 2];
|
||||
},
|
||||
pushState: function begin(condition) {
|
||||
this.begin(condition);
|
||||
}
|
||||
};
|
||||
lexer.options = {};
|
||||
|
||||
lexer.performAction = function anonymous(
|
||||
yy,
|
||||
yy_,
|
||||
$avoiding_name_collisions,
|
||||
YY_START
|
||||
) {
|
||||
var YYSTATE = YY_START;
|
||||
|
||||
switch ($avoiding_name_collisions) {
|
||||
case 0:
|
||||
/* skip whitespace */
|
||||
break;
|
||||
|
||||
case 1:
|
||||
return 6;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2);
|
||||
return 4;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
return 17;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
return 18;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
return 23;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
return 24;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
return 22;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
return 21;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
return 10;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
return 11;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
return 8;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
return 14;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
return 'INVALID';
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
lexer.rules = [
|
||||
/^(?:\s+)/,
|
||||
/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,
|
||||
/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,
|
||||
/^(?:\{)/,
|
||||
/^(?:\})/,
|
||||
/^(?:\[)/,
|
||||
/^(?:\])/,
|
||||
/^(?:,)/,
|
||||
/^(?::)/,
|
||||
/^(?:true\b)/,
|
||||
/^(?:false\b)/,
|
||||
/^(?:null\b)/,
|
||||
/^(?:$)/,
|
||||
/^(?:.)/
|
||||
];
|
||||
lexer.conditions = {
|
||||
INITIAL: {
|
||||
rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
inclusive: true
|
||||
}
|
||||
};
|
||||
return lexer;
|
||||
})();
|
||||
|
||||
parser.lexer = lexer;
|
||||
return parser;
|
||||
})();
|
||||
|
||||
exports.parser = jsonlint;
|
||||
|
||||
exports.errors = function (input) {
|
||||
try {
|
||||
this.parse(input);
|
||||
} catch (e) {
|
||||
return e.stack;
|
||||
}
|
||||
};
|
||||
|
||||
exports.parse = function () {
|
||||
return jsonlint.parse.apply(jsonlint, arguments);
|
||||
};
|
||||
|
||||
exports.main = function commonjsMain(args) {
|
||||
if (!args[1]) throw new Error('Usage: ' + args[0] + ' FILE');
|
||||
|
||||
if (typeof process !== 'undefined') {
|
||||
var source = require('fs').readFileSync(
|
||||
require('path').join(process.cwd(), args[1]),
|
||||
'utf8'
|
||||
);
|
||||
} else {
|
||||
var cwd = require('file').path(require('file').cwd());
|
||||
|
||||
var source = cwd.join(args[1]).read({
|
||||
charset: 'utf-8'
|
||||
});
|
||||
}
|
||||
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
21
node_modules/jest-config/node_modules/@jest/types/LICENSE
generated
vendored
Normal file
21
node_modules/jest-config/node_modules/@jest/types/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
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.
|
||||
172
node_modules/jest-config/node_modules/@jest/types/build/Circus.d.ts
generated
vendored
Normal file
172
node_modules/jest-config/node_modules/@jest/types/build/Circus.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import type * as Global from './Global';
|
||||
declare type Process = NodeJS.Process;
|
||||
export declare type DoneFn = Global.DoneFn;
|
||||
export declare type BlockFn = Global.BlockFn;
|
||||
export declare type BlockName = Global.BlockName;
|
||||
export declare type BlockMode = void | 'skip' | 'only' | 'todo';
|
||||
export declare type TestMode = BlockMode;
|
||||
export declare type TestName = Global.TestName;
|
||||
export declare type TestFn = Global.TestFn;
|
||||
export declare type HookFn = (done?: DoneFn) => Promise<any> | null | undefined;
|
||||
export declare type AsyncFn = TestFn | HookFn;
|
||||
export declare type SharedHookType = 'afterAll' | 'beforeAll';
|
||||
export declare type HookType = SharedHookType | 'afterEach' | 'beforeEach';
|
||||
export declare type TestContext = Record<string, any>;
|
||||
export declare type Exception = any;
|
||||
export declare type FormattedError = string;
|
||||
export declare type Hook = {
|
||||
asyncError: Error;
|
||||
fn: HookFn;
|
||||
type: HookType;
|
||||
parent: DescribeBlock;
|
||||
timeout: number | undefined | null;
|
||||
};
|
||||
export declare type EventHandler = (event: Event, state: State) => void;
|
||||
export declare type Event = {
|
||||
name: 'include_test_location_in_result';
|
||||
} | {
|
||||
asyncError: Error;
|
||||
mode: BlockMode;
|
||||
name: 'start_describe_definition';
|
||||
blockName: BlockName;
|
||||
} | {
|
||||
mode: BlockMode;
|
||||
name: 'finish_describe_definition';
|
||||
blockName: BlockName;
|
||||
} | {
|
||||
asyncError: Error;
|
||||
name: 'add_hook';
|
||||
hookType: HookType;
|
||||
fn: HookFn;
|
||||
timeout: number | undefined;
|
||||
} | {
|
||||
asyncError: Error;
|
||||
name: 'add_test';
|
||||
testName: TestName;
|
||||
fn?: TestFn;
|
||||
mode?: TestMode;
|
||||
timeout: number | undefined;
|
||||
} | {
|
||||
name: 'hook_start';
|
||||
hook: Hook;
|
||||
} | {
|
||||
name: 'hook_success';
|
||||
describeBlock?: DescribeBlock;
|
||||
test?: TestEntry;
|
||||
hook: Hook;
|
||||
} | {
|
||||
name: 'hook_failure';
|
||||
error: string | Exception;
|
||||
describeBlock?: DescribeBlock;
|
||||
test?: TestEntry;
|
||||
hook: Hook;
|
||||
} | {
|
||||
name: 'test_fn_start';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_fn_success';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_fn_failure';
|
||||
error: Exception;
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_retry';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_start';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_skip';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_todo';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_done';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'run_describe_start';
|
||||
describeBlock: DescribeBlock;
|
||||
} | {
|
||||
name: 'run_describe_finish';
|
||||
describeBlock: DescribeBlock;
|
||||
} | {
|
||||
name: 'run_start';
|
||||
} | {
|
||||
name: 'run_finish';
|
||||
} | {
|
||||
name: 'error';
|
||||
error: Exception;
|
||||
} | {
|
||||
name: 'setup';
|
||||
testNamePattern?: string;
|
||||
parentProcess: Process;
|
||||
} | {
|
||||
name: 'teardown';
|
||||
};
|
||||
export declare type TestStatus = 'skip' | 'done' | 'todo';
|
||||
export declare type TestResult = {
|
||||
duration?: number | null;
|
||||
errors: Array<FormattedError>;
|
||||
invocations: number;
|
||||
status: TestStatus;
|
||||
location?: {
|
||||
column: number;
|
||||
line: number;
|
||||
} | null;
|
||||
testPath: Array<TestName | BlockName>;
|
||||
};
|
||||
export declare type RunResult = {
|
||||
unhandledErrors: Array<FormattedError>;
|
||||
testResults: TestResults;
|
||||
};
|
||||
export declare type TestResults = Array<TestResult>;
|
||||
export declare type GlobalErrorHandlers = {
|
||||
uncaughtException: Array<(exception: Exception) => void>;
|
||||
unhandledRejection: Array<(exception: Exception, promise: Promise<any>) => void>;
|
||||
};
|
||||
export declare type State = {
|
||||
currentDescribeBlock: DescribeBlock;
|
||||
currentlyRunningTest?: TestEntry | null;
|
||||
expand?: boolean;
|
||||
hasFocusedTests: boolean;
|
||||
originalGlobalErrorHandlers?: GlobalErrorHandlers;
|
||||
parentProcess: Process | null;
|
||||
rootDescribeBlock: DescribeBlock;
|
||||
testNamePattern?: RegExp | null;
|
||||
testTimeout: number;
|
||||
unhandledErrors: Array<Exception>;
|
||||
includeTestLocationInResult: boolean;
|
||||
};
|
||||
export declare type DescribeBlock = {
|
||||
children: Array<DescribeBlock>;
|
||||
hooks: Array<Hook>;
|
||||
mode: BlockMode;
|
||||
name: BlockName;
|
||||
parent?: DescribeBlock;
|
||||
tests: Array<TestEntry>;
|
||||
};
|
||||
export declare type TestError = Exception | Array<[Exception | undefined, Exception]>;
|
||||
export declare type TestEntry = {
|
||||
asyncError: Exception;
|
||||
errors: TestError;
|
||||
fn?: TestFn;
|
||||
invocations: number;
|
||||
mode: TestMode;
|
||||
name: TestName;
|
||||
parent: DescribeBlock;
|
||||
startedAt?: number | null;
|
||||
duration?: number | null;
|
||||
status?: TestStatus | null;
|
||||
timeout?: number;
|
||||
};
|
||||
export {};
|
||||
//# sourceMappingURL=Circus.d.ts.map
|
||||
1
node_modules/jest-config/node_modules/@jest/types/build/Circus.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/node_modules/@jest/types/build/Circus.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"Circus.d.ts","sourceRoot":"","sources":["../src/Circus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AAExC,aAAK,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AAE9B,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACrC,oBAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AACzC,oBAAY,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AACxD,oBAAY,QAAQ,GAAG,SAAS,CAAC;AACjC,oBAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AACtC,oBAAY,cAAc,GAAG,UAAU,GAAG,WAAW,CAAC;AACtD,oBAAY,QAAQ,GAAG,cAAc,GAAG,WAAW,GAAG,YAAY,CAAC;AACnE,oBAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC9C,oBAAY,SAAS,GAAG,GAAG,CAAC;AAC5B,oBAAY,cAAc,GAAG,MAAM,CAAC;AACpC,oBAAY,IAAI,GAAG;IACjB,UAAU,EAAE,KAAK,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,oBAAY,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GACb;IACE,IAAI,EAAE,iCAAiC,CAAC;CACzC,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,2BAA2B,CAAC;IAClC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,4BAA4B,CAAC;IACnC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAGE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAKE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,WAAW,CAAC;CACnB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IAGE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB,GACD;IAEE,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB,GACD;IAGE,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEN,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAClD,oBAAY,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,oBAAY,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;AAE5C,oBAAY,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,KAAK,CAAC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC;IACzD,kBAAkB,EAAE,KAAK,CACvB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CACtD,CAAC;CACH,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,oBAAoB,EAAE,aAAa,CAAC;IACpC,oBAAoB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IAIzB,2BAA2B,CAAC,EAAE,mBAAmB,CAAC;IAClD,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,aAAa,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,2BAA2B,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CACzB,CAAC;AAEF,oBAAY,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC,SAAS,GAAG,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE9E,oBAAY,SAAS,GAAG;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,EAAE,SAAS,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
||||
1
node_modules/jest-config/node_modules/@jest/types/build/Circus.js
generated
vendored
Normal file
1
node_modules/jest-config/node_modules/@jest/types/build/Circus.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
'use strict';
|
||||
420
node_modules/jest-config/node_modules/@jest/types/build/Config.d.ts
generated
vendored
Normal file
420
node_modules/jest-config/node_modules/@jest/types/build/Config.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,420 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import type { Arguments } from 'yargs';
|
||||
import type { ReportOptions } from 'istanbul-reports';
|
||||
import chalk = require('chalk');
|
||||
declare type CoverageProvider = 'babel' | 'v8';
|
||||
export declare type Path = string;
|
||||
export declare type Glob = string;
|
||||
export declare type HasteConfig = {
|
||||
computeSha1?: boolean;
|
||||
defaultPlatform?: string | null;
|
||||
hasteImplModulePath?: string;
|
||||
platforms?: Array<string>;
|
||||
providesModuleNodeModules: Array<string>;
|
||||
throwOnModuleCollision?: boolean;
|
||||
};
|
||||
export declare type ReporterConfig = [string, Record<string, unknown>];
|
||||
export declare type TransformerConfig = [string, Record<string, unknown>];
|
||||
export interface ConfigGlobals {
|
||||
[K: string]: unknown;
|
||||
}
|
||||
export declare type DefaultOptions = {
|
||||
automock: boolean;
|
||||
bail: number;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: Path;
|
||||
changedFilesWithAncestor: boolean;
|
||||
clearMocks: boolean;
|
||||
collectCoverage: boolean;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
coverageReporters: Array<string | [string, any]>;
|
||||
coverageProvider: CoverageProvider;
|
||||
errorOnDeprecated: boolean;
|
||||
expand: boolean;
|
||||
forceCoverageMatch: Array<Glob>;
|
||||
globals: ConfigGlobals;
|
||||
haste: HasteConfig;
|
||||
maxConcurrency: number;
|
||||
maxWorkers: number | string;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleNameMapper: Record<string, string | Array<string>>;
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: NotifyMode;
|
||||
prettierPath: string;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
restoreMocks: boolean;
|
||||
roots: Array<Path>;
|
||||
runTestsByPath: boolean;
|
||||
runner: 'jest-runner';
|
||||
setupFiles: Array<Path>;
|
||||
setupFilesAfterEnv: Array<Path>;
|
||||
skipFilter: boolean;
|
||||
snapshotSerializers: Array<Path>;
|
||||
testEnvironment: string;
|
||||
testEnvironmentOptions: Record<string, any>;
|
||||
testFailureExitCode: string | number;
|
||||
testLocationInResults: boolean;
|
||||
testMatch: Array<Glob>;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testRegex: Array<string>;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
timers: 'real' | 'fake';
|
||||
transformIgnorePatterns: Array<Glob>;
|
||||
useStderr: boolean;
|
||||
watch: boolean;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
watchman: boolean;
|
||||
};
|
||||
export declare type DisplayName = string | {
|
||||
name: string;
|
||||
color: typeof chalk.Color;
|
||||
};
|
||||
export declare type InitialOptionsWithRootDir = InitialOptions & Required<Pick<InitialOptions, 'rootDir'>>;
|
||||
export declare type InitialOptions = Partial<{
|
||||
automock: boolean;
|
||||
bail: boolean | number;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: Path;
|
||||
clearMocks: boolean;
|
||||
changedFilesWithAncestor: boolean;
|
||||
changedSince: string;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: Array<Glob>;
|
||||
collectCoverageOnlyFrom: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
coverageProvider: CoverageProvider;
|
||||
coverageReporters: Array<string>;
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
[key: string]: number;
|
||||
};
|
||||
};
|
||||
dependencyExtractor: string;
|
||||
detectLeaks: boolean;
|
||||
detectOpenHandles: boolean;
|
||||
displayName: DisplayName;
|
||||
expand: boolean;
|
||||
extraGlobals: Array<string>;
|
||||
filter: Path;
|
||||
findRelatedTests: boolean;
|
||||
forceCoverageMatch: Array<Glob>;
|
||||
forceExit: boolean;
|
||||
json: boolean;
|
||||
globals: ConfigGlobals;
|
||||
globalSetup: string | null | undefined;
|
||||
globalTeardown: string | null | undefined;
|
||||
haste: HasteConfig;
|
||||
reporters: Array<string | ReporterConfig>;
|
||||
logHeapUsage: boolean;
|
||||
lastCommit: boolean;
|
||||
listTests: boolean;
|
||||
mapCoverage: boolean;
|
||||
maxConcurrency: number;
|
||||
maxWorkers: number | string;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleLoader: Path;
|
||||
moduleNameMapper: {
|
||||
[key: string]: string | Array<string>;
|
||||
};
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
modulePaths: Array<string>;
|
||||
name: string;
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: string;
|
||||
onlyChanged: boolean;
|
||||
outputFile: Path;
|
||||
passWithNoTests: boolean;
|
||||
preprocessorIgnorePatterns: Array<Glob>;
|
||||
preset: string | null | undefined;
|
||||
prettierPath: string | null | undefined;
|
||||
projects: Array<Glob>;
|
||||
replname: string | null | undefined;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver: Path | null | undefined;
|
||||
restoreMocks: boolean;
|
||||
rootDir: Path;
|
||||
roots: Array<Path>;
|
||||
runner: string;
|
||||
runTestsByPath: boolean;
|
||||
scriptPreprocessor: string;
|
||||
setupFiles: Array<Path>;
|
||||
setupTestFrameworkScriptFile: Path;
|
||||
setupFilesAfterEnv: Array<Path>;
|
||||
silent: boolean;
|
||||
skipFilter: boolean;
|
||||
skipNodeResolution: boolean;
|
||||
snapshotResolver: Path;
|
||||
snapshotSerializers: Array<Path>;
|
||||
errorOnDeprecated: boolean;
|
||||
testEnvironment: string;
|
||||
testEnvironmentOptions: Record<string, any>;
|
||||
testFailureExitCode: string | number;
|
||||
testLocationInResults: boolean;
|
||||
testMatch: Array<Glob>;
|
||||
testNamePattern: string;
|
||||
testPathDirs: Array<Path>;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testRegex: string | Array<string>;
|
||||
testResultsProcessor: string;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
testTimeout: number;
|
||||
timers: 'real' | 'fake';
|
||||
transform: {
|
||||
[regex: string]: Path | TransformerConfig;
|
||||
};
|
||||
transformIgnorePatterns: Array<Glob>;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
unmockedModulePathPatterns: Array<string>;
|
||||
updateSnapshot: boolean;
|
||||
useStderr: boolean;
|
||||
verbose?: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPlugins: Array<string | [string, Record<string, any>]>;
|
||||
}>;
|
||||
export declare type SnapshotUpdateState = 'all' | 'new' | 'none';
|
||||
declare type NotifyMode = 'always' | 'failure' | 'success' | 'change' | 'success-change' | 'failure-change';
|
||||
export declare type CoverageThresholdValue = {
|
||||
branches?: number;
|
||||
functions?: number;
|
||||
lines?: number;
|
||||
statements?: number;
|
||||
};
|
||||
declare type CoverageThreshold = {
|
||||
[path: string]: CoverageThresholdValue;
|
||||
global: CoverageThresholdValue;
|
||||
};
|
||||
export declare type GlobalConfig = {
|
||||
bail: number;
|
||||
changedSince?: string;
|
||||
changedFilesWithAncestor: boolean;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: Array<Glob>;
|
||||
collectCoverageOnlyFrom?: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns?: Array<string>;
|
||||
coverageProvider: CoverageProvider;
|
||||
coverageReporters: Array<keyof ReportOptions | [keyof ReportOptions, any]>;
|
||||
coverageThreshold?: CoverageThreshold;
|
||||
detectLeaks: boolean;
|
||||
detectOpenHandles: boolean;
|
||||
enabledTestsMap?: {
|
||||
[key: string]: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
};
|
||||
expand: boolean;
|
||||
filter?: Path;
|
||||
findRelatedTests: boolean;
|
||||
forceExit: boolean;
|
||||
json: boolean;
|
||||
globalSetup?: string;
|
||||
globalTeardown?: string;
|
||||
lastCommit: boolean;
|
||||
logHeapUsage: boolean;
|
||||
listTests: boolean;
|
||||
maxConcurrency: number;
|
||||
maxWorkers: number;
|
||||
noStackTrace: boolean;
|
||||
nonFlagArgs: Array<string>;
|
||||
noSCM?: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: NotifyMode;
|
||||
outputFile?: Path;
|
||||
onlyChanged: boolean;
|
||||
onlyFailures: boolean;
|
||||
passWithNoTests: boolean;
|
||||
projects: Array<Glob>;
|
||||
replname?: string;
|
||||
reporters?: Array<string | ReporterConfig>;
|
||||
runTestsByPath: boolean;
|
||||
rootDir: Path;
|
||||
silent?: boolean;
|
||||
skipFilter: boolean;
|
||||
errorOnDeprecated: boolean;
|
||||
testFailureExitCode: number;
|
||||
testNamePattern?: string;
|
||||
testPathPattern: string;
|
||||
testResultsProcessor?: string;
|
||||
testSequencer: string;
|
||||
testTimeout?: number;
|
||||
updateSnapshot: SnapshotUpdateState;
|
||||
useStderr: boolean;
|
||||
verbose?: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPlugins?: Array<{
|
||||
path: string;
|
||||
config: Record<string, any>;
|
||||
}> | null;
|
||||
};
|
||||
export declare type ProjectConfig = {
|
||||
automock: boolean;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: Path;
|
||||
clearMocks: boolean;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
cwd: Path;
|
||||
dependencyExtractor?: string;
|
||||
detectLeaks: boolean;
|
||||
detectOpenHandles: boolean;
|
||||
displayName?: DisplayName;
|
||||
errorOnDeprecated: boolean;
|
||||
extraGlobals: Array<keyof NodeJS.Global>;
|
||||
filter?: Path;
|
||||
forceCoverageMatch: Array<Glob>;
|
||||
globalSetup?: string;
|
||||
globalTeardown?: string;
|
||||
globals: ConfigGlobals;
|
||||
haste: HasteConfig;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleLoader?: Path;
|
||||
moduleNameMapper: Array<[string, string]>;
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
modulePaths?: Array<string>;
|
||||
name: string;
|
||||
prettierPath: string;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver?: Path;
|
||||
restoreMocks: boolean;
|
||||
rootDir: Path;
|
||||
roots: Array<Path>;
|
||||
runner: string;
|
||||
setupFiles: Array<Path>;
|
||||
setupFilesAfterEnv: Array<Path>;
|
||||
skipFilter: boolean;
|
||||
skipNodeResolution?: boolean;
|
||||
snapshotResolver?: Path;
|
||||
snapshotSerializers: Array<Path>;
|
||||
testEnvironment: string;
|
||||
testEnvironmentOptions: Record<string, any>;
|
||||
testMatch: Array<Glob>;
|
||||
testLocationInResults: boolean;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testRegex: Array<string>;
|
||||
testRunner: string;
|
||||
testURL: string;
|
||||
timers: 'real' | 'fake';
|
||||
transform: Array<[string, Path, Record<string, unknown>]>;
|
||||
transformIgnorePatterns: Array<Glob>;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
unmockedModulePathPatterns?: Array<string>;
|
||||
};
|
||||
export declare type Argv = Arguments<Partial<{
|
||||
all: boolean;
|
||||
automock: boolean;
|
||||
bail: boolean | number;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: string;
|
||||
changedFilesWithAncestor: boolean;
|
||||
changedSince: string;
|
||||
ci: boolean;
|
||||
clearCache: boolean;
|
||||
clearMocks: boolean;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: string;
|
||||
collectCoverageOnlyFrom: Array<string>;
|
||||
color: boolean;
|
||||
colors: boolean;
|
||||
config: string;
|
||||
coverage: boolean;
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
coverageReporters: Array<string>;
|
||||
coverageThreshold: string;
|
||||
debug: boolean;
|
||||
env: string;
|
||||
expand: boolean;
|
||||
findRelatedTests: boolean;
|
||||
forceExit: boolean;
|
||||
globals: string;
|
||||
globalSetup: string | null | undefined;
|
||||
globalTeardown: string | null | undefined;
|
||||
haste: string;
|
||||
init: boolean;
|
||||
json: boolean;
|
||||
lastCommit: boolean;
|
||||
logHeapUsage: boolean;
|
||||
maxWorkers: number | string;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleNameMapper: string;
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
modulePaths: Array<string>;
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: string;
|
||||
onlyChanged: boolean;
|
||||
outputFile: string;
|
||||
preset: string | null | undefined;
|
||||
projects: Array<string>;
|
||||
prettierPath: string | null | undefined;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver: string | null | undefined;
|
||||
restoreMocks: boolean;
|
||||
rootDir: string;
|
||||
roots: Array<string>;
|
||||
runInBand: boolean;
|
||||
setupFiles: Array<string>;
|
||||
setupFilesAfterEnv: Array<string>;
|
||||
showConfig: boolean;
|
||||
silent: boolean;
|
||||
snapshotSerializers: Array<string>;
|
||||
testEnvironment: string;
|
||||
testFailureExitCode: string | null | undefined;
|
||||
testMatch: Array<string>;
|
||||
testNamePattern: string;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testPathPattern: Array<string>;
|
||||
testRegex: string | Array<string>;
|
||||
testResultsProcessor: string;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
testTimeout: number | null | undefined;
|
||||
timers: string;
|
||||
transform: string;
|
||||
transformIgnorePatterns: Array<string>;
|
||||
unmockedModulePathPatterns: Array<string> | null | undefined;
|
||||
updateSnapshot: boolean;
|
||||
useStderr: boolean;
|
||||
verbose: boolean;
|
||||
version: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
}>>;
|
||||
export {};
|
||||
//# sourceMappingURL=Config.d.ts.map
|
||||
1
node_modules/jest-config/node_modules/@jest/types/build/Config.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/node_modules/@jest/types/build/Config.d.ts.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
15
node_modules/jest-config/node_modules/@jest/types/build/Config.js
generated
vendored
Normal file
15
node_modules/jest-config/node_modules/@jest/types/build/Config.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
77
node_modules/jest-config/node_modules/@jest/types/build/Global.d.ts
generated
vendored
Normal file
77
node_modules/jest-config/node_modules/@jest/types/build/Global.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import type { CoverageMapData } from 'istanbul-lib-coverage';
|
||||
export declare type DoneFn = (reason?: string | Error) => void;
|
||||
export declare type TestName = string;
|
||||
export declare type TestFn = (done?: DoneFn) => Promise<any> | void | undefined;
|
||||
export declare type BlockFn = () => void;
|
||||
export declare type BlockName = string;
|
||||
export declare type Col = unknown;
|
||||
export declare type Row = Array<Col>;
|
||||
export declare type Table = Array<Row>;
|
||||
export declare type ArrayTable = Table | Row;
|
||||
export declare type TemplateTable = TemplateStringsArray;
|
||||
export declare type TemplateData = Array<unknown>;
|
||||
export declare type EachTable = ArrayTable | TemplateTable;
|
||||
export declare type EachTestFn = (...args: Array<any>) => Promise<any> | void | undefined;
|
||||
declare type Jasmine = {
|
||||
_DEFAULT_TIMEOUT_INTERVAL?: number;
|
||||
addMatchers: Function;
|
||||
};
|
||||
declare type Each = (table: EachTable, ...taggedTemplateData: Array<unknown>) => (title: string, test: EachTestFn, timeout?: number) => void;
|
||||
export interface ItBase {
|
||||
(testName: TestName, fn: TestFn, timeout?: number): void;
|
||||
each: Each;
|
||||
}
|
||||
export interface It extends ItBase {
|
||||
only: ItBase;
|
||||
skip: ItBase;
|
||||
todo: (testName: TestName, ...rest: Array<any>) => void;
|
||||
}
|
||||
export interface ItConcurrentBase {
|
||||
(testName: string, testFn: () => Promise<any>, timeout?: number): void;
|
||||
}
|
||||
export interface ItConcurrentExtended extends ItConcurrentBase {
|
||||
only: ItConcurrentBase;
|
||||
skip: ItConcurrentBase;
|
||||
}
|
||||
export interface ItConcurrent extends It {
|
||||
concurrent: ItConcurrentExtended;
|
||||
}
|
||||
export interface DescribeBase {
|
||||
(blockName: BlockName, blockFn: BlockFn): void;
|
||||
each: Each;
|
||||
}
|
||||
export interface Describe extends DescribeBase {
|
||||
only: DescribeBase;
|
||||
skip: DescribeBase;
|
||||
}
|
||||
export interface GlobalAdditions {
|
||||
it: ItConcurrent;
|
||||
test: ItConcurrent;
|
||||
fit: ItBase & {
|
||||
concurrent?: ItConcurrentBase;
|
||||
};
|
||||
xit: ItBase;
|
||||
xtest: ItBase;
|
||||
describe: Describe;
|
||||
xdescribe: DescribeBase;
|
||||
fdescribe: DescribeBase;
|
||||
__coverage__: CoverageMapData;
|
||||
jasmine: Jasmine;
|
||||
fail: () => void;
|
||||
pending: () => void;
|
||||
spyOn: () => void;
|
||||
spyOnProperty: () => void;
|
||||
}
|
||||
declare type NodeGlobalWithoutAdditions = Omit<NodeJS.Global, keyof GlobalAdditions>;
|
||||
export interface Global extends GlobalAdditions, NodeGlobalWithoutAdditions {
|
||||
[extras: string]: any;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=Global.d.ts.map
|
||||
1
node_modules/jest-config/node_modules/@jest/types/build/Global.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/node_modules/@jest/types/build/Global.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"Global.d.ts","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAE3D,oBAAY,MAAM,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;AACvD,oBAAY,QAAQ,GAAG,MAAM,CAAC;AAC9B,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,IAAI,CAAC;AACjC,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B,oBAAY,GAAG,GAAG,OAAO,CAAC;AAC1B,oBAAY,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7B,oBAAY,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,oBAAY,UAAU,GAAG,KAAK,GAAG,GAAG,CAAC;AACrC,oBAAY,aAAa,GAAG,oBAAoB,CAAC;AACjD,oBAAY,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1C,oBAAY,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;AACnD,oBAAY,UAAU,GAAG,CACvB,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAChB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAGrC,aAAK,OAAO,GAAG;IAAC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,QAAQ,CAAA;CAAC,CAAC;AAE3E,aAAK,IAAI,GAAG,CACV,KAAK,EAAE,SAAS,EAChB,GAAG,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,KAClC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAEjE,MAAM,WAAW,MAAM;IACrB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzD,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,EAAG,SAAQ,MAAM;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;CACzD;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,YAAa,SAAQ,EAAE;IACtC,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/C,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB;AAGD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAC,CAAC;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAGD,aAAK,0BAA0B,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,eAAe,CAAC,CAAC;AAE7E,MAAM,WAAW,MAAO,SAAQ,eAAe,EAAE,0BAA0B;IACzE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC;CACvB"}
|
||||
1
node_modules/jest-config/node_modules/@jest/types/build/Global.js
generated
vendored
Normal file
1
node_modules/jest-config/node_modules/@jest/types/build/Global.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
'use strict';
|
||||
11
node_modules/jest-config/node_modules/@jest/types/build/index.d.ts
generated
vendored
Normal file
11
node_modules/jest-config/node_modules/@jest/types/build/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type * as Circus from './Circus';
|
||||
import type * as Config from './Config';
|
||||
import type * as Global from './Global';
|
||||
export type { Circus, Config, Global };
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/jest-config/node_modules/@jest/types/build/index.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-config/node_modules/@jest/types/build/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AAExC,YAAY,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC"}
|
||||
1
node_modules/jest-config/node_modules/@jest/types/build/index.js
generated
vendored
Normal file
1
node_modules/jest-config/node_modules/@jest/types/build/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
'use strict';
|
||||
173
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/Circus.d.ts
generated
vendored
Normal file
173
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/Circus.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
/// <reference types="node" />
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import * as Global from './Global';
|
||||
declare type Process = NodeJS.Process;
|
||||
export declare type DoneFn = Global.DoneFn;
|
||||
export declare type BlockFn = Global.BlockFn;
|
||||
export declare type BlockName = Global.BlockName;
|
||||
export declare type BlockMode = void | 'skip' | 'only' | 'todo';
|
||||
export declare type TestMode = BlockMode;
|
||||
export declare type TestName = Global.TestName;
|
||||
export declare type TestFn = Global.TestFn;
|
||||
export declare type HookFn = (done?: DoneFn) => Promise<any> | null | undefined;
|
||||
export declare type AsyncFn = TestFn | HookFn;
|
||||
export declare type SharedHookType = 'afterAll' | 'beforeAll';
|
||||
export declare type HookType = SharedHookType | 'afterEach' | 'beforeEach';
|
||||
export declare type TestContext = Record<string, any>;
|
||||
export declare type Exception = any;
|
||||
export declare type FormattedError = string;
|
||||
export declare type Hook = {
|
||||
asyncError: Error;
|
||||
fn: HookFn;
|
||||
type: HookType;
|
||||
parent: DescribeBlock;
|
||||
timeout: number | undefined | null;
|
||||
};
|
||||
export declare type EventHandler = (event: Event, state: State) => void;
|
||||
export declare type Event = {
|
||||
name: 'include_test_location_in_result';
|
||||
} | {
|
||||
asyncError: Error;
|
||||
mode: BlockMode;
|
||||
name: 'start_describe_definition';
|
||||
blockName: BlockName;
|
||||
} | {
|
||||
mode: BlockMode;
|
||||
name: 'finish_describe_definition';
|
||||
blockName: BlockName;
|
||||
} | {
|
||||
asyncError: Error;
|
||||
name: 'add_hook';
|
||||
hookType: HookType;
|
||||
fn: HookFn;
|
||||
timeout: number | undefined;
|
||||
} | {
|
||||
asyncError: Error;
|
||||
name: 'add_test';
|
||||
testName: TestName;
|
||||
fn?: TestFn;
|
||||
mode?: TestMode;
|
||||
timeout: number | undefined;
|
||||
} | {
|
||||
name: 'hook_start';
|
||||
hook: Hook;
|
||||
} | {
|
||||
name: 'hook_success';
|
||||
describeBlock?: DescribeBlock;
|
||||
test?: TestEntry;
|
||||
hook: Hook;
|
||||
} | {
|
||||
name: 'hook_failure';
|
||||
error: string | Exception;
|
||||
describeBlock?: DescribeBlock;
|
||||
test?: TestEntry;
|
||||
hook: Hook;
|
||||
} | {
|
||||
name: 'test_fn_start';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_fn_success';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_fn_failure';
|
||||
error: Exception;
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_retry';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_start';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_skip';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_todo';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'test_done';
|
||||
test: TestEntry;
|
||||
} | {
|
||||
name: 'run_describe_start';
|
||||
describeBlock: DescribeBlock;
|
||||
} | {
|
||||
name: 'run_describe_finish';
|
||||
describeBlock: DescribeBlock;
|
||||
} | {
|
||||
name: 'run_start';
|
||||
} | {
|
||||
name: 'run_finish';
|
||||
} | {
|
||||
name: 'error';
|
||||
error: Exception;
|
||||
} | {
|
||||
name: 'setup';
|
||||
testNamePattern?: string;
|
||||
parentProcess: Process;
|
||||
} | {
|
||||
name: 'teardown';
|
||||
};
|
||||
export declare type TestStatus = 'skip' | 'done' | 'todo';
|
||||
export declare type TestResult = {
|
||||
duration?: number | null;
|
||||
errors: Array<FormattedError>;
|
||||
invocations: number;
|
||||
status: TestStatus;
|
||||
location?: {
|
||||
column: number;
|
||||
line: number;
|
||||
} | null;
|
||||
testPath: Array<TestName | BlockName>;
|
||||
};
|
||||
export declare type RunResult = {
|
||||
unhandledErrors: Array<FormattedError>;
|
||||
testResults: TestResults;
|
||||
};
|
||||
export declare type TestResults = Array<TestResult>;
|
||||
export declare type GlobalErrorHandlers = {
|
||||
uncaughtException: Array<(exception: Exception) => void>;
|
||||
unhandledRejection: Array<(exception: Exception, promise: Promise<any>) => void>;
|
||||
};
|
||||
export declare type State = {
|
||||
currentDescribeBlock: DescribeBlock;
|
||||
currentlyRunningTest?: TestEntry | null;
|
||||
expand?: boolean;
|
||||
hasFocusedTests: boolean;
|
||||
originalGlobalErrorHandlers?: GlobalErrorHandlers;
|
||||
parentProcess: Process | null;
|
||||
rootDescribeBlock: DescribeBlock;
|
||||
testNamePattern?: RegExp | null;
|
||||
testTimeout: number;
|
||||
unhandledErrors: Array<Exception>;
|
||||
includeTestLocationInResult: boolean;
|
||||
};
|
||||
export declare type DescribeBlock = {
|
||||
children: Array<DescribeBlock>;
|
||||
hooks: Array<Hook>;
|
||||
mode: BlockMode;
|
||||
name: BlockName;
|
||||
parent?: DescribeBlock;
|
||||
tests: Array<TestEntry>;
|
||||
};
|
||||
export declare type TestError = Exception | Array<[Exception | undefined, Exception]>;
|
||||
export declare type TestEntry = {
|
||||
asyncError: Exception;
|
||||
errors: TestError;
|
||||
fn?: TestFn;
|
||||
invocations: number;
|
||||
mode: TestMode;
|
||||
name: TestName;
|
||||
parent: DescribeBlock;
|
||||
startedAt?: number | null;
|
||||
duration?: number | null;
|
||||
status?: TestStatus | null;
|
||||
timeout?: number;
|
||||
};
|
||||
export {};
|
||||
//# sourceMappingURL=Circus.d.ts.map
|
||||
421
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/Config.d.ts
generated
vendored
Normal file
421
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/Config.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,421 @@
|
|||
/// <reference types="node" />
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import { Arguments } from 'yargs';
|
||||
import { ReportOptions } from 'istanbul-reports';
|
||||
import chalk = require('chalk');
|
||||
declare type CoverageProvider = 'babel' | 'v8';
|
||||
export declare type Path = string;
|
||||
export declare type Glob = string;
|
||||
export declare type HasteConfig = {
|
||||
computeSha1?: boolean;
|
||||
defaultPlatform?: string | null;
|
||||
hasteImplModulePath?: string;
|
||||
platforms?: Array<string>;
|
||||
providesModuleNodeModules: Array<string>;
|
||||
throwOnModuleCollision?: boolean;
|
||||
};
|
||||
export declare type ReporterConfig = [string, Record<string, unknown>];
|
||||
export declare type TransformerConfig = [string, Record<string, unknown>];
|
||||
export interface ConfigGlobals {
|
||||
[K: string]: unknown;
|
||||
}
|
||||
export declare type DefaultOptions = {
|
||||
automock: boolean;
|
||||
bail: number;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: Path;
|
||||
changedFilesWithAncestor: boolean;
|
||||
clearMocks: boolean;
|
||||
collectCoverage: boolean;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
coverageReporters: Array<string | [string, any]>;
|
||||
coverageProvider: CoverageProvider;
|
||||
errorOnDeprecated: boolean;
|
||||
expand: boolean;
|
||||
forceCoverageMatch: Array<Glob>;
|
||||
globals: ConfigGlobals;
|
||||
haste: HasteConfig;
|
||||
maxConcurrency: number;
|
||||
maxWorkers: number | string;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleNameMapper: Record<string, string | Array<string>>;
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: NotifyMode;
|
||||
prettierPath: string;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
restoreMocks: boolean;
|
||||
roots: Array<Path>;
|
||||
runTestsByPath: boolean;
|
||||
runner: 'jest-runner';
|
||||
setupFiles: Array<Path>;
|
||||
setupFilesAfterEnv: Array<Path>;
|
||||
skipFilter: boolean;
|
||||
snapshotSerializers: Array<Path>;
|
||||
testEnvironment: string;
|
||||
testEnvironmentOptions: Record<string, any>;
|
||||
testFailureExitCode: string | number;
|
||||
testLocationInResults: boolean;
|
||||
testMatch: Array<Glob>;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testRegex: Array<string>;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
timers: 'real' | 'fake';
|
||||
transformIgnorePatterns: Array<Glob>;
|
||||
useStderr: boolean;
|
||||
watch: boolean;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
watchman: boolean;
|
||||
};
|
||||
export declare type DisplayName = string | {
|
||||
name: string;
|
||||
color: typeof chalk.Color;
|
||||
};
|
||||
export declare type InitialOptionsWithRootDir = InitialOptions & Required<Pick<InitialOptions, 'rootDir'>>;
|
||||
export declare type InitialOptions = Partial<{
|
||||
automock: boolean;
|
||||
bail: boolean | number;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: Path;
|
||||
clearMocks: boolean;
|
||||
changedFilesWithAncestor: boolean;
|
||||
changedSince: string;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: Array<Glob>;
|
||||
collectCoverageOnlyFrom: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
coverageProvider: CoverageProvider;
|
||||
coverageReporters: Array<string>;
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
[key: string]: number;
|
||||
};
|
||||
};
|
||||
dependencyExtractor: string;
|
||||
detectLeaks: boolean;
|
||||
detectOpenHandles: boolean;
|
||||
displayName: DisplayName;
|
||||
expand: boolean;
|
||||
extraGlobals: Array<string>;
|
||||
filter: Path;
|
||||
findRelatedTests: boolean;
|
||||
forceCoverageMatch: Array<Glob>;
|
||||
forceExit: boolean;
|
||||
json: boolean;
|
||||
globals: ConfigGlobals;
|
||||
globalSetup: string | null | undefined;
|
||||
globalTeardown: string | null | undefined;
|
||||
haste: HasteConfig;
|
||||
reporters: Array<string | ReporterConfig>;
|
||||
logHeapUsage: boolean;
|
||||
lastCommit: boolean;
|
||||
listTests: boolean;
|
||||
mapCoverage: boolean;
|
||||
maxConcurrency: number;
|
||||
maxWorkers: number | string;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleLoader: Path;
|
||||
moduleNameMapper: {
|
||||
[key: string]: string | Array<string>;
|
||||
};
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
modulePaths: Array<string>;
|
||||
name: string;
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: string;
|
||||
onlyChanged: boolean;
|
||||
outputFile: Path;
|
||||
passWithNoTests: boolean;
|
||||
preprocessorIgnorePatterns: Array<Glob>;
|
||||
preset: string | null | undefined;
|
||||
prettierPath: string | null | undefined;
|
||||
projects: Array<Glob>;
|
||||
replname: string | null | undefined;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver: Path | null | undefined;
|
||||
restoreMocks: boolean;
|
||||
rootDir: Path;
|
||||
roots: Array<Path>;
|
||||
runner: string;
|
||||
runTestsByPath: boolean;
|
||||
scriptPreprocessor: string;
|
||||
setupFiles: Array<Path>;
|
||||
setupTestFrameworkScriptFile: Path;
|
||||
setupFilesAfterEnv: Array<Path>;
|
||||
silent: boolean;
|
||||
skipFilter: boolean;
|
||||
skipNodeResolution: boolean;
|
||||
snapshotResolver: Path;
|
||||
snapshotSerializers: Array<Path>;
|
||||
errorOnDeprecated: boolean;
|
||||
testEnvironment: string;
|
||||
testEnvironmentOptions: Record<string, any>;
|
||||
testFailureExitCode: string | number;
|
||||
testLocationInResults: boolean;
|
||||
testMatch: Array<Glob>;
|
||||
testNamePattern: string;
|
||||
testPathDirs: Array<Path>;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testRegex: string | Array<string>;
|
||||
testResultsProcessor: string;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
testTimeout: number;
|
||||
timers: 'real' | 'fake';
|
||||
transform: {
|
||||
[regex: string]: Path | TransformerConfig;
|
||||
};
|
||||
transformIgnorePatterns: Array<Glob>;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
unmockedModulePathPatterns: Array<string>;
|
||||
updateSnapshot: boolean;
|
||||
useStderr: boolean;
|
||||
verbose?: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPlugins: Array<string | [string, Record<string, any>]>;
|
||||
}>;
|
||||
export declare type SnapshotUpdateState = 'all' | 'new' | 'none';
|
||||
declare type NotifyMode = 'always' | 'failure' | 'success' | 'change' | 'success-change' | 'failure-change';
|
||||
export declare type CoverageThresholdValue = {
|
||||
branches?: number;
|
||||
functions?: number;
|
||||
lines?: number;
|
||||
statements?: number;
|
||||
};
|
||||
declare type CoverageThreshold = {
|
||||
[path: string]: CoverageThresholdValue;
|
||||
global: CoverageThresholdValue;
|
||||
};
|
||||
export declare type GlobalConfig = {
|
||||
bail: number;
|
||||
changedSince?: string;
|
||||
changedFilesWithAncestor: boolean;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: Array<Glob>;
|
||||
collectCoverageOnlyFrom?: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns?: Array<string>;
|
||||
coverageProvider: CoverageProvider;
|
||||
coverageReporters: Array<keyof ReportOptions | [keyof ReportOptions, any]>;
|
||||
coverageThreshold?: CoverageThreshold;
|
||||
detectLeaks: boolean;
|
||||
detectOpenHandles: boolean;
|
||||
enabledTestsMap?: {
|
||||
[key: string]: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
};
|
||||
expand: boolean;
|
||||
filter?: Path;
|
||||
findRelatedTests: boolean;
|
||||
forceExit: boolean;
|
||||
json: boolean;
|
||||
globalSetup?: string;
|
||||
globalTeardown?: string;
|
||||
lastCommit: boolean;
|
||||
logHeapUsage: boolean;
|
||||
listTests: boolean;
|
||||
maxConcurrency: number;
|
||||
maxWorkers: number;
|
||||
noStackTrace: boolean;
|
||||
nonFlagArgs: Array<string>;
|
||||
noSCM?: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: NotifyMode;
|
||||
outputFile?: Path;
|
||||
onlyChanged: boolean;
|
||||
onlyFailures: boolean;
|
||||
passWithNoTests: boolean;
|
||||
projects: Array<Glob>;
|
||||
replname?: string;
|
||||
reporters?: Array<string | ReporterConfig>;
|
||||
runTestsByPath: boolean;
|
||||
rootDir: Path;
|
||||
silent?: boolean;
|
||||
skipFilter: boolean;
|
||||
errorOnDeprecated: boolean;
|
||||
testFailureExitCode: number;
|
||||
testNamePattern?: string;
|
||||
testPathPattern: string;
|
||||
testResultsProcessor?: string;
|
||||
testSequencer: string;
|
||||
testTimeout?: number;
|
||||
updateSnapshot: SnapshotUpdateState;
|
||||
useStderr: boolean;
|
||||
verbose?: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPlugins?: Array<{
|
||||
path: string;
|
||||
config: Record<string, any>;
|
||||
}> | null;
|
||||
};
|
||||
export declare type ProjectConfig = {
|
||||
automock: boolean;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: Path;
|
||||
clearMocks: boolean;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
cwd: Path;
|
||||
dependencyExtractor?: string;
|
||||
detectLeaks: boolean;
|
||||
detectOpenHandles: boolean;
|
||||
displayName?: DisplayName;
|
||||
errorOnDeprecated: boolean;
|
||||
extraGlobals: Array<keyof NodeJS.Global>;
|
||||
filter?: Path;
|
||||
forceCoverageMatch: Array<Glob>;
|
||||
globalSetup?: string;
|
||||
globalTeardown?: string;
|
||||
globals: ConfigGlobals;
|
||||
haste: HasteConfig;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleLoader?: Path;
|
||||
moduleNameMapper: Array<[string, string]>;
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
modulePaths?: Array<string>;
|
||||
name: string;
|
||||
prettierPath: string;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver?: Path;
|
||||
restoreMocks: boolean;
|
||||
rootDir: Path;
|
||||
roots: Array<Path>;
|
||||
runner: string;
|
||||
setupFiles: Array<Path>;
|
||||
setupFilesAfterEnv: Array<Path>;
|
||||
skipFilter: boolean;
|
||||
skipNodeResolution?: boolean;
|
||||
snapshotResolver?: Path;
|
||||
snapshotSerializers: Array<Path>;
|
||||
testEnvironment: string;
|
||||
testEnvironmentOptions: Record<string, any>;
|
||||
testMatch: Array<Glob>;
|
||||
testLocationInResults: boolean;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testRegex: Array<string>;
|
||||
testRunner: string;
|
||||
testURL: string;
|
||||
timers: 'real' | 'fake';
|
||||
transform: Array<[string, Path, Record<string, unknown>]>;
|
||||
transformIgnorePatterns: Array<Glob>;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
unmockedModulePathPatterns?: Array<string>;
|
||||
};
|
||||
export declare type Argv = Arguments<Partial<{
|
||||
all: boolean;
|
||||
automock: boolean;
|
||||
bail: boolean | number;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: string;
|
||||
changedFilesWithAncestor: boolean;
|
||||
changedSince: string;
|
||||
ci: boolean;
|
||||
clearCache: boolean;
|
||||
clearMocks: boolean;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: string;
|
||||
collectCoverageOnlyFrom: Array<string>;
|
||||
color: boolean;
|
||||
colors: boolean;
|
||||
config: string;
|
||||
coverage: boolean;
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns: Array<string>;
|
||||
coverageReporters: Array<string>;
|
||||
coverageThreshold: string;
|
||||
debug: boolean;
|
||||
env: string;
|
||||
expand: boolean;
|
||||
findRelatedTests: boolean;
|
||||
forceExit: boolean;
|
||||
globals: string;
|
||||
globalSetup: string | null | undefined;
|
||||
globalTeardown: string | null | undefined;
|
||||
haste: string;
|
||||
init: boolean;
|
||||
json: boolean;
|
||||
lastCommit: boolean;
|
||||
logHeapUsage: boolean;
|
||||
maxWorkers: number | string;
|
||||
moduleDirectories: Array<string>;
|
||||
moduleFileExtensions: Array<string>;
|
||||
moduleNameMapper: string;
|
||||
modulePathIgnorePatterns: Array<string>;
|
||||
modulePaths: Array<string>;
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: string;
|
||||
onlyChanged: boolean;
|
||||
outputFile: string;
|
||||
preset: string | null | undefined;
|
||||
projects: Array<string>;
|
||||
prettierPath: string | null | undefined;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver: string | null | undefined;
|
||||
restoreMocks: boolean;
|
||||
rootDir: string;
|
||||
roots: Array<string>;
|
||||
runInBand: boolean;
|
||||
setupFiles: Array<string>;
|
||||
setupFilesAfterEnv: Array<string>;
|
||||
showConfig: boolean;
|
||||
silent: boolean;
|
||||
snapshotSerializers: Array<string>;
|
||||
testEnvironment: string;
|
||||
testFailureExitCode: string | null | undefined;
|
||||
testMatch: Array<string>;
|
||||
testNamePattern: string;
|
||||
testPathIgnorePatterns: Array<string>;
|
||||
testPathPattern: Array<string>;
|
||||
testRegex: string | Array<string>;
|
||||
testResultsProcessor: string;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
testTimeout: number | null | undefined;
|
||||
timers: string;
|
||||
transform: string;
|
||||
transformIgnorePatterns: Array<string>;
|
||||
unmockedModulePathPatterns: Array<string> | null | undefined;
|
||||
updateSnapshot: boolean;
|
||||
useStderr: boolean;
|
||||
verbose: boolean;
|
||||
version: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPathIgnorePatterns: Array<string>;
|
||||
}>>;
|
||||
export {};
|
||||
//# sourceMappingURL=Config.d.ts.map
|
||||
78
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/Global.d.ts
generated
vendored
Normal file
78
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/Global.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/// <reference types="node" />
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import { CoverageMapData } from 'istanbul-lib-coverage';
|
||||
export declare type DoneFn = (reason?: string | Error) => void;
|
||||
export declare type TestName = string;
|
||||
export declare type TestFn = (done?: DoneFn) => Promise<any> | void | undefined;
|
||||
export declare type BlockFn = () => void;
|
||||
export declare type BlockName = string;
|
||||
export declare type Col = unknown;
|
||||
export declare type Row = Array<Col>;
|
||||
export declare type Table = Array<Row>;
|
||||
export declare type ArrayTable = Table | Row;
|
||||
export declare type TemplateTable = TemplateStringsArray;
|
||||
export declare type TemplateData = Array<unknown>;
|
||||
export declare type EachTable = ArrayTable | TemplateTable;
|
||||
export declare type EachTestFn = (...args: Array<any>) => Promise<any> | void | undefined;
|
||||
declare type Jasmine = {
|
||||
_DEFAULT_TIMEOUT_INTERVAL?: number;
|
||||
addMatchers: Function;
|
||||
};
|
||||
declare type Each = (table: EachTable, ...taggedTemplateData: Array<unknown>) => (title: string, test: EachTestFn, timeout?: number) => void;
|
||||
export interface ItBase {
|
||||
(testName: TestName, fn: TestFn, timeout?: number): void;
|
||||
each: Each;
|
||||
}
|
||||
export interface It extends ItBase {
|
||||
only: ItBase;
|
||||
skip: ItBase;
|
||||
todo: (testName: TestName, ...rest: Array<any>) => void;
|
||||
}
|
||||
export interface ItConcurrentBase {
|
||||
(testName: string, testFn: () => Promise<any>, timeout?: number): void;
|
||||
}
|
||||
export interface ItConcurrentExtended extends ItConcurrentBase {
|
||||
only: ItConcurrentBase;
|
||||
skip: ItConcurrentBase;
|
||||
}
|
||||
export interface ItConcurrent extends It {
|
||||
concurrent: ItConcurrentExtended;
|
||||
}
|
||||
export interface DescribeBase {
|
||||
(blockName: BlockName, blockFn: BlockFn): void;
|
||||
each: Each;
|
||||
}
|
||||
export interface Describe extends DescribeBase {
|
||||
only: DescribeBase;
|
||||
skip: DescribeBase;
|
||||
}
|
||||
export interface GlobalAdditions {
|
||||
it: ItConcurrent;
|
||||
test: ItConcurrent;
|
||||
fit: ItBase & {
|
||||
concurrent?: ItConcurrentBase;
|
||||
};
|
||||
xit: ItBase;
|
||||
xtest: ItBase;
|
||||
describe: Describe;
|
||||
xdescribe: DescribeBase;
|
||||
fdescribe: DescribeBase;
|
||||
__coverage__: CoverageMapData;
|
||||
jasmine: Jasmine;
|
||||
fail: () => void;
|
||||
pending: () => void;
|
||||
spyOn: () => void;
|
||||
spyOnProperty: () => void;
|
||||
}
|
||||
declare type NodeGlobalWithoutAdditions = Pick<NodeJS.Global, Exclude<keyof NodeJS.Global, keyof GlobalAdditions>>;
|
||||
export interface Global extends GlobalAdditions, NodeGlobalWithoutAdditions {
|
||||
[extras: string]: any;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=Global.d.ts.map
|
||||
11
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/index.d.ts
generated
vendored
Normal file
11
node_modules/jest-config/node_modules/@jest/types/build/ts3.4/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import * as Circus from './Circus';
|
||||
import * as Config from './Config';
|
||||
import * as Global from './Global';
|
||||
export { Circus, Config, Global };
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
41
node_modules/jest-config/node_modules/@jest/types/package.json
generated
vendored
Normal file
41
node_modules/jest-config/node_modules/@jest/types/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/jest/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@types/istanbul-lib-coverage": "^2.0.0",
|
||||
"@types/istanbul-reports": "^1.1.1",
|
||||
"@types/yargs": "^15.0.0",
|
||||
"chalk": "^3.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"devDependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.3"
|
||||
},
|
||||
"gitHead": "6f8bf80c38567ba076ae979af2dedb42b285b2d5",
|
||||
"homepage": "https://github.com/facebook/jest#readme",
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"name": "@jest/types",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/facebook/jest.git",
|
||||
"directory": "packages/jest-types"
|
||||
},
|
||||
"types": "build/index.d.ts",
|
||||
"typesVersions": {
|
||||
"<3.8": {
|
||||
"build/*": [
|
||||
"build/ts3.4/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "25.2.3"
|
||||
}
|
||||
21
node_modules/jest-config/node_modules/@types/yargs/LICENSE
generated
vendored
Normal file
21
node_modules/jest-config/node_modules/@types/yargs/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
16
node_modules/jest-config/node_modules/@types/yargs/README.md
generated
vendored
Normal file
16
node_modules/jest-config/node_modules/@types/yargs/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Installation
|
||||
> `npm install --save @types/yargs`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for yargs (https://github.com/chevex/yargs).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 25 Feb 2020 20:34:01 GMT
|
||||
* Dependencies: [@types/yargs-parser](https://npmjs.com/package/@types/yargs-parser)
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Martin Poelstra](https://github.com/poelstra), [Mizunashi Mana](https://github.com/mizunashi-mana), [Jeffery Grajkowski](https://github.com/pushplay), [Jeff Kenney](https://github.com/jeffkenney), [Jimi (Dimitris) Charalampidis](https://github.com/JimiC), [Steffen Viken Valvåg](https://github.com/steffenvv), [Emily Marigold Klassen](https://github.com/forivall), [ExE Boss](https://github.com/ExE-Boss), and [Aankhen](https://github.com/Aankhen).
|
||||
784
node_modules/jest-config/node_modules/@types/yargs/index.d.ts
generated
vendored
Normal file
784
node_modules/jest-config/node_modules/@types/yargs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,784 @@
|
|||
// Type definitions for yargs 15.0
|
||||
// Project: https://github.com/chevex/yargs, https://yargs.js.org
|
||||
// Definitions by: Martin Poelstra <https://github.com/poelstra>
|
||||
// Mizunashi Mana <https://github.com/mizunashi-mana>
|
||||
// Jeffery Grajkowski <https://github.com/pushplay>
|
||||
// Jeff Kenney <https://github.com/jeffkenney>
|
||||
// Jimi (Dimitris) Charalampidis <https://github.com/JimiC>
|
||||
// Steffen Viken Valvåg <https://github.com/steffenvv>
|
||||
// Emily Marigold Klassen <https://github.com/forivall>
|
||||
// ExE Boss <https://github.com/ExE-Boss>
|
||||
// Aankhen <https://github.com/Aankhen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
// The following TSLint rules have been disabled:
|
||||
// unified-signatures: Because there is useful information in the argument names of the overloaded signatures
|
||||
|
||||
// Convention:
|
||||
// Use 'union types' when:
|
||||
// - parameter types have similar signature type (i.e. 'string | ReadonlyArray<string>')
|
||||
// - parameter names have the same semantic meaning (i.e. ['command', 'commands'] , ['key', 'keys'])
|
||||
// An example for not using 'union types' is the declaration of 'env' where `prefix` and `enable` parameters
|
||||
// have different semantics. On the other hand, in the declaration of 'usage', a `command: string` parameter
|
||||
// has the same semantic meaning with declaring an overload method by using `commands: ReadonlyArray<string>`,
|
||||
// thus it's preferred to use `command: string | ReadonlyArray<string>`
|
||||
// Use parameterless declaration instead of declaring all parameters optional,
|
||||
// when all parameters are optional and more than one
|
||||
|
||||
import { DetailedArguments, Configuration } from 'yargs-parser';
|
||||
|
||||
declare namespace yargs {
|
||||
type BuilderCallback<T, R> = ((args: Argv<T>) => PromiseLike<Argv<R>>) | ((args: Argv<T>) => Argv<R>) | ((args: Argv<T>) => void);
|
||||
|
||||
type ParserConfigurationOptions = Configuration & {
|
||||
/** Sort commands alphabetically. Default is `false` */
|
||||
'sort-commands': boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* The type parameter `T` is the expected shape of the parsed options.
|
||||
* `Arguments<T>` is those options plus `_` and `$0`, and an indexer falling
|
||||
* back to `unknown` for unknown options.
|
||||
*
|
||||
* For the return type / `argv` property, we create a mapped type over
|
||||
* `Arguments<T>` to simplify the inferred type signature in client code.
|
||||
*/
|
||||
interface Argv<T = {}> {
|
||||
(): { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
(args: ReadonlyArray<string>, cwd?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Set key names as equivalent such that updates to a key will propagate to aliases and vice-versa.
|
||||
*
|
||||
* Optionally `.alias()` can take an object that maps keys to aliases.
|
||||
* Each key of this object should be the canonical version of the option, and each value should be a string or an array of strings.
|
||||
*/
|
||||
// Aliases for previously declared options can inherit the types of those options.
|
||||
alias<K1 extends keyof T, K2 extends string>(shortName: K1, longName: K2 | ReadonlyArray<K2>): Argv<T & { [key in K2]: T[K1] }>;
|
||||
alias<K1 extends keyof T, K2 extends string>(shortName: K2, longName: K1 | ReadonlyArray<K1>): Argv<T & { [key in K2]: T[K1] }>;
|
||||
alias(shortName: string | ReadonlyArray<string>, longName: string | ReadonlyArray<string>): Argv<T>;
|
||||
alias(aliases: { [shortName: string]: string | ReadonlyArray<string> }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Get the arguments as a plain old object.
|
||||
*
|
||||
* Arguments without a corresponding flag show up in the `argv._` array.
|
||||
*
|
||||
* The script name or node command is available at `argv.$0` similarly to how `$0` works in bash or perl.
|
||||
*
|
||||
* If `yargs` is executed in an environment that embeds node and there's no script name (e.g. Electron or nw.js),
|
||||
* it will ignore the first parameter since it expects it to be the script name. In order to override
|
||||
* this behavior, use `.parse(process.argv.slice(1))` instead of .argv and the first parameter won't be ignored.
|
||||
*/
|
||||
argv: { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
|
||||
/**
|
||||
* Tell the parser to interpret `key` as an array.
|
||||
* If `.array('foo')` is set, `--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'foo'`.
|
||||
* Also, if you use the option multiple times all the values will be flattened in one array so `--foo foo --foo bar` will be parsed as `['foo', 'bar']`
|
||||
*
|
||||
* When the option is used with a positional, use `--` to tell `yargs` to stop adding values to the array.
|
||||
*/
|
||||
array<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToArray<T[key]> }>;
|
||||
array<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: Array<string | number> | undefined }>;
|
||||
|
||||
/**
|
||||
* Interpret `key` as a boolean. If a non-flag option follows `key` in `process.argv`, that string won't get set as the value of `key`.
|
||||
*
|
||||
* `key` will default to `false`, unless a `default(key, undefined)` is explicitly set.
|
||||
*
|
||||
* If `key` is an array, interpret all the elements as booleans.
|
||||
*/
|
||||
boolean<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: boolean | undefined }>;
|
||||
boolean<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: boolean | undefined }>;
|
||||
|
||||
/**
|
||||
* Check that certain conditions are met in the provided arguments.
|
||||
* @param func Called with two arguments, the parsed `argv` hash and an array of options and their aliases.
|
||||
* If `func` throws or returns a non-truthy value, show the thrown error, usage information, and exit.
|
||||
* @param global Indicates whether `check()` should be enabled both at the top-level and for each sub-command.
|
||||
*/
|
||||
check(func: (argv: Arguments<T>, aliases: { [alias: string]: string }) => any, global?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Limit valid values for key to a predefined set of choices, given as an array or as an individual value.
|
||||
* If this method is called multiple times, all enumerated values will be merged together.
|
||||
* Choices are generally strings or numbers, and value matching is case-sensitive.
|
||||
*
|
||||
* Optionally `.choices()` can take an object that maps multiple keys to their choices.
|
||||
*
|
||||
* Choices can also be specified as choices in the object given to `option()`.
|
||||
*/
|
||||
choices<K extends keyof T, C extends ReadonlyArray<any>>(key: K, values: C): Argv<Omit<T, K> & { [key in K]: C[number] | undefined }>;
|
||||
choices<K extends string, C extends ReadonlyArray<any>>(key: K, values: C): Argv<T & { [key in K]: C[number] | undefined }>;
|
||||
choices<C extends { [key: string]: ReadonlyArray<any> }>(choices: C): Argv<Omit<T, keyof C> & { [key in keyof C]: C[key][number] | undefined }>;
|
||||
|
||||
/**
|
||||
* Provide a synchronous function to coerce or transform the value(s) given on the command line for `key`.
|
||||
*
|
||||
* The coercion function should accept one argument, representing the parsed value from the command line, and should return a new value or throw an error.
|
||||
* The returned value will be used as the value for `key` (or one of its aliases) in `argv`.
|
||||
*
|
||||
* If the function throws, the error will be treated as a validation failure, delegating to either a custom `.fail()` handler or printing the error message in the console.
|
||||
*
|
||||
* Coercion will be applied to a value after all other modifications, such as `.normalize()`.
|
||||
*
|
||||
* Optionally `.coerce()` can take an object that maps several keys to their respective coercion function.
|
||||
*
|
||||
* You can also map the same function to several keys at one time. Just pass an array of keys as the first argument to `.coerce()`.
|
||||
*
|
||||
* If you are using dot-notion or arrays, .e.g., `user.email` and `user.password`, coercion will be applied to the final object that has been parsed
|
||||
*/
|
||||
coerce<K extends keyof T, V>(key: K | ReadonlyArray<K>, func: (arg: any) => V): Argv<Omit<T, K> & { [key in K]: V | undefined }>;
|
||||
coerce<K extends string, V>(key: K | ReadonlyArray<K>, func: (arg: any) => V): Argv<T & { [key in K]: V | undefined }>;
|
||||
coerce<O extends { [key: string]: (arg: any) => any }>(opts: O): Argv<Omit<T, keyof O> & { [key in keyof O]: ReturnType<O[key]> | undefined }>;
|
||||
|
||||
/**
|
||||
* Define the commands exposed by your application.
|
||||
* @param command Should be a string representing the command or an array of strings representing the command and its aliases.
|
||||
* @param description Use to provide a description for each command your application accepts (the values stored in `argv._`).
|
||||
* Set `description` to false to create a hidden command. Hidden commands don't show up in the help output and aren't available for completion.
|
||||
* @param [builder] Object to give hints about the options that your command accepts.
|
||||
* Can also be a function. This function is executed with a yargs instance, and can be used to provide advanced command specific help.
|
||||
*
|
||||
* Note that when `void` is returned, the handler `argv` object type will not include command-specific arguments.
|
||||
* @param [handler] Function, which will be executed with the parsed `argv` object.
|
||||
*/
|
||||
command<U = T>(command: string | ReadonlyArray<string>, description: string, builder?: BuilderCallback<T, U>, handler?: (args: Arguments<U>) => void): Argv<U>;
|
||||
command<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, description: string, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
command<U>(command: string | ReadonlyArray<string>, description: string, module: CommandModule<T, U>): Argv<U>;
|
||||
command<U = T>(command: string | ReadonlyArray<string>, showInHelp: false, builder?: BuilderCallback<T, U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
command<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, showInHelp: false, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
command<U>(command: string | ReadonlyArray<string>, showInHelp: false, module: CommandModule<T, U>): Argv<U>;
|
||||
command<U>(module: CommandModule<T, U>): Argv<U>;
|
||||
|
||||
// Advanced API
|
||||
/** Apply command modules from a directory relative to the module calling this method. */
|
||||
commandDir(dir: string, opts?: RequireDirectoryOptions): Argv<T>;
|
||||
|
||||
/**
|
||||
* Enable bash/zsh-completion shortcuts for commands and options.
|
||||
*
|
||||
* If invoked without parameters, `.completion()` will make completion the command to output the completion script.
|
||||
*
|
||||
* @param [cmd] When present in `argv._`, will result in the `.bashrc` or `.zshrc` completion script being outputted.
|
||||
* To enable bash/zsh completions, concat the generated script to your `.bashrc` or `.bash_profile` (or `.zshrc` for zsh).
|
||||
* @param [description] Provide a description in your usage instructions for the command that generates the completion scripts.
|
||||
* @param [func] Rather than relying on yargs' default completion functionality, which shiver me timbers is pretty awesome, you can provide your own completion method.
|
||||
*/
|
||||
completion(): Argv<T>;
|
||||
completion(cmd: string, func?: AsyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, func?: SyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, func?: PromiseCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string | false, func?: AsyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string | false, func?: SyncCompletionFunction): Argv<T>;
|
||||
completion(cmd: string, description?: string | false, func?: PromiseCompletionFunction): Argv<T>;
|
||||
|
||||
/**
|
||||
* Tells the parser that if the option specified by `key` is passed in, it should be interpreted as a path to a JSON config file.
|
||||
* The file is loaded and parsed, and its properties are set as arguments.
|
||||
* Because the file is loaded using Node's require(), the filename MUST end in `.json` to be interpreted correctly.
|
||||
*
|
||||
* If invoked without parameters, `.config()` will make --config the option to pass the JSON config file.
|
||||
*
|
||||
* @param [description] Provided to customize the config (`key`) option in the usage string.
|
||||
* @param [explicitConfigurationObject] An explicit configuration `object`
|
||||
*/
|
||||
config(): Argv<T>;
|
||||
config(key: string | ReadonlyArray<string>, description?: string, parseFn?: (configPath: string) => object): Argv<T>;
|
||||
config(key: string | ReadonlyArray<string>, parseFn: (configPath: string) => object): Argv<T>;
|
||||
config(explicitConfigurationObject: object): Argv<T>;
|
||||
|
||||
/**
|
||||
* Given the key `x` is set, the key `y` must not be set. `y` can either be a single string or an array of argument names that `x` conflicts with.
|
||||
*
|
||||
* Optionally `.conflicts()` can accept an object specifying multiple conflicting keys.
|
||||
*/
|
||||
conflicts(key: string, value: string | ReadonlyArray<string>): Argv<T>;
|
||||
conflicts(conflicts: { [key: string]: string | ReadonlyArray<string> }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Interpret `key` as a boolean flag, but set its parsed value to the number of flag occurrences rather than `true` or `false`. Default value is thus `0`.
|
||||
*/
|
||||
count<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: number }>;
|
||||
count<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: number }>;
|
||||
|
||||
/**
|
||||
* Set `argv[key]` to `value` if no option was specified in `process.argv`.
|
||||
*
|
||||
* Optionally `.default()` can take an object that maps keys to default values.
|
||||
*
|
||||
* The default value can be a `function` which returns a value. The name of the function will be used in the usage string.
|
||||
*
|
||||
* Optionally, `description` can also be provided and will take precedence over displaying the value in the usage instructions.
|
||||
*/
|
||||
default<K extends keyof T, V>(key: K, value: V, description?: string): Argv<Omit<T, K> & { [key in K]: V }>;
|
||||
default<K extends string, V>(key: K, value: V, description?: string): Argv<T & { [key in K]: V }>;
|
||||
default<D extends { [key: string]: any }>(defaults: D, description?: string): Argv<Omit<T, keyof D> & D>;
|
||||
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use '.demandCommand()' or '.demandOption()' instead
|
||||
*/
|
||||
demand<K extends keyof T>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<Defined<T, K>>;
|
||||
demand<K extends string>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<T & { [key in K]: unknown }>;
|
||||
demand(key: string | ReadonlyArray<string>, required?: boolean): Argv<T>;
|
||||
demand(positionals: number, msg: string): Argv<T>;
|
||||
demand(positionals: number, required?: boolean): Argv<T>;
|
||||
demand(positionals: number, max: number, msg?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* @param key If is a string, show the usage information and exit if key wasn't specified in `process.argv`.
|
||||
* If is an array, demand each element.
|
||||
* @param msg If string is given, it will be printed when the argument is missing, instead of the standard error message.
|
||||
* @param demand Controls whether the option is demanded; this is useful when using .options() to specify command line parameters.
|
||||
*/
|
||||
demandOption<K extends keyof T>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<Defined<T, K>>;
|
||||
demandOption<K extends string>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<T & { [key in K]: unknown }>;
|
||||
demandOption(key: string | ReadonlyArray<string>, demand?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Demand in context of commands.
|
||||
* You can demand a minimum and a maximum number a user can have within your program, as well as provide corresponding error messages if either of the demands is not met.
|
||||
*/
|
||||
demandCommand(): Argv<T>;
|
||||
demandCommand(min: number, minMsg?: string): Argv<T>;
|
||||
demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Describe a `key` for the generated usage information.
|
||||
*
|
||||
* Optionally `.describe()` can take an object that maps keys to descriptions.
|
||||
*/
|
||||
describe(key: string | ReadonlyArray<string>, description: string): Argv<T>;
|
||||
describe(descriptions: { [key: string]: string }): Argv<T>;
|
||||
|
||||
/** Should yargs attempt to detect the os' locale? Defaults to `true`. */
|
||||
detectLocale(detect: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Tell yargs to parse environment variables matching the given prefix and apply them to argv as though they were command line arguments.
|
||||
*
|
||||
* Use the "__" separator in the environment variable to indicate nested options. (e.g. prefix_nested__foo => nested.foo)
|
||||
*
|
||||
* If this method is called with no argument or with an empty string or with true, then all env vars will be applied to argv.
|
||||
*
|
||||
* Program arguments are defined in this order of precedence:
|
||||
* 1. Command line args
|
||||
* 2. Env vars
|
||||
* 3. Config file/objects
|
||||
* 4. Configured defaults
|
||||
*
|
||||
* Env var parsing is disabled by default, but you can also explicitly disable it by calling `.env(false)`, e.g. if you need to undo previous configuration.
|
||||
*/
|
||||
env(): Argv<T>;
|
||||
env(prefix: string): Argv<T>;
|
||||
env(enable: boolean): Argv<T>;
|
||||
|
||||
/** A message to print at the end of the usage instructions */
|
||||
epilog(msg: string): Argv<T>;
|
||||
/** A message to print at the end of the usage instructions */
|
||||
epilogue(msg: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Give some example invocations of your program.
|
||||
* Inside `cmd`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl.
|
||||
* Examples will be printed out as part of the help message.
|
||||
*/
|
||||
example(command: string, description: string): Argv<T>;
|
||||
|
||||
/** Manually indicate that the program should exit, and provide context about why we wanted to exit. Follows the behavior set by `.exitProcess().` */
|
||||
exit(code: number, err: Error): void;
|
||||
|
||||
/**
|
||||
* By default, yargs exits the process when the user passes a help flag, the user uses the `.version` functionality, validation fails, or the command handler fails.
|
||||
* Calling `.exitProcess(false)` disables this behavior, enabling further actions after yargs have been validated.
|
||||
*/
|
||||
exitProcess(enabled: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Method to execute when a failure occurs, rather than printing the failure message.
|
||||
* @param func Is called with the failure message that would have been printed, the Error instance originally thrown and yargs state when the failure occurred.
|
||||
*/
|
||||
fail(func: (msg: string, err: Error, yargs: Argv<T>) => any): Argv<T>;
|
||||
|
||||
/**
|
||||
* Allows to programmatically get completion choices for any line.
|
||||
* @param args An array of the words in the command line to complete.
|
||||
* @param done The callback to be called with the resulting completions.
|
||||
*/
|
||||
getCompletion(args: ReadonlyArray<string>, done: (completions: ReadonlyArray<string>) => void): Argv<T>;
|
||||
|
||||
/**
|
||||
* Indicate that an option (or group of options) should not be reset when a command is executed
|
||||
*
|
||||
* Options default to being global.
|
||||
*/
|
||||
global(key: string | ReadonlyArray<string>): Argv<T>;
|
||||
|
||||
/** Given a key, or an array of keys, places options under an alternative heading when displaying usage instructions */
|
||||
group(key: string | ReadonlyArray<string>, groupName: string): Argv<T>;
|
||||
|
||||
/** Hides a key from the generated usage information. Unless a `--show-hidden` option is also passed with `--help` (see `showHidden()`). */
|
||||
hide(key: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Configure an (e.g. `--help`) and implicit command that displays the usage string and exits the process.
|
||||
* By default yargs enables help on the `--help` option.
|
||||
*
|
||||
* Note that any multi-char aliases (e.g. `help`) used for the help option will also be used for the implicit command.
|
||||
* If there are no multi-char aliases (e.g. `h`), then all single-char aliases will be used for the command.
|
||||
*
|
||||
* If invoked without parameters, `.help()` will use `--help` as the option and help as the implicit command to trigger help output.
|
||||
*
|
||||
* @param [description] Customizes the description of the help option in the usage string.
|
||||
* @param [enableExplicit] If `false` is provided, it will disable --help.
|
||||
*/
|
||||
help(): Argv<T>;
|
||||
help(enableExplicit: boolean): Argv<T>;
|
||||
help(option: string, enableExplicit: boolean): Argv<T>;
|
||||
help(option: string, description?: string, enableExplicit?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Given the key `x` is set, it is required that the key `y` is set.
|
||||
* y` can either be the name of an argument to imply, a number indicating the position of an argument or an array of multiple implications to associate with `x`.
|
||||
*
|
||||
* Optionally `.implies()` can accept an object specifying multiple implications.
|
||||
*/
|
||||
implies(key: string, value: string | ReadonlyArray<string>): Argv<T>;
|
||||
implies(implies: { [key: string]: string | ReadonlyArray<string> }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Return the locale that yargs is currently using.
|
||||
*
|
||||
* By default, yargs will auto-detect the operating system's locale so that yargs-generated help content will display in the user's language.
|
||||
*/
|
||||
locale(): string;
|
||||
/**
|
||||
* Override the auto-detected locale from the user's operating system with a static locale.
|
||||
* Note that the OS locale can be modified by setting/exporting the `LC_ALL` environment variable.
|
||||
*/
|
||||
locale(loc: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Define global middleware functions to be called first, in list order, for all cli command.
|
||||
* @param callbacks Can be a function or a list of functions. Each callback gets passed a reference to argv.
|
||||
* @param [applyBeforeValidation] Set to `true` to apply middleware before validation. This will execute the middleware prior to validation checks, but after parsing.
|
||||
*/
|
||||
middleware(callbacks: MiddlewareFunction<T> | ReadonlyArray<MiddlewareFunction<T>>, applyBeforeValidation?: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* The number of arguments that should be consumed after a key. This can be a useful hint to prevent parsing ambiguity.
|
||||
*
|
||||
* Optionally `.nargs()` can take an object of `key`/`narg` pairs.
|
||||
*/
|
||||
nargs(key: string, count: number): Argv<T>;
|
||||
nargs(nargs: { [key: string]: number }): Argv<T>;
|
||||
|
||||
/** The key provided represents a path and should have `path.normalize()` applied. */
|
||||
normalize<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToString<T[key]> }>;
|
||||
normalize<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: string | undefined }>;
|
||||
|
||||
/**
|
||||
* Tell the parser to always interpret key as a number.
|
||||
*
|
||||
* If `key` is an array, all elements will be parsed as numbers.
|
||||
*
|
||||
* If the option is given on the command line without a value, `argv` will be populated with `undefined`.
|
||||
*
|
||||
* If the value given on the command line cannot be parsed as a number, `argv` will be populated with `NaN`.
|
||||
*
|
||||
* Note that decimals, hexadecimals, and scientific notation are all accepted.
|
||||
*/
|
||||
number<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToNumber<T[key]> }>;
|
||||
number<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: number | undefined }>;
|
||||
|
||||
/**
|
||||
* Method to execute when a command finishes successfully.
|
||||
* @param func Is called with the successful result of the command that finished.
|
||||
*/
|
||||
onFinishCommand(func: (result: any) => void): Argv<T>;
|
||||
|
||||
/**
|
||||
* This method can be used to make yargs aware of options that could exist.
|
||||
* You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option.
|
||||
*/
|
||||
option<K extends keyof T, O extends Options>(key: K, options: O): Argv<Omit<T, K> & { [key in K]: InferredOptionType<O> }>;
|
||||
option<K extends string, O extends Options>(key: K, options: O): Argv<T & { [key in K]: InferredOptionType<O> }>;
|
||||
option<O extends { [key: string]: Options }>(options: O): Argv<Omit<T, keyof O> & InferredOptionTypes<O>>;
|
||||
|
||||
/**
|
||||
* This method can be used to make yargs aware of options that could exist.
|
||||
* You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option.
|
||||
*/
|
||||
options<K extends keyof T, O extends Options>(key: K, options: O): Argv<Omit<T, K> & { [key in K]: InferredOptionType<O> }>;
|
||||
options<K extends string, O extends Options>(key: K, options: O): Argv<T & { [key in K]: InferredOptionType<O> }>;
|
||||
options<O extends { [key: string]: Options }>(options: O): Argv<Omit<T, keyof O> & InferredOptionTypes<O>>;
|
||||
|
||||
/**
|
||||
* Parse `args` instead of `process.argv`. Returns the `argv` object. `args` may either be a pre-processed argv array, or a raw argument string.
|
||||
*
|
||||
* Note: Providing a callback to parse() disables the `exitProcess` setting until after the callback is invoked.
|
||||
* @param [context] Provides a useful mechanism for passing state information to commands
|
||||
*/
|
||||
parse(): { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
parse(arg: string | ReadonlyArray<string>, context?: object, parseCallback?: ParseCallback<T>): { [key in keyof Arguments<T>]: Arguments<T>[key] };
|
||||
|
||||
/**
|
||||
* If the arguments have not been parsed, this property is `false`.
|
||||
*
|
||||
* If the arguments have been parsed, this contain detailed parsed arguments.
|
||||
*/
|
||||
parsed: DetailedArguments | false;
|
||||
|
||||
/** Allows to configure advanced yargs features. */
|
||||
parserConfiguration(configuration: Partial<ParserConfigurationOptions>): Argv<T>;
|
||||
|
||||
/**
|
||||
* Similar to `config()`, indicates that yargs should interpret the object from the specified key in package.json as a configuration object.
|
||||
* @param [cwd] If provided, the package.json will be read from this location
|
||||
*/
|
||||
pkgConf(key: string | ReadonlyArray<string>, cwd?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Allows you to configure a command's positional arguments with an API similar to `.option()`.
|
||||
* `.positional()` should be called in a command's builder function, and is not available on the top-level yargs instance. If so, it will throw an error.
|
||||
*/
|
||||
positional<K extends keyof T, O extends PositionalOptions>(key: K, opt: O): Argv<Omit<T, K> & { [key in K]: InferredOptionType<O> }>;
|
||||
positional<K extends string, O extends PositionalOptions>(key: K, opt: O): Argv<T & { [key in K]: InferredOptionType<O> }>;
|
||||
|
||||
/** Should yargs provide suggestions regarding similar commands if no matching command is found? */
|
||||
recommendCommands(): Argv<T>;
|
||||
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use '.demandCommand()' or '.demandOption()' instead
|
||||
*/
|
||||
require<K extends keyof T>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<Defined<T, K>>;
|
||||
require(key: string, msg: string): Argv<T>;
|
||||
require(key: string, required: boolean): Argv<T>;
|
||||
require(keys: ReadonlyArray<number>, msg: string): Argv<T>;
|
||||
require(keys: ReadonlyArray<number>, required: boolean): Argv<T>;
|
||||
require(positionals: number, required: boolean): Argv<T>;
|
||||
require(positionals: number, msg: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use '.demandCommand()' or '.demandOption()' instead
|
||||
*/
|
||||
required<K extends keyof T>(key: K | ReadonlyArray<K>, msg?: string | true): Argv<Defined<T, K>>;
|
||||
required(key: string, msg: string): Argv<T>;
|
||||
required(key: string, required: boolean): Argv<T>;
|
||||
required(keys: ReadonlyArray<number>, msg: string): Argv<T>;
|
||||
required(keys: ReadonlyArray<number>, required: boolean): Argv<T>;
|
||||
required(positionals: number, required: boolean): Argv<T>;
|
||||
required(positionals: number, msg: string): Argv<T>;
|
||||
|
||||
requiresArg(key: string | ReadonlyArray<string>): Argv<T>;
|
||||
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use '.global()' instead
|
||||
*/
|
||||
reset(): Argv<T>;
|
||||
|
||||
/** Set the name of your script ($0). Default is the base filename executed by node (`process.argv[1]`) */
|
||||
scriptName($0: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Generate a bash completion script.
|
||||
* Users of your application can install this script in their `.bashrc`, and yargs will provide completion shortcuts for commands and options.
|
||||
*/
|
||||
showCompletionScript(): Argv<T>;
|
||||
|
||||
/**
|
||||
* Configure the `--show-hidden` option that displays the hidden keys (see `hide()`).
|
||||
* @param option If `boolean`, it enables/disables this option altogether. i.e. hidden keys will be permanently hidden if first argument is `false`.
|
||||
* If `string` it changes the key name ("--show-hidden").
|
||||
* @param description Changes the default description ("Show hidden options")
|
||||
*/
|
||||
showHidden(option?: string | boolean): Argv<T>;
|
||||
showHidden(option: string, description?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Print the usage data using the console function consoleLevel for printing.
|
||||
* @param [consoleLevel='error']
|
||||
*/
|
||||
showHelp(consoleLevel?: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* By default, yargs outputs a usage string if any error is detected.
|
||||
* Use the `.showHelpOnFail()` method to customize this behavior.
|
||||
* @param enable If `false`, the usage string is not output.
|
||||
* @param [message] Message that is output after the error message.
|
||||
*/
|
||||
showHelpOnFail(enable: boolean, message?: string): Argv<T>;
|
||||
|
||||
/** Specifies either a single option key (string), or an array of options. If any of the options is present, yargs validation is skipped. */
|
||||
skipValidation(key: string | ReadonlyArray<string>): Argv<T>;
|
||||
|
||||
/**
|
||||
* Any command-line argument given that is not demanded, or does not have a corresponding description, will be reported as an error.
|
||||
*
|
||||
* Unrecognized commands will also be reported as errors.
|
||||
*/
|
||||
strict(): Argv<T>;
|
||||
strict(enabled: boolean): Argv<T>;
|
||||
|
||||
/**
|
||||
* Tell the parser logic not to interpret `key` as a number or boolean. This can be useful if you need to preserve leading zeros in an input.
|
||||
*
|
||||
* If `key` is an array, interpret all the elements as strings.
|
||||
*
|
||||
* `.string('_')` will result in non-hyphenated arguments being interpreted as strings, regardless of whether they resemble numbers.
|
||||
*/
|
||||
string<K extends keyof T>(key: K | ReadonlyArray<K>): Argv<Omit<T, K> & { [key in K]: ToString<T[key]> }>;
|
||||
string<K extends string>(key: K | ReadonlyArray<K>): Argv<T & { [key in K]: string | undefined }>;
|
||||
|
||||
// Intended to be used with '.wrap()'
|
||||
terminalWidth(): number;
|
||||
|
||||
updateLocale(obj: { [key: string]: string }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Override the default strings used by yargs with the key/value pairs provided in obj
|
||||
*
|
||||
* If you explicitly specify a locale(), you should do so before calling `updateStrings()`.
|
||||
*/
|
||||
updateStrings(obj: { [key: string]: string }): Argv<T>;
|
||||
|
||||
/**
|
||||
* Set a usage message to show which commands to use.
|
||||
* Inside `message`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl.
|
||||
*
|
||||
* If the optional `description`/`builder`/`handler` are provided, `.usage()` acts an an alias for `.command()`.
|
||||
* This allows you to use `.usage()` to configure the default command that will be run as an entry-point to your application
|
||||
* and allows you to provide configuration for the positional arguments accepted by your program:
|
||||
*/
|
||||
usage(message: string): Argv<T>;
|
||||
usage<U>(command: string | ReadonlyArray<string>, description: string, builder?: (args: Argv<T>) => Argv<U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
usage<U>(command: string | ReadonlyArray<string>, showInHelp: boolean, builder?: (args: Argv<T>) => Argv<U>, handler?: (args: Arguments<U>) => void): Argv<T>;
|
||||
usage<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, description: string, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
usage<O extends { [key: string]: Options }>(command: string | ReadonlyArray<string>, showInHelp: boolean, builder?: O, handler?: (args: Arguments<InferredOptionTypes<O>>) => void): Argv<T>;
|
||||
|
||||
/**
|
||||
* Add an option (e.g. `--version`) that displays the version number (given by the version parameter) and exits the process.
|
||||
* By default yargs enables version for the `--version` option.
|
||||
*
|
||||
* If no arguments are passed to version (`.version()`), yargs will parse the package.json of your module and use its version value.
|
||||
*
|
||||
* If the boolean argument `false` is provided, it will disable `--version`.
|
||||
*/
|
||||
version(): Argv<T>;
|
||||
version(version: string): Argv<T>;
|
||||
version(enable: boolean): Argv<T>;
|
||||
version(optionKey: string, version: string): Argv<T>;
|
||||
version(optionKey: string, description: string, version: string): Argv<T>;
|
||||
|
||||
/**
|
||||
* Format usage output to wrap at columns many columns.
|
||||
*
|
||||
* By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to specify no column limit (no right-align).
|
||||
* Use `.wrap(yargs.terminalWidth())` to maximize the width of yargs' usage instructions.
|
||||
*/
|
||||
wrap(columns: number | null): Argv<T>;
|
||||
}
|
||||
|
||||
type Arguments<T = {}> = T & {
|
||||
/** Non-option arguments */
|
||||
_: string[];
|
||||
/** The script name or node command */
|
||||
$0: string;
|
||||
/** All remaining options */
|
||||
[argName: string]: unknown;
|
||||
};
|
||||
|
||||
interface RequireDirectoryOptions {
|
||||
/** Look for command modules in all subdirectories and apply them as a flattened (non-hierarchical) list. */
|
||||
recurse?: boolean;
|
||||
/** The types of files to look for when requiring command modules. */
|
||||
extensions?: ReadonlyArray<string>;
|
||||
/**
|
||||
* A synchronous function called for each command module encountered.
|
||||
* Accepts `commandObject`, `pathToFile`, and `filename` as arguments.
|
||||
* Returns `commandObject` to include the command; any falsy value to exclude/skip it.
|
||||
*/
|
||||
visit?: (commandObject: any, pathToFile?: string, filename?: string) => any;
|
||||
/** Whitelist certain modules */
|
||||
include?: RegExp | ((pathToFile: string) => boolean);
|
||||
/** Blacklist certain modules. */
|
||||
exclude?: RegExp | ((pathToFile: string) => boolean);
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/** string or array of strings, alias(es) for the canonical option key, see `alias()` */
|
||||
alias?: string | ReadonlyArray<string>;
|
||||
/** boolean, interpret option as an array, see `array()` */
|
||||
array?: boolean;
|
||||
/** boolean, interpret option as a boolean flag, see `boolean()` */
|
||||
boolean?: boolean;
|
||||
/** value or array of values, limit valid option arguments to a predefined set, see `choices()` */
|
||||
choices?: Choices;
|
||||
/** function, coerce or transform parsed command line values into another value, see `coerce()` */
|
||||
coerce?: (arg: any) => any;
|
||||
/** boolean, interpret option as a path to a JSON config file, see `config()` */
|
||||
config?: boolean;
|
||||
/** function, provide a custom config parsing function, see `config()` */
|
||||
configParser?: (configPath: string) => object;
|
||||
/** string or object, require certain keys not to be set, see `conflicts()` */
|
||||
conflicts?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** boolean, interpret option as a count of boolean flags, see `count()` */
|
||||
count?: boolean;
|
||||
/** value, set a default value for the option, see `default()` */
|
||||
default?: any;
|
||||
/** string, use this description for the default value in help content, see `default()` */
|
||||
defaultDescription?: string;
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use 'demandOption' instead
|
||||
*/
|
||||
demand?: boolean | string;
|
||||
/** boolean or string, demand the option be given, with optional error message, see `demandOption()` */
|
||||
demandOption?: boolean | string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
desc?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
describe?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
description?: string;
|
||||
/** boolean, indicate that this key should not be reset when a command is invoked, see `global()` */
|
||||
global?: boolean;
|
||||
/** string, when displaying usage instructions place the option under an alternative group heading, see `group()` */
|
||||
group?: string;
|
||||
/** don't display option in help output. */
|
||||
hidden?: boolean;
|
||||
/** string or object, require certain keys to be set, see `implies()` */
|
||||
implies?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** number, specify how many arguments should be consumed for the option, see `nargs()` */
|
||||
nargs?: number;
|
||||
/** boolean, apply path.normalize() to the option, see `normalize()` */
|
||||
normalize?: boolean;
|
||||
/** boolean, interpret option as a number, `number()` */
|
||||
number?: boolean;
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use 'demandOption' instead
|
||||
*/
|
||||
require?: boolean | string;
|
||||
/**
|
||||
* @deprecated since version 6.6.0
|
||||
* Use 'demandOption' instead
|
||||
*/
|
||||
required?: boolean | string;
|
||||
/** boolean, require the option be specified with a value, see `requiresArg()` */
|
||||
requiresArg?: boolean;
|
||||
/** boolean, skips validation if the option is present, see `skipValidation()` */
|
||||
skipValidation?: boolean;
|
||||
/** boolean, interpret option as a string, see `string()` */
|
||||
string?: boolean;
|
||||
type?: "array" | "count" | PositionalOptionsType;
|
||||
}
|
||||
|
||||
interface PositionalOptions {
|
||||
/** string or array of strings, see `alias()` */
|
||||
alias?: string | ReadonlyArray<string>;
|
||||
/** boolean, interpret option as an array, see `array()` */
|
||||
array?: boolean;
|
||||
/** value or array of values, limit valid option arguments to a predefined set, see `choices()` */
|
||||
choices?: Choices;
|
||||
/** function, coerce or transform parsed command line values into another value, see `coerce()` */
|
||||
coerce?: (arg: any) => any;
|
||||
/** string or object, require certain keys not to be set, see `conflicts()` */
|
||||
conflicts?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** value, set a default value for the option, see `default()` */
|
||||
default?: any;
|
||||
/** boolean or string, demand the option be given, with optional error message, see `demandOption()` */
|
||||
demandOption?: boolean | string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
desc?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
describe?: string;
|
||||
/** string, the option description for help content, see `describe()` */
|
||||
description?: string;
|
||||
/** string or object, require certain keys to be set, see `implies()` */
|
||||
implies?: string | ReadonlyArray<string> | { [key: string]: string | ReadonlyArray<string> };
|
||||
/** boolean, apply path.normalize() to the option, see normalize() */
|
||||
normalize?: boolean;
|
||||
type?: PositionalOptionsType;
|
||||
}
|
||||
|
||||
/** Remove keys K in T */
|
||||
type Omit<T, K> = { [key in Exclude<keyof T, K>]: T[key] };
|
||||
|
||||
/** Remove undefined as a possible value for keys K in T */
|
||||
type Defined<T, K extends keyof T> = Omit<T, K> & { [key in K]: Exclude<T[key], undefined> };
|
||||
|
||||
/** Convert T to T[] and T | undefined to T[] | undefined */
|
||||
type ToArray<T> = Array<Exclude<T, undefined>> | Extract<T, undefined>;
|
||||
|
||||
/** Gives string[] if T is an array type, otherwise string. Preserves | undefined. */
|
||||
type ToString<T> = (Exclude<T, undefined> extends any[] ? string[] : string) | Extract<T, undefined>;
|
||||
|
||||
/** Gives number[] if T is an array type, otherwise number. Preserves | undefined. */
|
||||
type ToNumber<T> = (Exclude<T, undefined> extends any[] ? number[] : number) | Extract<T, undefined>;
|
||||
|
||||
type InferredOptionType<O extends Options | PositionalOptions> =
|
||||
O extends { default: infer D } ? D :
|
||||
O extends { type: "count" } ? number :
|
||||
O extends { count: true } ? number :
|
||||
O extends { required: string | true } ? RequiredOptionType<O> :
|
||||
O extends { require: string | true } ? RequiredOptionType<O> :
|
||||
O extends { demand: string | true } ? RequiredOptionType<O> :
|
||||
O extends { demandOption: string | true } ? RequiredOptionType<O> :
|
||||
RequiredOptionType<O> | undefined;
|
||||
|
||||
type RequiredOptionType<O extends Options | PositionalOptions> =
|
||||
O extends { type: "array", string: true } ? string[] :
|
||||
O extends { type: "array", number: true } ? number[] :
|
||||
O extends { type: "array", normalize: true } ? string[] :
|
||||
O extends { type: "string", array: true } ? string[] :
|
||||
O extends { type: "number", array: true } ? number[] :
|
||||
O extends { string: true, array: true } ? string[] :
|
||||
O extends { number: true, array: true } ? number[] :
|
||||
O extends { normalize: true, array: true } ? string[] :
|
||||
O extends { type: "array" } ? Array<string | number> :
|
||||
O extends { type: "boolean" } ? boolean :
|
||||
O extends { type: "number" } ? number :
|
||||
O extends { type: "string" } ? string :
|
||||
O extends { array: true } ? Array<string | number> :
|
||||
O extends { boolean: true } ? boolean :
|
||||
O extends { number: true } ? number :
|
||||
O extends { string: true } ? string :
|
||||
O extends { normalize: true } ? string :
|
||||
O extends { choices: ReadonlyArray<infer C> } ? C :
|
||||
O extends { coerce: (arg: any) => infer T } ? T :
|
||||
unknown;
|
||||
|
||||
type InferredOptionTypes<O extends { [key: string]: Options }> = { [key in keyof O]: InferredOptionType<O[key]> };
|
||||
|
||||
interface CommandModule<T = {}, U = {}> {
|
||||
/** array of strings (or a single string) representing aliases of `exports.command`, positional args defined in an alias are ignored */
|
||||
aliases?: ReadonlyArray<string> | string;
|
||||
/** object declaring the options the command accepts, or a function accepting and returning a yargs instance */
|
||||
builder?: CommandBuilder<T, U>;
|
||||
/** string (or array of strings) that executes this command when given on the command line, first string may contain positional args */
|
||||
command?: ReadonlyArray<string> | string;
|
||||
/** string used as the description for the command in help text, use `false` for a hidden command */
|
||||
describe?: string | false;
|
||||
/** a function which will be passed the parsed argv. */
|
||||
handler: (args: Arguments<U>) => void;
|
||||
}
|
||||
|
||||
type ParseCallback<T = {}> = (err: Error | undefined, argv: Arguments<T>, output: string) => void;
|
||||
type CommandBuilder<T = {}, U = {}> = { [key: string]: Options } | ((args: Argv<T>) => Argv<U>) | ((args: Argv<T>) => PromiseLike<Argv<U>>);
|
||||
type SyncCompletionFunction = (current: string, argv: any) => string[];
|
||||
type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray<string>) => void) => void;
|
||||
type PromiseCompletionFunction = (current: string, argv: any) => Promise<string[]>;
|
||||
type MiddlewareFunction<T = {}> = (args: Arguments<T>) => void;
|
||||
type Choices = ReadonlyArray<string | number | true | undefined>;
|
||||
type PositionalOptionsType = "boolean" | "number" | "string";
|
||||
}
|
||||
|
||||
declare var yargs: yargs.Argv;
|
||||
export = yargs;
|
||||
63
node_modules/jest-config/node_modules/@types/yargs/package.json
generated
vendored
Normal file
63
node_modules/jest-config/node_modules/@types/yargs/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Martin Poelstra",
|
||||
"url": "https://github.com/poelstra"
|
||||
},
|
||||
{
|
||||
"name": "Mizunashi Mana",
|
||||
"url": "https://github.com/mizunashi-mana"
|
||||
},
|
||||
{
|
||||
"name": "Jeffery Grajkowski",
|
||||
"url": "https://github.com/pushplay"
|
||||
},
|
||||
{
|
||||
"name": "Jeff Kenney",
|
||||
"url": "https://github.com/jeffkenney"
|
||||
},
|
||||
{
|
||||
"name": "Jimi",
|
||||
"url": "Dimitris"
|
||||
},
|
||||
{
|
||||
"name": "Steffen Viken Valvåg",
|
||||
"url": "https://github.com/steffenvv"
|
||||
},
|
||||
{
|
||||
"name": "Emily Marigold Klassen",
|
||||
"url": "https://github.com/forivall"
|
||||
},
|
||||
{
|
||||
"name": "ExE Boss",
|
||||
"url": "https://github.com/ExE-Boss"
|
||||
},
|
||||
{
|
||||
"name": "Aankhen",
|
||||
"url": "https://github.com/Aankhen"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/yargs-parser": "*"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "TypeScript definitions for yargs",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||
"license": "MIT",
|
||||
"main": "",
|
||||
"name": "@types/yargs",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/yargs"
|
||||
},
|
||||
"scripts": {},
|
||||
"typeScriptVersion": "3.0",
|
||||
"types": "index.d.ts",
|
||||
"typesPublisherContentHash": "33123d2b50bbbc5d15307f8a14b565cbb797530f625c3087b83b21aceb528536",
|
||||
"version": "15.0.4"
|
||||
}
|
||||
9
node_modules/jest-config/node_modules/@types/yargs/yargs.d.ts
generated
vendored
Normal file
9
node_modules/jest-config/node_modules/@types/yargs/yargs.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Argv } from '.';
|
||||
|
||||
export = Yargs;
|
||||
|
||||
declare function Yargs(
|
||||
processArgs?: ReadonlyArray<string>,
|
||||
cwd?: string,
|
||||
parentRequire?: NodeRequire,
|
||||
): Argv;
|
||||
37
node_modules/jest-config/node_modules/ansi-regex/index.d.ts
generated
vendored
Normal file
37
node_modules/jest-config/node_modules/ansi-regex/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
declare namespace ansiRegex {
|
||||
interface Options {
|
||||
/**
|
||||
Match only the first ANSI escape.
|
||||
|
||||
@default false
|
||||
*/
|
||||
onlyFirst: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Regular expression for matching ANSI escape codes.
|
||||
|
||||
@example
|
||||
```
|
||||
import ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001B[4mcake\u001B[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
|
||||
//=> ['\u001B[4m', '\u001B[0m']
|
||||
|
||||
'\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']
|
||||
```
|
||||
*/
|
||||
declare function ansiRegex(options?: ansiRegex.Options): RegExp;
|
||||
|
||||
export = ansiRegex;
|
||||
10
node_modules/jest-config/node_modules/ansi-regex/index.js
generated
vendored
Normal file
10
node_modules/jest-config/node_modules/ansi-regex/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = ({onlyFirst = false} = {}) => {
|
||||
const pattern = [
|
||||
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
||||
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
|
||||
].join('|');
|
||||
|
||||
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
||||
};
|
||||
9
node_modules/jest-config/node_modules/ansi-regex/license
generated
vendored
Normal file
9
node_modules/jest-config/node_modules/ansi-regex/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
||||
64
node_modules/jest-config/node_modules/ansi-regex/package.json
generated
vendored
Normal file
64
node_modules/jest-config/node_modules/ansi-regex/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-regex/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Regular expression for matching ANSI escape codes",
|
||||
"devDependencies": {
|
||||
"ava": "^2.4.0",
|
||||
"tsd": "^0.9.0",
|
||||
"xo": "^0.25.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"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 && tsd",
|
||||
"view-supported": "node fixtures/view-codes.js"
|
||||
},
|
||||
"version": "5.0.0"
|
||||
}
|
||||
78
node_modules/jest-config/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
78
node_modules/jest-config/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# ansi-regex [](https://travis-ci.org/chalk/ansi-regex)
|
||||
|
||||
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install ansi-regex
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001B[4mcake\u001B[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
|
||||
//=> ['\u001B[4m', '\u001B[0m']
|
||||
|
||||
'\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`<br>
|
||||
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. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
|
||||
|
||||
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [Sindre Sorhus](https://github.com/sindresorhus)
|
||||
- [Josh Junon](https://github.com/qix-)
|
||||
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
197
node_modules/jest-config/node_modules/ansi-styles/index.d.ts
generated
vendored
Normal file
197
node_modules/jest-config/node_modules/ansi-styles/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
import * as cssColors from 'color-name';
|
||||
|
||||
declare namespace ansiStyles {
|
||||
interface ColorConvert {
|
||||
/**
|
||||
The RGB color space.
|
||||
|
||||
@param red - (`0`-`255`)
|
||||
@param green - (`0`-`255`)
|
||||
@param blue - (`0`-`255`)
|
||||
*/
|
||||
rgb(red: number, green: number, blue: number): string;
|
||||
|
||||
/**
|
||||
The RGB HEX color space.
|
||||
|
||||
@param hex - A hexadecimal string containing RGB data.
|
||||
*/
|
||||
hex(hex: string): string;
|
||||
|
||||
/**
|
||||
@param keyword - A CSS color name.
|
||||
*/
|
||||
keyword(keyword: keyof typeof cssColors): string;
|
||||
|
||||
/**
|
||||
The HSL color space.
|
||||
|
||||
@param hue - (`0`-`360`)
|
||||
@param saturation - (`0`-`100`)
|
||||
@param lightness - (`0`-`100`)
|
||||
*/
|
||||
hsl(hue: number, saturation: number, lightness: number): string;
|
||||
|
||||
/**
|
||||
The HSV color space.
|
||||
|
||||
@param hue - (`0`-`360`)
|
||||
@param saturation - (`0`-`100`)
|
||||
@param value - (`0`-`100`)
|
||||
*/
|
||||
hsv(hue: number, saturation: number, value: number): string;
|
||||
|
||||
/**
|
||||
The HSV color space.
|
||||
|
||||
@param hue - (`0`-`360`)
|
||||
@param whiteness - (`0`-`100`)
|
||||
@param blackness - (`0`-`100`)
|
||||
*/
|
||||
hwb(hue: number, whiteness: number, blackness: number): string;
|
||||
|
||||
/**
|
||||
Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color.
|
||||
*/
|
||||
ansi(ansi: number): string;
|
||||
|
||||
/**
|
||||
Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
|
||||
*/
|
||||
ansi256(ansi: number): string;
|
||||
}
|
||||
|
||||
interface CSPair {
|
||||
/**
|
||||
The ANSI terminal control sequence for starting this style.
|
||||
*/
|
||||
readonly open: string;
|
||||
|
||||
/**
|
||||
The ANSI terminal control sequence for ending this style.
|
||||
*/
|
||||
readonly close: string;
|
||||
}
|
||||
|
||||
interface ColorBase {
|
||||
readonly ansi: ColorConvert;
|
||||
readonly ansi256: ColorConvert;
|
||||
readonly ansi16m: ColorConvert;
|
||||
|
||||
/**
|
||||
The ANSI terminal control sequence for ending this color.
|
||||
*/
|
||||
readonly close: string;
|
||||
}
|
||||
|
||||
interface Modifier {
|
||||
/**
|
||||
Resets the current color chain.
|
||||
*/
|
||||
readonly reset: CSPair;
|
||||
|
||||
/**
|
||||
Make text bold.
|
||||
*/
|
||||
readonly bold: CSPair;
|
||||
|
||||
/**
|
||||
Emitting only a small amount of light.
|
||||
*/
|
||||
readonly dim: CSPair;
|
||||
|
||||
/**
|
||||
Make text italic. (Not widely supported)
|
||||
*/
|
||||
readonly italic: CSPair;
|
||||
|
||||
/**
|
||||
Make text underline. (Not widely supported)
|
||||
*/
|
||||
readonly underline: CSPair;
|
||||
|
||||
/**
|
||||
Inverse background and foreground colors.
|
||||
*/
|
||||
readonly inverse: CSPair;
|
||||
|
||||
/**
|
||||
Prints the text, but makes it invisible.
|
||||
*/
|
||||
readonly hidden: CSPair;
|
||||
|
||||
/**
|
||||
Puts a horizontal line through the center of the text. (Not widely supported)
|
||||
*/
|
||||
readonly strikethrough: CSPair;
|
||||
}
|
||||
|
||||
interface ForegroundColor {
|
||||
readonly black: CSPair;
|
||||
readonly red: CSPair;
|
||||
readonly green: CSPair;
|
||||
readonly yellow: CSPair;
|
||||
readonly blue: CSPair;
|
||||
readonly cyan: CSPair;
|
||||
readonly magenta: CSPair;
|
||||
readonly white: CSPair;
|
||||
|
||||
/**
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly gray: CSPair;
|
||||
|
||||
/**
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly grey: CSPair;
|
||||
|
||||
readonly blackBright: CSPair;
|
||||
readonly redBright: CSPair;
|
||||
readonly greenBright: CSPair;
|
||||
readonly yellowBright: CSPair;
|
||||
readonly blueBright: CSPair;
|
||||
readonly cyanBright: CSPair;
|
||||
readonly magentaBright: CSPair;
|
||||
readonly whiteBright: CSPair;
|
||||
}
|
||||
|
||||
interface BackgroundColor {
|
||||
readonly bgBlack: CSPair;
|
||||
readonly bgRed: CSPair;
|
||||
readonly bgGreen: CSPair;
|
||||
readonly bgYellow: CSPair;
|
||||
readonly bgBlue: CSPair;
|
||||
readonly bgCyan: CSPair;
|
||||
readonly bgMagenta: CSPair;
|
||||
readonly bgWhite: CSPair;
|
||||
|
||||
/**
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGray: CSPair;
|
||||
|
||||
/**
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGrey: CSPair;
|
||||
|
||||
readonly bgBlackBright: CSPair;
|
||||
readonly bgRedBright: CSPair;
|
||||
readonly bgGreenBright: CSPair;
|
||||
readonly bgYellowBright: CSPair;
|
||||
readonly bgBlueBright: CSPair;
|
||||
readonly bgCyanBright: CSPair;
|
||||
readonly bgMagentaBright: CSPair;
|
||||
readonly bgWhiteBright: CSPair;
|
||||
}
|
||||
}
|
||||
|
||||
declare const ansiStyles: {
|
||||
readonly modifier: ansiStyles.Modifier;
|
||||
readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase;
|
||||
readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase;
|
||||
readonly codes: ReadonlyMap<number, number>;
|
||||
} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier;
|
||||
|
||||
export = ansiStyles;
|
||||
163
node_modules/jest-config/node_modules/ansi-styles/index.js
generated
vendored
Normal file
163
node_modules/jest-config/node_modules/ansi-styles/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
'use strict';
|
||||
|
||||
const wrapAnsi16 = (fn, offset) => (...args) => {
|
||||
const code = fn(...args);
|
||||
return `\u001B[${code + offset}m`;
|
||||
};
|
||||
|
||||
const wrapAnsi256 = (fn, offset) => (...args) => {
|
||||
const code = fn(...args);
|
||||
return `\u001B[${38 + offset};5;${code}m`;
|
||||
};
|
||||
|
||||
const wrapAnsi16m = (fn, offset) => (...args) => {
|
||||
const rgb = fn(...args);
|
||||
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
||||
};
|
||||
|
||||
const ansi2ansi = n => n;
|
||||
const rgb2rgb = (r, g, b) => [r, g, b];
|
||||
|
||||
const setLazyProperty = (object, property, get) => {
|
||||
Object.defineProperty(object, property, {
|
||||
get: () => {
|
||||
const value = get();
|
||||
|
||||
Object.defineProperty(object, property, {
|
||||
value,
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
return value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
};
|
||||
|
||||
/** @type {typeof import('color-convert')} */
|
||||
let colorConvert;
|
||||
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
||||
if (colorConvert === undefined) {
|
||||
colorConvert = require('color-convert');
|
||||
}
|
||||
|
||||
const offset = isBackground ? 10 : 0;
|
||||
const styles = {};
|
||||
|
||||
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
||||
const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
|
||||
if (sourceSpace === targetSpace) {
|
||||
styles[name] = wrap(identity, offset);
|
||||
} else if (typeof suite === 'object') {
|
||||
styles[name] = wrap(suite[targetSpace], offset);
|
||||
}
|
||||
}
|
||||
|
||||
return styles;
|
||||
};
|
||||
|
||||
function assembleStyles() {
|
||||
const codes = new Map();
|
||||
const styles = {
|
||||
modifier: {
|
||||
reset: [0, 0],
|
||||
// 21 isn't widely supported and 22 does the same thing
|
||||
bold: [1, 22],
|
||||
dim: [2, 22],
|
||||
italic: [3, 23],
|
||||
underline: [4, 24],
|
||||
inverse: [7, 27],
|
||||
hidden: [8, 28],
|
||||
strikethrough: [9, 29]
|
||||
},
|
||||
color: {
|
||||
black: [30, 39],
|
||||
red: [31, 39],
|
||||
green: [32, 39],
|
||||
yellow: [33, 39],
|
||||
blue: [34, 39],
|
||||
magenta: [35, 39],
|
||||
cyan: [36, 39],
|
||||
white: [37, 39],
|
||||
|
||||
// Bright color
|
||||
blackBright: [90, 39],
|
||||
redBright: [91, 39],
|
||||
greenBright: [92, 39],
|
||||
yellowBright: [93, 39],
|
||||
blueBright: [94, 39],
|
||||
magentaBright: [95, 39],
|
||||
cyanBright: [96, 39],
|
||||
whiteBright: [97, 39]
|
||||
},
|
||||
bgColor: {
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
bgYellow: [43, 49],
|
||||
bgBlue: [44, 49],
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49],
|
||||
|
||||
// Bright color
|
||||
bgBlackBright: [100, 49],
|
||||
bgRedBright: [101, 49],
|
||||
bgGreenBright: [102, 49],
|
||||
bgYellowBright: [103, 49],
|
||||
bgBlueBright: [104, 49],
|
||||
bgMagentaBright: [105, 49],
|
||||
bgCyanBright: [106, 49],
|
||||
bgWhiteBright: [107, 49]
|
||||
}
|
||||
};
|
||||
|
||||
// Alias bright black as gray (and grey)
|
||||
styles.color.gray = styles.color.blackBright;
|
||||
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
||||
styles.color.grey = styles.color.blackBright;
|
||||
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
||||
|
||||
for (const [groupName, group] of Object.entries(styles)) {
|
||||
for (const [styleName, style] of Object.entries(group)) {
|
||||
styles[styleName] = {
|
||||
open: `\u001B[${style[0]}m`,
|
||||
close: `\u001B[${style[1]}m`
|
||||
};
|
||||
|
||||
group[styleName] = styles[styleName];
|
||||
|
||||
codes.set(style[0], style[1]);
|
||||
}
|
||||
|
||||
Object.defineProperty(styles, groupName, {
|
||||
value: group,
|
||||
enumerable: false
|
||||
});
|
||||
}
|
||||
|
||||
Object.defineProperty(styles, 'codes', {
|
||||
value: codes,
|
||||
enumerable: false
|
||||
});
|
||||
|
||||
styles.color.close = '\u001B[39m';
|
||||
styles.bgColor.close = '\u001B[49m';
|
||||
|
||||
setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
|
||||
setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
|
||||
setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
|
||||
setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
|
||||
setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
|
||||
setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
// Make the export immutable
|
||||
Object.defineProperty(module, 'exports', {
|
||||
enumerable: true,
|
||||
get: assembleStyles
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue