Rebuild
This commit is contained in:
parent
c34989108a
commit
8a2fb59d7a
149
dist/index.js
vendored
149
dist/index.js
vendored
|
@ -1543,7 +1543,9 @@ class HttpClient {
|
||||||
maxSockets: maxSockets,
|
maxSockets: maxSockets,
|
||||||
keepAlive: this._keepAlive,
|
keepAlive: this._keepAlive,
|
||||||
proxy: {
|
proxy: {
|
||||||
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`,
|
...((proxyUrl.username || proxyUrl.password) && {
|
||||||
|
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
|
||||||
|
}),
|
||||||
host: proxyUrl.hostname,
|
host: proxyUrl.hostname,
|
||||||
port: proxyUrl.port
|
port: proxyUrl.port
|
||||||
}
|
}
|
||||||
|
@ -1732,11 +1734,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var _a;
|
var _a;
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const assert_1 = __nccwpck_require__(2357);
|
const assert_1 = __nccwpck_require__(2357);
|
||||||
const fs = __nccwpck_require__(5747);
|
const fs = __importStar(__nccwpck_require__(5747));
|
||||||
const path = __nccwpck_require__(5622);
|
const path = __importStar(__nccwpck_require__(5622));
|
||||||
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
||||||
exports.IS_WINDOWS = process.platform === 'win32';
|
exports.IS_WINDOWS = process.platform === 'win32';
|
||||||
function exists(fsPath) {
|
function exists(fsPath) {
|
||||||
|
@ -1934,11 +1943,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const childProcess = __nccwpck_require__(3129);
|
const childProcess = __importStar(__nccwpck_require__(3129));
|
||||||
const path = __nccwpck_require__(5622);
|
const path = __importStar(__nccwpck_require__(5622));
|
||||||
const util_1 = __nccwpck_require__(1669);
|
const util_1 = __nccwpck_require__(1669);
|
||||||
const ioUtil = __nccwpck_require__(1962);
|
const ioUtil = __importStar(__nccwpck_require__(1962));
|
||||||
const exec = util_1.promisify(childProcess.exec);
|
const exec = util_1.promisify(childProcess.exec);
|
||||||
/**
|
/**
|
||||||
* Copies a file or folder.
|
* Copies a file or folder.
|
||||||
|
@ -2106,12 +2122,30 @@ function which(tool, check) {
|
||||||
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
|
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
const matches = yield findInPath(tool);
|
||||||
|
if (matches && matches.length > 0) {
|
||||||
|
return matches[0];
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.which = which;
|
||||||
|
/**
|
||||||
|
* Returns a list of all occurrences of the given tool on the system path.
|
||||||
|
*
|
||||||
|
* @returns Promise<string[]> the paths of the tool
|
||||||
|
*/
|
||||||
|
function findInPath(tool) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (!tool) {
|
||||||
|
throw new Error("parameter 'tool' is required");
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
// build the list of extensions to try
|
// build the list of extensions to try
|
||||||
const extensions = [];
|
const extensions = [];
|
||||||
if (ioUtil.IS_WINDOWS && process.env.PATHEXT) {
|
if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
|
||||||
for (const extension of process.env.PATHEXT.split(path.delimiter)) {
|
for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
|
||||||
if (extension) {
|
if (extension) {
|
||||||
extensions.push(extension);
|
extensions.push(extension);
|
||||||
}
|
}
|
||||||
|
@ -2121,13 +2155,13 @@ function which(tool, check) {
|
||||||
if (ioUtil.isRooted(tool)) {
|
if (ioUtil.isRooted(tool)) {
|
||||||
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
|
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
return filePath;
|
return [filePath];
|
||||||
}
|
}
|
||||||
return '';
|
return [];
|
||||||
}
|
}
|
||||||
// if any path separators, return empty
|
// if any path separators, return empty
|
||||||
if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) {
|
if (tool.includes(path.sep)) {
|
||||||
return '';
|
return [];
|
||||||
}
|
}
|
||||||
// build the list of directories
|
// build the list of directories
|
||||||
//
|
//
|
||||||
|
@ -2143,21 +2177,18 @@ function which(tool, check) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// return the first match
|
// find all matches
|
||||||
|
const matches = [];
|
||||||
for (const directory of directories) {
|
for (const directory of directories) {
|
||||||
const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions);
|
const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
return filePath;
|
matches.push(filePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return matches;
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
throw new Error(`which failed with message ${err.message}`);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.which = which;
|
exports.findInPath = findInPath;
|
||||||
function readCopyOptions(options) {
|
function readCopyOptions(options) {
|
||||||
const force = options.force == null ? true : options.force;
|
const force = options.force == null ? true : options.force;
|
||||||
const recursive = Boolean(options.recursive);
|
const recursive = Boolean(options.recursive);
|
||||||
|
@ -7175,22 +7206,30 @@ module.exports = (versions, range, options) => {
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
const Range = __nccwpck_require__(9828)
|
const Range = __nccwpck_require__(9828)
|
||||||
const { ANY } = __nccwpck_require__(1532)
|
const Comparator = __nccwpck_require__(1532)
|
||||||
|
const { ANY } = Comparator
|
||||||
const satisfies = __nccwpck_require__(6055)
|
const satisfies = __nccwpck_require__(6055)
|
||||||
const compare = __nccwpck_require__(4309)
|
const compare = __nccwpck_require__(4309)
|
||||||
|
|
||||||
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
||||||
// - Every simple range `r1, r2, ...` is a subset of some `R1, R2, ...`
|
// - Every simple range `r1, r2, ...` is a null set, OR
|
||||||
|
// - Every simple range `r1, r2, ...` which is not a null set is a subset of
|
||||||
|
// some `R1, R2, ...`
|
||||||
//
|
//
|
||||||
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
||||||
// - If c is only the ANY comparator
|
// - If c is only the ANY comparator
|
||||||
// - If C is only the ANY comparator, return true
|
// - If C is only the ANY comparator, return true
|
||||||
// - Else return false
|
// - Else if in prerelease mode, return false
|
||||||
|
// - else replace c with `[>=0.0.0]`
|
||||||
|
// - If C is only the ANY comparator
|
||||||
|
// - if in prerelease mode, return true
|
||||||
|
// - else replace C with `[>=0.0.0]`
|
||||||
// - Let EQ be the set of = comparators in c
|
// - Let EQ be the set of = comparators in c
|
||||||
// - If EQ is more than one, return true (null set)
|
// - If EQ is more than one, return true (null set)
|
||||||
// - Let GT be the highest > or >= comparator in c
|
// - Let GT be the highest > or >= comparator in c
|
||||||
// - Let LT be the lowest < or <= comparator in c
|
// - Let LT be the lowest < or <= comparator in c
|
||||||
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
||||||
|
// - If any C is a = range, and GT or LT are set, return false
|
||||||
// - If EQ
|
// - If EQ
|
||||||
// - If GT, and EQ does not satisfy GT, return true (null set)
|
// - If GT, and EQ does not satisfy GT, return true (null set)
|
||||||
// - If LT, and EQ does not satisfy LT, return true (null set)
|
// - If LT, and EQ does not satisfy LT, return true (null set)
|
||||||
|
@ -7199,13 +7238,16 @@ const compare = __nccwpck_require__(4309)
|
||||||
// - If GT
|
// - If GT
|
||||||
// - If GT.semver is lower than any > or >= comp in C, return false
|
// - If GT.semver is lower than any > or >= comp in C, return false
|
||||||
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
||||||
|
// - If GT.semver has a prerelease, and not in prerelease mode
|
||||||
|
// - If no C has a prerelease and the GT.semver tuple, return false
|
||||||
// - If LT
|
// - If LT
|
||||||
// - If LT.semver is greater than any < or <= comp in C, return false
|
// - If LT.semver is greater than any < or <= comp in C, return false
|
||||||
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
||||||
// - If any C is a = range, and GT or LT are set, return false
|
// - If GT.semver has a prerelease, and not in prerelease mode
|
||||||
|
// - If no C has a prerelease and the LT.semver tuple, return false
|
||||||
// - Else return true
|
// - Else return true
|
||||||
|
|
||||||
const subset = (sub, dom, options) => {
|
const subset = (sub, dom, options = {}) => {
|
||||||
if (sub === dom)
|
if (sub === dom)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
@ -7234,8 +7276,21 @@ const simpleSubset = (sub, dom, options) => {
|
||||||
if (sub === dom)
|
if (sub === dom)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
if (sub.length === 1 && sub[0].semver === ANY)
|
if (sub.length === 1 && sub[0].semver === ANY) {
|
||||||
return dom.length === 1 && dom[0].semver === ANY
|
if (dom.length === 1 && dom[0].semver === ANY)
|
||||||
|
return true
|
||||||
|
else if (options.includePrerelease)
|
||||||
|
sub = [ new Comparator('>=0.0.0-0') ]
|
||||||
|
else
|
||||||
|
sub = [ new Comparator('>=0.0.0') ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dom.length === 1 && dom[0].semver === ANY) {
|
||||||
|
if (options.includePrerelease)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
dom = [ new Comparator('>=0.0.0') ]
|
||||||
|
}
|
||||||
|
|
||||||
const eqSet = new Set()
|
const eqSet = new Set()
|
||||||
let gt, lt
|
let gt, lt
|
||||||
|
@ -7278,10 +7333,32 @@ const simpleSubset = (sub, dom, options) => {
|
||||||
|
|
||||||
let higher, lower
|
let higher, lower
|
||||||
let hasDomLT, hasDomGT
|
let hasDomLT, hasDomGT
|
||||||
|
// if the subset has a prerelease, we need a comparator in the superset
|
||||||
|
// with the same tuple and a prerelease, or it's not a subset
|
||||||
|
let needDomLTPre = lt &&
|
||||||
|
!options.includePrerelease &&
|
||||||
|
lt.semver.prerelease.length ? lt.semver : false
|
||||||
|
let needDomGTPre = gt &&
|
||||||
|
!options.includePrerelease &&
|
||||||
|
gt.semver.prerelease.length ? gt.semver : false
|
||||||
|
// exception: <1.2.3-0 is the same as <1.2.3
|
||||||
|
if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
|
||||||
|
lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
|
||||||
|
needDomLTPre = false
|
||||||
|
}
|
||||||
|
|
||||||
for (const c of dom) {
|
for (const c of dom) {
|
||||||
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
|
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
|
||||||
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
|
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
|
||||||
if (gt) {
|
if (gt) {
|
||||||
|
if (needDomGTPre) {
|
||||||
|
if (c.semver.prerelease && c.semver.prerelease.length &&
|
||||||
|
c.semver.major === needDomGTPre.major &&
|
||||||
|
c.semver.minor === needDomGTPre.minor &&
|
||||||
|
c.semver.patch === needDomGTPre.patch) {
|
||||||
|
needDomGTPre = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if (c.operator === '>' || c.operator === '>=') {
|
if (c.operator === '>' || c.operator === '>=') {
|
||||||
higher = higherGT(gt, c, options)
|
higher = higherGT(gt, c, options)
|
||||||
if (higher === c && higher !== gt)
|
if (higher === c && higher !== gt)
|
||||||
|
@ -7290,6 +7367,14 @@ const simpleSubset = (sub, dom, options) => {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (lt) {
|
if (lt) {
|
||||||
|
if (needDomLTPre) {
|
||||||
|
if (c.semver.prerelease && c.semver.prerelease.length &&
|
||||||
|
c.semver.major === needDomLTPre.major &&
|
||||||
|
c.semver.minor === needDomLTPre.minor &&
|
||||||
|
c.semver.patch === needDomLTPre.patch) {
|
||||||
|
needDomLTPre = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if (c.operator === '<' || c.operator === '<=') {
|
if (c.operator === '<' || c.operator === '<=') {
|
||||||
lower = lowerLT(lt, c, options)
|
lower = lowerLT(lt, c, options)
|
||||||
if (lower === c && lower !== lt)
|
if (lower === c && lower !== lt)
|
||||||
|
@ -7310,6 +7395,12 @@ const simpleSubset = (sub, dom, options) => {
|
||||||
if (lt && hasDomGT && !gt && gtltComp !== 0)
|
if (lt && hasDomGT && !gt && gtltComp !== 0)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
// we needed a prerelease range in a specific tuple, but didn't get one
|
||||||
|
// then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
|
||||||
|
// because it includes prereleases in the 1.2.3 tuple
|
||||||
|
if (needDomGTPre || needDomLTPre)
|
||||||
|
return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user