mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Fix.
This commit is contained in:
parent
596a6da241
commit
c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions
10
node_modules/jest-runtime/build/cli/args.d.ts
generated
vendored
Normal file
10
node_modules/jest-runtime/build/cli/args.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 { Options } from 'yargs';
|
||||
export declare const usage = "Usage: $0 [--config=<pathToConfigFile>] <file>";
|
||||
export declare const options: Record<'cache' | 'config' | 'debug' | 'version' | 'watchman', Options>;
|
||||
//# sourceMappingURL=args.d.ts.map
|
1
node_modules/jest-runtime/build/cli/args.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-runtime/build/cli/args.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,eAAO,MAAM,KAAK,mDAAmD,CAAC;AAEtE,eAAO,MAAM,OAAO,EAAE,MAAM,CAC1B,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,EACrD,OAAO,CA8BR,CAAC"}
|
46
node_modules/jest-runtime/build/cli/args.js
generated
vendored
Normal file
46
node_modules/jest-runtime/build/cli/args.js
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.options = exports.usage = 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 usage = 'Usage: $0 [--config=<pathToConfigFile>] <file>';
|
||||
exports.usage = usage;
|
||||
const options = {
|
||||
cache: {
|
||||
default: true,
|
||||
description:
|
||||
'Whether to use the preprocessor cache. Disable ' +
|
||||
'the cache using --no-cache.',
|
||||
type: 'boolean'
|
||||
},
|
||||
config: {
|
||||
alias: 'c',
|
||||
description: 'The path to a Jest config file.',
|
||||
type: 'string'
|
||||
},
|
||||
debug: {
|
||||
description: 'Print debugging info about your jest config.',
|
||||
type: 'boolean'
|
||||
},
|
||||
version: {
|
||||
alias: 'v',
|
||||
description: 'Print the version and exit',
|
||||
type: 'boolean'
|
||||
},
|
||||
watchman: {
|
||||
default: true,
|
||||
description:
|
||||
'Whether to use watchman for file crawling. Disable using ' +
|
||||
'--no-watchman.',
|
||||
type: 'boolean'
|
||||
}
|
||||
};
|
||||
exports.options = options;
|
9
node_modules/jest-runtime/build/cli/index.d.ts
generated
vendored
Normal file
9
node_modules/jest-runtime/build/cli/index.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 declare function run(cliArgv?: Config.Argv, cliInfo?: Array<string>): void;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/jest-runtime/build/cli/index.d.ts.map
generated
vendored
Normal file
1
node_modules/jest-runtime/build/cli/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAUnC,wBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,QA+EjE"}
|
256
node_modules/jest-runtime/build/cli/index.js
generated
vendored
Normal file
256
node_modules/jest-runtime/build/cli/index.js
generated
vendored
Normal file
|
@ -0,0 +1,256 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.run = run;
|
||||
|
||||
function _os() {
|
||||
const data = _interopRequireDefault(require('os'));
|
||||
|
||||
_os = function _os() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require('path'));
|
||||
|
||||
_path = function _path() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _realpathNative() {
|
||||
const data = require('realpath-native');
|
||||
|
||||
_realpathNative = function _realpathNative() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _yargs() {
|
||||
const data = _interopRequireDefault(require('yargs'));
|
||||
|
||||
_yargs = function _yargs() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _console() {
|
||||
const data = require('@jest/console');
|
||||
|
||||
_console = function _console() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function _jestUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function _jestValidate() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestConfig() {
|
||||
const data = require('jest-config');
|
||||
|
||||
_jestConfig = function _jestConfig() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _version = require('../version');
|
||||
|
||||
var args = _interopRequireWildcard(require('./args'));
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
return newObj;
|
||||
}
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(
|
||||
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
})
|
||||
);
|
||||
}
|
||||
ownKeys.forEach(function(key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function run(cliArgv, cliInfo) {
|
||||
const realFs = require('fs');
|
||||
|
||||
const fs = require('graceful-fs');
|
||||
|
||||
fs.gracefulify(realFs);
|
||||
let argv;
|
||||
|
||||
if (cliArgv) {
|
||||
argv = cliArgv;
|
||||
} else {
|
||||
argv = _yargs()
|
||||
.default.usage(args.usage)
|
||||
.help(false)
|
||||
.version(false)
|
||||
.options(args.options).argv; // @ts-ignore: fix this at some point
|
||||
|
||||
(0, _jestValidate().validateCLIOptions)(
|
||||
argv,
|
||||
_objectSpread({}, args.options, {
|
||||
deprecationEntries: _jestConfig().deprecationEntries
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (argv.help) {
|
||||
_yargs().default.showHelp();
|
||||
|
||||
process.on('exit', () => (process.exitCode = 1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (argv.version) {
|
||||
console.log(`v${_version.VERSION}\n`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!argv._.length) {
|
||||
console.log('Please provide a path to a script. (See --help for details)');
|
||||
process.on('exit', () => (process.exitCode = 1));
|
||||
return;
|
||||
}
|
||||
|
||||
const root = (0, _realpathNative().sync)(process.cwd());
|
||||
|
||||
const filePath = _path().default.resolve(root, argv._[0]);
|
||||
|
||||
if (argv.debug) {
|
||||
const info = cliInfo ? ', ' + cliInfo.join(', ') : '';
|
||||
console.log(`Using Jest Runtime v${_version.VERSION}${info}`);
|
||||
} // TODO: Figure this out
|
||||
// @ts-ignore: this might not have the correct arguments
|
||||
|
||||
const options = (0, _jestConfig().readConfig)(argv, root);
|
||||
const globalConfig = options.globalConfig; // Always disable automocking in scripts.
|
||||
|
||||
const config = _objectSpread({}, options.projectConfig, {
|
||||
automock: false,
|
||||
unmockedModulePathPatterns: null
|
||||
}); // Break circular dependency
|
||||
|
||||
const Runtime = require('..');
|
||||
|
||||
Runtime.createContext(config, {
|
||||
maxWorkers: Math.max(_os().default.cpus().length - 1, 1),
|
||||
watchman: globalConfig.watchman
|
||||
})
|
||||
.then(hasteMap => {
|
||||
const Environment = require(config.testEnvironment);
|
||||
|
||||
const environment = new Environment(config);
|
||||
(0, _jestUtil().setGlobal)(
|
||||
environment.global,
|
||||
'console',
|
||||
new (_console()).CustomConsole(process.stdout, process.stderr)
|
||||
);
|
||||
(0, _jestUtil().setGlobal)(
|
||||
environment.global,
|
||||
'jestProjectConfig',
|
||||
config
|
||||
);
|
||||
(0, _jestUtil().setGlobal)(
|
||||
environment.global,
|
||||
'jestGlobalConfig',
|
||||
globalConfig
|
||||
);
|
||||
const runtime = new Runtime(config, environment, hasteMap.resolver);
|
||||
runtime.requireModule(filePath);
|
||||
})
|
||||
.catch(e => {
|
||||
console.error(_chalk().default.red(e.stack || e));
|
||||
process.on('exit', () => (process.exitCode = 1));
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue