@coana-tech/cli 14.12.48 → 14.12.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.mjs +751 -647
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +17 -18
- package/repos/coana-tech/alucard/alucard.jar +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
- package/repos/coana-tech/mambalade/dist/{mambalade-0.3.12-py3-none-any.whl → mambalade-0.3.13-py3-none-any.whl} +0 -0
package/cli.mjs
CHANGED
|
@@ -6672,14 +6672,14 @@ var require_async_iterator = __commonJS({
|
|
|
6672
6672
|
};
|
|
6673
6673
|
}
|
|
6674
6674
|
function readAndResolve(iter) {
|
|
6675
|
-
var
|
|
6676
|
-
if (
|
|
6675
|
+
var resolve38 = iter[kLastResolve];
|
|
6676
|
+
if (resolve38 !== null) {
|
|
6677
6677
|
var data2 = iter[kStream].read();
|
|
6678
6678
|
if (data2 !== null) {
|
|
6679
6679
|
iter[kLastPromise] = null;
|
|
6680
6680
|
iter[kLastResolve] = null;
|
|
6681
6681
|
iter[kLastReject] = null;
|
|
6682
|
-
|
|
6682
|
+
resolve38(createIterResult(data2, false));
|
|
6683
6683
|
}
|
|
6684
6684
|
}
|
|
6685
6685
|
}
|
|
@@ -6687,13 +6687,13 @@ var require_async_iterator = __commonJS({
|
|
|
6687
6687
|
process.nextTick(readAndResolve, iter);
|
|
6688
6688
|
}
|
|
6689
6689
|
function wrapForNext(lastPromise, iter) {
|
|
6690
|
-
return function(
|
|
6690
|
+
return function(resolve38, reject) {
|
|
6691
6691
|
lastPromise.then(function() {
|
|
6692
6692
|
if (iter[kEnded]) {
|
|
6693
|
-
|
|
6693
|
+
resolve38(createIterResult(void 0, true));
|
|
6694
6694
|
return;
|
|
6695
6695
|
}
|
|
6696
|
-
iter[kHandlePromise](
|
|
6696
|
+
iter[kHandlePromise](resolve38, reject);
|
|
6697
6697
|
}, reject);
|
|
6698
6698
|
};
|
|
6699
6699
|
}
|
|
@@ -6713,12 +6713,12 @@ var require_async_iterator = __commonJS({
|
|
|
6713
6713
|
return Promise.resolve(createIterResult(void 0, true));
|
|
6714
6714
|
}
|
|
6715
6715
|
if (this[kStream].destroyed) {
|
|
6716
|
-
return new Promise(function(
|
|
6716
|
+
return new Promise(function(resolve38, reject) {
|
|
6717
6717
|
process.nextTick(function() {
|
|
6718
6718
|
if (_this[kError]) {
|
|
6719
6719
|
reject(_this[kError]);
|
|
6720
6720
|
} else {
|
|
6721
|
-
|
|
6721
|
+
resolve38(createIterResult(void 0, true));
|
|
6722
6722
|
}
|
|
6723
6723
|
});
|
|
6724
6724
|
});
|
|
@@ -6741,13 +6741,13 @@ var require_async_iterator = __commonJS({
|
|
|
6741
6741
|
return this;
|
|
6742
6742
|
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
|
|
6743
6743
|
var _this2 = this;
|
|
6744
|
-
return new Promise(function(
|
|
6744
|
+
return new Promise(function(resolve38, reject) {
|
|
6745
6745
|
_this2[kStream].destroy(null, function(err) {
|
|
6746
6746
|
if (err) {
|
|
6747
6747
|
reject(err);
|
|
6748
6748
|
return;
|
|
6749
6749
|
}
|
|
6750
|
-
|
|
6750
|
+
resolve38(createIterResult(void 0, true));
|
|
6751
6751
|
});
|
|
6752
6752
|
});
|
|
6753
6753
|
}), _Object$setPrototypeO), AsyncIteratorPrototype);
|
|
@@ -6769,15 +6769,15 @@ var require_async_iterator = __commonJS({
|
|
|
6769
6769
|
value: stream5._readableState.endEmitted,
|
|
6770
6770
|
writable: true
|
|
6771
6771
|
}), _defineProperty(_Object$create, kHandlePromise, {
|
|
6772
|
-
value: function value(
|
|
6772
|
+
value: function value(resolve38, reject) {
|
|
6773
6773
|
var data2 = iterator[kStream].read();
|
|
6774
6774
|
if (data2) {
|
|
6775
6775
|
iterator[kLastPromise] = null;
|
|
6776
6776
|
iterator[kLastResolve] = null;
|
|
6777
6777
|
iterator[kLastReject] = null;
|
|
6778
|
-
|
|
6778
|
+
resolve38(createIterResult(data2, false));
|
|
6779
6779
|
} else {
|
|
6780
|
-
iterator[kLastResolve] =
|
|
6780
|
+
iterator[kLastResolve] = resolve38;
|
|
6781
6781
|
iterator[kLastReject] = reject;
|
|
6782
6782
|
}
|
|
6783
6783
|
},
|
|
@@ -6796,12 +6796,12 @@ var require_async_iterator = __commonJS({
|
|
|
6796
6796
|
iterator[kError] = err;
|
|
6797
6797
|
return;
|
|
6798
6798
|
}
|
|
6799
|
-
var
|
|
6800
|
-
if (
|
|
6799
|
+
var resolve38 = iterator[kLastResolve];
|
|
6800
|
+
if (resolve38 !== null) {
|
|
6801
6801
|
iterator[kLastPromise] = null;
|
|
6802
6802
|
iterator[kLastResolve] = null;
|
|
6803
6803
|
iterator[kLastReject] = null;
|
|
6804
|
-
|
|
6804
|
+
resolve38(createIterResult(void 0, true));
|
|
6805
6805
|
}
|
|
6806
6806
|
iterator[kEnded] = true;
|
|
6807
6807
|
});
|
|
@@ -6816,7 +6816,7 @@ var require_async_iterator = __commonJS({
|
|
|
6816
6816
|
var require_from = __commonJS({
|
|
6817
6817
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
|
|
6818
6818
|
"use strict";
|
|
6819
|
-
function asyncGeneratorStep(gen,
|
|
6819
|
+
function asyncGeneratorStep(gen, resolve38, reject, _next, _throw, key, arg) {
|
|
6820
6820
|
try {
|
|
6821
6821
|
var info = gen[key](arg);
|
|
6822
6822
|
var value = info.value;
|
|
@@ -6825,7 +6825,7 @@ var require_from = __commonJS({
|
|
|
6825
6825
|
return;
|
|
6826
6826
|
}
|
|
6827
6827
|
if (info.done) {
|
|
6828
|
-
|
|
6828
|
+
resolve38(value);
|
|
6829
6829
|
} else {
|
|
6830
6830
|
Promise.resolve(value).then(_next, _throw);
|
|
6831
6831
|
}
|
|
@@ -6833,13 +6833,13 @@ var require_from = __commonJS({
|
|
|
6833
6833
|
function _asyncToGenerator(fn2) {
|
|
6834
6834
|
return function() {
|
|
6835
6835
|
var self2 = this, args2 = arguments;
|
|
6836
|
-
return new Promise(function(
|
|
6836
|
+
return new Promise(function(resolve38, reject) {
|
|
6837
6837
|
var gen = fn2.apply(self2, args2);
|
|
6838
6838
|
function _next(value) {
|
|
6839
|
-
asyncGeneratorStep(gen,
|
|
6839
|
+
asyncGeneratorStep(gen, resolve38, reject, _next, _throw, "next", value);
|
|
6840
6840
|
}
|
|
6841
6841
|
function _throw(err) {
|
|
6842
|
-
asyncGeneratorStep(gen,
|
|
6842
|
+
asyncGeneratorStep(gen, resolve38, reject, _next, _throw, "throw", err);
|
|
6843
6843
|
}
|
|
6844
6844
|
_next(void 0);
|
|
6845
6845
|
});
|
|
@@ -8676,10 +8676,10 @@ var require_awaitify = __commonJS({
|
|
|
8676
8676
|
if (typeof args2[arity - 1] === "function") {
|
|
8677
8677
|
return asyncFn.apply(this, args2);
|
|
8678
8678
|
}
|
|
8679
|
-
return new Promise((
|
|
8679
|
+
return new Promise((resolve38, reject) => {
|
|
8680
8680
|
args2[arity - 1] = (err, ...cbArgs) => {
|
|
8681
8681
|
if (err) return reject(err);
|
|
8682
|
-
|
|
8682
|
+
resolve38(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
|
|
8683
8683
|
};
|
|
8684
8684
|
asyncFn.apply(this, args2);
|
|
8685
8685
|
});
|
|
@@ -9308,13 +9308,13 @@ var require_diagnostics = __commonJS({
|
|
|
9308
9308
|
if (adapters[i7](namespace2)) return true;
|
|
9309
9309
|
}
|
|
9310
9310
|
if (!async.length) return false;
|
|
9311
|
-
return new Promise(function pinky(
|
|
9311
|
+
return new Promise(function pinky(resolve38) {
|
|
9312
9312
|
Promise.all(
|
|
9313
9313
|
async.map(function prebind(fn2) {
|
|
9314
9314
|
return fn2(namespace2);
|
|
9315
9315
|
})
|
|
9316
9316
|
).then(function resolved(values) {
|
|
9317
|
-
|
|
9317
|
+
resolve38(values.some(Boolean));
|
|
9318
9318
|
});
|
|
9319
9319
|
});
|
|
9320
9320
|
}
|
|
@@ -33418,7 +33418,7 @@ var require_parser2 = __commonJS({
|
|
|
33418
33418
|
exports2.parseForESLint = void 0;
|
|
33419
33419
|
var toml_parser_1 = require_toml_parser();
|
|
33420
33420
|
var visitor_keys_1 = require_visitor_keys();
|
|
33421
|
-
function
|
|
33421
|
+
function parseForESLint4(code, options) {
|
|
33422
33422
|
const parser = new toml_parser_1.TOMLParser(code, options);
|
|
33423
33423
|
const ast = parser.parse();
|
|
33424
33424
|
return {
|
|
@@ -33429,7 +33429,7 @@ var require_parser2 = __commonJS({
|
|
|
33429
33429
|
}
|
|
33430
33430
|
};
|
|
33431
33431
|
}
|
|
33432
|
-
exports2.parseForESLint =
|
|
33432
|
+
exports2.parseForESLint = parseForESLint4;
|
|
33433
33433
|
}
|
|
33434
33434
|
});
|
|
33435
33435
|
|
|
@@ -36389,9 +36389,9 @@ var require_picomatch = __commonJS({
|
|
|
36389
36389
|
var utils = require_utils2();
|
|
36390
36390
|
var constants3 = require_constants2();
|
|
36391
36391
|
var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2);
|
|
36392
|
-
var
|
|
36392
|
+
var picomatch7 = (glob2, options, returnState = false) => {
|
|
36393
36393
|
if (Array.isArray(glob2)) {
|
|
36394
|
-
const fns = glob2.map((input) =>
|
|
36394
|
+
const fns = glob2.map((input) => picomatch7(input, options, returnState));
|
|
36395
36395
|
const arrayMatcher = (str) => {
|
|
36396
36396
|
for (const isMatch4 of fns) {
|
|
36397
36397
|
const state2 = isMatch4(str);
|
|
@@ -36407,16 +36407,16 @@ var require_picomatch = __commonJS({
|
|
|
36407
36407
|
}
|
|
36408
36408
|
const opts = options || {};
|
|
36409
36409
|
const posix3 = opts.windows;
|
|
36410
|
-
const regex = isState ?
|
|
36410
|
+
const regex = isState ? picomatch7.compileRe(glob2, options) : picomatch7.makeRe(glob2, options, false, true);
|
|
36411
36411
|
const state = regex.state;
|
|
36412
36412
|
delete regex.state;
|
|
36413
36413
|
let isIgnored = () => false;
|
|
36414
36414
|
if (opts.ignore) {
|
|
36415
36415
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
36416
|
-
isIgnored =
|
|
36416
|
+
isIgnored = picomatch7(opts.ignore, ignoreOpts, returnState);
|
|
36417
36417
|
}
|
|
36418
36418
|
const matcher = (input, returnObject = false) => {
|
|
36419
|
-
const { isMatch: isMatch4, match: match2, output } =
|
|
36419
|
+
const { isMatch: isMatch4, match: match2, output } = picomatch7.test(input, regex, options, { glob: glob2, posix: posix3 });
|
|
36420
36420
|
const result = { glob: glob2, state, regex, posix: posix3, input, output, match: match2, isMatch: isMatch4 };
|
|
36421
36421
|
if (typeof opts.onResult === "function") {
|
|
36422
36422
|
opts.onResult(result);
|
|
@@ -36442,7 +36442,7 @@ var require_picomatch = __commonJS({
|
|
|
36442
36442
|
}
|
|
36443
36443
|
return matcher;
|
|
36444
36444
|
};
|
|
36445
|
-
|
|
36445
|
+
picomatch7.test = (input, regex, options, { glob: glob2, posix: posix3 } = {}) => {
|
|
36446
36446
|
if (typeof input !== "string") {
|
|
36447
36447
|
throw new TypeError("Expected input to be a string");
|
|
36448
36448
|
}
|
|
@@ -36459,24 +36459,24 @@ var require_picomatch = __commonJS({
|
|
|
36459
36459
|
}
|
|
36460
36460
|
if (match2 === false || opts.capture === true) {
|
|
36461
36461
|
if (opts.matchBase === true || opts.basename === true) {
|
|
36462
|
-
match2 =
|
|
36462
|
+
match2 = picomatch7.matchBase(input, regex, options, posix3);
|
|
36463
36463
|
} else {
|
|
36464
36464
|
match2 = regex.exec(output);
|
|
36465
36465
|
}
|
|
36466
36466
|
}
|
|
36467
36467
|
return { isMatch: Boolean(match2), match: match2, output };
|
|
36468
36468
|
};
|
|
36469
|
-
|
|
36470
|
-
const regex = glob2 instanceof RegExp ? glob2 :
|
|
36469
|
+
picomatch7.matchBase = (input, glob2, options) => {
|
|
36470
|
+
const regex = glob2 instanceof RegExp ? glob2 : picomatch7.makeRe(glob2, options);
|
|
36471
36471
|
return regex.test(utils.basename(input));
|
|
36472
36472
|
};
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
if (Array.isArray(pattern)) return pattern.map((p3) =>
|
|
36473
|
+
picomatch7.isMatch = (str, patterns, options) => picomatch7(patterns, options)(str);
|
|
36474
|
+
picomatch7.parse = (pattern, options) => {
|
|
36475
|
+
if (Array.isArray(pattern)) return pattern.map((p3) => picomatch7.parse(p3, options));
|
|
36476
36476
|
return parse12(pattern, { ...options, fastpaths: false });
|
|
36477
36477
|
};
|
|
36478
|
-
|
|
36479
|
-
|
|
36478
|
+
picomatch7.scan = (input, options) => scan(input, options);
|
|
36479
|
+
picomatch7.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
36480
36480
|
if (returnOutput === true) {
|
|
36481
36481
|
return state.output;
|
|
36482
36482
|
}
|
|
@@ -36487,13 +36487,13 @@ var require_picomatch = __commonJS({
|
|
|
36487
36487
|
if (state && state.negated === true) {
|
|
36488
36488
|
source = `^(?!${source}).*$`;
|
|
36489
36489
|
}
|
|
36490
|
-
const regex =
|
|
36490
|
+
const regex = picomatch7.toRegex(source, options);
|
|
36491
36491
|
if (returnState === true) {
|
|
36492
36492
|
regex.state = state;
|
|
36493
36493
|
}
|
|
36494
36494
|
return regex;
|
|
36495
36495
|
};
|
|
36496
|
-
|
|
36496
|
+
picomatch7.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
36497
36497
|
if (!input || typeof input !== "string") {
|
|
36498
36498
|
throw new TypeError("Expected a non-empty string");
|
|
36499
36499
|
}
|
|
@@ -36504,9 +36504,9 @@ var require_picomatch = __commonJS({
|
|
|
36504
36504
|
if (!parsed.output) {
|
|
36505
36505
|
parsed = parse12(input, options);
|
|
36506
36506
|
}
|
|
36507
|
-
return
|
|
36507
|
+
return picomatch7.compileRe(parsed, options, returnOutput, returnState);
|
|
36508
36508
|
};
|
|
36509
|
-
|
|
36509
|
+
picomatch7.toRegex = (source, options) => {
|
|
36510
36510
|
try {
|
|
36511
36511
|
const opts = options || {};
|
|
36512
36512
|
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
@@ -36515,8 +36515,8 @@ var require_picomatch = __commonJS({
|
|
|
36515
36515
|
return /$^/;
|
|
36516
36516
|
}
|
|
36517
36517
|
};
|
|
36518
|
-
|
|
36519
|
-
module2.exports =
|
|
36518
|
+
picomatch7.constants = constants3;
|
|
36519
|
+
module2.exports = picomatch7;
|
|
36520
36520
|
}
|
|
36521
36521
|
});
|
|
36522
36522
|
|
|
@@ -36526,14 +36526,14 @@ var require_picomatch2 = __commonJS({
|
|
|
36526
36526
|
"use strict";
|
|
36527
36527
|
var pico = require_picomatch();
|
|
36528
36528
|
var utils = require_utils2();
|
|
36529
|
-
function
|
|
36529
|
+
function picomatch7(glob2, options, returnState = false) {
|
|
36530
36530
|
if (options && (options.windows === null || options.windows === void 0)) {
|
|
36531
36531
|
options = { ...options, windows: utils.isWindows() };
|
|
36532
36532
|
}
|
|
36533
36533
|
return pico(glob2, options, returnState);
|
|
36534
36534
|
}
|
|
36535
|
-
Object.assign(
|
|
36536
|
-
module2.exports =
|
|
36535
|
+
Object.assign(picomatch7, pico);
|
|
36536
|
+
module2.exports = picomatch7;
|
|
36537
36537
|
}
|
|
36538
36538
|
});
|
|
36539
36539
|
|
|
@@ -49506,8 +49506,8 @@ var require_follow_redirects = __commonJS({
|
|
|
49506
49506
|
}
|
|
49507
49507
|
return parsed;
|
|
49508
49508
|
}
|
|
49509
|
-
function resolveUrl(
|
|
49510
|
-
return useNativeURL ? new URL3(
|
|
49509
|
+
function resolveUrl(relative17, base) {
|
|
49510
|
+
return useNativeURL ? new URL3(relative17, base) : parseUrl(url2.resolve(base, relative17));
|
|
49511
49511
|
}
|
|
49512
49512
|
function validateUrl(input) {
|
|
49513
49513
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -53586,13 +53586,13 @@ var require_lib12 = __commonJS({
|
|
|
53586
53586
|
};
|
|
53587
53587
|
}
|
|
53588
53588
|
function serializeActiveFile(absoluteName) {
|
|
53589
|
-
return new Promise((
|
|
53589
|
+
return new Promise((resolve38) => {
|
|
53590
53590
|
if (!activeFiles[absoluteName]) {
|
|
53591
53591
|
activeFiles[absoluteName] = [];
|
|
53592
53592
|
}
|
|
53593
|
-
activeFiles[absoluteName].push(
|
|
53593
|
+
activeFiles[absoluteName].push(resolve38);
|
|
53594
53594
|
if (activeFiles[absoluteName].length === 1) {
|
|
53595
|
-
|
|
53595
|
+
resolve38();
|
|
53596
53596
|
}
|
|
53597
53597
|
});
|
|
53598
53598
|
}
|
|
@@ -54864,12 +54864,12 @@ var require_isexe = __commonJS({
|
|
|
54864
54864
|
if (typeof Promise !== "function") {
|
|
54865
54865
|
throw new TypeError("callback not provided");
|
|
54866
54866
|
}
|
|
54867
|
-
return new Promise(function(
|
|
54867
|
+
return new Promise(function(resolve38, reject) {
|
|
54868
54868
|
isexe(path2, options || {}, function(er, is4) {
|
|
54869
54869
|
if (er) {
|
|
54870
54870
|
reject(er);
|
|
54871
54871
|
} else {
|
|
54872
|
-
|
|
54872
|
+
resolve38(is4);
|
|
54873
54873
|
}
|
|
54874
54874
|
});
|
|
54875
54875
|
});
|
|
@@ -54931,27 +54931,27 @@ var require_which = __commonJS({
|
|
|
54931
54931
|
opt = {};
|
|
54932
54932
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
54933
54933
|
const found = [];
|
|
54934
|
-
const step = (i7) => new Promise((
|
|
54934
|
+
const step = (i7) => new Promise((resolve38, reject) => {
|
|
54935
54935
|
if (i7 === pathEnv.length)
|
|
54936
|
-
return opt.all && found.length ?
|
|
54936
|
+
return opt.all && found.length ? resolve38(found) : reject(getNotFoundError(cmd));
|
|
54937
54937
|
const ppRaw = pathEnv[i7];
|
|
54938
54938
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
54939
54939
|
const pCmd = path2.join(pathPart, cmd);
|
|
54940
54940
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
54941
|
-
|
|
54941
|
+
resolve38(subStep(p3, i7, 0));
|
|
54942
54942
|
});
|
|
54943
|
-
const subStep = (p3, i7, ii) => new Promise((
|
|
54943
|
+
const subStep = (p3, i7, ii) => new Promise((resolve38, reject) => {
|
|
54944
54944
|
if (ii === pathExt.length)
|
|
54945
|
-
return
|
|
54945
|
+
return resolve38(step(i7 + 1));
|
|
54946
54946
|
const ext2 = pathExt[ii];
|
|
54947
54947
|
isexe(p3 + ext2, { pathExt: pathExtExe }, (er, is4) => {
|
|
54948
54948
|
if (!er && is4) {
|
|
54949
54949
|
if (opt.all)
|
|
54950
54950
|
found.push(p3 + ext2);
|
|
54951
54951
|
else
|
|
54952
|
-
return
|
|
54952
|
+
return resolve38(p3 + ext2);
|
|
54953
54953
|
}
|
|
54954
|
-
return
|
|
54954
|
+
return resolve38(subStep(p3, i7, ii + 1));
|
|
54955
54955
|
});
|
|
54956
54956
|
});
|
|
54957
54957
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -55027,27 +55027,27 @@ var require_which2 = __commonJS({
|
|
|
55027
55027
|
opt = {};
|
|
55028
55028
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
55029
55029
|
const found = [];
|
|
55030
|
-
const step = (i7) => new Promise((
|
|
55030
|
+
const step = (i7) => new Promise((resolve38, reject) => {
|
|
55031
55031
|
if (i7 === pathEnv.length)
|
|
55032
|
-
return opt.all && found.length ?
|
|
55032
|
+
return opt.all && found.length ? resolve38(found) : reject(getNotFoundError(cmd));
|
|
55033
55033
|
const ppRaw = pathEnv[i7];
|
|
55034
55034
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
55035
55035
|
const pCmd = path2.join(pathPart, cmd);
|
|
55036
55036
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
55037
|
-
|
|
55037
|
+
resolve38(subStep(p3, i7, 0));
|
|
55038
55038
|
});
|
|
55039
|
-
const subStep = (p3, i7, ii) => new Promise((
|
|
55039
|
+
const subStep = (p3, i7, ii) => new Promise((resolve38, reject) => {
|
|
55040
55040
|
if (ii === pathExt.length)
|
|
55041
|
-
return
|
|
55041
|
+
return resolve38(step(i7 + 1));
|
|
55042
55042
|
const ext2 = pathExt[ii];
|
|
55043
55043
|
isexe(p3 + ext2, { pathExt: pathExtExe }, (er, is4) => {
|
|
55044
55044
|
if (!er && is4) {
|
|
55045
55045
|
if (opt.all)
|
|
55046
55046
|
found.push(p3 + ext2);
|
|
55047
55047
|
else
|
|
55048
|
-
return
|
|
55048
|
+
return resolve38(p3 + ext2);
|
|
55049
55049
|
}
|
|
55050
|
-
return
|
|
55050
|
+
return resolve38(subStep(p3, i7, ii + 1));
|
|
55051
55051
|
});
|
|
55052
55052
|
});
|
|
55053
55053
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -55989,7 +55989,7 @@ var require_kill = __commonJS({
|
|
|
55989
55989
|
return spawnedPromise;
|
|
55990
55990
|
}
|
|
55991
55991
|
let timeoutId;
|
|
55992
|
-
const timeoutPromise = new Promise((
|
|
55992
|
+
const timeoutPromise = new Promise((resolve38, reject) => {
|
|
55993
55993
|
timeoutId = setTimeout(() => {
|
|
55994
55994
|
timeoutKill(spawned, killSignal, reject);
|
|
55995
55995
|
}, timeout);
|
|
@@ -56095,7 +56095,7 @@ var require_get_stream = __commonJS({
|
|
|
56095
56095
|
};
|
|
56096
56096
|
const { maxBuffer } = options;
|
|
56097
56097
|
const stream6 = bufferStream(options);
|
|
56098
|
-
await new Promise((
|
|
56098
|
+
await new Promise((resolve38, reject) => {
|
|
56099
56099
|
const rejectPromise = (error) => {
|
|
56100
56100
|
if (error && stream6.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
56101
56101
|
error.bufferedData = stream6.getBufferedValue();
|
|
@@ -56105,7 +56105,7 @@ var require_get_stream = __commonJS({
|
|
|
56105
56105
|
(async () => {
|
|
56106
56106
|
try {
|
|
56107
56107
|
await streamPipelinePromisified(inputStream, stream6);
|
|
56108
|
-
|
|
56108
|
+
resolve38();
|
|
56109
56109
|
} catch (error) {
|
|
56110
56110
|
rejectPromise(error);
|
|
56111
56111
|
}
|
|
@@ -56262,9 +56262,9 @@ var require_promise = __commonJS({
|
|
|
56262
56262
|
return spawned;
|
|
56263
56263
|
};
|
|
56264
56264
|
var getSpawnedPromise = (spawned) => {
|
|
56265
|
-
return new Promise((
|
|
56265
|
+
return new Promise((resolve38, reject) => {
|
|
56266
56266
|
spawned.on("exit", (exitCode, signal) => {
|
|
56267
|
-
|
|
56267
|
+
resolve38({ exitCode, signal });
|
|
56268
56268
|
});
|
|
56269
56269
|
spawned.on("error", (error) => {
|
|
56270
56270
|
reject(error);
|
|
@@ -57334,9 +57334,9 @@ var require_graceful_git = __commonJS({
|
|
|
57334
57334
|
async function gracefulGit(args2, opts) {
|
|
57335
57335
|
opts = opts || {};
|
|
57336
57336
|
const operation = retry.operation(Object.assign({}, RETRY_OPTIONS, opts));
|
|
57337
|
-
return new Promise((
|
|
57337
|
+
return new Promise((resolve38, reject) => {
|
|
57338
57338
|
operation.attempt((currentAttempt) => {
|
|
57339
|
-
noRetry(args2, opts).then(
|
|
57339
|
+
noRetry(args2, opts).then(resolve38).catch((err) => {
|
|
57340
57340
|
if (operation.retry(err)) {
|
|
57341
57341
|
return;
|
|
57342
57342
|
}
|
|
@@ -58728,7 +58728,7 @@ var require_dist3 = __commonJS({
|
|
|
58728
58728
|
};
|
|
58729
58729
|
var supportedSchemas = /* @__PURE__ */ new Set(["data:", "http:", "https:"]);
|
|
58730
58730
|
async function fetch3(url3, options_) {
|
|
58731
|
-
return new Promise((
|
|
58731
|
+
return new Promise((resolve38, reject) => {
|
|
58732
58732
|
const request = new Request2(url3, options_);
|
|
58733
58733
|
const options = getNodeRequestOptions(request);
|
|
58734
58734
|
if (!supportedSchemas.has(options.protocol)) {
|
|
@@ -58737,7 +58737,7 @@ var require_dist3 = __commonJS({
|
|
|
58737
58737
|
if (options.protocol === "data:") {
|
|
58738
58738
|
const data2 = dataUriToBuffer(request.url);
|
|
58739
58739
|
const response2 = new Response2(data2, { headers: { "Content-Type": data2.typeFull } });
|
|
58740
|
-
|
|
58740
|
+
resolve38(response2);
|
|
58741
58741
|
return;
|
|
58742
58742
|
}
|
|
58743
58743
|
const send = (options.protocol === "https:" ? https2 : http2).request;
|
|
@@ -58826,7 +58826,7 @@ var require_dist3 = __commonJS({
|
|
|
58826
58826
|
requestOptions.body = void 0;
|
|
58827
58827
|
requestOptions.headers.delete("content-length");
|
|
58828
58828
|
}
|
|
58829
|
-
|
|
58829
|
+
resolve38(fetch3(new Request2(locationURL, requestOptions)));
|
|
58830
58830
|
finalize();
|
|
58831
58831
|
return;
|
|
58832
58832
|
}
|
|
@@ -58855,7 +58855,7 @@ var require_dist3 = __commonJS({
|
|
|
58855
58855
|
const codings = headers.get("Content-Encoding");
|
|
58856
58856
|
if (!request.compress || request.method === "HEAD" || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
|
|
58857
58857
|
response = new Response2(body, responseOptions);
|
|
58858
|
-
|
|
58858
|
+
resolve38(response);
|
|
58859
58859
|
return;
|
|
58860
58860
|
}
|
|
58861
58861
|
const zlibOptions2 = {
|
|
@@ -58867,7 +58867,7 @@ var require_dist3 = __commonJS({
|
|
|
58867
58867
|
reject(error);
|
|
58868
58868
|
});
|
|
58869
58869
|
response = new Response2(body, responseOptions);
|
|
58870
|
-
|
|
58870
|
+
resolve38(response);
|
|
58871
58871
|
return;
|
|
58872
58872
|
}
|
|
58873
58873
|
if (codings === "deflate" || codings === "x-deflate") {
|
|
@@ -58885,7 +58885,7 @@ var require_dist3 = __commonJS({
|
|
|
58885
58885
|
});
|
|
58886
58886
|
}
|
|
58887
58887
|
response = new Response2(body, responseOptions);
|
|
58888
|
-
|
|
58888
|
+
resolve38(response);
|
|
58889
58889
|
});
|
|
58890
58890
|
return;
|
|
58891
58891
|
}
|
|
@@ -58894,11 +58894,11 @@ var require_dist3 = __commonJS({
|
|
|
58894
58894
|
reject(error);
|
|
58895
58895
|
});
|
|
58896
58896
|
response = new Response2(body, responseOptions);
|
|
58897
|
-
|
|
58897
|
+
resolve38(response);
|
|
58898
58898
|
return;
|
|
58899
58899
|
}
|
|
58900
58900
|
response = new Response2(body, responseOptions);
|
|
58901
|
-
|
|
58901
|
+
resolve38(response);
|
|
58902
58902
|
});
|
|
58903
58903
|
writeToStream(request_, request);
|
|
58904
58904
|
});
|
|
@@ -58976,14 +58976,14 @@ var require_fetch = __commonJS({
|
|
|
58976
58976
|
retries: maxRetries
|
|
58977
58977
|
});
|
|
58978
58978
|
try {
|
|
58979
|
-
return await new Promise((
|
|
58979
|
+
return await new Promise((resolve38, reject) => {
|
|
58980
58980
|
op.attempt(async (attempt) => {
|
|
58981
58981
|
try {
|
|
58982
58982
|
const res = await (0, node_fetch_1.default)(url2, opts);
|
|
58983
58983
|
if (res.status >= 500 && res.status < 600 || [408, 409, 420, 429].includes(res.status)) {
|
|
58984
58984
|
throw new ResponseError(res);
|
|
58985
58985
|
} else {
|
|
58986
|
-
|
|
58986
|
+
resolve38(res);
|
|
58987
58987
|
}
|
|
58988
58988
|
} catch (error) {
|
|
58989
58989
|
(0, assert_1.default)(util_1.default.types.isNativeError(error));
|
|
@@ -61258,12 +61258,12 @@ var require_promisify = __commonJS({
|
|
|
61258
61258
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61259
61259
|
function promisify2(fn2) {
|
|
61260
61260
|
return function(req, opts) {
|
|
61261
|
-
return new Promise((
|
|
61261
|
+
return new Promise((resolve38, reject) => {
|
|
61262
61262
|
fn2.call(this, req, opts, (err, rtn) => {
|
|
61263
61263
|
if (err) {
|
|
61264
61264
|
reject(err);
|
|
61265
61265
|
} else {
|
|
61266
|
-
|
|
61266
|
+
resolve38(rtn);
|
|
61267
61267
|
}
|
|
61268
61268
|
});
|
|
61269
61269
|
});
|
|
@@ -61467,7 +61467,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
61467
61467
|
var debug_1 = __importDefault(require_src3());
|
|
61468
61468
|
var debug = debug_1.default("https-proxy-agent:parse-proxy-response");
|
|
61469
61469
|
function parseProxyResponse(socket) {
|
|
61470
|
-
return new Promise((
|
|
61470
|
+
return new Promise((resolve38, reject) => {
|
|
61471
61471
|
let buffersLength = 0;
|
|
61472
61472
|
const buffers = [];
|
|
61473
61473
|
function read() {
|
|
@@ -61507,7 +61507,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
61507
61507
|
const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
|
|
61508
61508
|
const statusCode = +firstLine.split(" ")[1];
|
|
61509
61509
|
debug("got proxy server response: %o", firstLine);
|
|
61510
|
-
|
|
61510
|
+
resolve38({
|
|
61511
61511
|
statusCode,
|
|
61512
61512
|
buffered
|
|
61513
61513
|
});
|
|
@@ -61528,11 +61528,11 @@ var require_agent2 = __commonJS({
|
|
|
61528
61528
|
"use strict";
|
|
61529
61529
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
61530
61530
|
function adopt(value) {
|
|
61531
|
-
return value instanceof P ? value : new P(function(
|
|
61532
|
-
|
|
61531
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
61532
|
+
resolve38(value);
|
|
61533
61533
|
});
|
|
61534
61534
|
}
|
|
61535
|
-
return new (P || (P = Promise))(function(
|
|
61535
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
61536
61536
|
function fulfilled(value) {
|
|
61537
61537
|
try {
|
|
61538
61538
|
step(generator.next(value));
|
|
@@ -61548,7 +61548,7 @@ var require_agent2 = __commonJS({
|
|
|
61548
61548
|
}
|
|
61549
61549
|
}
|
|
61550
61550
|
function step(result) {
|
|
61551
|
-
result.done ?
|
|
61551
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
61552
61552
|
}
|
|
61553
61553
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
61554
61554
|
});
|
|
@@ -61688,7 +61688,7 @@ var require_dist4 = __commonJS({
|
|
|
61688
61688
|
"use strict";
|
|
61689
61689
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61690
61690
|
function once8(emitter, name, { signal } = {}) {
|
|
61691
|
-
return new Promise((
|
|
61691
|
+
return new Promise((resolve38, reject) => {
|
|
61692
61692
|
function cleanup() {
|
|
61693
61693
|
signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", cleanup);
|
|
61694
61694
|
emitter.removeListener(name, onEvent);
|
|
@@ -61696,7 +61696,7 @@ var require_dist4 = __commonJS({
|
|
|
61696
61696
|
}
|
|
61697
61697
|
function onEvent(...args2) {
|
|
61698
61698
|
cleanup();
|
|
61699
|
-
|
|
61699
|
+
resolve38(args2);
|
|
61700
61700
|
}
|
|
61701
61701
|
function onError(err) {
|
|
61702
61702
|
cleanup();
|
|
@@ -61717,11 +61717,11 @@ var require_agent3 = __commonJS({
|
|
|
61717
61717
|
"use strict";
|
|
61718
61718
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
61719
61719
|
function adopt(value) {
|
|
61720
|
-
return value instanceof P ? value : new P(function(
|
|
61721
|
-
|
|
61720
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
61721
|
+
resolve38(value);
|
|
61722
61722
|
});
|
|
61723
61723
|
}
|
|
61724
|
-
return new (P || (P = Promise))(function(
|
|
61724
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
61725
61725
|
function fulfilled(value) {
|
|
61726
61726
|
try {
|
|
61727
61727
|
step(generator.next(value));
|
|
@@ -61737,7 +61737,7 @@ var require_agent3 = __commonJS({
|
|
|
61737
61737
|
}
|
|
61738
61738
|
}
|
|
61739
61739
|
function step(result) {
|
|
61740
|
-
result.done ?
|
|
61740
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
61741
61741
|
}
|
|
61742
61742
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
61743
61743
|
});
|
|
@@ -63665,11 +63665,11 @@ var require_socksclient = __commonJS({
|
|
|
63665
63665
|
"use strict";
|
|
63666
63666
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
63667
63667
|
function adopt(value) {
|
|
63668
|
-
return value instanceof P ? value : new P(function(
|
|
63669
|
-
|
|
63668
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
63669
|
+
resolve38(value);
|
|
63670
63670
|
});
|
|
63671
63671
|
}
|
|
63672
|
-
return new (P || (P = Promise))(function(
|
|
63672
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
63673
63673
|
function fulfilled(value) {
|
|
63674
63674
|
try {
|
|
63675
63675
|
step(generator.next(value));
|
|
@@ -63685,7 +63685,7 @@ var require_socksclient = __commonJS({
|
|
|
63685
63685
|
}
|
|
63686
63686
|
}
|
|
63687
63687
|
function step(result) {
|
|
63688
|
-
result.done ?
|
|
63688
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
63689
63689
|
}
|
|
63690
63690
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
63691
63691
|
});
|
|
@@ -63719,13 +63719,13 @@ var require_socksclient = __commonJS({
|
|
|
63719
63719
|
* @returns { Promise }
|
|
63720
63720
|
*/
|
|
63721
63721
|
static createConnection(options, callback) {
|
|
63722
|
-
return new Promise((
|
|
63722
|
+
return new Promise((resolve38, reject) => {
|
|
63723
63723
|
try {
|
|
63724
63724
|
(0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
|
|
63725
63725
|
} catch (err) {
|
|
63726
63726
|
if (typeof callback === "function") {
|
|
63727
63727
|
callback(err);
|
|
63728
|
-
return
|
|
63728
|
+
return resolve38(err);
|
|
63729
63729
|
} else {
|
|
63730
63730
|
return reject(err);
|
|
63731
63731
|
}
|
|
@@ -63736,16 +63736,16 @@ var require_socksclient = __commonJS({
|
|
|
63736
63736
|
client.removeAllListeners();
|
|
63737
63737
|
if (typeof callback === "function") {
|
|
63738
63738
|
callback(null, info);
|
|
63739
|
-
|
|
63739
|
+
resolve38(info);
|
|
63740
63740
|
} else {
|
|
63741
|
-
|
|
63741
|
+
resolve38(info);
|
|
63742
63742
|
}
|
|
63743
63743
|
});
|
|
63744
63744
|
client.once("error", (err) => {
|
|
63745
63745
|
client.removeAllListeners();
|
|
63746
63746
|
if (typeof callback === "function") {
|
|
63747
63747
|
callback(err);
|
|
63748
|
-
|
|
63748
|
+
resolve38(err);
|
|
63749
63749
|
} else {
|
|
63750
63750
|
reject(err);
|
|
63751
63751
|
}
|
|
@@ -63762,13 +63762,13 @@ var require_socksclient = __commonJS({
|
|
|
63762
63762
|
* @returns { Promise }
|
|
63763
63763
|
*/
|
|
63764
63764
|
static createConnectionChain(options, callback) {
|
|
63765
|
-
return new Promise((
|
|
63765
|
+
return new Promise((resolve38, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
63766
63766
|
try {
|
|
63767
63767
|
(0, helpers_1.validateSocksClientChainOptions)(options);
|
|
63768
63768
|
} catch (err) {
|
|
63769
63769
|
if (typeof callback === "function") {
|
|
63770
63770
|
callback(err);
|
|
63771
|
-
return
|
|
63771
|
+
return resolve38(err);
|
|
63772
63772
|
} else {
|
|
63773
63773
|
return reject(err);
|
|
63774
63774
|
}
|
|
@@ -63794,14 +63794,14 @@ var require_socksclient = __commonJS({
|
|
|
63794
63794
|
}
|
|
63795
63795
|
if (typeof callback === "function") {
|
|
63796
63796
|
callback(null, { socket: sock });
|
|
63797
|
-
|
|
63797
|
+
resolve38({ socket: sock });
|
|
63798
63798
|
} else {
|
|
63799
|
-
|
|
63799
|
+
resolve38({ socket: sock });
|
|
63800
63800
|
}
|
|
63801
63801
|
} catch (err) {
|
|
63802
63802
|
if (typeof callback === "function") {
|
|
63803
63803
|
callback(err);
|
|
63804
|
-
|
|
63804
|
+
resolve38(err);
|
|
63805
63805
|
} else {
|
|
63806
63806
|
reject(err);
|
|
63807
63807
|
}
|
|
@@ -64369,11 +64369,11 @@ var require_agent4 = __commonJS({
|
|
|
64369
64369
|
"use strict";
|
|
64370
64370
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
64371
64371
|
function adopt(value) {
|
|
64372
|
-
return value instanceof P ? value : new P(function(
|
|
64373
|
-
|
|
64372
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
64373
|
+
resolve38(value);
|
|
64374
64374
|
});
|
|
64375
64375
|
}
|
|
64376
|
-
return new (P || (P = Promise))(function(
|
|
64376
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
64377
64377
|
function fulfilled(value) {
|
|
64378
64378
|
try {
|
|
64379
64379
|
step(generator.next(value));
|
|
@@ -64389,7 +64389,7 @@ var require_agent4 = __commonJS({
|
|
|
64389
64389
|
}
|
|
64390
64390
|
}
|
|
64391
64391
|
function step(result) {
|
|
64392
|
-
result.done ?
|
|
64392
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
64393
64393
|
}
|
|
64394
64394
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
64395
64395
|
});
|
|
@@ -64406,12 +64406,12 @@ var require_agent4 = __commonJS({
|
|
|
64406
64406
|
var socks_1 = require_build();
|
|
64407
64407
|
var debug = debug_1.default("socks-proxy-agent");
|
|
64408
64408
|
function dnsLookup(host) {
|
|
64409
|
-
return new Promise((
|
|
64409
|
+
return new Promise((resolve38, reject) => {
|
|
64410
64410
|
dns_1.default.lookup(host, (err, res) => {
|
|
64411
64411
|
if (err) {
|
|
64412
64412
|
reject(err);
|
|
64413
64413
|
} else {
|
|
64414
|
-
|
|
64414
|
+
resolve38(res);
|
|
64415
64415
|
}
|
|
64416
64416
|
});
|
|
64417
64417
|
});
|
|
@@ -67224,9 +67224,9 @@ var require_write = __commonJS({
|
|
|
67224
67224
|
var lockfileName_1 = require_lockfileName();
|
|
67225
67225
|
var lockfileFormatConverters_1 = require_lockfileFormatConverters();
|
|
67226
67226
|
async function writeFileAtomic(filename, data2) {
|
|
67227
|
-
return new Promise((
|
|
67227
|
+
return new Promise((resolve38, reject) => {
|
|
67228
67228
|
(0, write_file_atomic_1.default)(filename, data2, {}, (err) => {
|
|
67229
|
-
err != null ? reject(err) :
|
|
67229
|
+
err != null ? reject(err) : resolve38();
|
|
67230
67230
|
});
|
|
67231
67231
|
});
|
|
67232
67232
|
}
|
|
@@ -67330,14 +67330,14 @@ var require_existsWantedLockfile = __commonJS({
|
|
|
67330
67330
|
mergeGitBranchLockfiles: false
|
|
67331
67331
|
}) {
|
|
67332
67332
|
const wantedLockfile = await (0, lockfileName_1.getWantedLockfileName)(opts);
|
|
67333
|
-
return new Promise((
|
|
67333
|
+
return new Promise((resolve38, reject) => {
|
|
67334
67334
|
fs_1.default.access(path_1.default.join(pkgPath, wantedLockfile), (err) => {
|
|
67335
67335
|
if (err == null) {
|
|
67336
|
-
|
|
67336
|
+
resolve38(true);
|
|
67337
67337
|
return;
|
|
67338
67338
|
}
|
|
67339
67339
|
if (err.code === "ENOENT") {
|
|
67340
|
-
|
|
67340
|
+
resolve38(false);
|
|
67341
67341
|
return;
|
|
67342
67342
|
}
|
|
67343
67343
|
reject(err);
|
|
@@ -84218,7 +84218,7 @@ var require_lockfile = __commonJS({
|
|
|
84218
84218
|
exports3.default = function(fn2) {
|
|
84219
84219
|
return function() {
|
|
84220
84220
|
var gen = fn2.apply(this, arguments);
|
|
84221
|
-
return new _promise2.default(function(
|
|
84221
|
+
return new _promise2.default(function(resolve38, reject) {
|
|
84222
84222
|
function step(key, arg) {
|
|
84223
84223
|
try {
|
|
84224
84224
|
var info = gen[key](arg);
|
|
@@ -84228,7 +84228,7 @@ var require_lockfile = __commonJS({
|
|
|
84228
84228
|
return;
|
|
84229
84229
|
}
|
|
84230
84230
|
if (info.done) {
|
|
84231
|
-
|
|
84231
|
+
resolve38(value);
|
|
84232
84232
|
} else {
|
|
84233
84233
|
return _promise2.default.resolve(value).then(function(value2) {
|
|
84234
84234
|
step("next", value2);
|
|
@@ -84849,7 +84849,7 @@ var require_lockfile = __commonJS({
|
|
|
84849
84849
|
}
|
|
84850
84850
|
const file = _ref22;
|
|
84851
84851
|
if (yield exists2(file)) {
|
|
84852
|
-
return
|
|
84852
|
+
return readFile32(file);
|
|
84853
84853
|
}
|
|
84854
84854
|
}
|
|
84855
84855
|
return null;
|
|
@@ -84868,7 +84868,7 @@ var require_lockfile = __commonJS({
|
|
|
84868
84868
|
})();
|
|
84869
84869
|
let readJsonAndFile = exports3.readJsonAndFile = (() => {
|
|
84870
84870
|
var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {
|
|
84871
|
-
const file = yield
|
|
84871
|
+
const file = yield readFile32(loc);
|
|
84872
84872
|
try {
|
|
84873
84873
|
return {
|
|
84874
84874
|
object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM2(file))),
|
|
@@ -84919,16 +84919,16 @@ var require_lockfile = __commonJS({
|
|
|
84919
84919
|
if (process.platform === "win32") {
|
|
84920
84920
|
yield fsSymlink(src, dest, "junction");
|
|
84921
84921
|
} else {
|
|
84922
|
-
let
|
|
84922
|
+
let relative17;
|
|
84923
84923
|
try {
|
|
84924
|
-
|
|
84924
|
+
relative17 = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src));
|
|
84925
84925
|
} catch (err) {
|
|
84926
84926
|
if (err.code !== "ENOENT") {
|
|
84927
84927
|
throw err;
|
|
84928
84928
|
}
|
|
84929
|
-
|
|
84929
|
+
relative17 = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src);
|
|
84930
84930
|
}
|
|
84931
|
-
yield fsSymlink(
|
|
84931
|
+
yield fsSymlink(relative17 || ".", dest);
|
|
84932
84932
|
}
|
|
84933
84933
|
});
|
|
84934
84934
|
return function symlink2(_x24, _x25) {
|
|
@@ -84955,17 +84955,17 @@ var require_lockfile = __commonJS({
|
|
|
84955
84955
|
_ref28 = _i14.value;
|
|
84956
84956
|
}
|
|
84957
84957
|
const name = _ref28;
|
|
84958
|
-
const
|
|
84958
|
+
const relative17 = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name;
|
|
84959
84959
|
const loc = (_path || _load_path()).default.join(dir, name);
|
|
84960
84960
|
const stat5 = yield lstat2(loc);
|
|
84961
84961
|
files.push({
|
|
84962
|
-
relative:
|
|
84962
|
+
relative: relative17,
|
|
84963
84963
|
basename: name,
|
|
84964
84964
|
absolute: loc,
|
|
84965
84965
|
mtime: +stat5.mtime
|
|
84966
84966
|
});
|
|
84967
84967
|
if (stat5.isDirectory()) {
|
|
84968
|
-
files = files.concat(yield walk(loc,
|
|
84968
|
+
files = files.concat(yield walk(loc, relative17, ignoreBasenames));
|
|
84969
84969
|
}
|
|
84970
84970
|
}
|
|
84971
84971
|
return files;
|
|
@@ -85108,7 +85108,7 @@ var require_lockfile = __commonJS({
|
|
|
85108
85108
|
};
|
|
85109
85109
|
})();
|
|
85110
85110
|
exports3.copy = copy;
|
|
85111
|
-
exports3.readFile =
|
|
85111
|
+
exports3.readFile = readFile32;
|
|
85112
85112
|
exports3.readFileRaw = readFileRaw;
|
|
85113
85113
|
exports3.normalizeOS = normalizeOS;
|
|
85114
85114
|
var _fs;
|
|
@@ -85196,17 +85196,17 @@ var require_lockfile = __commonJS({
|
|
|
85196
85196
|
return copyBulk([{ src, dest }], reporter);
|
|
85197
85197
|
}
|
|
85198
85198
|
function _readFile(loc, encoding) {
|
|
85199
|
-
return new Promise((
|
|
85199
|
+
return new Promise((resolve38, reject) => {
|
|
85200
85200
|
(_fs || _load_fs()).default.readFile(loc, encoding, function(err, content) {
|
|
85201
85201
|
if (err) {
|
|
85202
85202
|
reject(err);
|
|
85203
85203
|
} else {
|
|
85204
|
-
|
|
85204
|
+
resolve38(content);
|
|
85205
85205
|
}
|
|
85206
85206
|
});
|
|
85207
85207
|
});
|
|
85208
85208
|
}
|
|
85209
|
-
function
|
|
85209
|
+
function readFile32(loc) {
|
|
85210
85210
|
return _readFile(loc, "utf8").then(normalizeOS);
|
|
85211
85211
|
}
|
|
85212
85212
|
function readFileRaw(loc) {
|
|
@@ -85434,8 +85434,8 @@ var require_lockfile = __commonJS({
|
|
|
85434
85434
|
return true;
|
|
85435
85435
|
}
|
|
85436
85436
|
function sleep(ms) {
|
|
85437
|
-
return new Promise((
|
|
85438
|
-
setTimeout(
|
|
85437
|
+
return new Promise((resolve38) => {
|
|
85438
|
+
setTimeout(resolve38, ms);
|
|
85439
85439
|
});
|
|
85440
85440
|
}
|
|
85441
85441
|
},
|
|
@@ -85892,13 +85892,13 @@ var require_lockfile = __commonJS({
|
|
|
85892
85892
|
exports3.promisify = promisify2;
|
|
85893
85893
|
exports3.queue = queue;
|
|
85894
85894
|
function wait(delay) {
|
|
85895
|
-
return new Promise((
|
|
85896
|
-
setTimeout(
|
|
85895
|
+
return new Promise((resolve38) => {
|
|
85896
|
+
setTimeout(resolve38, delay);
|
|
85897
85897
|
});
|
|
85898
85898
|
}
|
|
85899
85899
|
function promisify2(fn2, firstData) {
|
|
85900
85900
|
return function(...args2) {
|
|
85901
|
-
return new Promise(function(
|
|
85901
|
+
return new Promise(function(resolve38, reject) {
|
|
85902
85902
|
args2.push(function(err, ...result) {
|
|
85903
85903
|
let res = result;
|
|
85904
85904
|
if (result.length <= 1) {
|
|
@@ -85911,7 +85911,7 @@ var require_lockfile = __commonJS({
|
|
|
85911
85911
|
if (err) {
|
|
85912
85912
|
reject(err);
|
|
85913
85913
|
} else {
|
|
85914
|
-
|
|
85914
|
+
resolve38(res);
|
|
85915
85915
|
}
|
|
85916
85916
|
});
|
|
85917
85917
|
fn2.apply(null, args2);
|
|
@@ -85926,7 +85926,7 @@ var require_lockfile = __commonJS({
|
|
|
85926
85926
|
if (!total) {
|
|
85927
85927
|
return Promise.resolve(results);
|
|
85928
85928
|
}
|
|
85929
|
-
return new Promise((
|
|
85929
|
+
return new Promise((resolve38, reject) => {
|
|
85930
85930
|
for (let i7 = 0; i7 < concurrency; i7++) {
|
|
85931
85931
|
next2();
|
|
85932
85932
|
}
|
|
@@ -85937,7 +85937,7 @@ var require_lockfile = __commonJS({
|
|
|
85937
85937
|
results.push(result);
|
|
85938
85938
|
total--;
|
|
85939
85939
|
if (total === 0) {
|
|
85940
|
-
|
|
85940
|
+
resolve38(results);
|
|
85941
85941
|
} else {
|
|
85942
85942
|
if (arr.length) {
|
|
85943
85943
|
next2();
|
|
@@ -86295,7 +86295,7 @@ var require_lockfile = __commonJS({
|
|
|
86295
86295
|
opts = opts || {};
|
|
86296
86296
|
const P = opts.Promise || Promise;
|
|
86297
86297
|
const istream = integrityStream(opts);
|
|
86298
|
-
return new P((
|
|
86298
|
+
return new P((resolve38, reject) => {
|
|
86299
86299
|
stream5.pipe(istream);
|
|
86300
86300
|
stream5.on("error", reject);
|
|
86301
86301
|
istream.on("error", reject);
|
|
@@ -86303,7 +86303,7 @@ var require_lockfile = __commonJS({
|
|
|
86303
86303
|
istream.on("integrity", (s6) => {
|
|
86304
86304
|
sri = s6;
|
|
86305
86305
|
});
|
|
86306
|
-
istream.on("end", () =>
|
|
86306
|
+
istream.on("end", () => resolve38(sri));
|
|
86307
86307
|
istream.on("data", () => {
|
|
86308
86308
|
});
|
|
86309
86309
|
});
|
|
@@ -86356,7 +86356,7 @@ var require_lockfile = __commonJS({
|
|
|
86356
86356
|
const checker = integrityStream(Object.assign({}, opts, {
|
|
86357
86357
|
integrity: sri
|
|
86358
86358
|
}));
|
|
86359
|
-
return new P((
|
|
86359
|
+
return new P((resolve38, reject) => {
|
|
86360
86360
|
stream5.pipe(checker);
|
|
86361
86361
|
stream5.on("error", reject);
|
|
86362
86362
|
checker.on("error", reject);
|
|
@@ -86364,7 +86364,7 @@ var require_lockfile = __commonJS({
|
|
|
86364
86364
|
checker.on("verified", (s6) => {
|
|
86365
86365
|
sri2 = s6;
|
|
86366
86366
|
});
|
|
86367
|
-
checker.on("end", () =>
|
|
86367
|
+
checker.on("end", () => resolve38(sri2));
|
|
86368
86368
|
checker.on("data", () => {
|
|
86369
86369
|
});
|
|
86370
86370
|
});
|
|
@@ -87105,13 +87105,13 @@ var require_lockfile = __commonJS({
|
|
|
87105
87105
|
"use strict";
|
|
87106
87106
|
var aFunction = __webpack_require__(46);
|
|
87107
87107
|
function PromiseCapability(C2) {
|
|
87108
|
-
var
|
|
87108
|
+
var resolve38, reject;
|
|
87109
87109
|
this.promise = new C2(function($$resolve, $$reject) {
|
|
87110
|
-
if (
|
|
87111
|
-
|
|
87110
|
+
if (resolve38 !== void 0 || reject !== void 0) throw TypeError("Bad Promise constructor");
|
|
87111
|
+
resolve38 = $$resolve;
|
|
87112
87112
|
reject = $$reject;
|
|
87113
87113
|
});
|
|
87114
|
-
this.resolve = aFunction(
|
|
87114
|
+
this.resolve = aFunction(resolve38);
|
|
87115
87115
|
this.reject = aFunction(reject);
|
|
87116
87116
|
}
|
|
87117
87117
|
module3.exports.f = function(C2) {
|
|
@@ -88140,9 +88140,9 @@ var require_lockfile = __commonJS({
|
|
|
88140
88140
|
} else {
|
|
88141
88141
|
this.stillActive();
|
|
88142
88142
|
}
|
|
88143
|
-
return new Promise((
|
|
88143
|
+
return new Promise((resolve38, reject) => {
|
|
88144
88144
|
const queue = this.queue[key] = this.queue[key] || [];
|
|
88145
|
-
queue.push({ factory, resolve:
|
|
88145
|
+
queue.push({ factory, resolve: resolve38, reject });
|
|
88146
88146
|
if (!this.running[key]) {
|
|
88147
88147
|
this.shift(key);
|
|
88148
88148
|
}
|
|
@@ -88166,7 +88166,7 @@ var require_lockfile = __commonJS({
|
|
|
88166
88166
|
return;
|
|
88167
88167
|
}
|
|
88168
88168
|
var _queue$shift = queue.shift();
|
|
88169
|
-
const
|
|
88169
|
+
const resolve38 = _queue$shift.resolve, reject = _queue$shift.reject, factory = _queue$shift.factory;
|
|
88170
88170
|
if (!queue.length) {
|
|
88171
88171
|
delete this.queue[key];
|
|
88172
88172
|
}
|
|
@@ -88178,7 +88178,7 @@ var require_lockfile = __commonJS({
|
|
|
88178
88178
|
this.running[key] = true;
|
|
88179
88179
|
this.runningCount++;
|
|
88180
88180
|
factory().then(function(val2) {
|
|
88181
|
-
|
|
88181
|
+
resolve38(val2);
|
|
88182
88182
|
next2();
|
|
88183
88183
|
return null;
|
|
88184
88184
|
}).catch(function(err) {
|
|
@@ -88361,8 +88361,8 @@ var require_lockfile = __commonJS({
|
|
|
88361
88361
|
anObject(C2);
|
|
88362
88362
|
if (isObject2(x2) && x2.constructor === C2) return x2;
|
|
88363
88363
|
var promiseCapability = newPromiseCapability.f(C2);
|
|
88364
|
-
var
|
|
88365
|
-
|
|
88364
|
+
var resolve38 = promiseCapability.resolve;
|
|
88365
|
+
resolve38(x2);
|
|
88366
88366
|
return promiseCapability.promise;
|
|
88367
88367
|
};
|
|
88368
88368
|
},
|
|
@@ -89261,11 +89261,11 @@ ${indent2}`);
|
|
|
89261
89261
|
})();
|
|
89262
89262
|
const copyFilePoly = (src, dest, flags, data2) => {
|
|
89263
89263
|
if ((_fs || _load_fs()).default.copyFile) {
|
|
89264
|
-
return new Promise((
|
|
89264
|
+
return new Promise((resolve38, reject) => (_fs || _load_fs()).default.copyFile(src, dest, flags, (err) => {
|
|
89265
89265
|
if (err) {
|
|
89266
89266
|
reject(err);
|
|
89267
89267
|
} else {
|
|
89268
|
-
fixTimes(void 0, dest, data2).then(() =>
|
|
89268
|
+
fixTimes(void 0, dest, data2).then(() => resolve38()).catch((ex) => reject(ex));
|
|
89269
89269
|
}
|
|
89270
89270
|
}));
|
|
89271
89271
|
} else {
|
|
@@ -90174,7 +90174,7 @@ ${indent2}`);
|
|
|
90174
90174
|
var i7 = 0;
|
|
90175
90175
|
var run3 = function(reaction) {
|
|
90176
90176
|
var handler = ok ? reaction.ok : reaction.fail;
|
|
90177
|
-
var
|
|
90177
|
+
var resolve38 = reaction.resolve;
|
|
90178
90178
|
var reject = reaction.reject;
|
|
90179
90179
|
var domain = reaction.domain;
|
|
90180
90180
|
var result, then, exited;
|
|
@@ -90196,8 +90196,8 @@ ${indent2}`);
|
|
|
90196
90196
|
if (result === reaction.promise) {
|
|
90197
90197
|
reject(TypeError2("Promise-chain cycle"));
|
|
90198
90198
|
} else if (then = isThenable2(result)) {
|
|
90199
|
-
then.call(result,
|
|
90200
|
-
} else
|
|
90199
|
+
then.call(result, resolve38, reject);
|
|
90200
|
+
} else resolve38(result);
|
|
90201
90201
|
} else reject(value);
|
|
90202
90202
|
} catch (e) {
|
|
90203
90203
|
if (domain && !exited) domain.exit();
|
|
@@ -90342,7 +90342,7 @@ ${indent2}`);
|
|
|
90342
90342
|
});
|
|
90343
90343
|
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
|
|
90344
90344
|
// 25.4.4.6 Promise.resolve(x)
|
|
90345
|
-
resolve: function
|
|
90345
|
+
resolve: function resolve38(x2) {
|
|
90346
90346
|
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x2);
|
|
90347
90347
|
}
|
|
90348
90348
|
});
|
|
@@ -90353,7 +90353,7 @@ ${indent2}`);
|
|
|
90353
90353
|
all: function all3(iterable) {
|
|
90354
90354
|
var C2 = this;
|
|
90355
90355
|
var capability = newPromiseCapability(C2);
|
|
90356
|
-
var
|
|
90356
|
+
var resolve38 = capability.resolve;
|
|
90357
90357
|
var reject = capability.reject;
|
|
90358
90358
|
var result = perform(function() {
|
|
90359
90359
|
var values = [];
|
|
@@ -90368,10 +90368,10 @@ ${indent2}`);
|
|
|
90368
90368
|
if (alreadyCalled) return;
|
|
90369
90369
|
alreadyCalled = true;
|
|
90370
90370
|
values[$index] = value;
|
|
90371
|
-
--remaining ||
|
|
90371
|
+
--remaining || resolve38(values);
|
|
90372
90372
|
}, reject);
|
|
90373
90373
|
});
|
|
90374
|
-
--remaining ||
|
|
90374
|
+
--remaining || resolve38(values);
|
|
90375
90375
|
});
|
|
90376
90376
|
if (result.e) reject(result.v);
|
|
90377
90377
|
return capability.promise;
|
|
@@ -94436,7 +94436,7 @@ var require_ohm = __commonJS({
|
|
|
94436
94436
|
this.recordedFailures = this._recordedFailuresStack.pop();
|
|
94437
94437
|
}
|
|
94438
94438
|
};
|
|
94439
|
-
var
|
|
94439
|
+
var Matcher2 = class {
|
|
94440
94440
|
constructor(grammar2) {
|
|
94441
94441
|
this.grammar = grammar2;
|
|
94442
94442
|
this._memoTable = [];
|
|
@@ -94998,7 +94998,7 @@ var require_ohm = __commonJS({
|
|
|
94998
94998
|
this.supportsIncrementalParsing = true;
|
|
94999
94999
|
}
|
|
95000
95000
|
matcher() {
|
|
95001
|
-
return new
|
|
95001
|
+
return new Matcher2(this);
|
|
95002
95002
|
}
|
|
95003
95003
|
// Return true if the grammar is a built-in grammar, otherwise false.
|
|
95004
95004
|
// NOTE: This might give an unexpected result if called before BuiltInRules is defined!
|
|
@@ -99031,9 +99031,9 @@ var require_picomatch3 = __commonJS({
|
|
|
99031
99031
|
var utils = require_utils5();
|
|
99032
99032
|
var constants3 = require_constants7();
|
|
99033
99033
|
var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2);
|
|
99034
|
-
var
|
|
99034
|
+
var picomatch7 = (glob2, options, returnState = false) => {
|
|
99035
99035
|
if (Array.isArray(glob2)) {
|
|
99036
|
-
const fns = glob2.map((input) =>
|
|
99036
|
+
const fns = glob2.map((input) => picomatch7(input, options, returnState));
|
|
99037
99037
|
const arrayMatcher = (str) => {
|
|
99038
99038
|
for (const isMatch4 of fns) {
|
|
99039
99039
|
const state2 = isMatch4(str);
|
|
@@ -99049,16 +99049,16 @@ var require_picomatch3 = __commonJS({
|
|
|
99049
99049
|
}
|
|
99050
99050
|
const opts = options || {};
|
|
99051
99051
|
const posix3 = utils.isWindows(options);
|
|
99052
|
-
const regex = isState ?
|
|
99052
|
+
const regex = isState ? picomatch7.compileRe(glob2, options) : picomatch7.makeRe(glob2, options, false, true);
|
|
99053
99053
|
const state = regex.state;
|
|
99054
99054
|
delete regex.state;
|
|
99055
99055
|
let isIgnored = () => false;
|
|
99056
99056
|
if (opts.ignore) {
|
|
99057
99057
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
99058
|
-
isIgnored =
|
|
99058
|
+
isIgnored = picomatch7(opts.ignore, ignoreOpts, returnState);
|
|
99059
99059
|
}
|
|
99060
99060
|
const matcher = (input, returnObject = false) => {
|
|
99061
|
-
const { isMatch: isMatch4, match: match2, output } =
|
|
99061
|
+
const { isMatch: isMatch4, match: match2, output } = picomatch7.test(input, regex, options, { glob: glob2, posix: posix3 });
|
|
99062
99062
|
const result = { glob: glob2, state, regex, posix: posix3, input, output, match: match2, isMatch: isMatch4 };
|
|
99063
99063
|
if (typeof opts.onResult === "function") {
|
|
99064
99064
|
opts.onResult(result);
|
|
@@ -99084,7 +99084,7 @@ var require_picomatch3 = __commonJS({
|
|
|
99084
99084
|
}
|
|
99085
99085
|
return matcher;
|
|
99086
99086
|
};
|
|
99087
|
-
|
|
99087
|
+
picomatch7.test = (input, regex, options, { glob: glob2, posix: posix3 } = {}) => {
|
|
99088
99088
|
if (typeof input !== "string") {
|
|
99089
99089
|
throw new TypeError("Expected input to be a string");
|
|
99090
99090
|
}
|
|
@@ -99101,24 +99101,24 @@ var require_picomatch3 = __commonJS({
|
|
|
99101
99101
|
}
|
|
99102
99102
|
if (match2 === false || opts.capture === true) {
|
|
99103
99103
|
if (opts.matchBase === true || opts.basename === true) {
|
|
99104
|
-
match2 =
|
|
99104
|
+
match2 = picomatch7.matchBase(input, regex, options, posix3);
|
|
99105
99105
|
} else {
|
|
99106
99106
|
match2 = regex.exec(output);
|
|
99107
99107
|
}
|
|
99108
99108
|
}
|
|
99109
99109
|
return { isMatch: Boolean(match2), match: match2, output };
|
|
99110
99110
|
};
|
|
99111
|
-
|
|
99112
|
-
const regex = glob2 instanceof RegExp ? glob2 :
|
|
99111
|
+
picomatch7.matchBase = (input, glob2, options, posix3 = utils.isWindows(options)) => {
|
|
99112
|
+
const regex = glob2 instanceof RegExp ? glob2 : picomatch7.makeRe(glob2, options);
|
|
99113
99113
|
return regex.test(path2.basename(input));
|
|
99114
99114
|
};
|
|
99115
|
-
|
|
99116
|
-
|
|
99117
|
-
if (Array.isArray(pattern)) return pattern.map((p3) =>
|
|
99115
|
+
picomatch7.isMatch = (str, patterns, options) => picomatch7(patterns, options)(str);
|
|
99116
|
+
picomatch7.parse = (pattern, options) => {
|
|
99117
|
+
if (Array.isArray(pattern)) return pattern.map((p3) => picomatch7.parse(p3, options));
|
|
99118
99118
|
return parse12(pattern, { ...options, fastpaths: false });
|
|
99119
99119
|
};
|
|
99120
|
-
|
|
99121
|
-
|
|
99120
|
+
picomatch7.scan = (input, options) => scan(input, options);
|
|
99121
|
+
picomatch7.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
99122
99122
|
if (returnOutput === true) {
|
|
99123
99123
|
return state.output;
|
|
99124
99124
|
}
|
|
@@ -99129,13 +99129,13 @@ var require_picomatch3 = __commonJS({
|
|
|
99129
99129
|
if (state && state.negated === true) {
|
|
99130
99130
|
source = `^(?!${source}).*$`;
|
|
99131
99131
|
}
|
|
99132
|
-
const regex =
|
|
99132
|
+
const regex = picomatch7.toRegex(source, options);
|
|
99133
99133
|
if (returnState === true) {
|
|
99134
99134
|
regex.state = state;
|
|
99135
99135
|
}
|
|
99136
99136
|
return regex;
|
|
99137
99137
|
};
|
|
99138
|
-
|
|
99138
|
+
picomatch7.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
99139
99139
|
if (!input || typeof input !== "string") {
|
|
99140
99140
|
throw new TypeError("Expected a non-empty string");
|
|
99141
99141
|
}
|
|
@@ -99146,9 +99146,9 @@ var require_picomatch3 = __commonJS({
|
|
|
99146
99146
|
if (!parsed.output) {
|
|
99147
99147
|
parsed = parse12(input, options);
|
|
99148
99148
|
}
|
|
99149
|
-
return
|
|
99149
|
+
return picomatch7.compileRe(parsed, options, returnOutput, returnState);
|
|
99150
99150
|
};
|
|
99151
|
-
|
|
99151
|
+
picomatch7.toRegex = (source, options) => {
|
|
99152
99152
|
try {
|
|
99153
99153
|
const opts = options || {};
|
|
99154
99154
|
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
@@ -99157,8 +99157,8 @@ var require_picomatch3 = __commonJS({
|
|
|
99157
99157
|
return /$^/;
|
|
99158
99158
|
}
|
|
99159
99159
|
};
|
|
99160
|
-
|
|
99161
|
-
module2.exports =
|
|
99160
|
+
picomatch7.constants = constants3;
|
|
99161
|
+
module2.exports = picomatch7;
|
|
99162
99162
|
}
|
|
99163
99163
|
});
|
|
99164
99164
|
|
|
@@ -99176,7 +99176,7 @@ var require_micromatch = __commonJS({
|
|
|
99176
99176
|
"use strict";
|
|
99177
99177
|
var util5 = __require("util");
|
|
99178
99178
|
var braces = require_braces();
|
|
99179
|
-
var
|
|
99179
|
+
var picomatch7 = require_picomatch4();
|
|
99180
99180
|
var utils = require_utils5();
|
|
99181
99181
|
var isEmptyString = (val2) => val2 === "" || val2 === "./";
|
|
99182
99182
|
var micromatch4 = (list, patterns, options) => {
|
|
@@ -99193,7 +99193,7 @@ var require_micromatch = __commonJS({
|
|
|
99193
99193
|
}
|
|
99194
99194
|
};
|
|
99195
99195
|
for (let i7 = 0; i7 < patterns.length; i7++) {
|
|
99196
|
-
let isMatch4 =
|
|
99196
|
+
let isMatch4 = picomatch7(String(patterns[i7]), { ...options, onResult }, true);
|
|
99197
99197
|
let negated = isMatch4.state.negated || isMatch4.state.negatedExtglob;
|
|
99198
99198
|
if (negated) negatives++;
|
|
99199
99199
|
for (let item of list) {
|
|
@@ -99221,8 +99221,8 @@ var require_micromatch = __commonJS({
|
|
|
99221
99221
|
return matches;
|
|
99222
99222
|
};
|
|
99223
99223
|
micromatch4.match = micromatch4;
|
|
99224
|
-
micromatch4.matcher = (pattern, options) =>
|
|
99225
|
-
micromatch4.isMatch = (str, patterns, options) =>
|
|
99224
|
+
micromatch4.matcher = (pattern, options) => picomatch7(pattern, options);
|
|
99225
|
+
micromatch4.isMatch = (str, patterns, options) => picomatch7(patterns, options)(str);
|
|
99226
99226
|
micromatch4.any = micromatch4.isMatch;
|
|
99227
99227
|
micromatch4.not = (list, patterns, options = {}) => {
|
|
99228
99228
|
patterns = [].concat(patterns).map(String);
|
|
@@ -99269,7 +99269,7 @@ var require_micromatch = __commonJS({
|
|
|
99269
99269
|
micromatch4.some = (list, patterns, options) => {
|
|
99270
99270
|
let items = [].concat(list);
|
|
99271
99271
|
for (let pattern of [].concat(patterns)) {
|
|
99272
|
-
let isMatch4 =
|
|
99272
|
+
let isMatch4 = picomatch7(String(pattern), options);
|
|
99273
99273
|
if (items.some((item) => isMatch4(item))) {
|
|
99274
99274
|
return true;
|
|
99275
99275
|
}
|
|
@@ -99279,7 +99279,7 @@ var require_micromatch = __commonJS({
|
|
|
99279
99279
|
micromatch4.every = (list, patterns, options) => {
|
|
99280
99280
|
let items = [].concat(list);
|
|
99281
99281
|
for (let pattern of [].concat(patterns)) {
|
|
99282
|
-
let isMatch4 =
|
|
99282
|
+
let isMatch4 = picomatch7(String(pattern), options);
|
|
99283
99283
|
if (!items.every((item) => isMatch4(item))) {
|
|
99284
99284
|
return false;
|
|
99285
99285
|
}
|
|
@@ -99290,23 +99290,23 @@ var require_micromatch = __commonJS({
|
|
|
99290
99290
|
if (typeof str !== "string") {
|
|
99291
99291
|
throw new TypeError(`Expected a string: "${util5.inspect(str)}"`);
|
|
99292
99292
|
}
|
|
99293
|
-
return [].concat(patterns).every((p3) =>
|
|
99293
|
+
return [].concat(patterns).every((p3) => picomatch7(p3, options)(str));
|
|
99294
99294
|
};
|
|
99295
99295
|
micromatch4.capture = (glob2, input, options) => {
|
|
99296
99296
|
let posix3 = utils.isWindows(options);
|
|
99297
|
-
let regex =
|
|
99297
|
+
let regex = picomatch7.makeRe(String(glob2), { ...options, capture: true });
|
|
99298
99298
|
let match2 = regex.exec(posix3 ? utils.toPosixSlashes(input) : input);
|
|
99299
99299
|
if (match2) {
|
|
99300
99300
|
return match2.slice(1).map((v) => v === void 0 ? "" : v);
|
|
99301
99301
|
}
|
|
99302
99302
|
};
|
|
99303
|
-
micromatch4.makeRe = (...args2) =>
|
|
99304
|
-
micromatch4.scan = (...args2) =>
|
|
99303
|
+
micromatch4.makeRe = (...args2) => picomatch7.makeRe(...args2);
|
|
99304
|
+
micromatch4.scan = (...args2) => picomatch7.scan(...args2);
|
|
99305
99305
|
micromatch4.parse = (patterns, options) => {
|
|
99306
99306
|
let res = [];
|
|
99307
99307
|
for (let pattern of [].concat(patterns || [])) {
|
|
99308
99308
|
for (let str of braces(String(pattern), options)) {
|
|
99309
|
-
res.push(
|
|
99309
|
+
res.push(picomatch7.parse(str, options));
|
|
99310
99310
|
}
|
|
99311
99311
|
}
|
|
99312
99312
|
return res;
|
|
@@ -103631,8 +103631,8 @@ var require_util4 = __commonJS({
|
|
|
103631
103631
|
function createDeferredPromise() {
|
|
103632
103632
|
let res;
|
|
103633
103633
|
let rej;
|
|
103634
|
-
const promise = new Promise((
|
|
103635
|
-
res =
|
|
103634
|
+
const promise = new Promise((resolve38, reject) => {
|
|
103635
|
+
res = resolve38;
|
|
103636
103636
|
rej = reject;
|
|
103637
103637
|
});
|
|
103638
103638
|
return { promise, resolve: res, reject: rej };
|
|
@@ -105136,8 +105136,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
105136
105136
|
});
|
|
105137
105137
|
}
|
|
105138
105138
|
});
|
|
105139
|
-
const busboyResolve = new Promise((
|
|
105140
|
-
busboy.on("finish",
|
|
105139
|
+
const busboyResolve = new Promise((resolve38, reject) => {
|
|
105140
|
+
busboy.on("finish", resolve38);
|
|
105141
105141
|
busboy.on("error", (err) => reject(new TypeError(err)));
|
|
105142
105142
|
});
|
|
105143
105143
|
if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk);
|
|
@@ -105671,9 +105671,9 @@ var require_dispatcher_base = __commonJS({
|
|
|
105671
105671
|
}
|
|
105672
105672
|
close(callback) {
|
|
105673
105673
|
if (callback === void 0) {
|
|
105674
|
-
return new Promise((
|
|
105674
|
+
return new Promise((resolve38, reject) => {
|
|
105675
105675
|
this.close((err, data2) => {
|
|
105676
|
-
return err ? reject(err) :
|
|
105676
|
+
return err ? reject(err) : resolve38(data2);
|
|
105677
105677
|
});
|
|
105678
105678
|
});
|
|
105679
105679
|
}
|
|
@@ -105711,12 +105711,12 @@ var require_dispatcher_base = __commonJS({
|
|
|
105711
105711
|
err = null;
|
|
105712
105712
|
}
|
|
105713
105713
|
if (callback === void 0) {
|
|
105714
|
-
return new Promise((
|
|
105714
|
+
return new Promise((resolve38, reject) => {
|
|
105715
105715
|
this.destroy(err, (err2, data2) => {
|
|
105716
105716
|
return err2 ? (
|
|
105717
105717
|
/* istanbul ignore next: should never error */
|
|
105718
105718
|
reject(err2)
|
|
105719
|
-
) :
|
|
105719
|
+
) : resolve38(data2);
|
|
105720
105720
|
});
|
|
105721
105721
|
});
|
|
105722
105722
|
}
|
|
@@ -106776,16 +106776,16 @@ var require_client = __commonJS({
|
|
|
106776
106776
|
return this[kNeedDrain] < 2;
|
|
106777
106777
|
}
|
|
106778
106778
|
async [kClose]() {
|
|
106779
|
-
return new Promise((
|
|
106779
|
+
return new Promise((resolve38) => {
|
|
106780
106780
|
if (!this[kSize]) {
|
|
106781
|
-
|
|
106781
|
+
resolve38(null);
|
|
106782
106782
|
} else {
|
|
106783
|
-
this[kClosedResolve] =
|
|
106783
|
+
this[kClosedResolve] = resolve38;
|
|
106784
106784
|
}
|
|
106785
106785
|
});
|
|
106786
106786
|
}
|
|
106787
106787
|
async [kDestroy](err) {
|
|
106788
|
-
return new Promise((
|
|
106788
|
+
return new Promise((resolve38) => {
|
|
106789
106789
|
const requests = this[kQueue].splice(this[kPendingIdx]);
|
|
106790
106790
|
for (let i7 = 0; i7 < requests.length; i7++) {
|
|
106791
106791
|
const request = requests[i7];
|
|
@@ -106796,7 +106796,7 @@ var require_client = __commonJS({
|
|
|
106796
106796
|
this[kClosedResolve]();
|
|
106797
106797
|
this[kClosedResolve] = null;
|
|
106798
106798
|
}
|
|
106799
|
-
|
|
106799
|
+
resolve38();
|
|
106800
106800
|
};
|
|
106801
106801
|
if (this[kHTTP2Session] != null) {
|
|
106802
106802
|
util5.destroy(this[kHTTP2Session], err);
|
|
@@ -107376,7 +107376,7 @@ var require_client = __commonJS({
|
|
|
107376
107376
|
});
|
|
107377
107377
|
}
|
|
107378
107378
|
try {
|
|
107379
|
-
const socket = await new Promise((
|
|
107379
|
+
const socket = await new Promise((resolve38, reject) => {
|
|
107380
107380
|
client[kConnector]({
|
|
107381
107381
|
host,
|
|
107382
107382
|
hostname,
|
|
@@ -107388,7 +107388,7 @@ var require_client = __commonJS({
|
|
|
107388
107388
|
if (err) {
|
|
107389
107389
|
reject(err);
|
|
107390
107390
|
} else {
|
|
107391
|
-
|
|
107391
|
+
resolve38(socket2);
|
|
107392
107392
|
}
|
|
107393
107393
|
});
|
|
107394
107394
|
});
|
|
@@ -108012,12 +108012,12 @@ upgrade: ${upgrade}\r
|
|
|
108012
108012
|
cb();
|
|
108013
108013
|
}
|
|
108014
108014
|
}
|
|
108015
|
-
const waitForDrain = () => new Promise((
|
|
108015
|
+
const waitForDrain = () => new Promise((resolve38, reject) => {
|
|
108016
108016
|
assert10(callback === null);
|
|
108017
108017
|
if (socket[kError]) {
|
|
108018
108018
|
reject(socket[kError]);
|
|
108019
108019
|
} else {
|
|
108020
|
-
callback =
|
|
108020
|
+
callback = resolve38;
|
|
108021
108021
|
}
|
|
108022
108022
|
});
|
|
108023
108023
|
if (client[kHTTPConnVersion] === "h2") {
|
|
@@ -108362,8 +108362,8 @@ var require_pool_base = __commonJS({
|
|
|
108362
108362
|
if (this[kQueue].isEmpty()) {
|
|
108363
108363
|
return Promise.all(this[kClients].map((c3) => c3.close()));
|
|
108364
108364
|
} else {
|
|
108365
|
-
return new Promise((
|
|
108366
|
-
this[kClosedResolve] =
|
|
108365
|
+
return new Promise((resolve38) => {
|
|
108366
|
+
this[kClosedResolve] = resolve38;
|
|
108367
108367
|
});
|
|
108368
108368
|
}
|
|
108369
108369
|
}
|
|
@@ -108933,7 +108933,7 @@ var require_readable2 = __commonJS({
|
|
|
108933
108933
|
if (this.closed) {
|
|
108934
108934
|
return Promise.resolve(null);
|
|
108935
108935
|
}
|
|
108936
|
-
return new Promise((
|
|
108936
|
+
return new Promise((resolve38, reject) => {
|
|
108937
108937
|
const signalListenerCleanup = signal ? util5.addAbortListener(signal, () => {
|
|
108938
108938
|
this.destroy();
|
|
108939
108939
|
}) : noop2;
|
|
@@ -108942,7 +108942,7 @@ var require_readable2 = __commonJS({
|
|
|
108942
108942
|
if (signal && signal.aborted) {
|
|
108943
108943
|
reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" }));
|
|
108944
108944
|
} else {
|
|
108945
|
-
|
|
108945
|
+
resolve38(null);
|
|
108946
108946
|
}
|
|
108947
108947
|
}).on("error", noop2).on("data", function(chunk) {
|
|
108948
108948
|
limit -= chunk.length;
|
|
@@ -108964,11 +108964,11 @@ var require_readable2 = __commonJS({
|
|
|
108964
108964
|
throw new TypeError("unusable");
|
|
108965
108965
|
}
|
|
108966
108966
|
assert10(!stream5[kConsume]);
|
|
108967
|
-
return new Promise((
|
|
108967
|
+
return new Promise((resolve38, reject) => {
|
|
108968
108968
|
stream5[kConsume] = {
|
|
108969
108969
|
type,
|
|
108970
108970
|
stream: stream5,
|
|
108971
|
-
resolve:
|
|
108971
|
+
resolve: resolve38,
|
|
108972
108972
|
reject,
|
|
108973
108973
|
length: 0,
|
|
108974
108974
|
body: []
|
|
@@ -109003,12 +109003,12 @@ var require_readable2 = __commonJS({
|
|
|
109003
109003
|
}
|
|
109004
109004
|
}
|
|
109005
109005
|
function consumeEnd(consume2) {
|
|
109006
|
-
const { type, body, resolve:
|
|
109006
|
+
const { type, body, resolve: resolve38, stream: stream5, length } = consume2;
|
|
109007
109007
|
try {
|
|
109008
109008
|
if (type === "text") {
|
|
109009
|
-
|
|
109009
|
+
resolve38(toUSVString(Buffer.concat(body)));
|
|
109010
109010
|
} else if (type === "json") {
|
|
109011
|
-
|
|
109011
|
+
resolve38(JSON.parse(Buffer.concat(body)));
|
|
109012
109012
|
} else if (type === "arrayBuffer") {
|
|
109013
109013
|
const dst = new Uint8Array(length);
|
|
109014
109014
|
let pos = 0;
|
|
@@ -109016,12 +109016,12 @@ var require_readable2 = __commonJS({
|
|
|
109016
109016
|
dst.set(buf, pos);
|
|
109017
109017
|
pos += buf.byteLength;
|
|
109018
109018
|
}
|
|
109019
|
-
|
|
109019
|
+
resolve38(dst.buffer);
|
|
109020
109020
|
} else if (type === "blob") {
|
|
109021
109021
|
if (!Blob2) {
|
|
109022
109022
|
Blob2 = __require("buffer").Blob;
|
|
109023
109023
|
}
|
|
109024
|
-
|
|
109024
|
+
resolve38(new Blob2(body, { type: stream5[kContentType] }));
|
|
109025
109025
|
}
|
|
109026
109026
|
consumeFinish(consume2);
|
|
109027
109027
|
} catch (err) {
|
|
@@ -109276,9 +109276,9 @@ var require_api_request = __commonJS({
|
|
|
109276
109276
|
};
|
|
109277
109277
|
function request(opts, callback) {
|
|
109278
109278
|
if (callback === void 0) {
|
|
109279
|
-
return new Promise((
|
|
109279
|
+
return new Promise((resolve38, reject) => {
|
|
109280
109280
|
request.call(this, opts, (err, data2) => {
|
|
109281
|
-
return err ? reject(err) :
|
|
109281
|
+
return err ? reject(err) : resolve38(data2);
|
|
109282
109282
|
});
|
|
109283
109283
|
});
|
|
109284
109284
|
}
|
|
@@ -109451,9 +109451,9 @@ var require_api_stream = __commonJS({
|
|
|
109451
109451
|
};
|
|
109452
109452
|
function stream5(opts, factory, callback) {
|
|
109453
109453
|
if (callback === void 0) {
|
|
109454
|
-
return new Promise((
|
|
109454
|
+
return new Promise((resolve38, reject) => {
|
|
109455
109455
|
stream5.call(this, opts, factory, (err, data2) => {
|
|
109456
|
-
return err ? reject(err) :
|
|
109456
|
+
return err ? reject(err) : resolve38(data2);
|
|
109457
109457
|
});
|
|
109458
109458
|
});
|
|
109459
109459
|
}
|
|
@@ -109734,9 +109734,9 @@ var require_api_upgrade = __commonJS({
|
|
|
109734
109734
|
};
|
|
109735
109735
|
function upgrade(opts, callback) {
|
|
109736
109736
|
if (callback === void 0) {
|
|
109737
|
-
return new Promise((
|
|
109737
|
+
return new Promise((resolve38, reject) => {
|
|
109738
109738
|
upgrade.call(this, opts, (err, data2) => {
|
|
109739
|
-
return err ? reject(err) :
|
|
109739
|
+
return err ? reject(err) : resolve38(data2);
|
|
109740
109740
|
});
|
|
109741
109741
|
});
|
|
109742
109742
|
}
|
|
@@ -109825,9 +109825,9 @@ var require_api_connect = __commonJS({
|
|
|
109825
109825
|
};
|
|
109826
109826
|
function connect(opts, callback) {
|
|
109827
109827
|
if (callback === void 0) {
|
|
109828
|
-
return new Promise((
|
|
109828
|
+
return new Promise((resolve38, reject) => {
|
|
109829
109829
|
connect.call(this, opts, (err, data2) => {
|
|
109830
|
-
return err ? reject(err) :
|
|
109830
|
+
return err ? reject(err) : resolve38(data2);
|
|
109831
109831
|
});
|
|
109832
109832
|
});
|
|
109833
109833
|
}
|
|
@@ -113445,7 +113445,7 @@ var require_fetch2 = __commonJS({
|
|
|
113445
113445
|
async function dispatch({ body }) {
|
|
113446
113446
|
const url2 = requestCurrentURL(request);
|
|
113447
113447
|
const agent = fetchParams.controller.dispatcher;
|
|
113448
|
-
return new Promise((
|
|
113448
|
+
return new Promise((resolve38, reject) => agent.dispatch(
|
|
113449
113449
|
{
|
|
113450
113450
|
path: url2.pathname + url2.search,
|
|
113451
113451
|
origin: url2.origin,
|
|
@@ -113521,7 +113521,7 @@ var require_fetch2 = __commonJS({
|
|
|
113521
113521
|
}
|
|
113522
113522
|
}
|
|
113523
113523
|
}
|
|
113524
|
-
|
|
113524
|
+
resolve38({
|
|
113525
113525
|
status,
|
|
113526
113526
|
statusText,
|
|
113527
113527
|
headersList: headers[kHeadersList],
|
|
@@ -113564,7 +113564,7 @@ var require_fetch2 = __commonJS({
|
|
|
113564
113564
|
const val2 = headersList[n2 + 1].toString("latin1");
|
|
113565
113565
|
headers[kHeadersList].append(key, val2);
|
|
113566
113566
|
}
|
|
113567
|
-
|
|
113567
|
+
resolve38({
|
|
113568
113568
|
status,
|
|
113569
113569
|
statusText: STATUS_CODES[status],
|
|
113570
113570
|
headersList: headers[kHeadersList],
|
|
@@ -116932,11 +116932,11 @@ var require_lib27 = __commonJS({
|
|
|
116932
116932
|
};
|
|
116933
116933
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
116934
116934
|
function adopt(value) {
|
|
116935
|
-
return value instanceof P ? value : new P(function(
|
|
116936
|
-
|
|
116935
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
116936
|
+
resolve38(value);
|
|
116937
116937
|
});
|
|
116938
116938
|
}
|
|
116939
|
-
return new (P || (P = Promise))(function(
|
|
116939
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
116940
116940
|
function fulfilled(value) {
|
|
116941
116941
|
try {
|
|
116942
116942
|
step(generator.next(value));
|
|
@@ -116952,7 +116952,7 @@ var require_lib27 = __commonJS({
|
|
|
116952
116952
|
}
|
|
116953
116953
|
}
|
|
116954
116954
|
function step(result) {
|
|
116955
|
-
result.done ?
|
|
116955
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
116956
116956
|
}
|
|
116957
116957
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
116958
116958
|
});
|
|
@@ -117038,26 +117038,26 @@ var require_lib27 = __commonJS({
|
|
|
117038
117038
|
}
|
|
117039
117039
|
readBody() {
|
|
117040
117040
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117041
|
-
return new Promise((
|
|
117041
|
+
return new Promise((resolve38) => __awaiter(this, void 0, void 0, function* () {
|
|
117042
117042
|
let output = Buffer.alloc(0);
|
|
117043
117043
|
this.message.on("data", (chunk) => {
|
|
117044
117044
|
output = Buffer.concat([output, chunk]);
|
|
117045
117045
|
});
|
|
117046
117046
|
this.message.on("end", () => {
|
|
117047
|
-
|
|
117047
|
+
resolve38(output.toString());
|
|
117048
117048
|
});
|
|
117049
117049
|
}));
|
|
117050
117050
|
});
|
|
117051
117051
|
}
|
|
117052
117052
|
readBodyBuffer() {
|
|
117053
117053
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117054
|
-
return new Promise((
|
|
117054
|
+
return new Promise((resolve38) => __awaiter(this, void 0, void 0, function* () {
|
|
117055
117055
|
const chunks = [];
|
|
117056
117056
|
this.message.on("data", (chunk) => {
|
|
117057
117057
|
chunks.push(chunk);
|
|
117058
117058
|
});
|
|
117059
117059
|
this.message.on("end", () => {
|
|
117060
|
-
|
|
117060
|
+
resolve38(Buffer.concat(chunks));
|
|
117061
117061
|
});
|
|
117062
117062
|
}));
|
|
117063
117063
|
});
|
|
@@ -117266,14 +117266,14 @@ var require_lib27 = __commonJS({
|
|
|
117266
117266
|
*/
|
|
117267
117267
|
requestRaw(info, data2) {
|
|
117268
117268
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117269
|
-
return new Promise((
|
|
117269
|
+
return new Promise((resolve38, reject) => {
|
|
117270
117270
|
function callbackForResult(err, res) {
|
|
117271
117271
|
if (err) {
|
|
117272
117272
|
reject(err);
|
|
117273
117273
|
} else if (!res) {
|
|
117274
117274
|
reject(new Error("Unknown error"));
|
|
117275
117275
|
} else {
|
|
117276
|
-
|
|
117276
|
+
resolve38(res);
|
|
117277
117277
|
}
|
|
117278
117278
|
}
|
|
117279
117279
|
this.requestRawWithCallback(info, data2, callbackForResult);
|
|
@@ -117455,12 +117455,12 @@ var require_lib27 = __commonJS({
|
|
|
117455
117455
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117456
117456
|
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
|
|
117457
117457
|
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
|
|
117458
|
-
return new Promise((
|
|
117458
|
+
return new Promise((resolve38) => setTimeout(() => resolve38(), ms));
|
|
117459
117459
|
});
|
|
117460
117460
|
}
|
|
117461
117461
|
_processResponse(res, options) {
|
|
117462
117462
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117463
|
-
return new Promise((
|
|
117463
|
+
return new Promise((resolve38, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
117464
117464
|
const statusCode = res.message.statusCode || 0;
|
|
117465
117465
|
const response = {
|
|
117466
117466
|
statusCode,
|
|
@@ -117468,7 +117468,7 @@ var require_lib27 = __commonJS({
|
|
|
117468
117468
|
headers: {}
|
|
117469
117469
|
};
|
|
117470
117470
|
if (statusCode === HttpCodes.NotFound) {
|
|
117471
|
-
|
|
117471
|
+
resolve38(response);
|
|
117472
117472
|
}
|
|
117473
117473
|
function dateTimeDeserializer(key, value) {
|
|
117474
117474
|
if (typeof value === "string") {
|
|
@@ -117507,7 +117507,7 @@ var require_lib27 = __commonJS({
|
|
|
117507
117507
|
err.result = response.result;
|
|
117508
117508
|
reject(err);
|
|
117509
117509
|
} else {
|
|
117510
|
-
|
|
117510
|
+
resolve38(response);
|
|
117511
117511
|
}
|
|
117512
117512
|
}));
|
|
117513
117513
|
});
|
|
@@ -117524,11 +117524,11 @@ var require_auth = __commonJS({
|
|
|
117524
117524
|
"use strict";
|
|
117525
117525
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
117526
117526
|
function adopt(value) {
|
|
117527
|
-
return value instanceof P ? value : new P(function(
|
|
117528
|
-
|
|
117527
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
117528
|
+
resolve38(value);
|
|
117529
117529
|
});
|
|
117530
117530
|
}
|
|
117531
|
-
return new (P || (P = Promise))(function(
|
|
117531
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
117532
117532
|
function fulfilled(value) {
|
|
117533
117533
|
try {
|
|
117534
117534
|
step(generator.next(value));
|
|
@@ -117544,7 +117544,7 @@ var require_auth = __commonJS({
|
|
|
117544
117544
|
}
|
|
117545
117545
|
}
|
|
117546
117546
|
function step(result) {
|
|
117547
|
-
result.done ?
|
|
117547
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
117548
117548
|
}
|
|
117549
117549
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
117550
117550
|
});
|
|
@@ -117628,11 +117628,11 @@ var require_oidc_utils = __commonJS({
|
|
|
117628
117628
|
"use strict";
|
|
117629
117629
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
117630
117630
|
function adopt(value) {
|
|
117631
|
-
return value instanceof P ? value : new P(function(
|
|
117632
|
-
|
|
117631
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
117632
|
+
resolve38(value);
|
|
117633
117633
|
});
|
|
117634
117634
|
}
|
|
117635
|
-
return new (P || (P = Promise))(function(
|
|
117635
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
117636
117636
|
function fulfilled(value) {
|
|
117637
117637
|
try {
|
|
117638
117638
|
step(generator.next(value));
|
|
@@ -117648,7 +117648,7 @@ var require_oidc_utils = __commonJS({
|
|
|
117648
117648
|
}
|
|
117649
117649
|
}
|
|
117650
117650
|
function step(result) {
|
|
117651
|
-
result.done ?
|
|
117651
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
117652
117652
|
}
|
|
117653
117653
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
117654
117654
|
});
|
|
@@ -117726,11 +117726,11 @@ var require_summary = __commonJS({
|
|
|
117726
117726
|
"use strict";
|
|
117727
117727
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
117728
117728
|
function adopt(value) {
|
|
117729
|
-
return value instanceof P ? value : new P(function(
|
|
117730
|
-
|
|
117729
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
117730
|
+
resolve38(value);
|
|
117731
117731
|
});
|
|
117732
117732
|
}
|
|
117733
|
-
return new (P || (P = Promise))(function(
|
|
117733
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
117734
117734
|
function fulfilled(value) {
|
|
117735
117735
|
try {
|
|
117736
117736
|
step(generator.next(value));
|
|
@@ -117746,7 +117746,7 @@ var require_summary = __commonJS({
|
|
|
117746
117746
|
}
|
|
117747
117747
|
}
|
|
117748
117748
|
function step(result) {
|
|
117749
|
-
result.done ?
|
|
117749
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
117750
117750
|
}
|
|
117751
117751
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
117752
117752
|
});
|
|
@@ -118088,11 +118088,11 @@ var require_core4 = __commonJS({
|
|
|
118088
118088
|
};
|
|
118089
118089
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
118090
118090
|
function adopt(value) {
|
|
118091
|
-
return value instanceof P ? value : new P(function(
|
|
118092
|
-
|
|
118091
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
118092
|
+
resolve38(value);
|
|
118093
118093
|
});
|
|
118094
118094
|
}
|
|
118095
|
-
return new (P || (P = Promise))(function(
|
|
118095
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
118096
118096
|
function fulfilled(value) {
|
|
118097
118097
|
try {
|
|
118098
118098
|
step(generator.next(value));
|
|
@@ -118108,7 +118108,7 @@ var require_core4 = __commonJS({
|
|
|
118108
118108
|
}
|
|
118109
118109
|
}
|
|
118110
118110
|
function step(result) {
|
|
118111
|
-
result.done ?
|
|
118111
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
118112
118112
|
}
|
|
118113
118113
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
118114
118114
|
});
|
|
@@ -121672,11 +121672,11 @@ var require_utils8 = __commonJS({
|
|
|
121672
121672
|
"use strict";
|
|
121673
121673
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
121674
121674
|
function adopt(value) {
|
|
121675
|
-
return value instanceof P ? value : new P(function(
|
|
121676
|
-
|
|
121675
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
121676
|
+
resolve38(value);
|
|
121677
121677
|
});
|
|
121678
121678
|
}
|
|
121679
|
-
return new (P || (P = Promise))(function(
|
|
121679
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
121680
121680
|
function fulfilled(value) {
|
|
121681
121681
|
try {
|
|
121682
121682
|
step(generator.next(value));
|
|
@@ -121692,7 +121692,7 @@ var require_utils8 = __commonJS({
|
|
|
121692
121692
|
}
|
|
121693
121693
|
}
|
|
121694
121694
|
function step(result) {
|
|
121695
|
-
result.done ?
|
|
121695
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
121696
121696
|
}
|
|
121697
121697
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
121698
121698
|
});
|
|
@@ -121902,19 +121902,19 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)}
|
|
|
121902
121902
|
exports2.getProperRetention = getProperRetention;
|
|
121903
121903
|
function sleep(milliseconds) {
|
|
121904
121904
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121905
|
-
return new Promise((
|
|
121905
|
+
return new Promise((resolve38) => setTimeout(resolve38, milliseconds));
|
|
121906
121906
|
});
|
|
121907
121907
|
}
|
|
121908
121908
|
exports2.sleep = sleep;
|
|
121909
121909
|
function digestForStream(stream5) {
|
|
121910
121910
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121911
|
-
return new Promise((
|
|
121911
|
+
return new Promise((resolve38, reject) => {
|
|
121912
121912
|
const crc64 = new crc64_1.default();
|
|
121913
121913
|
const md52 = crypto_1.default.createHash("md5");
|
|
121914
121914
|
stream5.on("data", (data2) => {
|
|
121915
121915
|
crc64.update(data2);
|
|
121916
121916
|
md52.update(data2);
|
|
121917
|
-
}).on("end", () =>
|
|
121917
|
+
}).on("end", () => resolve38({
|
|
121918
121918
|
crc64: crc64.digest("base64"),
|
|
121919
121919
|
md5: md52.digest("base64")
|
|
121920
121920
|
})).on("error", reject);
|
|
@@ -122038,11 +122038,11 @@ var require_upload_gzip = __commonJS({
|
|
|
122038
122038
|
};
|
|
122039
122039
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
122040
122040
|
function adopt(value) {
|
|
122041
|
-
return value instanceof P ? value : new P(function(
|
|
122042
|
-
|
|
122041
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
122042
|
+
resolve38(value);
|
|
122043
122043
|
});
|
|
122044
122044
|
}
|
|
122045
|
-
return new (P || (P = Promise))(function(
|
|
122045
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
122046
122046
|
function fulfilled(value) {
|
|
122047
122047
|
try {
|
|
122048
122048
|
step(generator.next(value));
|
|
@@ -122058,7 +122058,7 @@ var require_upload_gzip = __commonJS({
|
|
|
122058
122058
|
}
|
|
122059
122059
|
}
|
|
122060
122060
|
function step(result) {
|
|
122061
|
-
result.done ?
|
|
122061
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
122062
122062
|
}
|
|
122063
122063
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
122064
122064
|
});
|
|
@@ -122071,14 +122071,14 @@ var require_upload_gzip = __commonJS({
|
|
|
122071
122071
|
}, i7);
|
|
122072
122072
|
function verb(n2) {
|
|
122073
122073
|
i7[n2] = o7[n2] && function(v) {
|
|
122074
|
-
return new Promise(function(
|
|
122075
|
-
v = o7[n2](v), settle2(
|
|
122074
|
+
return new Promise(function(resolve38, reject) {
|
|
122075
|
+
v = o7[n2](v), settle2(resolve38, reject, v.done, v.value);
|
|
122076
122076
|
});
|
|
122077
122077
|
};
|
|
122078
122078
|
}
|
|
122079
|
-
function settle2(
|
|
122079
|
+
function settle2(resolve38, reject, d4, v) {
|
|
122080
122080
|
Promise.resolve(v).then(function(v2) {
|
|
122081
|
-
|
|
122081
|
+
resolve38({ value: v2, done: d4 });
|
|
122082
122082
|
}, reject);
|
|
122083
122083
|
}
|
|
122084
122084
|
};
|
|
@@ -122119,14 +122119,14 @@ var require_upload_gzip = __commonJS({
|
|
|
122119
122119
|
return Number.MAX_SAFE_INTEGER;
|
|
122120
122120
|
}
|
|
122121
122121
|
}
|
|
122122
|
-
return new Promise((
|
|
122122
|
+
return new Promise((resolve38, reject) => {
|
|
122123
122123
|
const inputStream = fs.createReadStream(originalFilePath);
|
|
122124
122124
|
const gzip = zlib2.createGzip();
|
|
122125
122125
|
const outputStream = fs.createWriteStream(tempFilePath);
|
|
122126
122126
|
inputStream.pipe(gzip).pipe(outputStream);
|
|
122127
122127
|
outputStream.on("finish", () => __awaiter(this, void 0, void 0, function* () {
|
|
122128
122128
|
const size = (yield stat4(tempFilePath)).size;
|
|
122129
|
-
|
|
122129
|
+
resolve38(size);
|
|
122130
122130
|
}));
|
|
122131
122131
|
outputStream.on("error", (error) => {
|
|
122132
122132
|
console.log(error);
|
|
@@ -122138,7 +122138,7 @@ var require_upload_gzip = __commonJS({
|
|
|
122138
122138
|
exports2.createGZipFileOnDisk = createGZipFileOnDisk;
|
|
122139
122139
|
function createGZipFileInBuffer(originalFilePath) {
|
|
122140
122140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122141
|
-
return new Promise((
|
|
122141
|
+
return new Promise((resolve38) => __awaiter(this, void 0, void 0, function* () {
|
|
122142
122142
|
var _a2, e_1, _b, _c;
|
|
122143
122143
|
const inputStream = fs.createReadStream(originalFilePath);
|
|
122144
122144
|
const gzip = zlib2.createGzip();
|
|
@@ -122164,7 +122164,7 @@ var require_upload_gzip = __commonJS({
|
|
|
122164
122164
|
if (e_1) throw e_1.error;
|
|
122165
122165
|
}
|
|
122166
122166
|
}
|
|
122167
|
-
|
|
122167
|
+
resolve38(Buffer.concat(chunks));
|
|
122168
122168
|
}));
|
|
122169
122169
|
});
|
|
122170
122170
|
}
|
|
@@ -122205,11 +122205,11 @@ var require_requestUtils = __commonJS({
|
|
|
122205
122205
|
};
|
|
122206
122206
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
122207
122207
|
function adopt(value) {
|
|
122208
|
-
return value instanceof P ? value : new P(function(
|
|
122209
|
-
|
|
122208
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
122209
|
+
resolve38(value);
|
|
122210
122210
|
});
|
|
122211
122211
|
}
|
|
122212
|
-
return new (P || (P = Promise))(function(
|
|
122212
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
122213
122213
|
function fulfilled(value) {
|
|
122214
122214
|
try {
|
|
122215
122215
|
step(generator.next(value));
|
|
@@ -122225,7 +122225,7 @@ var require_requestUtils = __commonJS({
|
|
|
122225
122225
|
}
|
|
122226
122226
|
}
|
|
122227
122227
|
function step(result) {
|
|
122228
|
-
result.done ?
|
|
122228
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
122229
122229
|
}
|
|
122230
122230
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
122231
122231
|
});
|
|
@@ -122322,11 +122322,11 @@ var require_upload_http_client = __commonJS({
|
|
|
122322
122322
|
};
|
|
122323
122323
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
122324
122324
|
function adopt(value) {
|
|
122325
|
-
return value instanceof P ? value : new P(function(
|
|
122326
|
-
|
|
122325
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
122326
|
+
resolve38(value);
|
|
122327
122327
|
});
|
|
122328
122328
|
}
|
|
122329
|
-
return new (P || (P = Promise))(function(
|
|
122329
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
122330
122330
|
function fulfilled(value) {
|
|
122331
122331
|
try {
|
|
122332
122332
|
step(generator.next(value));
|
|
@@ -122342,7 +122342,7 @@ var require_upload_http_client = __commonJS({
|
|
|
122342
122342
|
}
|
|
122343
122343
|
}
|
|
122344
122344
|
function step(result) {
|
|
122345
|
-
result.done ?
|
|
122345
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
122346
122346
|
}
|
|
122347
122347
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
122348
122348
|
});
|
|
@@ -122714,11 +122714,11 @@ var require_download_http_client = __commonJS({
|
|
|
122714
122714
|
};
|
|
122715
122715
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
122716
122716
|
function adopt(value) {
|
|
122717
|
-
return value instanceof P ? value : new P(function(
|
|
122718
|
-
|
|
122717
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
122718
|
+
resolve38(value);
|
|
122719
122719
|
});
|
|
122720
122720
|
}
|
|
122721
|
-
return new (P || (P = Promise))(function(
|
|
122721
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
122722
122722
|
function fulfilled(value) {
|
|
122723
122723
|
try {
|
|
122724
122724
|
step(generator.next(value));
|
|
@@ -122734,7 +122734,7 @@ var require_download_http_client = __commonJS({
|
|
|
122734
122734
|
}
|
|
122735
122735
|
}
|
|
122736
122736
|
function step(result) {
|
|
122737
|
-
result.done ?
|
|
122737
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
122738
122738
|
}
|
|
122739
122739
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
122740
122740
|
});
|
|
@@ -122867,10 +122867,10 @@ var require_download_http_client = __commonJS({
|
|
|
122867
122867
|
};
|
|
122868
122868
|
const resetDestinationStream = (fileDownloadPath) => __awaiter(this, void 0, void 0, function* () {
|
|
122869
122869
|
destinationStream.close();
|
|
122870
|
-
yield new Promise((
|
|
122871
|
-
destinationStream.on("close",
|
|
122870
|
+
yield new Promise((resolve38) => {
|
|
122871
|
+
destinationStream.on("close", resolve38);
|
|
122872
122872
|
if (destinationStream.writableFinished) {
|
|
122873
|
-
|
|
122873
|
+
resolve38();
|
|
122874
122874
|
}
|
|
122875
122875
|
});
|
|
122876
122876
|
yield (0, utils_1.rmFile)(fileDownloadPath);
|
|
@@ -122919,7 +122919,7 @@ var require_download_http_client = __commonJS({
|
|
|
122919
122919
|
*/
|
|
122920
122920
|
pipeResponseToFile(response, destinationStream, isGzip) {
|
|
122921
122921
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122922
|
-
yield new Promise((
|
|
122922
|
+
yield new Promise((resolve38, reject) => {
|
|
122923
122923
|
if (isGzip) {
|
|
122924
122924
|
const gunzip = zlib2.createGunzip();
|
|
122925
122925
|
response.message.on("error", (error) => {
|
|
@@ -122932,7 +122932,7 @@ var require_download_http_client = __commonJS({
|
|
|
122932
122932
|
destinationStream.close();
|
|
122933
122933
|
reject(error);
|
|
122934
122934
|
}).pipe(destinationStream).on("close", () => {
|
|
122935
|
-
|
|
122935
|
+
resolve38();
|
|
122936
122936
|
}).on("error", (error) => {
|
|
122937
122937
|
core2.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
|
122938
122938
|
reject(error);
|
|
@@ -122943,7 +122943,7 @@ var require_download_http_client = __commonJS({
|
|
|
122943
122943
|
destinationStream.close();
|
|
122944
122944
|
reject(error);
|
|
122945
122945
|
}).pipe(destinationStream).on("close", () => {
|
|
122946
|
-
|
|
122946
|
+
resolve38();
|
|
122947
122947
|
}).on("error", (error) => {
|
|
122948
122948
|
core2.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
|
122949
122949
|
reject(error);
|
|
@@ -123057,11 +123057,11 @@ var require_artifact_client = __commonJS({
|
|
|
123057
123057
|
};
|
|
123058
123058
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
123059
123059
|
function adopt(value) {
|
|
123060
|
-
return value instanceof P ? value : new P(function(
|
|
123061
|
-
|
|
123060
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
123061
|
+
resolve38(value);
|
|
123062
123062
|
});
|
|
123063
123063
|
}
|
|
123064
|
-
return new (P || (P = Promise))(function(
|
|
123064
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
123065
123065
|
function fulfilled(value) {
|
|
123066
123066
|
try {
|
|
123067
123067
|
step(generator.next(value));
|
|
@@ -123077,7 +123077,7 @@ var require_artifact_client = __commonJS({
|
|
|
123077
123077
|
}
|
|
123078
123078
|
}
|
|
123079
123079
|
function step(result) {
|
|
123080
|
-
result.done ?
|
|
123080
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
123081
123081
|
}
|
|
123082
123082
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
123083
123083
|
});
|
|
@@ -124962,9 +124962,9 @@ var require_dispatcher_base2 = __commonJS({
|
|
|
124962
124962
|
}
|
|
124963
124963
|
close(callback) {
|
|
124964
124964
|
if (callback === void 0) {
|
|
124965
|
-
return new Promise((
|
|
124965
|
+
return new Promise((resolve38, reject) => {
|
|
124966
124966
|
this.close((err, data2) => {
|
|
124967
|
-
return err ? reject(err) :
|
|
124967
|
+
return err ? reject(err) : resolve38(data2);
|
|
124968
124968
|
});
|
|
124969
124969
|
});
|
|
124970
124970
|
}
|
|
@@ -125002,12 +125002,12 @@ var require_dispatcher_base2 = __commonJS({
|
|
|
125002
125002
|
err = null;
|
|
125003
125003
|
}
|
|
125004
125004
|
if (callback === void 0) {
|
|
125005
|
-
return new Promise((
|
|
125005
|
+
return new Promise((resolve38, reject) => {
|
|
125006
125006
|
this.destroy(err, (err2, data2) => {
|
|
125007
125007
|
return err2 ? (
|
|
125008
125008
|
/* istanbul ignore next: should never error */
|
|
125009
125009
|
reject(err2)
|
|
125010
|
-
) :
|
|
125010
|
+
) : resolve38(data2);
|
|
125011
125011
|
});
|
|
125012
125012
|
});
|
|
125013
125013
|
}
|
|
@@ -127274,8 +127274,8 @@ var require_util11 = __commonJS({
|
|
|
127274
127274
|
function createDeferredPromise() {
|
|
127275
127275
|
let res;
|
|
127276
127276
|
let rej;
|
|
127277
|
-
const promise = new Promise((
|
|
127278
|
-
res =
|
|
127277
|
+
const promise = new Promise((resolve38, reject) => {
|
|
127278
|
+
res = resolve38;
|
|
127279
127279
|
rej = reject;
|
|
127280
127280
|
});
|
|
127281
127281
|
return { promise, resolve: res, reject: rej };
|
|
@@ -129418,12 +129418,12 @@ upgrade: ${upgrade}\r
|
|
|
129418
129418
|
cb();
|
|
129419
129419
|
}
|
|
129420
129420
|
}
|
|
129421
|
-
const waitForDrain = () => new Promise((
|
|
129421
|
+
const waitForDrain = () => new Promise((resolve38, reject) => {
|
|
129422
129422
|
assert10(callback === null);
|
|
129423
129423
|
if (socket[kError]) {
|
|
129424
129424
|
reject(socket[kError]);
|
|
129425
129425
|
} else {
|
|
129426
|
-
callback =
|
|
129426
|
+
callback = resolve38;
|
|
129427
129427
|
}
|
|
129428
129428
|
});
|
|
129429
129429
|
socket.on("close", onDrain).on("drain", onDrain);
|
|
@@ -130060,12 +130060,12 @@ var require_client_h2 = __commonJS({
|
|
|
130060
130060
|
cb();
|
|
130061
130061
|
}
|
|
130062
130062
|
}
|
|
130063
|
-
const waitForDrain = () => new Promise((
|
|
130063
|
+
const waitForDrain = () => new Promise((resolve38, reject) => {
|
|
130064
130064
|
assert10(callback === null);
|
|
130065
130065
|
if (socket[kError]) {
|
|
130066
130066
|
reject(socket[kError]);
|
|
130067
130067
|
} else {
|
|
130068
|
-
callback =
|
|
130068
|
+
callback = resolve38;
|
|
130069
130069
|
}
|
|
130070
130070
|
});
|
|
130071
130071
|
h2stream.on("close", onDrain).on("drain", onDrain);
|
|
@@ -130542,16 +130542,16 @@ var require_client2 = __commonJS({
|
|
|
130542
130542
|
return this[kNeedDrain] < 2;
|
|
130543
130543
|
}
|
|
130544
130544
|
async [kClose]() {
|
|
130545
|
-
return new Promise((
|
|
130545
|
+
return new Promise((resolve38) => {
|
|
130546
130546
|
if (this[kSize]) {
|
|
130547
|
-
this[kClosedResolve] =
|
|
130547
|
+
this[kClosedResolve] = resolve38;
|
|
130548
130548
|
} else {
|
|
130549
|
-
|
|
130549
|
+
resolve38(null);
|
|
130550
130550
|
}
|
|
130551
130551
|
});
|
|
130552
130552
|
}
|
|
130553
130553
|
async [kDestroy](err) {
|
|
130554
|
-
return new Promise((
|
|
130554
|
+
return new Promise((resolve38) => {
|
|
130555
130555
|
const requests = this[kQueue].splice(this[kPendingIdx]);
|
|
130556
130556
|
for (let i7 = 0; i7 < requests.length; i7++) {
|
|
130557
130557
|
const request = requests[i7];
|
|
@@ -130562,7 +130562,7 @@ var require_client2 = __commonJS({
|
|
|
130562
130562
|
this[kClosedResolve]();
|
|
130563
130563
|
this[kClosedResolve] = null;
|
|
130564
130564
|
}
|
|
130565
|
-
|
|
130565
|
+
resolve38(null);
|
|
130566
130566
|
};
|
|
130567
130567
|
if (this[kHTTPContext]) {
|
|
130568
130568
|
this[kHTTPContext].destroy(err, callback);
|
|
@@ -130613,7 +130613,7 @@ var require_client2 = __commonJS({
|
|
|
130613
130613
|
});
|
|
130614
130614
|
}
|
|
130615
130615
|
try {
|
|
130616
|
-
const socket = await new Promise((
|
|
130616
|
+
const socket = await new Promise((resolve38, reject) => {
|
|
130617
130617
|
client[kConnector]({
|
|
130618
130618
|
host,
|
|
130619
130619
|
hostname,
|
|
@@ -130625,7 +130625,7 @@ var require_client2 = __commonJS({
|
|
|
130625
130625
|
if (err) {
|
|
130626
130626
|
reject(err);
|
|
130627
130627
|
} else {
|
|
130628
|
-
|
|
130628
|
+
resolve38(socket2);
|
|
130629
130629
|
}
|
|
130630
130630
|
});
|
|
130631
130631
|
});
|
|
@@ -130961,8 +130961,8 @@ var require_pool_base2 = __commonJS({
|
|
|
130961
130961
|
if (this[kQueue].isEmpty()) {
|
|
130962
130962
|
await Promise.all(this[kClients].map((c3) => c3.close()));
|
|
130963
130963
|
} else {
|
|
130964
|
-
await new Promise((
|
|
130965
|
-
this[kClosedResolve] =
|
|
130964
|
+
await new Promise((resolve38) => {
|
|
130965
|
+
this[kClosedResolve] = resolve38;
|
|
130966
130966
|
});
|
|
130967
130967
|
}
|
|
130968
130968
|
}
|
|
@@ -132109,7 +132109,7 @@ var require_readable3 = __commonJS({
|
|
|
132109
132109
|
if (this._readableState.closeEmitted) {
|
|
132110
132110
|
return null;
|
|
132111
132111
|
}
|
|
132112
|
-
return await new Promise((
|
|
132112
|
+
return await new Promise((resolve38, reject) => {
|
|
132113
132113
|
if (this[kContentLength] > limit) {
|
|
132114
132114
|
this.destroy(new AbortError());
|
|
132115
132115
|
}
|
|
@@ -132122,7 +132122,7 @@ var require_readable3 = __commonJS({
|
|
|
132122
132122
|
if (signal?.aborted) {
|
|
132123
132123
|
reject(signal.reason ?? new AbortError());
|
|
132124
132124
|
} else {
|
|
132125
|
-
|
|
132125
|
+
resolve38(null);
|
|
132126
132126
|
}
|
|
132127
132127
|
}).on("error", noop2).on("data", function(chunk) {
|
|
132128
132128
|
limit -= chunk.length;
|
|
@@ -132141,7 +132141,7 @@ var require_readable3 = __commonJS({
|
|
|
132141
132141
|
}
|
|
132142
132142
|
async function consume(stream5, type) {
|
|
132143
132143
|
assert10(!stream5[kConsume]);
|
|
132144
|
-
return new Promise((
|
|
132144
|
+
return new Promise((resolve38, reject) => {
|
|
132145
132145
|
if (isUnusable(stream5)) {
|
|
132146
132146
|
const rState = stream5._readableState;
|
|
132147
132147
|
if (rState.destroyed && rState.closeEmitted === false) {
|
|
@@ -132158,7 +132158,7 @@ var require_readable3 = __commonJS({
|
|
|
132158
132158
|
stream5[kConsume] = {
|
|
132159
132159
|
type,
|
|
132160
132160
|
stream: stream5,
|
|
132161
|
-
resolve:
|
|
132161
|
+
resolve: resolve38,
|
|
132162
132162
|
reject,
|
|
132163
132163
|
length: 0,
|
|
132164
132164
|
body: []
|
|
@@ -132228,18 +132228,18 @@ var require_readable3 = __commonJS({
|
|
|
132228
132228
|
return buffer;
|
|
132229
132229
|
}
|
|
132230
132230
|
function consumeEnd(consume2) {
|
|
132231
|
-
const { type, body, resolve:
|
|
132231
|
+
const { type, body, resolve: resolve38, stream: stream5, length } = consume2;
|
|
132232
132232
|
try {
|
|
132233
132233
|
if (type === "text") {
|
|
132234
|
-
|
|
132234
|
+
resolve38(chunksDecode(body, length));
|
|
132235
132235
|
} else if (type === "json") {
|
|
132236
|
-
|
|
132236
|
+
resolve38(JSON.parse(chunksDecode(body, length)));
|
|
132237
132237
|
} else if (type === "arrayBuffer") {
|
|
132238
|
-
|
|
132238
|
+
resolve38(chunksConcat(body, length).buffer);
|
|
132239
132239
|
} else if (type === "blob") {
|
|
132240
|
-
|
|
132240
|
+
resolve38(new Blob(body, { type: stream5[kContentType] }));
|
|
132241
132241
|
} else if (type === "bytes") {
|
|
132242
|
-
|
|
132242
|
+
resolve38(chunksConcat(body, length));
|
|
132243
132243
|
}
|
|
132244
132244
|
consumeFinish(consume2);
|
|
132245
132245
|
} catch (err) {
|
|
@@ -132496,9 +132496,9 @@ var require_api_request2 = __commonJS({
|
|
|
132496
132496
|
};
|
|
132497
132497
|
function request(opts, callback) {
|
|
132498
132498
|
if (callback === void 0) {
|
|
132499
|
-
return new Promise((
|
|
132499
|
+
return new Promise((resolve38, reject) => {
|
|
132500
132500
|
request.call(this, opts, (err, data2) => {
|
|
132501
|
-
return err ? reject(err) :
|
|
132501
|
+
return err ? reject(err) : resolve38(data2);
|
|
132502
132502
|
});
|
|
132503
132503
|
});
|
|
132504
132504
|
}
|
|
@@ -132721,9 +132721,9 @@ var require_api_stream2 = __commonJS({
|
|
|
132721
132721
|
};
|
|
132722
132722
|
function stream5(opts, factory, callback) {
|
|
132723
132723
|
if (callback === void 0) {
|
|
132724
|
-
return new Promise((
|
|
132724
|
+
return new Promise((resolve38, reject) => {
|
|
132725
132725
|
stream5.call(this, opts, factory, (err, data2) => {
|
|
132726
|
-
return err ? reject(err) :
|
|
132726
|
+
return err ? reject(err) : resolve38(data2);
|
|
132727
132727
|
});
|
|
132728
132728
|
});
|
|
132729
132729
|
}
|
|
@@ -133008,9 +133008,9 @@ var require_api_upgrade2 = __commonJS({
|
|
|
133008
133008
|
};
|
|
133009
133009
|
function upgrade(opts, callback) {
|
|
133010
133010
|
if (callback === void 0) {
|
|
133011
|
-
return new Promise((
|
|
133011
|
+
return new Promise((resolve38, reject) => {
|
|
133012
133012
|
upgrade.call(this, opts, (err, data2) => {
|
|
133013
|
-
return err ? reject(err) :
|
|
133013
|
+
return err ? reject(err) : resolve38(data2);
|
|
133014
133014
|
});
|
|
133015
133015
|
});
|
|
133016
133016
|
}
|
|
@@ -133102,9 +133102,9 @@ var require_api_connect2 = __commonJS({
|
|
|
133102
133102
|
};
|
|
133103
133103
|
function connect(opts, callback) {
|
|
133104
133104
|
if (callback === void 0) {
|
|
133105
|
-
return new Promise((
|
|
133105
|
+
return new Promise((resolve38, reject) => {
|
|
133106
133106
|
connect.call(this, opts, (err, data2) => {
|
|
133107
|
-
return err ? reject(err) :
|
|
133107
|
+
return err ? reject(err) : resolve38(data2);
|
|
133108
133108
|
});
|
|
133109
133109
|
});
|
|
133110
133110
|
}
|
|
@@ -136958,7 +136958,7 @@ var require_fetch3 = __commonJS({
|
|
|
136958
136958
|
function dispatch({ body }) {
|
|
136959
136959
|
const url2 = requestCurrentURL(request);
|
|
136960
136960
|
const agent = fetchParams.controller.dispatcher;
|
|
136961
|
-
return new Promise((
|
|
136961
|
+
return new Promise((resolve38, reject) => agent.dispatch(
|
|
136962
136962
|
{
|
|
136963
136963
|
path: url2.pathname + url2.search,
|
|
136964
136964
|
origin: url2.origin,
|
|
@@ -137032,7 +137032,7 @@ var require_fetch3 = __commonJS({
|
|
|
137032
137032
|
}
|
|
137033
137033
|
}
|
|
137034
137034
|
const onError = this.onError.bind(this);
|
|
137035
|
-
|
|
137035
|
+
resolve38({
|
|
137036
137036
|
status,
|
|
137037
137037
|
statusText,
|
|
137038
137038
|
headersList,
|
|
@@ -137078,7 +137078,7 @@ var require_fetch3 = __commonJS({
|
|
|
137078
137078
|
for (let i7 = 0; i7 < rawHeaders.length; i7 += 2) {
|
|
137079
137079
|
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i7]), rawHeaders[i7 + 1].toString("latin1"), true);
|
|
137080
137080
|
}
|
|
137081
|
-
|
|
137081
|
+
resolve38({
|
|
137082
137082
|
status,
|
|
137083
137083
|
statusText: STATUS_CODES[status],
|
|
137084
137084
|
headersList,
|
|
@@ -140671,8 +140671,8 @@ var require_util17 = __commonJS({
|
|
|
140671
140671
|
return true;
|
|
140672
140672
|
}
|
|
140673
140673
|
function delay(ms) {
|
|
140674
|
-
return new Promise((
|
|
140675
|
-
setTimeout(
|
|
140674
|
+
return new Promise((resolve38) => {
|
|
140675
|
+
setTimeout(resolve38, ms).unref();
|
|
140676
140676
|
});
|
|
140677
140677
|
}
|
|
140678
140678
|
module2.exports = {
|
|
@@ -141385,11 +141385,11 @@ var require_utils10 = __commonJS({
|
|
|
141385
141385
|
};
|
|
141386
141386
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
141387
141387
|
function adopt(value) {
|
|
141388
|
-
return value instanceof P ? value : new P(function(
|
|
141389
|
-
|
|
141388
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
141389
|
+
resolve38(value);
|
|
141390
141390
|
});
|
|
141391
141391
|
}
|
|
141392
|
-
return new (P || (P = Promise))(function(
|
|
141392
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
141393
141393
|
function fulfilled(value) {
|
|
141394
141394
|
try {
|
|
141395
141395
|
step(generator.next(value));
|
|
@@ -141405,7 +141405,7 @@ var require_utils10 = __commonJS({
|
|
|
141405
141405
|
}
|
|
141406
141406
|
}
|
|
141407
141407
|
function step(result) {
|
|
141408
|
-
result.done ?
|
|
141408
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
141409
141409
|
}
|
|
141410
141410
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
141411
141411
|
});
|
|
@@ -145949,7 +145949,7 @@ var require_micromatch2 = __commonJS({
|
|
|
145949
145949
|
"use strict";
|
|
145950
145950
|
var util5 = __require("util");
|
|
145951
145951
|
var braces = require_braces2();
|
|
145952
|
-
var
|
|
145952
|
+
var picomatch7 = require_picomatch4();
|
|
145953
145953
|
var utils = require_utils5();
|
|
145954
145954
|
var isEmptyString = (v) => v === "" || v === "./";
|
|
145955
145955
|
var hasBraces = (v) => {
|
|
@@ -145970,7 +145970,7 @@ var require_micromatch2 = __commonJS({
|
|
|
145970
145970
|
}
|
|
145971
145971
|
};
|
|
145972
145972
|
for (let i7 = 0; i7 < patterns.length; i7++) {
|
|
145973
|
-
let isMatch4 =
|
|
145973
|
+
let isMatch4 = picomatch7(String(patterns[i7]), { ...options, onResult }, true);
|
|
145974
145974
|
let negated = isMatch4.state.negated || isMatch4.state.negatedExtglob;
|
|
145975
145975
|
if (negated) negatives++;
|
|
145976
145976
|
for (let item of list) {
|
|
@@ -145998,8 +145998,8 @@ var require_micromatch2 = __commonJS({
|
|
|
145998
145998
|
return matches;
|
|
145999
145999
|
};
|
|
146000
146000
|
micromatch4.match = micromatch4;
|
|
146001
|
-
micromatch4.matcher = (pattern, options) =>
|
|
146002
|
-
micromatch4.isMatch = (str, patterns, options) =>
|
|
146001
|
+
micromatch4.matcher = (pattern, options) => picomatch7(pattern, options);
|
|
146002
|
+
micromatch4.isMatch = (str, patterns, options) => picomatch7(patterns, options)(str);
|
|
146003
146003
|
micromatch4.any = micromatch4.isMatch;
|
|
146004
146004
|
micromatch4.not = (list, patterns, options = {}) => {
|
|
146005
146005
|
patterns = [].concat(patterns).map(String);
|
|
@@ -146046,7 +146046,7 @@ var require_micromatch2 = __commonJS({
|
|
|
146046
146046
|
micromatch4.some = (list, patterns, options) => {
|
|
146047
146047
|
let items = [].concat(list);
|
|
146048
146048
|
for (let pattern of [].concat(patterns)) {
|
|
146049
|
-
let isMatch4 =
|
|
146049
|
+
let isMatch4 = picomatch7(String(pattern), options);
|
|
146050
146050
|
if (items.some((item) => isMatch4(item))) {
|
|
146051
146051
|
return true;
|
|
146052
146052
|
}
|
|
@@ -146056,7 +146056,7 @@ var require_micromatch2 = __commonJS({
|
|
|
146056
146056
|
micromatch4.every = (list, patterns, options) => {
|
|
146057
146057
|
let items = [].concat(list);
|
|
146058
146058
|
for (let pattern of [].concat(patterns)) {
|
|
146059
|
-
let isMatch4 =
|
|
146059
|
+
let isMatch4 = picomatch7(String(pattern), options);
|
|
146060
146060
|
if (!items.every((item) => isMatch4(item))) {
|
|
146061
146061
|
return false;
|
|
146062
146062
|
}
|
|
@@ -146067,23 +146067,23 @@ var require_micromatch2 = __commonJS({
|
|
|
146067
146067
|
if (typeof str !== "string") {
|
|
146068
146068
|
throw new TypeError(`Expected a string: "${util5.inspect(str)}"`);
|
|
146069
146069
|
}
|
|
146070
|
-
return [].concat(patterns).every((p3) =>
|
|
146070
|
+
return [].concat(patterns).every((p3) => picomatch7(p3, options)(str));
|
|
146071
146071
|
};
|
|
146072
146072
|
micromatch4.capture = (glob2, input, options) => {
|
|
146073
146073
|
let posix3 = utils.isWindows(options);
|
|
146074
|
-
let regex =
|
|
146074
|
+
let regex = picomatch7.makeRe(String(glob2), { ...options, capture: true });
|
|
146075
146075
|
let match2 = regex.exec(posix3 ? utils.toPosixSlashes(input) : input);
|
|
146076
146076
|
if (match2) {
|
|
146077
146077
|
return match2.slice(1).map((v) => v === void 0 ? "" : v);
|
|
146078
146078
|
}
|
|
146079
146079
|
};
|
|
146080
|
-
micromatch4.makeRe = (...args2) =>
|
|
146081
|
-
micromatch4.scan = (...args2) =>
|
|
146080
|
+
micromatch4.makeRe = (...args2) => picomatch7.makeRe(...args2);
|
|
146081
|
+
micromatch4.scan = (...args2) => picomatch7.scan(...args2);
|
|
146082
146082
|
micromatch4.parse = (patterns, options) => {
|
|
146083
146083
|
let res = [];
|
|
146084
146084
|
for (let pattern of [].concat(patterns || [])) {
|
|
146085
146085
|
for (let str of braces(String(pattern), options)) {
|
|
146086
|
-
res.push(
|
|
146086
|
+
res.push(picomatch7.parse(str, options));
|
|
146087
146087
|
}
|
|
146088
146088
|
}
|
|
146089
146089
|
return res;
|
|
@@ -158830,7 +158830,7 @@ var require_utils13 = __commonJS({
|
|
|
158830
158830
|
}
|
|
158831
158831
|
exports2.matchesParentDomain = matchesParentDomain;
|
|
158832
158832
|
async function request(uri, options = {}) {
|
|
158833
|
-
return new Promise((
|
|
158833
|
+
return new Promise((resolve38, reject) => {
|
|
158834
158834
|
const requestOptions = {
|
|
158835
158835
|
method: "GET",
|
|
158836
158836
|
timeout: 1e4,
|
|
@@ -158846,12 +158846,12 @@ var require_utils13 = __commonJS({
|
|
|
158846
158846
|
});
|
|
158847
158847
|
res.once("end", () => {
|
|
158848
158848
|
if (options.json === false) {
|
|
158849
|
-
|
|
158849
|
+
resolve38(data2);
|
|
158850
158850
|
return;
|
|
158851
158851
|
}
|
|
158852
158852
|
try {
|
|
158853
158853
|
const parsed = JSON.parse(data2);
|
|
158854
|
-
|
|
158854
|
+
resolve38(parsed);
|
|
158855
158855
|
} catch {
|
|
158856
158856
|
reject(new error_1.MongoRuntimeError(`Invalid JSON response: "${data2}"`));
|
|
158857
158857
|
}
|
|
@@ -164509,11 +164509,11 @@ var require_drop = __commonJS({
|
|
|
164509
164509
|
})().then((result) => callback(void 0, result), (err) => callback(err));
|
|
164510
164510
|
}
|
|
164511
164511
|
executeWithoutEncryptedFieldsCheck(server, session) {
|
|
164512
|
-
return new Promise((
|
|
164512
|
+
return new Promise((resolve38, reject) => {
|
|
164513
164513
|
super.executeCommand(server, session, { drop: this.name }, (err, result) => {
|
|
164514
164514
|
if (err)
|
|
164515
164515
|
return reject(err);
|
|
164516
|
-
|
|
164516
|
+
resolve38(!!result.ok);
|
|
164517
164517
|
});
|
|
164518
164518
|
});
|
|
164519
164519
|
}
|
|
@@ -165973,7 +165973,7 @@ var require_create_collection = __commonJS({
|
|
|
165973
165973
|
})().then((coll) => callback(void 0, coll), (err) => callback(err));
|
|
165974
165974
|
}
|
|
165975
165975
|
executeWithoutEncryptedFieldsCheck(server, session) {
|
|
165976
|
-
return new Promise((
|
|
165976
|
+
return new Promise((resolve38, reject) => {
|
|
165977
165977
|
const db = this.db;
|
|
165978
165978
|
const name = this.name;
|
|
165979
165979
|
const options = this.options;
|
|
@@ -165981,7 +165981,7 @@ var require_create_collection = __commonJS({
|
|
|
165981
165981
|
if (err) {
|
|
165982
165982
|
return reject(err);
|
|
165983
165983
|
}
|
|
165984
|
-
|
|
165984
|
+
resolve38(new collection_1.Collection(db, name, options));
|
|
165985
165985
|
};
|
|
165986
165986
|
const cmd = { create: name };
|
|
165987
165987
|
for (const n2 in options) {
|
|
@@ -177978,7 +177978,7 @@ var require_mongo_client = __commonJS({
|
|
|
177978
177978
|
}
|
|
177979
177979
|
const topology = this.topology;
|
|
177980
177980
|
this.topology = void 0;
|
|
177981
|
-
await new Promise((
|
|
177981
|
+
await new Promise((resolve38, reject) => {
|
|
177982
177982
|
topology.close({ force }, (error) => {
|
|
177983
177983
|
if (error)
|
|
177984
177984
|
return reject(error);
|
|
@@ -177987,10 +177987,10 @@ var require_mongo_client = __commonJS({
|
|
|
177987
177987
|
return encrypter.close(this, force, (error2) => {
|
|
177988
177988
|
if (error2)
|
|
177989
177989
|
return reject(error2);
|
|
177990
|
-
|
|
177990
|
+
resolve38();
|
|
177991
177991
|
});
|
|
177992
177992
|
}
|
|
177993
|
-
|
|
177993
|
+
resolve38();
|
|
177994
177994
|
});
|
|
177995
177995
|
});
|
|
177996
177996
|
}
|
|
@@ -180677,8 +180677,8 @@ var require_light = __commonJS({
|
|
|
180677
180677
|
return this.Promise.resolve();
|
|
180678
180678
|
}
|
|
180679
180679
|
yieldLoop(t4 = 0) {
|
|
180680
|
-
return new this.Promise(function(
|
|
180681
|
-
return setTimeout(
|
|
180680
|
+
return new this.Promise(function(resolve38, reject) {
|
|
180681
|
+
return setTimeout(resolve38, t4);
|
|
180682
180682
|
});
|
|
180683
180683
|
}
|
|
180684
180684
|
computePenalty() {
|
|
@@ -180889,15 +180889,15 @@ var require_light = __commonJS({
|
|
|
180889
180889
|
return this._queue.length === 0;
|
|
180890
180890
|
}
|
|
180891
180891
|
async _tryToRun() {
|
|
180892
|
-
var args2, cb, error, reject,
|
|
180892
|
+
var args2, cb, error, reject, resolve38, returned, task;
|
|
180893
180893
|
if (this._running < 1 && this._queue.length > 0) {
|
|
180894
180894
|
this._running++;
|
|
180895
|
-
({ task, args: args2, resolve:
|
|
180895
|
+
({ task, args: args2, resolve: resolve38, reject } = this._queue.shift());
|
|
180896
180896
|
cb = await async function() {
|
|
180897
180897
|
try {
|
|
180898
180898
|
returned = await task(...args2);
|
|
180899
180899
|
return function() {
|
|
180900
|
-
return
|
|
180900
|
+
return resolve38(returned);
|
|
180901
180901
|
};
|
|
180902
180902
|
} catch (error1) {
|
|
180903
180903
|
error = error1;
|
|
@@ -180912,13 +180912,13 @@ var require_light = __commonJS({
|
|
|
180912
180912
|
}
|
|
180913
180913
|
}
|
|
180914
180914
|
schedule(task, ...args2) {
|
|
180915
|
-
var promise, reject,
|
|
180916
|
-
|
|
180915
|
+
var promise, reject, resolve38;
|
|
180916
|
+
resolve38 = reject = null;
|
|
180917
180917
|
promise = new this.Promise(function(_resolve, _reject) {
|
|
180918
|
-
|
|
180918
|
+
resolve38 = _resolve;
|
|
180919
180919
|
return reject = _reject;
|
|
180920
180920
|
});
|
|
180921
|
-
this._queue.push({ task, args: args2, resolve:
|
|
180921
|
+
this._queue.push({ task, args: args2, resolve: resolve38, reject });
|
|
180922
180922
|
this._tryToRun();
|
|
180923
180923
|
return promise;
|
|
180924
180924
|
}
|
|
@@ -181319,14 +181319,14 @@ var require_light = __commonJS({
|
|
|
181319
181319
|
counts = this._states.counts;
|
|
181320
181320
|
return counts[0] + counts[1] + counts[2] + counts[3] === at;
|
|
181321
181321
|
};
|
|
181322
|
-
return new this.Promise((
|
|
181322
|
+
return new this.Promise((resolve38, reject) => {
|
|
181323
181323
|
if (finished()) {
|
|
181324
|
-
return
|
|
181324
|
+
return resolve38();
|
|
181325
181325
|
} else {
|
|
181326
181326
|
return this.on("done", () => {
|
|
181327
181327
|
if (finished()) {
|
|
181328
181328
|
this.removeAllListeners("done");
|
|
181329
|
-
return
|
|
181329
|
+
return resolve38();
|
|
181330
181330
|
}
|
|
181331
181331
|
});
|
|
181332
181332
|
}
|
|
@@ -181419,9 +181419,9 @@ var require_light = __commonJS({
|
|
|
181419
181419
|
options = parser$5.load(options, this.jobDefaults);
|
|
181420
181420
|
}
|
|
181421
181421
|
task = (...args3) => {
|
|
181422
|
-
return new this.Promise(function(
|
|
181422
|
+
return new this.Promise(function(resolve38, reject) {
|
|
181423
181423
|
return fn2(...args3, function(...args4) {
|
|
181424
|
-
return (args4[0] != null ? reject :
|
|
181424
|
+
return (args4[0] != null ? reject : resolve38)(args4);
|
|
181425
181425
|
});
|
|
181426
181426
|
});
|
|
181427
181427
|
};
|
|
@@ -182377,7 +182377,7 @@ var require_dist_node16 = __commonJS({
|
|
|
182377
182377
|
return newScope === currentScope ? authentication : false;
|
|
182378
182378
|
}
|
|
182379
182379
|
async function wait(seconds) {
|
|
182380
|
-
await new Promise((
|
|
182380
|
+
await new Promise((resolve38) => setTimeout(resolve38, seconds * 1e3));
|
|
182381
182381
|
}
|
|
182382
182382
|
async function waitForAccessToken(request, clientId, clientType, verification) {
|
|
182383
182383
|
try {
|
|
@@ -186389,7 +186389,7 @@ var require_dist_node20 = __commonJS({
|
|
|
186389
186389
|
state.log.warn(
|
|
186390
186390
|
`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)`
|
|
186391
186391
|
);
|
|
186392
|
-
await new Promise((
|
|
186392
|
+
await new Promise((resolve38) => setTimeout(resolve38, awaitTime));
|
|
186393
186393
|
return sendRequestWithRetries(state, request, options, createdAt, retries);
|
|
186394
186394
|
}
|
|
186395
186395
|
}
|
|
@@ -187142,9 +187142,9 @@ var require_dist_node22 = __commonJS({
|
|
|
187142
187142
|
function parseRequest(request) {
|
|
187143
187143
|
const { method, url: url2, headers } = request;
|
|
187144
187144
|
async function text3() {
|
|
187145
|
-
const text22 = await new Promise((
|
|
187145
|
+
const text22 = await new Promise((resolve38, reject) => {
|
|
187146
187146
|
let bodyChunks = [];
|
|
187147
|
-
request.on("error", reject).on("data", (chunk) => bodyChunks.push(chunk)).on("end", () =>
|
|
187147
|
+
request.on("error", reject).on("data", (chunk) => bodyChunks.push(chunk)).on("end", () => resolve38(Buffer.concat(bodyChunks).toString()));
|
|
187148
187148
|
});
|
|
187149
187149
|
return text22;
|
|
187150
187150
|
}
|
|
@@ -188001,7 +188001,7 @@ var require_dist_node24 = __commonJS({
|
|
|
188001
188001
|
return Promise.resolve(request.body);
|
|
188002
188002
|
}
|
|
188003
188003
|
}
|
|
188004
|
-
return new Promise((
|
|
188004
|
+
return new Promise((resolve38, reject) => {
|
|
188005
188005
|
let data2 = [];
|
|
188006
188006
|
request.on("error", (error) => reject(new import_aggregate_error3.default([error])));
|
|
188007
188007
|
request.on("data", (chunk) => data2.push(chunk));
|
|
@@ -188011,7 +188011,7 @@ var require_dist_node24 = __commonJS({
|
|
|
188011
188011
|
// setImmediate improves the throughput by reducing the pressure from
|
|
188012
188012
|
// the event loop
|
|
188013
188013
|
setImmediate(
|
|
188014
|
-
|
|
188014
|
+
resolve38,
|
|
188015
188015
|
data2.length === 1 ? data2[0].toString("utf8") : Buffer.concat(data2).toString("utf8")
|
|
188016
188016
|
)
|
|
188017
188017
|
)
|
|
@@ -188718,11 +188718,11 @@ var require_p_finally = __commonJS({
|
|
|
188718
188718
|
onFinally = onFinally || (() => {
|
|
188719
188719
|
});
|
|
188720
188720
|
return promise.then(
|
|
188721
|
-
(val2) => new Promise((
|
|
188722
|
-
|
|
188721
|
+
(val2) => new Promise((resolve38) => {
|
|
188722
|
+
resolve38(onFinally());
|
|
188723
188723
|
}).then(() => val2),
|
|
188724
|
-
(err) => new Promise((
|
|
188725
|
-
|
|
188724
|
+
(err) => new Promise((resolve38) => {
|
|
188725
|
+
resolve38(onFinally());
|
|
188726
188726
|
}).then(() => {
|
|
188727
188727
|
throw err;
|
|
188728
188728
|
})
|
|
@@ -188742,18 +188742,18 @@ var require_p_timeout = __commonJS({
|
|
|
188742
188742
|
this.name = "TimeoutError";
|
|
188743
188743
|
}
|
|
188744
188744
|
};
|
|
188745
|
-
var pTimeout = (promise, milliseconds, fallback) => new Promise((
|
|
188745
|
+
var pTimeout = (promise, milliseconds, fallback) => new Promise((resolve38, reject) => {
|
|
188746
188746
|
if (typeof milliseconds !== "number" || milliseconds < 0) {
|
|
188747
188747
|
throw new TypeError("Expected `milliseconds` to be a positive number");
|
|
188748
188748
|
}
|
|
188749
188749
|
if (milliseconds === Infinity) {
|
|
188750
|
-
|
|
188750
|
+
resolve38(promise);
|
|
188751
188751
|
return;
|
|
188752
188752
|
}
|
|
188753
188753
|
const timer = setTimeout(() => {
|
|
188754
188754
|
if (typeof fallback === "function") {
|
|
188755
188755
|
try {
|
|
188756
|
-
|
|
188756
|
+
resolve38(fallback());
|
|
188757
188757
|
} catch (error) {
|
|
188758
188758
|
reject(error);
|
|
188759
188759
|
}
|
|
@@ -188768,7 +188768,7 @@ var require_p_timeout = __commonJS({
|
|
|
188768
188768
|
}, milliseconds);
|
|
188769
188769
|
pFinally(
|
|
188770
188770
|
// eslint-disable-next-line promise/prefer-await-to-then
|
|
188771
|
-
promise.then(
|
|
188771
|
+
promise.then(resolve38, reject),
|
|
188772
188772
|
() => {
|
|
188773
188773
|
clearTimeout(timer);
|
|
188774
188774
|
}
|
|
@@ -188986,7 +188986,7 @@ var require_dist13 = __commonJS({
|
|
|
188986
188986
|
Adds a sync or async task to the queue. Always returns a promise.
|
|
188987
188987
|
*/
|
|
188988
188988
|
async add(fn2, options = {}) {
|
|
188989
|
-
return new Promise((
|
|
188989
|
+
return new Promise((resolve38, reject) => {
|
|
188990
188990
|
const run3 = async () => {
|
|
188991
188991
|
this._pendingCount++;
|
|
188992
188992
|
this._intervalCount++;
|
|
@@ -188997,7 +188997,7 @@ var require_dist13 = __commonJS({
|
|
|
188997
188997
|
}
|
|
188998
188998
|
return void 0;
|
|
188999
188999
|
});
|
|
189000
|
-
|
|
189000
|
+
resolve38(await operation);
|
|
189001
189001
|
} catch (error) {
|
|
189002
189002
|
reject(error);
|
|
189003
189003
|
}
|
|
@@ -189048,11 +189048,11 @@ var require_dist13 = __commonJS({
|
|
|
189048
189048
|
if (this._queue.size === 0) {
|
|
189049
189049
|
return;
|
|
189050
189050
|
}
|
|
189051
|
-
return new Promise((
|
|
189051
|
+
return new Promise((resolve38) => {
|
|
189052
189052
|
const existingResolve = this._resolveEmpty;
|
|
189053
189053
|
this._resolveEmpty = () => {
|
|
189054
189054
|
existingResolve();
|
|
189055
|
-
|
|
189055
|
+
resolve38();
|
|
189056
189056
|
};
|
|
189057
189057
|
});
|
|
189058
189058
|
}
|
|
@@ -189065,11 +189065,11 @@ var require_dist13 = __commonJS({
|
|
|
189065
189065
|
if (this._pendingCount === 0 && this._queue.size === 0) {
|
|
189066
189066
|
return;
|
|
189067
189067
|
}
|
|
189068
|
-
return new Promise((
|
|
189068
|
+
return new Promise((resolve38) => {
|
|
189069
189069
|
const existingResolve = this._resolveIdle;
|
|
189070
189070
|
this._resolveIdle = () => {
|
|
189071
189071
|
existingResolve();
|
|
189072
|
-
|
|
189072
|
+
resolve38();
|
|
189073
189073
|
};
|
|
189074
189074
|
});
|
|
189075
189075
|
}
|
|
@@ -189149,7 +189149,7 @@ var require_p_retry = __commonJS({
|
|
|
189149
189149
|
return error;
|
|
189150
189150
|
};
|
|
189151
189151
|
var isNetworkError2 = (errorMessage) => networkErrorMsgs.includes(errorMessage);
|
|
189152
|
-
var pRetry = (input, options) => new Promise((
|
|
189152
|
+
var pRetry = (input, options) => new Promise((resolve38, reject) => {
|
|
189153
189153
|
options = {
|
|
189154
189154
|
onFailedAttempt: () => {
|
|
189155
189155
|
},
|
|
@@ -189159,7 +189159,7 @@ var require_p_retry = __commonJS({
|
|
|
189159
189159
|
const operation = retry.operation(options);
|
|
189160
189160
|
operation.attempt(async (attemptNumber) => {
|
|
189161
189161
|
try {
|
|
189162
|
-
|
|
189162
|
+
resolve38(await input(attemptNumber));
|
|
189163
189163
|
} catch (error) {
|
|
189164
189164
|
if (!(error instanceof Error)) {
|
|
189165
189165
|
reject(new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`));
|
|
@@ -190403,10 +190403,10 @@ var require_axios = __commonJS({
|
|
|
190403
190403
|
utils$1.inherits(CanceledError3, AxiosError3, {
|
|
190404
190404
|
__CANCEL__: true
|
|
190405
190405
|
});
|
|
190406
|
-
function settle2(
|
|
190406
|
+
function settle2(resolve38, reject, response) {
|
|
190407
190407
|
const validateStatus2 = response.config.validateStatus;
|
|
190408
190408
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
190409
|
-
|
|
190409
|
+
resolve38(response);
|
|
190410
190410
|
} else {
|
|
190411
190411
|
reject(new AxiosError3(
|
|
190412
190412
|
"Request failed with status code " + response.status,
|
|
@@ -190855,7 +190855,7 @@ var require_axios = __commonJS({
|
|
|
190855
190855
|
}
|
|
190856
190856
|
var isHttpAdapterSupported2 = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
190857
190857
|
var wrapAsync2 = (asyncExecutor) => {
|
|
190858
|
-
return new Promise((
|
|
190858
|
+
return new Promise((resolve38, reject) => {
|
|
190859
190859
|
let onDone;
|
|
190860
190860
|
let isDone;
|
|
190861
190861
|
const done = (value, isRejected) => {
|
|
@@ -190865,7 +190865,7 @@ var require_axios = __commonJS({
|
|
|
190865
190865
|
};
|
|
190866
190866
|
const _resolve = (value) => {
|
|
190867
190867
|
done(value);
|
|
190868
|
-
|
|
190868
|
+
resolve38(value);
|
|
190869
190869
|
};
|
|
190870
190870
|
const _reject = (reason) => {
|
|
190871
190871
|
done(reason, true);
|
|
@@ -190885,7 +190885,7 @@ var require_axios = __commonJS({
|
|
|
190885
190885
|
};
|
|
190886
190886
|
var buildAddressEntry2 = (address, family) => resolveFamily2(utils$1.isObject(address) ? address : { address, family });
|
|
190887
190887
|
var httpAdapter2 = isHttpAdapterSupported2 && function httpAdapter3(config3) {
|
|
190888
|
-
return wrapAsync2(async function dispatchHttpRequest(
|
|
190888
|
+
return wrapAsync2(async function dispatchHttpRequest(resolve38, reject, onDone) {
|
|
190889
190889
|
let { data: data2, lookup, family } = config3;
|
|
190890
190890
|
const { responseType, responseEncoding } = config3;
|
|
190891
190891
|
const method = config3.method.toUpperCase();
|
|
@@ -190937,7 +190937,7 @@ var require_axios = __commonJS({
|
|
|
190937
190937
|
if (protocol === "data:") {
|
|
190938
190938
|
let convertedData;
|
|
190939
190939
|
if (method !== "GET") {
|
|
190940
|
-
return settle2(
|
|
190940
|
+
return settle2(resolve38, reject, {
|
|
190941
190941
|
status: 405,
|
|
190942
190942
|
statusText: "method not allowed",
|
|
190943
190943
|
headers: {},
|
|
@@ -190959,7 +190959,7 @@ var require_axios = __commonJS({
|
|
|
190959
190959
|
} else if (responseType === "stream") {
|
|
190960
190960
|
convertedData = stream__default["default"].Readable.from(convertedData);
|
|
190961
190961
|
}
|
|
190962
|
-
return settle2(
|
|
190962
|
+
return settle2(resolve38, reject, {
|
|
190963
190963
|
data: convertedData,
|
|
190964
190964
|
status: 200,
|
|
190965
190965
|
statusText: "OK",
|
|
@@ -191177,7 +191177,7 @@ var require_axios = __commonJS({
|
|
|
191177
191177
|
};
|
|
191178
191178
|
if (responseType === "stream") {
|
|
191179
191179
|
response.data = responseStream;
|
|
191180
|
-
settle2(
|
|
191180
|
+
settle2(resolve38, reject, response);
|
|
191181
191181
|
} else {
|
|
191182
191182
|
const responseBuffer = [];
|
|
191183
191183
|
let totalResponseBytes = 0;
|
|
@@ -191225,7 +191225,7 @@ var require_axios = __commonJS({
|
|
|
191225
191225
|
} catch (err) {
|
|
191226
191226
|
return reject(AxiosError3.from(err, null, config3, response.request, response));
|
|
191227
191227
|
}
|
|
191228
|
-
settle2(
|
|
191228
|
+
settle2(resolve38, reject, response);
|
|
191229
191229
|
});
|
|
191230
191230
|
}
|
|
191231
191231
|
emitter.once("abort", (err) => {
|
|
@@ -191442,7 +191442,7 @@ var require_axios = __commonJS({
|
|
|
191442
191442
|
};
|
|
191443
191443
|
var isXHRAdapterSupported2 = typeof XMLHttpRequest !== "undefined";
|
|
191444
191444
|
var xhrAdapter = isXHRAdapterSupported2 && function(config3) {
|
|
191445
|
-
return new Promise(function dispatchXhrRequest(
|
|
191445
|
+
return new Promise(function dispatchXhrRequest(resolve38, reject) {
|
|
191446
191446
|
const _config = resolveConfig(config3);
|
|
191447
191447
|
let requestData = _config.data;
|
|
191448
191448
|
const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
|
@@ -191476,7 +191476,7 @@ var require_axios = __commonJS({
|
|
|
191476
191476
|
request
|
|
191477
191477
|
};
|
|
191478
191478
|
settle2(function _resolve(value) {
|
|
191479
|
-
|
|
191479
|
+
resolve38(value);
|
|
191480
191480
|
done();
|
|
191481
191481
|
}, function _reject(err) {
|
|
191482
191482
|
reject(err);
|
|
@@ -191813,8 +191813,8 @@ var require_axios = __commonJS({
|
|
|
191813
191813
|
responseType = responseType || "text";
|
|
191814
191814
|
let responseData = await resolvers2[utils$1.findKey(resolvers2, responseType) || "text"](response, config3);
|
|
191815
191815
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
191816
|
-
return await new Promise((
|
|
191817
|
-
settle2(
|
|
191816
|
+
return await new Promise((resolve38, reject) => {
|
|
191817
|
+
settle2(resolve38, reject, {
|
|
191818
191818
|
data: responseData,
|
|
191819
191819
|
headers: AxiosHeaders$1.from(response.headers),
|
|
191820
191820
|
status: response.status,
|
|
@@ -192170,8 +192170,8 @@ var require_axios = __commonJS({
|
|
|
192170
192170
|
throw new TypeError("executor must be a function.");
|
|
192171
192171
|
}
|
|
192172
192172
|
let resolvePromise;
|
|
192173
|
-
this.promise = new Promise(function promiseExecutor(
|
|
192174
|
-
resolvePromise =
|
|
192173
|
+
this.promise = new Promise(function promiseExecutor(resolve38) {
|
|
192174
|
+
resolvePromise = resolve38;
|
|
192175
192175
|
});
|
|
192176
192176
|
const token = this;
|
|
192177
192177
|
this.promise.then((cancel) => {
|
|
@@ -192184,9 +192184,9 @@ var require_axios = __commonJS({
|
|
|
192184
192184
|
});
|
|
192185
192185
|
this.promise.then = (onfulfilled) => {
|
|
192186
192186
|
let _resolve;
|
|
192187
|
-
const promise = new Promise((
|
|
192188
|
-
token.subscribe(
|
|
192189
|
-
_resolve =
|
|
192187
|
+
const promise = new Promise((resolve38) => {
|
|
192188
|
+
token.subscribe(resolve38);
|
|
192189
|
+
_resolve = resolve38;
|
|
192190
192190
|
}).then(onfulfilled);
|
|
192191
192191
|
promise.cancel = function reject() {
|
|
192192
192192
|
token.unsubscribe(_resolve);
|
|
@@ -193875,8 +193875,8 @@ var require_helpers3 = __commonJS({
|
|
|
193875
193875
|
"use strict";
|
|
193876
193876
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
193877
193877
|
function delay(ms) {
|
|
193878
|
-
return new Promise((
|
|
193879
|
-
setTimeout(
|
|
193878
|
+
return new Promise((resolve38) => {
|
|
193879
|
+
setTimeout(resolve38, ms);
|
|
193880
193880
|
});
|
|
193881
193881
|
}
|
|
193882
193882
|
exports2.default = delay;
|
|
@@ -193963,7 +193963,7 @@ var require_file_upload = __commonJS({
|
|
|
193963
193963
|
exports2.getFileDataLength = getFileDataLength;
|
|
193964
193964
|
async function getFileDataAsStream(readable) {
|
|
193965
193965
|
const chunks = [];
|
|
193966
|
-
return new Promise((
|
|
193966
|
+
return new Promise((resolve38, reject) => {
|
|
193967
193967
|
readable.on("readable", () => {
|
|
193968
193968
|
let chunk;
|
|
193969
193969
|
while ((chunk = readable.read()) !== null) {
|
|
@@ -193973,7 +193973,7 @@ var require_file_upload = __commonJS({
|
|
|
193973
193973
|
readable.on("end", () => {
|
|
193974
193974
|
if (chunks.length > 0) {
|
|
193975
193975
|
const content = Buffer.concat(chunks);
|
|
193976
|
-
|
|
193976
|
+
resolve38(content);
|
|
193977
193977
|
} else {
|
|
193978
193978
|
reject(Error("No data in supplied file"));
|
|
193979
193979
|
}
|
|
@@ -194184,14 +194184,14 @@ var require_WebClient = __commonJS({
|
|
|
194184
194184
|
}, i7);
|
|
194185
194185
|
function verb(n2) {
|
|
194186
194186
|
i7[n2] = o7[n2] && function(v) {
|
|
194187
|
-
return new Promise(function(
|
|
194188
|
-
v = o7[n2](v), settle2(
|
|
194187
|
+
return new Promise(function(resolve38, reject) {
|
|
194188
|
+
v = o7[n2](v), settle2(resolve38, reject, v.done, v.value);
|
|
194189
194189
|
});
|
|
194190
194190
|
};
|
|
194191
194191
|
}
|
|
194192
|
-
function settle2(
|
|
194192
|
+
function settle2(resolve38, reject, d4, v) {
|
|
194193
194193
|
Promise.resolve(v).then(function(v2) {
|
|
194194
|
-
|
|
194194
|
+
resolve38({ value: v2, done: d4 });
|
|
194195
194195
|
}, reject);
|
|
194196
194196
|
}
|
|
194197
194197
|
};
|
|
@@ -194596,12 +194596,12 @@ var require_WebClient = __commonJS({
|
|
|
194596
194596
|
const isGzipResponse = response.headers["content-type"] === "application/gzip";
|
|
194597
194597
|
if (isGzipResponse) {
|
|
194598
194598
|
try {
|
|
194599
|
-
const unzippedData = await new Promise((
|
|
194599
|
+
const unzippedData = await new Promise((resolve38, reject) => {
|
|
194600
194600
|
zlib_1.default.unzip(data2, (err, buf) => {
|
|
194601
194601
|
if (err) {
|
|
194602
194602
|
return reject(err);
|
|
194603
194603
|
}
|
|
194604
|
-
return
|
|
194604
|
+
return resolve38(buf.toString().split("\n"));
|
|
194605
194605
|
});
|
|
194606
194606
|
}).then((res) => res).catch((err) => {
|
|
194607
194607
|
throw err;
|
|
@@ -194818,8 +194818,8 @@ var {
|
|
|
194818
194818
|
} = import_index.default;
|
|
194819
194819
|
|
|
194820
194820
|
// dist/index.js
|
|
194821
|
-
import { mkdir as mkdir3, readFile as
|
|
194822
|
-
import { dirname as
|
|
194821
|
+
import { mkdir as mkdir3, readFile as readFile31, writeFile as writeFile12 } from "fs/promises";
|
|
194822
|
+
import { dirname as dirname15, join as join28, resolve as resolve37 } from "path";
|
|
194823
194823
|
|
|
194824
194824
|
// ../utils/src/tmp-file.ts
|
|
194825
194825
|
import { rm, mkdtemp } from "fs/promises";
|
|
@@ -194928,20 +194928,20 @@ var CLILogger = class {
|
|
|
194928
194928
|
* in errors that are swallowed by the 'error' event listener in this function.
|
|
194929
194929
|
*/
|
|
194930
194930
|
async finish() {
|
|
194931
|
-
return new Promise((
|
|
194931
|
+
return new Promise((resolve38) => {
|
|
194932
194932
|
if (this.logger instanceof Console || this.logger.writableEnded) {
|
|
194933
|
-
|
|
194933
|
+
resolve38();
|
|
194934
194934
|
return;
|
|
194935
194935
|
}
|
|
194936
194936
|
this.logger.on("error", () => {
|
|
194937
194937
|
});
|
|
194938
194938
|
this.logger.end(() => {
|
|
194939
194939
|
if (!this.writeStream || this.writeStream.writableEnded) {
|
|
194940
|
-
|
|
194940
|
+
resolve38();
|
|
194941
194941
|
return;
|
|
194942
194942
|
}
|
|
194943
194943
|
if (!this.writeStream.writableEnded) {
|
|
194944
|
-
this.writeStream.end(
|
|
194944
|
+
this.writeStream.end(resolve38);
|
|
194945
194945
|
}
|
|
194946
194946
|
});
|
|
194947
194947
|
});
|
|
@@ -195394,11 +195394,11 @@ var E_ALREADY_LOCKED = new Error("mutex already locked");
|
|
|
195394
195394
|
var E_CANCELED = new Error("request for lock canceled");
|
|
195395
195395
|
var __awaiter$2 = function(thisArg, _arguments, P, generator) {
|
|
195396
195396
|
function adopt(value) {
|
|
195397
|
-
return value instanceof P ? value : new P(function(
|
|
195398
|
-
|
|
195397
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
195398
|
+
resolve38(value);
|
|
195399
195399
|
});
|
|
195400
195400
|
}
|
|
195401
|
-
return new (P || (P = Promise))(function(
|
|
195401
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
195402
195402
|
function fulfilled(value) {
|
|
195403
195403
|
try {
|
|
195404
195404
|
step(generator.next(value));
|
|
@@ -195414,7 +195414,7 @@ var __awaiter$2 = function(thisArg, _arguments, P, generator) {
|
|
|
195414
195414
|
}
|
|
195415
195415
|
}
|
|
195416
195416
|
function step(result) {
|
|
195417
|
-
result.done ?
|
|
195417
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
195418
195418
|
}
|
|
195419
195419
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
195420
195420
|
});
|
|
@@ -195429,8 +195429,8 @@ var Semaphore = class {
|
|
|
195429
195429
|
acquire(weight = 1, priority = 0) {
|
|
195430
195430
|
if (weight <= 0)
|
|
195431
195431
|
throw new Error(`invalid weight ${weight}: must be positive`);
|
|
195432
|
-
return new Promise((
|
|
195433
|
-
const task = { resolve:
|
|
195432
|
+
return new Promise((resolve38, reject) => {
|
|
195433
|
+
const task = { resolve: resolve38, reject, weight, priority };
|
|
195434
195434
|
const i7 = findIndexFromEnd(this._queue, (other) => priority <= other.priority);
|
|
195435
195435
|
if (i7 === -1 && weight <= this._value) {
|
|
195436
195436
|
this._dispatchItem(task);
|
|
@@ -195455,10 +195455,10 @@ var Semaphore = class {
|
|
|
195455
195455
|
if (this._couldLockImmediately(weight, priority)) {
|
|
195456
195456
|
return Promise.resolve();
|
|
195457
195457
|
} else {
|
|
195458
|
-
return new Promise((
|
|
195458
|
+
return new Promise((resolve38) => {
|
|
195459
195459
|
if (!this._weightedWaiters[weight - 1])
|
|
195460
195460
|
this._weightedWaiters[weight - 1] = [];
|
|
195461
|
-
insertSorted(this._weightedWaiters[weight - 1], { resolve:
|
|
195461
|
+
insertSorted(this._weightedWaiters[weight - 1], { resolve: resolve38, priority });
|
|
195462
195462
|
});
|
|
195463
195463
|
}
|
|
195464
195464
|
}
|
|
@@ -195541,11 +195541,11 @@ function findIndexFromEnd(a4, predicate) {
|
|
|
195541
195541
|
}
|
|
195542
195542
|
var __awaiter$1 = function(thisArg, _arguments, P, generator) {
|
|
195543
195543
|
function adopt(value) {
|
|
195544
|
-
return value instanceof P ? value : new P(function(
|
|
195545
|
-
|
|
195544
|
+
return value instanceof P ? value : new P(function(resolve38) {
|
|
195545
|
+
resolve38(value);
|
|
195546
195546
|
});
|
|
195547
195547
|
}
|
|
195548
|
-
return new (P || (P = Promise))(function(
|
|
195548
|
+
return new (P || (P = Promise))(function(resolve38, reject) {
|
|
195549
195549
|
function fulfilled(value) {
|
|
195550
195550
|
try {
|
|
195551
195551
|
step(generator.next(value));
|
|
@@ -195561,7 +195561,7 @@ var __awaiter$1 = function(thisArg, _arguments, P, generator) {
|
|
|
195561
195561
|
}
|
|
195562
195562
|
}
|
|
195563
195563
|
function step(result) {
|
|
195564
|
-
result.done ?
|
|
195564
|
+
result.done ? resolve38(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
195565
195565
|
}
|
|
195566
195566
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
195567
195567
|
});
|
|
@@ -195742,7 +195742,7 @@ ${stderr}`) ? em.slice(0, -stderr.length - 1) : em}`);
|
|
|
195742
195742
|
logger[logLevel](`stderr: ${stderr}`);
|
|
195743
195743
|
}
|
|
195744
195744
|
async function execNeverFail(cmd, dir, options) {
|
|
195745
|
-
return new Promise((
|
|
195745
|
+
return new Promise((resolve38) => {
|
|
195746
195746
|
let args2;
|
|
195747
195747
|
if (typeof cmd !== "string") [cmd, ...args2] = cmd;
|
|
195748
195748
|
const childProcess = execFile(
|
|
@@ -195750,7 +195750,7 @@ async function execNeverFail(cmd, dir, options) {
|
|
|
195750
195750
|
args2,
|
|
195751
195751
|
{ ...options, cwd: dir, maxBuffer: 1024 * 1024 * 1024, shell: args2 === void 0 },
|
|
195752
195752
|
(error, stdout, stderr) => {
|
|
195753
|
-
|
|
195753
|
+
resolve38({ error, stdout, stderr });
|
|
195754
195754
|
}
|
|
195755
195755
|
);
|
|
195756
195756
|
if (options?.pipe) {
|
|
@@ -201160,10 +201160,10 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
|
201160
201160
|
var CanceledError_default = CanceledError;
|
|
201161
201161
|
|
|
201162
201162
|
// ../../node_modules/.pnpm/axios@1.8.2/node_modules/axios/lib/core/settle.js
|
|
201163
|
-
function settle(
|
|
201163
|
+
function settle(resolve38, reject, response) {
|
|
201164
201164
|
const validateStatus2 = response.config.validateStatus;
|
|
201165
201165
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
201166
|
-
|
|
201166
|
+
resolve38(response);
|
|
201167
201167
|
} else {
|
|
201168
201168
|
reject(new AxiosError_default(
|
|
201169
201169
|
"Request failed with status code " + response.status,
|
|
@@ -201664,7 +201664,7 @@ function setProxy(options, configProxy, location) {
|
|
|
201664
201664
|
}
|
|
201665
201665
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
201666
201666
|
var wrapAsync = (asyncExecutor) => {
|
|
201667
|
-
return new Promise((
|
|
201667
|
+
return new Promise((resolve38, reject) => {
|
|
201668
201668
|
let onDone;
|
|
201669
201669
|
let isDone;
|
|
201670
201670
|
const done = (value, isRejected) => {
|
|
@@ -201674,7 +201674,7 @@ var wrapAsync = (asyncExecutor) => {
|
|
|
201674
201674
|
};
|
|
201675
201675
|
const _resolve = (value) => {
|
|
201676
201676
|
done(value);
|
|
201677
|
-
|
|
201677
|
+
resolve38(value);
|
|
201678
201678
|
};
|
|
201679
201679
|
const _reject = (reason) => {
|
|
201680
201680
|
done(reason, true);
|
|
@@ -201694,7 +201694,7 @@ var resolveFamily = ({ address, family }) => {
|
|
|
201694
201694
|
};
|
|
201695
201695
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
201696
201696
|
var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
201697
|
-
return wrapAsync(async function dispatchHttpRequest(
|
|
201697
|
+
return wrapAsync(async function dispatchHttpRequest(resolve38, reject, onDone) {
|
|
201698
201698
|
let { data: data2, lookup, family } = config3;
|
|
201699
201699
|
const { responseType, responseEncoding } = config3;
|
|
201700
201700
|
const method = config3.method.toUpperCase();
|
|
@@ -201746,7 +201746,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
201746
201746
|
if (protocol === "data:") {
|
|
201747
201747
|
let convertedData;
|
|
201748
201748
|
if (method !== "GET") {
|
|
201749
|
-
return settle(
|
|
201749
|
+
return settle(resolve38, reject, {
|
|
201750
201750
|
status: 405,
|
|
201751
201751
|
statusText: "method not allowed",
|
|
201752
201752
|
headers: {},
|
|
@@ -201768,7 +201768,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
201768
201768
|
} else if (responseType === "stream") {
|
|
201769
201769
|
convertedData = stream3.Readable.from(convertedData);
|
|
201770
201770
|
}
|
|
201771
|
-
return settle(
|
|
201771
|
+
return settle(resolve38, reject, {
|
|
201772
201772
|
data: convertedData,
|
|
201773
201773
|
status: 200,
|
|
201774
201774
|
statusText: "OK",
|
|
@@ -201986,7 +201986,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
201986
201986
|
};
|
|
201987
201987
|
if (responseType === "stream") {
|
|
201988
201988
|
response.data = responseStream;
|
|
201989
|
-
settle(
|
|
201989
|
+
settle(resolve38, reject, response);
|
|
201990
201990
|
} else {
|
|
201991
201991
|
const responseBuffer = [];
|
|
201992
201992
|
let totalResponseBytes = 0;
|
|
@@ -202034,7 +202034,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
202034
202034
|
} catch (err) {
|
|
202035
202035
|
return reject(AxiosError_default.from(err, null, config3, response.request, response));
|
|
202036
202036
|
}
|
|
202037
|
-
settle(
|
|
202037
|
+
settle(resolve38, reject, response);
|
|
202038
202038
|
});
|
|
202039
202039
|
}
|
|
202040
202040
|
emitter.once("abort", (err) => {
|
|
@@ -202261,7 +202261,7 @@ var resolveConfig_default = (config3) => {
|
|
|
202261
202261
|
// ../../node_modules/.pnpm/axios@1.8.2/node_modules/axios/lib/adapters/xhr.js
|
|
202262
202262
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
202263
202263
|
var xhr_default = isXHRAdapterSupported && function(config3) {
|
|
202264
|
-
return new Promise(function dispatchXhrRequest(
|
|
202264
|
+
return new Promise(function dispatchXhrRequest(resolve38, reject) {
|
|
202265
202265
|
const _config = resolveConfig_default(config3);
|
|
202266
202266
|
let requestData = _config.data;
|
|
202267
202267
|
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
@@ -202295,7 +202295,7 @@ var xhr_default = isXHRAdapterSupported && function(config3) {
|
|
|
202295
202295
|
request
|
|
202296
202296
|
};
|
|
202297
202297
|
settle(function _resolve(value) {
|
|
202298
|
-
|
|
202298
|
+
resolve38(value);
|
|
202299
202299
|
done();
|
|
202300
202300
|
}, function _reject(err) {
|
|
202301
202301
|
reject(err);
|
|
@@ -202638,8 +202638,8 @@ var fetch_default = isFetchSupported && (async (config3) => {
|
|
|
202638
202638
|
responseType = responseType || "text";
|
|
202639
202639
|
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config3);
|
|
202640
202640
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
202641
|
-
return await new Promise((
|
|
202642
|
-
settle(
|
|
202641
|
+
return await new Promise((resolve38, reject) => {
|
|
202642
|
+
settle(resolve38, reject, {
|
|
202643
202643
|
data: responseData,
|
|
202644
202644
|
headers: AxiosHeaders_default.from(response.headers),
|
|
202645
202645
|
status: response.status,
|
|
@@ -203005,8 +203005,8 @@ var CancelToken = class _CancelToken {
|
|
|
203005
203005
|
throw new TypeError("executor must be a function.");
|
|
203006
203006
|
}
|
|
203007
203007
|
let resolvePromise;
|
|
203008
|
-
this.promise = new Promise(function promiseExecutor(
|
|
203009
|
-
resolvePromise =
|
|
203008
|
+
this.promise = new Promise(function promiseExecutor(resolve38) {
|
|
203009
|
+
resolvePromise = resolve38;
|
|
203010
203010
|
});
|
|
203011
203011
|
const token = this;
|
|
203012
203012
|
this.promise.then((cancel) => {
|
|
@@ -203019,9 +203019,9 @@ var CancelToken = class _CancelToken {
|
|
|
203019
203019
|
});
|
|
203020
203020
|
this.promise.then = (onfulfilled) => {
|
|
203021
203021
|
let _resolve;
|
|
203022
|
-
const promise = new Promise((
|
|
203023
|
-
token.subscribe(
|
|
203024
|
-
_resolve =
|
|
203022
|
+
const promise = new Promise((resolve38) => {
|
|
203023
|
+
token.subscribe(resolve38);
|
|
203024
|
+
_resolve = resolve38;
|
|
203025
203025
|
}).then(onfulfilled);
|
|
203026
203026
|
promise.cancel = function reject() {
|
|
203027
203027
|
token.unsubscribe(_resolve);
|
|
@@ -203350,8 +203350,8 @@ var axiosRetry = (axiosInstance, defaultOptions2) => {
|
|
|
203350
203350
|
}
|
|
203351
203351
|
config3.transformRequest = [(data2) => data2];
|
|
203352
203352
|
await onRetry(currentState.retryCount, error, config3);
|
|
203353
|
-
return new Promise((
|
|
203354
|
-
setTimeout(() =>
|
|
203353
|
+
return new Promise((resolve38) => {
|
|
203354
|
+
setTimeout(() => resolve38(axiosInstance(config3)), delay);
|
|
203355
203355
|
});
|
|
203356
203356
|
}
|
|
203357
203357
|
await handleMaxRetryTimesExceeded(currentState, error);
|
|
@@ -208334,10 +208334,10 @@ var Minipass = class extends EventEmitter2 {
|
|
|
208334
208334
|
* Return a void Promise that resolves once the stream ends.
|
|
208335
208335
|
*/
|
|
208336
208336
|
async promise() {
|
|
208337
|
-
return new Promise((
|
|
208337
|
+
return new Promise((resolve38, reject) => {
|
|
208338
208338
|
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
208339
208339
|
this.on("error", (er) => reject(er));
|
|
208340
|
-
this.on("end", () =>
|
|
208340
|
+
this.on("end", () => resolve38());
|
|
208341
208341
|
});
|
|
208342
208342
|
}
|
|
208343
208343
|
/**
|
|
@@ -208361,7 +208361,7 @@ var Minipass = class extends EventEmitter2 {
|
|
|
208361
208361
|
return Promise.resolve({ done: false, value: res });
|
|
208362
208362
|
if (this[EOF])
|
|
208363
208363
|
return stop();
|
|
208364
|
-
let
|
|
208364
|
+
let resolve38;
|
|
208365
208365
|
let reject;
|
|
208366
208366
|
const onerr = (er) => {
|
|
208367
208367
|
this.off("data", ondata);
|
|
@@ -208375,19 +208375,19 @@ var Minipass = class extends EventEmitter2 {
|
|
|
208375
208375
|
this.off("end", onend);
|
|
208376
208376
|
this.off(DESTROYED, ondestroy);
|
|
208377
208377
|
this.pause();
|
|
208378
|
-
|
|
208378
|
+
resolve38({ value, done: !!this[EOF] });
|
|
208379
208379
|
};
|
|
208380
208380
|
const onend = () => {
|
|
208381
208381
|
this.off("error", onerr);
|
|
208382
208382
|
this.off("data", ondata);
|
|
208383
208383
|
this.off(DESTROYED, ondestroy);
|
|
208384
208384
|
stop();
|
|
208385
|
-
|
|
208385
|
+
resolve38({ done: true, value: void 0 });
|
|
208386
208386
|
};
|
|
208387
208387
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
208388
208388
|
return new Promise((res2, rej) => {
|
|
208389
208389
|
reject = rej;
|
|
208390
|
-
|
|
208390
|
+
resolve38 = res2;
|
|
208391
208391
|
this.once(DESTROYED, ondestroy);
|
|
208392
208392
|
this.once("error", onerr);
|
|
208393
208393
|
this.once("end", onend);
|
|
@@ -209357,9 +209357,9 @@ var PathBase = class {
|
|
|
209357
209357
|
if (this.#asyncReaddirInFlight) {
|
|
209358
209358
|
await this.#asyncReaddirInFlight;
|
|
209359
209359
|
} else {
|
|
209360
|
-
let
|
|
209360
|
+
let resolve38 = () => {
|
|
209361
209361
|
};
|
|
209362
|
-
this.#asyncReaddirInFlight = new Promise((res) =>
|
|
209362
|
+
this.#asyncReaddirInFlight = new Promise((res) => resolve38 = res);
|
|
209363
209363
|
try {
|
|
209364
209364
|
for (const e of await this.#fs.promises.readdir(fullpath, {
|
|
209365
209365
|
withFileTypes: true
|
|
@@ -209372,7 +209372,7 @@ var PathBase = class {
|
|
|
209372
209372
|
children2.provisional = 0;
|
|
209373
209373
|
}
|
|
209374
209374
|
this.#asyncReaddirInFlight = void 0;
|
|
209375
|
-
|
|
209375
|
+
resolve38();
|
|
209376
209376
|
}
|
|
209377
209377
|
return children2.slice(0, children2.provisional);
|
|
209378
209378
|
}
|
|
@@ -210434,10 +210434,10 @@ var Ignore = class {
|
|
|
210434
210434
|
ignored(p3) {
|
|
210435
210435
|
const fullpath = p3.fullpath();
|
|
210436
210436
|
const fullpaths = `${fullpath}/`;
|
|
210437
|
-
const
|
|
210438
|
-
const relatives = `${
|
|
210437
|
+
const relative17 = p3.relative() || ".";
|
|
210438
|
+
const relatives = `${relative17}/`;
|
|
210439
210439
|
for (const m4 of this.relative) {
|
|
210440
|
-
if (m4.match(
|
|
210440
|
+
if (m4.match(relative17) || m4.match(relatives))
|
|
210441
210441
|
return true;
|
|
210442
210442
|
}
|
|
210443
210443
|
for (const m4 of this.absolute) {
|
|
@@ -210448,9 +210448,9 @@ var Ignore = class {
|
|
|
210448
210448
|
}
|
|
210449
210449
|
childrenIgnored(p3) {
|
|
210450
210450
|
const fullpath = p3.fullpath() + "/";
|
|
210451
|
-
const
|
|
210451
|
+
const relative17 = (p3.relative() || ".") + "/";
|
|
210452
210452
|
for (const m4 of this.relativeChildren) {
|
|
210453
|
-
if (m4.match(
|
|
210453
|
+
if (m4.match(relative17))
|
|
210454
210454
|
return true;
|
|
210455
210455
|
}
|
|
210456
210456
|
for (const m4 of this.absoluteChildren) {
|
|
@@ -211424,12 +211424,12 @@ ${stderr}`) ? em.slice(0, -stderr.length - 1) : em}`);
|
|
|
211424
211424
|
logger[logLevel](`stderr: ${stderr}`);
|
|
211425
211425
|
}
|
|
211426
211426
|
async function execNeverFail2(cmd, dir, options) {
|
|
211427
|
-
return new Promise((
|
|
211427
|
+
return new Promise((resolve38) => {
|
|
211428
211428
|
let args2;
|
|
211429
211429
|
if (typeof cmd !== "string")
|
|
211430
211430
|
[cmd, ...args2] = cmd;
|
|
211431
211431
|
const childProcess = execFile2(cmd, args2, { ...options, cwd: dir, maxBuffer: 1024 * 1024 * 1024, shell: args2 === void 0 }, (error, stdout, stderr) => {
|
|
211432
|
-
|
|
211432
|
+
resolve38({ error, stdout, stderr });
|
|
211433
211433
|
});
|
|
211434
211434
|
if (options?.pipe) {
|
|
211435
211435
|
childProcess.stdout?.on("data", (data2) => {
|
|
@@ -213439,48 +213439,118 @@ var NuGetSocketUpgradeManager = class {
|
|
|
213439
213439
|
};
|
|
213440
213440
|
|
|
213441
213441
|
// ../fixing-management/src/fixing-management/rust/cargo-socket-upgrade-manager.ts
|
|
213442
|
-
import { basename as basename7, dirname as
|
|
213443
|
-
var
|
|
213444
|
-
var
|
|
213442
|
+
import { basename as basename7, dirname as dirname11, resolve as resolve23 } from "node:path";
|
|
213443
|
+
var import_toml_eslint_parser3 = __toESM(require_lib10(), 1);
|
|
213444
|
+
var import_picomatch4 = __toESM(require_picomatch2(), 1);
|
|
213445
213445
|
var import_semver3 = __toESM(require_semver2(), 1);
|
|
213446
213446
|
import assert8 from "node:assert";
|
|
213447
|
+
import { readFile as readFile20 } from "node:fs/promises";
|
|
213448
|
+
|
|
213449
|
+
// ../utils/src/cargo-utils.ts
|
|
213450
|
+
var import_toml_eslint_parser2 = __toESM(require_lib10(), 1);
|
|
213451
|
+
var import_picomatch3 = __toESM(require_picomatch2(), 1);
|
|
213447
213452
|
import { readFile as readFile19 } from "node:fs/promises";
|
|
213453
|
+
import { dirname as dirname10, relative as relative9, resolve as resolve22 } from "node:path";
|
|
213454
|
+
async function getCargoTomlFilesForCargoLockFile(rootDir, cargoLockFile, cargoTomlFiles) {
|
|
213455
|
+
const lockDir = dirname10(cargoLockFile);
|
|
213456
|
+
const rootTomlContent = await readFile19(resolve22(rootDir, lockDir, "Cargo.toml"), "utf-8");
|
|
213457
|
+
const { ast } = (0, import_toml_eslint_parser2.parseForESLint)(rootTomlContent);
|
|
213458
|
+
for (const node of ast.body[0].body) {
|
|
213459
|
+
if (node.type !== "TOMLTable") continue;
|
|
213460
|
+
if (node.resolvedKey.join(".") !== "workspace") continue;
|
|
213461
|
+
const memberMatchers = [];
|
|
213462
|
+
const excludeMatchers = [];
|
|
213463
|
+
for (const kvPair of node.body) {
|
|
213464
|
+
if (kvPair.type !== "TOMLKeyValue") continue;
|
|
213465
|
+
const key = kvPair.key.keys.map((k) => k.type === "TOMLBare" ? k.name : k.value).filter((name) => name !== null).join(".");
|
|
213466
|
+
if (key === "members" && kvPair.value.type === "TOMLArray") {
|
|
213467
|
+
for (const element of kvPair.value.elements) {
|
|
213468
|
+
if (element.type === "TOMLValue" && element.kind === "string") {
|
|
213469
|
+
memberMatchers.push((0, import_picomatch3.default)(element.value));
|
|
213470
|
+
}
|
|
213471
|
+
}
|
|
213472
|
+
} else if (key === "exclude" && kvPair.value.type === "TOMLArray") {
|
|
213473
|
+
for (const element of kvPair.value.elements) {
|
|
213474
|
+
if (element.type === "TOMLValue" && element.kind === "string") {
|
|
213475
|
+
excludeMatchers.push((0, import_picomatch3.default)(element.value));
|
|
213476
|
+
}
|
|
213477
|
+
}
|
|
213478
|
+
}
|
|
213479
|
+
}
|
|
213480
|
+
return cargoTomlFiles.filter((cargoTomlFile) => {
|
|
213481
|
+
const memberDir = relative9(lockDir, dirname10(cargoTomlFile));
|
|
213482
|
+
return memberMatchers.some((matcher) => matcher(memberDir)) && !excludeMatchers.some((matcher) => matcher(memberDir));
|
|
213483
|
+
});
|
|
213484
|
+
}
|
|
213485
|
+
return cargoTomlFiles.filter((cargoTomlFile) => dirname10(cargoTomlFile) === lockDir);
|
|
213486
|
+
}
|
|
213487
|
+
|
|
213488
|
+
// ../fixing-management/src/fixing-management/rust/cargo-socket-upgrade-manager.ts
|
|
213448
213489
|
var CargoSocketUpgradeManager = class {
|
|
213449
213490
|
constructor(rootDir) {
|
|
213450
213491
|
this.rootDir = rootDir;
|
|
213451
213492
|
}
|
|
213452
|
-
cargoTomlMatcher = (0,
|
|
213453
|
-
cargoLockMatcher = (0,
|
|
213493
|
+
cargoTomlMatcher = (0, import_picomatch4.default)("Cargo.toml");
|
|
213494
|
+
cargoLockMatcher = (0, import_picomatch4.default)("Cargo.lock");
|
|
213454
213495
|
async applySocketArtifactUpgrades(ctxt) {
|
|
213455
|
-
const
|
|
213496
|
+
const tomlFiles = ctxt.manifestFiles.filter((mf) => this.cargoTomlMatcher(basename7(mf)));
|
|
213497
|
+
const lockFiles = ctxt.manifestFiles.filter((mf) => this.cargoLockMatcher(basename7(mf)));
|
|
213498
|
+
const tomlToLock = /* @__PURE__ */ new Map();
|
|
213499
|
+
await asyncForEach(lockFiles, async (lockFile) => {
|
|
213500
|
+
const tomlFilesForLockFile = await getCargoTomlFilesForCargoLockFile(this.rootDir, lockFile, tomlFiles);
|
|
213501
|
+
for (const tomlFile of tomlFilesForLockFile) {
|
|
213502
|
+
tomlToLock.set(tomlFile, lockFile);
|
|
213503
|
+
}
|
|
213504
|
+
});
|
|
213505
|
+
const lockfileToArtifacts = {};
|
|
213506
|
+
const patches = await asyncFlatMap(Array.from(ctxt.upgrades), async ([idx, upgradeVersion]) => {
|
|
213456
213507
|
const artifact = ctxt.artifacts[idx];
|
|
213457
213508
|
assert8(artifact.name);
|
|
213458
213509
|
assert8(artifact.version);
|
|
213459
|
-
const
|
|
213460
|
-
|
|
213461
|
-
directManifestFiles.filter((manifestFile) => this.cargoTomlMatcher(basename7(manifestFile))),
|
|
213462
|
-
async (manifestFile) => this.handleCargoToml(manifestFile, idx, upgradeVersion, ctxt)
|
|
213510
|
+
const directCargoTomls = new Set(
|
|
213511
|
+
artifact.manifestFiles?.map((ref) => ref.file).filter((manifestFile) => this.cargoTomlMatcher(basename7(manifestFile))) ?? []
|
|
213463
213512
|
);
|
|
213464
|
-
|
|
213465
|
-
const lockPatches = await asyncFlatMap(
|
|
213466
|
-
ctxt.manifestFiles.filter((mf) => this.cargoLockMatcher(basename7(mf))),
|
|
213467
|
-
async (lockFile) => await asyncFlatMap(
|
|
213513
|
+
const directPatches = await asyncFlatMap(
|
|
213468
213514
|
Array.from(ctxt.upgrades),
|
|
213469
|
-
async ([
|
|
213470
|
-
|
|
213471
|
-
|
|
213472
|
-
|
|
213473
|
-
|
|
213474
|
-
|
|
213475
|
-
|
|
213515
|
+
async ([idx2, upgradeVersion2]) => await asyncFlatMap(Array.from(directCargoTomls), async (cargoToml) => {
|
|
213516
|
+
const patches2 = await this.handleCargoToml(
|
|
213517
|
+
cargoToml,
|
|
213518
|
+
idx2,
|
|
213519
|
+
upgradeVersion2,
|
|
213520
|
+
ctxt
|
|
213521
|
+
);
|
|
213522
|
+
const cargoLock = tomlToLock.get(cargoToml);
|
|
213523
|
+
if (cargoLock !== void 0) {
|
|
213524
|
+
(lockfileToArtifacts[cargoLock] ??= []).push(idx2);
|
|
213525
|
+
patches2.push(...await this.handleCargoLock(cargoLock, idx2, upgradeVersion2, ctxt));
|
|
213526
|
+
}
|
|
213527
|
+
return patches2;
|
|
213528
|
+
})
|
|
213529
|
+
);
|
|
213530
|
+
const ancestorCargoTomls = i(
|
|
213531
|
+
artifact.toplevelAncestors?.flatMap(
|
|
213532
|
+
(ancestorId) => ctxt.artifacts.find((a4) => a4.id === ancestorId)?.manifestFiles?.map((m4) => m4.file).filter((manifestFile) => this.cargoTomlMatcher(basename7(manifestFile))).filter((cargoToml) => !directCargoTomls.has(cargoToml)) ?? []
|
|
213533
|
+
) ?? []
|
|
213534
|
+
);
|
|
213535
|
+
const transitivePatches = await asyncFlatMap(ancestorCargoTomls, async (cargoToml) => {
|
|
213536
|
+
const cargoLock = tomlToLock.get(cargoToml);
|
|
213537
|
+
if (cargoLock !== void 0) {
|
|
213538
|
+
(lockfileToArtifacts[cargoLock] ??= []).push(idx);
|
|
213539
|
+
return await this.handleCargoLock(cargoLock, idx, upgradeVersion, ctxt);
|
|
213540
|
+
} else {
|
|
213541
|
+
return await this.handleCargoTomlAddDependency(cargoToml, idx, upgradeVersion, ctxt);
|
|
213542
|
+
}
|
|
213543
|
+
});
|
|
213544
|
+
return directPatches.concat(transitivePatches);
|
|
213476
213545
|
});
|
|
213546
|
+
await applyPatches("RUST", this.rootDir, patches, ctxt);
|
|
213477
213547
|
await asyncForEach(Object.entries(lockfileToArtifacts), async ([file, artifacts]) => {
|
|
213478
|
-
const { error } = await execNeverFail(cmdt`cargo fetch`,
|
|
213548
|
+
const { error } = await execNeverFail(cmdt`cargo fetch`, dirname11(resolve23(this.rootDir, file)));
|
|
213479
213549
|
if (error) {
|
|
213480
213550
|
ctxt.statusUpdater?.({
|
|
213481
213551
|
status: "error",
|
|
213482
213552
|
file,
|
|
213483
|
-
artifacts,
|
|
213553
|
+
artifacts: i(artifacts),
|
|
213484
213554
|
message: `Failed to finalize lockfile fixes -- error during 'cargo fetch': ${error.message}`
|
|
213485
213555
|
});
|
|
213486
213556
|
}
|
|
@@ -213490,9 +213560,9 @@ var CargoSocketUpgradeManager = class {
|
|
|
213490
213560
|
* Handle Cargo.toml file updates for direct dependencies
|
|
213491
213561
|
*/
|
|
213492
213562
|
async handleCargoToml(tomlFile, idx, upgradeVersion, ctxt) {
|
|
213493
|
-
const fullPath =
|
|
213494
|
-
const content = await
|
|
213495
|
-
const { ast } = (0,
|
|
213563
|
+
const fullPath = resolve23(this.rootDir, tomlFile);
|
|
213564
|
+
const content = await readFile20(fullPath, "utf-8");
|
|
213565
|
+
const { ast } = (0, import_toml_eslint_parser3.parseForESLint)(content);
|
|
213496
213566
|
const artifact = ctxt.artifacts[idx];
|
|
213497
213567
|
assert8(artifact.name);
|
|
213498
213568
|
assert8(artifact.version);
|
|
@@ -213549,35 +213619,33 @@ var CargoSocketUpgradeManager = class {
|
|
|
213549
213619
|
*/
|
|
213550
213620
|
async handleCargoLock(lockFile, idx, upgradeVersion, ctxt) {
|
|
213551
213621
|
const patches = [];
|
|
213552
|
-
const fullPath =
|
|
213622
|
+
const fullPath = resolve23(this.rootDir, lockFile);
|
|
213553
213623
|
const artifact = ctxt.artifacts[idx];
|
|
213554
213624
|
try {
|
|
213555
|
-
const content = await
|
|
213556
|
-
const { ast } = (0,
|
|
213625
|
+
const content = await readFile20(fullPath, "utf-8");
|
|
213626
|
+
const { ast } = (0, import_toml_eslint_parser3.parseForESLint)(content);
|
|
213557
213627
|
for (const node of ast.body[0].body) {
|
|
213558
213628
|
if (node.type === "TOMLTable" && node.kind === "array" && node.resolvedKey[0] === "package") {
|
|
213559
|
-
let
|
|
213560
|
-
let
|
|
213561
|
-
let
|
|
213562
|
-
let checksumNode = null;
|
|
213629
|
+
let nameNode;
|
|
213630
|
+
let versionNode;
|
|
213631
|
+
let checksumNode;
|
|
213563
213632
|
for (const kvPair of node.body) {
|
|
213564
213633
|
if (kvPair.type !== "TOMLKeyValue") continue;
|
|
213565
213634
|
const key = this.getKeyName(kvPair.key);
|
|
213566
213635
|
if (key === "name" && kvPair.value.type === "TOMLValue" && kvPair.value.kind === "string") {
|
|
213567
|
-
|
|
213636
|
+
nameNode = kvPair.value;
|
|
213568
213637
|
} else if (key === "version" && kvPair.value.type === "TOMLValue" && kvPair.value.kind === "string") {
|
|
213569
|
-
packageVersion = kvPair.value.value;
|
|
213570
213638
|
versionNode = kvPair.value;
|
|
213571
213639
|
} else if (key === "checksum" && kvPair.value.type === "TOMLValue" && kvPair.value.kind === "string") {
|
|
213572
213640
|
checksumNode = kvPair.value;
|
|
213573
213641
|
}
|
|
213574
213642
|
}
|
|
213575
|
-
if (
|
|
213643
|
+
if (nameNode && versionNode && nameNode.value === artifact.name && versionNode.value === artifact.version) {
|
|
213576
213644
|
patches.push({
|
|
213577
213645
|
file: lockFile,
|
|
213578
213646
|
offset: versionNode.range[0] + 1,
|
|
213579
213647
|
// Skip opening quote
|
|
213580
|
-
length:
|
|
213648
|
+
length: versionNode.value.length,
|
|
213581
213649
|
artifacts: [idx],
|
|
213582
213650
|
text: upgradeVersion
|
|
213583
213651
|
});
|
|
@@ -213680,6 +213748,42 @@ var CargoSocketUpgradeManager = class {
|
|
|
213680
213748
|
versionMatches(tomlVersion, resolvedVersion) {
|
|
213681
213749
|
return import_semver3.default.satisfies(resolvedVersion, /^\d/.test(tomlVersion) ? `^${tomlVersion}` : tomlVersion);
|
|
213682
213750
|
}
|
|
213751
|
+
/**
|
|
213752
|
+
* Add a new dependency to a Cargo.toml file
|
|
213753
|
+
*/
|
|
213754
|
+
async handleCargoTomlAddDependency(tomlFile, idx, upgradeVersion, ctxt) {
|
|
213755
|
+
const fullPath = resolve23(this.rootDir, tomlFile);
|
|
213756
|
+
const content = await readFile20(fullPath, "utf-8");
|
|
213757
|
+
const { ast } = (0, import_toml_eslint_parser3.parseForESLint)(content);
|
|
213758
|
+
const artifact = ctxt.artifacts[idx];
|
|
213759
|
+
assert8(artifact.name);
|
|
213760
|
+
assert8(artifact.version);
|
|
213761
|
+
const dependenciesSection = ast.body[0].body.find(
|
|
213762
|
+
(node) => node.type === "TOMLTable" && node.resolvedKey.join(".") === "dependencies"
|
|
213763
|
+
);
|
|
213764
|
+
if (!dependenciesSection) {
|
|
213765
|
+
ctxt.statusUpdater?.({
|
|
213766
|
+
status: "error",
|
|
213767
|
+
file: tomlFile,
|
|
213768
|
+
artifacts: [idx],
|
|
213769
|
+
message: "No [dependencies] section found in Cargo.toml"
|
|
213770
|
+
});
|
|
213771
|
+
return [];
|
|
213772
|
+
}
|
|
213773
|
+
const versionString = this.createNewVersionString("1.0.0", upgradeVersion, ctxt.rangeStyle);
|
|
213774
|
+
const newDependencyLine = `${artifact.name} = "${versionString}"`;
|
|
213775
|
+
const lastElement = dependenciesSection.body[dependenciesSection.body.length - 1];
|
|
213776
|
+
const insertPosition = lastElement ? lastElement.range[1] : dependenciesSection.range[1];
|
|
213777
|
+
return [
|
|
213778
|
+
{
|
|
213779
|
+
file: tomlFile,
|
|
213780
|
+
offset: insertPosition,
|
|
213781
|
+
artifacts: [idx],
|
|
213782
|
+
text: `
|
|
213783
|
+
${newDependencyLine}`
|
|
213784
|
+
}
|
|
213785
|
+
];
|
|
213786
|
+
}
|
|
213683
213787
|
/**
|
|
213684
213788
|
* Get the key name from a TOML key node
|
|
213685
213789
|
*/
|
|
@@ -213689,10 +213793,10 @@ var CargoSocketUpgradeManager = class {
|
|
|
213689
213793
|
};
|
|
213690
213794
|
|
|
213691
213795
|
// ../fixing-management/src/fixing-management/pip/pip-socket-upgrade-manager.ts
|
|
213692
|
-
import { resolve as
|
|
213693
|
-
var
|
|
213796
|
+
import { resolve as resolve24 } from "node:path";
|
|
213797
|
+
var import_picomatch5 = __toESM(require_picomatch2(), 1);
|
|
213694
213798
|
import assert9 from "node:assert";
|
|
213695
|
-
import { readFile as
|
|
213799
|
+
import { readFile as readFile21 } from "node:fs/promises";
|
|
213696
213800
|
var import_pip_requirements_js = __toESM(require_dist11(), 1);
|
|
213697
213801
|
var PipSocketUpgradeManager = class {
|
|
213698
213802
|
constructor(rootDir) {
|
|
@@ -213700,7 +213804,7 @@ var PipSocketUpgradeManager = class {
|
|
|
213700
213804
|
}
|
|
213701
213805
|
// glob pattern taken from depscan/workspaces/pipeline/src/glob-patterns.ts
|
|
213702
213806
|
// Note, depscan glob pattern router uses recursive matching, we instead do optional prefix `(**/)?`
|
|
213703
|
-
requirementsMatcher = (0,
|
|
213807
|
+
requirementsMatcher = (0, import_picomatch5.default)("(**/)?{requirements{[-_.]frozen,{[-_]*,}}.txt,requirements/*.txt}");
|
|
213704
213808
|
async applySocketArtifactUpgrades(ctxt) {
|
|
213705
213809
|
const patches = await asyncFlatMap(Array.from(ctxt.upgrades), async ([idx, upgradeVersion]) => {
|
|
213706
213810
|
const artifact = ctxt.artifacts[idx];
|
|
@@ -213751,7 +213855,7 @@ var PipSocketUpgradeManager = class {
|
|
|
213751
213855
|
* Handle requirements.txt file updates
|
|
213752
213856
|
*/
|
|
213753
213857
|
async handleRequirementsDirect(ref, idx, upgradeVersion, ctxt) {
|
|
213754
|
-
const fullPath =
|
|
213858
|
+
const fullPath = resolve24(this.rootDir, ref.file);
|
|
213755
213859
|
const artifact = ctxt.artifacts[idx];
|
|
213756
213860
|
assert9(artifact.name);
|
|
213757
213861
|
assert9(artifact.version);
|
|
@@ -213768,7 +213872,7 @@ var PipSocketUpgradeManager = class {
|
|
|
213768
213872
|
const refStart = ref.start;
|
|
213769
213873
|
const refEnd = ref.end;
|
|
213770
213874
|
try {
|
|
213771
|
-
const content = await
|
|
213875
|
+
const content = await readFile21(fullPath, "utf-8");
|
|
213772
213876
|
const requirements = (0, import_pip_requirements_js.parsePipRequirementsFileLoosely)(content, { includeLocations: true });
|
|
213773
213877
|
const foundRequirement = requirements.filter((req) => req.data.type === "ProjectName").find((req) => refStart <= req.location.startIdx && req.location.endIdx <= refEnd);
|
|
213774
213878
|
if (foundRequirement) {
|
|
@@ -213873,13 +213977,13 @@ var PipSocketUpgradeManager = class {
|
|
|
213873
213977
|
* Handle requirements.txt file updates
|
|
213874
213978
|
*/
|
|
213875
213979
|
async handleRequirementsTransitive(requirementsFile, idx, upgradeVersion, ctxt) {
|
|
213876
|
-
const fullPath =
|
|
213980
|
+
const fullPath = resolve24(this.rootDir, requirementsFile);
|
|
213877
213981
|
const artifact = ctxt.artifacts[idx];
|
|
213878
213982
|
assert9(artifact.name);
|
|
213879
213983
|
assert9(artifact.version);
|
|
213880
213984
|
const patches = [];
|
|
213881
213985
|
try {
|
|
213882
|
-
const content = await
|
|
213986
|
+
const content = await readFile21(fullPath, "utf-8");
|
|
213883
213987
|
const newText = `${artifact.name}==${upgradeVersion}`;
|
|
213884
213988
|
patches.push({
|
|
213885
213989
|
file: requirementsFile,
|
|
@@ -213964,11 +214068,11 @@ import { execFileSync } from "child_process";
|
|
|
213964
214068
|
|
|
213965
214069
|
// ../docker-management/src/constants.ts
|
|
213966
214070
|
var import_lodash7 = __toESM(require_lodash(), 1);
|
|
213967
|
-
import { resolve as
|
|
214071
|
+
import { resolve as resolve26 } from "path";
|
|
213968
214072
|
|
|
213969
214073
|
// ../utils/dist/constants.js
|
|
213970
214074
|
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
213971
|
-
import { dirname as
|
|
214075
|
+
import { dirname as dirname12, join as join14 } from "node:path";
|
|
213972
214076
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
213973
214077
|
|
|
213974
214078
|
// ../utils/dist/file-utils.js
|
|
@@ -213976,14 +214080,14 @@ var import_lodash5 = __toESM(require_lodash(), 1);
|
|
|
213976
214080
|
var import_micromatch = __toESM(require_micromatch(), 1);
|
|
213977
214081
|
import { existsSync as existsSync13 } from "fs";
|
|
213978
214082
|
import { access as access2, cp, readdir as readdir3, stat as stat2 } from "fs/promises";
|
|
213979
|
-
import { basename as basename8, join as join13, relative as
|
|
214083
|
+
import { basename as basename8, join as join13, relative as relative10, resolve as resolve25 } from "path";
|
|
213980
214084
|
var { uniq } = import_lodash5.default;
|
|
213981
214085
|
var { isMatch } = import_micromatch.default;
|
|
213982
214086
|
function* parents(dir) {
|
|
213983
214087
|
let [curr, last2] = [dir, dir];
|
|
213984
214088
|
do {
|
|
213985
214089
|
yield curr;
|
|
213986
|
-
[last2, curr] = [curr,
|
|
214090
|
+
[last2, curr] = [curr, resolve25(curr, "..")];
|
|
213987
214091
|
} while (curr !== last2);
|
|
213988
214092
|
return void 0;
|
|
213989
214093
|
}
|
|
@@ -213996,7 +214100,7 @@ function findParent(dir, predicate, wholePath) {
|
|
|
213996
214100
|
// ../utils/dist/constants.js
|
|
213997
214101
|
var { once: once2 } = import_lodash6.default;
|
|
213998
214102
|
var fileName = fileURLToPath3(import.meta.url);
|
|
213999
|
-
var dirName =
|
|
214103
|
+
var dirName = dirname12(fileName);
|
|
214000
214104
|
var COANA_ROOT = once2(() => {
|
|
214001
214105
|
const coanaRoot = process.env.COANA_ROOT ?? findParent(dirName, (d4) => ["coana-package-manager", "coana"].includes(d4));
|
|
214002
214106
|
if (!coanaRoot) {
|
|
@@ -214014,7 +214118,7 @@ var COANA_REPOS_PATH = once2(() => {
|
|
|
214014
214118
|
// ../docker-management/src/constants.ts
|
|
214015
214119
|
var { once: once3 } = import_lodash7.default;
|
|
214016
214120
|
var DOCKERFILES_ROOT = once3(() => {
|
|
214017
|
-
return
|
|
214121
|
+
return resolve26(COANA_ROOT(), "packages", "docker-management", "docker");
|
|
214018
214122
|
});
|
|
214019
214123
|
var REPOSITORY = process.env.DOCKER_REPOSITORY ?? "coanapublic.azurecr.io";
|
|
214020
214124
|
var getImageTag = () => {
|
|
@@ -214596,7 +214700,7 @@ function utilFormatter2() {
|
|
|
214596
214700
|
}
|
|
214597
214701
|
|
|
214598
214702
|
// ../web-compat-utils/dist/logger-singleton.js
|
|
214599
|
-
import { readFile as
|
|
214703
|
+
import { readFile as readFile22 } from "fs/promises";
|
|
214600
214704
|
var CLILogger2 = class {
|
|
214601
214705
|
logger = console;
|
|
214602
214706
|
writeStream;
|
|
@@ -214654,20 +214758,20 @@ var CLILogger2 = class {
|
|
|
214654
214758
|
* in errors that are swallowed by the 'error' event listener in this function.
|
|
214655
214759
|
*/
|
|
214656
214760
|
async finish() {
|
|
214657
|
-
return new Promise((
|
|
214761
|
+
return new Promise((resolve38) => {
|
|
214658
214762
|
if (this.logger instanceof Console2 || this.logger.writableEnded) {
|
|
214659
|
-
|
|
214763
|
+
resolve38();
|
|
214660
214764
|
return;
|
|
214661
214765
|
}
|
|
214662
214766
|
this.logger.on("error", () => {
|
|
214663
214767
|
});
|
|
214664
214768
|
this.logger.end(() => {
|
|
214665
214769
|
if (!this.writeStream || this.writeStream.writableEnded) {
|
|
214666
|
-
|
|
214770
|
+
resolve38();
|
|
214667
214771
|
return;
|
|
214668
214772
|
}
|
|
214669
214773
|
if (!this.writeStream.writableEnded) {
|
|
214670
|
-
this.writeStream.end(
|
|
214774
|
+
this.writeStream.end(resolve38);
|
|
214671
214775
|
}
|
|
214672
214776
|
});
|
|
214673
214777
|
});
|
|
@@ -214676,7 +214780,7 @@ var CLILogger2 = class {
|
|
|
214676
214780
|
await this.finish();
|
|
214677
214781
|
let logContent;
|
|
214678
214782
|
try {
|
|
214679
|
-
logContent = await
|
|
214783
|
+
logContent = await readFile22(logFilePath, "utf-8");
|
|
214680
214784
|
} catch (e) {
|
|
214681
214785
|
console.error("Error reading log file", e);
|
|
214682
214786
|
}
|
|
@@ -214721,13 +214825,13 @@ async function detectVariantMaven(projectDir) {
|
|
|
214721
214825
|
// ../docker-management/src/maven/gradle-version-detector.ts
|
|
214722
214826
|
import { existsSync as existsSync14 } from "fs";
|
|
214723
214827
|
import { join as join16 } from "path";
|
|
214724
|
-
import { readFile as
|
|
214828
|
+
import { readFile as readFile23 } from "fs/promises";
|
|
214725
214829
|
async function detectVariantGradle(projectDir) {
|
|
214726
214830
|
return sanitizeJvmVariant("GRADLE", projectDir, await detect(projectDir));
|
|
214727
214831
|
}
|
|
214728
214832
|
async function detect(projectDir) {
|
|
214729
214833
|
const gradleWrapperPropertiesPath = join16(projectDir, "gradle", "wrapper", "gradle-wrapper.properties");
|
|
214730
|
-
const gradleWrapperProperties = existsSync14(gradleWrapperPropertiesPath) ? (await
|
|
214834
|
+
const gradleWrapperProperties = existsSync14(gradleWrapperPropertiesPath) ? (await readFile23(gradleWrapperPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
214731
214835
|
if (!gradleWrapperProperties) return void 0;
|
|
214732
214836
|
const distributionUrlRegex = /.*gradle-(\d+(\.\d+(\.\d+)?)?)/;
|
|
214733
214837
|
for (const prop2 of gradleWrapperProperties) {
|
|
@@ -214743,13 +214847,13 @@ async function detect(projectDir) {
|
|
|
214743
214847
|
// ../docker-management/src/maven/sbt-version-detector.ts
|
|
214744
214848
|
import { existsSync as existsSync15 } from "fs";
|
|
214745
214849
|
import { join as join17 } from "path";
|
|
214746
|
-
import { readFile as
|
|
214850
|
+
import { readFile as readFile24 } from "fs/promises";
|
|
214747
214851
|
async function detectVariantSbt(projectDir) {
|
|
214748
214852
|
return sanitizeJvmVariant("SBT", projectDir, await detect2(projectDir));
|
|
214749
214853
|
}
|
|
214750
214854
|
async function detect2(projectDir) {
|
|
214751
214855
|
const sbtBuildPropertiesPath = join17(projectDir, "project", "build.properties");
|
|
214752
|
-
const sbtBuildProperties = existsSync15(sbtBuildPropertiesPath) ? (await
|
|
214856
|
+
const sbtBuildProperties = existsSync15(sbtBuildPropertiesPath) ? (await readFile24(sbtBuildPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
214753
214857
|
if (!sbtBuildProperties) return void 0;
|
|
214754
214858
|
for (const prop2 of sbtBuildProperties) {
|
|
214755
214859
|
const [key, value] = prop2.split("=");
|
|
@@ -214863,23 +214967,23 @@ async function findReachabilityAnalyzersDockerImage(ecosystem) {
|
|
|
214863
214967
|
// ../other-modules-communicator/src/other-modules-communicator.ts
|
|
214864
214968
|
var import_lodash11 = __toESM(require_lodash(), 1);
|
|
214865
214969
|
import { rmSync } from "fs";
|
|
214866
|
-
import { mkdir, readFile as
|
|
214970
|
+
import { mkdir, readFile as readFile25, writeFile as writeFile8 } from "fs/promises";
|
|
214867
214971
|
import { platform } from "os";
|
|
214868
|
-
import { join as join20, posix as posix2, relative as
|
|
214972
|
+
import { join as join20, posix as posix2, relative as relative12, sep as sep3 } from "path";
|
|
214869
214973
|
|
|
214870
214974
|
// ../utils/src/file-utils.ts
|
|
214871
214975
|
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
214872
214976
|
var import_micromatch2 = __toESM(require_micromatch(), 1);
|
|
214873
214977
|
import { existsSync as existsSync16 } from "fs";
|
|
214874
214978
|
import { access as access3, cp as cp2, readdir as readdir4, stat as stat3 } from "fs/promises";
|
|
214875
|
-
import { basename as basename9, join as join18, relative as
|
|
214979
|
+
import { basename as basename9, join as join18, relative as relative11, resolve as resolve27 } from "path";
|
|
214876
214980
|
var { uniq: uniq2 } = import_lodash8.default;
|
|
214877
214981
|
var { isMatch: isMatch2 } = import_micromatch2.default;
|
|
214878
214982
|
function* parents2(dir) {
|
|
214879
214983
|
let [curr, last2] = [dir, dir];
|
|
214880
214984
|
do {
|
|
214881
214985
|
yield curr;
|
|
214882
|
-
[last2, curr] = [curr,
|
|
214986
|
+
[last2, curr] = [curr, resolve27(curr, "..")];
|
|
214883
214987
|
} while (curr !== last2);
|
|
214884
214988
|
return void 0;
|
|
214885
214989
|
}
|
|
@@ -215116,15 +215220,15 @@ var PACKAGE_MANAGER_TO_SUPPORT2 = n(u3(t2(ecosystemToSupport2), ([_, support]) =
|
|
|
215116
215220
|
|
|
215117
215221
|
// ../other-modules-communicator/src/constants.ts
|
|
215118
215222
|
var import_lodash10 = __toESM(require_lodash(), 1);
|
|
215119
|
-
import { resolve as
|
|
215223
|
+
import { resolve as resolve28 } from "path";
|
|
215120
215224
|
|
|
215121
215225
|
// ../utils/src/constants.ts
|
|
215122
215226
|
var import_lodash9 = __toESM(require_lodash(), 1);
|
|
215123
|
-
import { dirname as
|
|
215227
|
+
import { dirname as dirname13, join as join19 } from "node:path";
|
|
215124
215228
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
215125
215229
|
var { once: once4 } = import_lodash9.default;
|
|
215126
215230
|
var fileName2 = fileURLToPath4(import.meta.url);
|
|
215127
|
-
var dirName2 =
|
|
215231
|
+
var dirName2 = dirname13(fileName2);
|
|
215128
215232
|
var COANA_ROOT2 = once4(() => {
|
|
215129
215233
|
const coanaRoot = process.env.COANA_ROOT ?? findParent2(dirName2, (d4) => ["coana-package-manager", "coana"].includes(d4));
|
|
215130
215234
|
if (!coanaRoot) {
|
|
@@ -215143,10 +215247,10 @@ var REQUIREMENTS_FILES_SEARCH_DEPTH = 2;
|
|
|
215143
215247
|
// ../other-modules-communicator/src/constants.ts
|
|
215144
215248
|
var { once: once5 } = import_lodash10.default;
|
|
215145
215249
|
var PACKAGE_MANAGER_SCRIPT_PATH = once5(() => {
|
|
215146
|
-
return process.env.PACKAGE_MANAGER_SCRIPT_PATH ??
|
|
215250
|
+
return process.env.PACKAGE_MANAGER_SCRIPT_PATH ?? resolve28(COANA_ROOT2(), "packages", "package-management", "dist", "package-management-cli.js");
|
|
215147
215251
|
});
|
|
215148
215252
|
var REACHABILITY_ANALYZERS_SCRIPT_PATH = once5(() => {
|
|
215149
|
-
return process.env.REACHABILITY_ANALYZERS_SCRIPT_PATH ??
|
|
215253
|
+
return process.env.REACHABILITY_ANALYZERS_SCRIPT_PATH ?? resolve28(COANA_ROOT2(), "packages", "reachability-analyzers", "dist", "reachability-analyzers-cli.js");
|
|
215150
215254
|
});
|
|
215151
215255
|
var DOCKER_ENV_WHITE_LIST = [
|
|
215152
215256
|
"GITHUB_",
|
|
@@ -215212,7 +215316,7 @@ var OtherModulesCommunicator = class {
|
|
|
215212
215316
|
}
|
|
215213
215317
|
if (cmd === "getWorkspacePathsMultipleSubprojects")
|
|
215214
215318
|
return `${_cmdStr()}: (${packageManagerName}) ${abbreviateList(subprojects, 10)}`;
|
|
215215
|
-
return `${_cmdStr()}: (${packageManagerName}) ${
|
|
215319
|
+
return `${_cmdStr()}: (${packageManagerName}) ${relative12(this.rootWorkingDir, subprojectPath) || "."}`;
|
|
215216
215320
|
}
|
|
215217
215321
|
getSpinnerTextForReachabilityAnalyzerCommand(cmd, ecosystem, subprojectPath, workspacePath) {
|
|
215218
215322
|
function _cmdStr() {
|
|
@@ -215225,10 +215329,10 @@ var OtherModulesCommunicator = class {
|
|
|
215225
215329
|
return "Running reachability analysis on package registry package";
|
|
215226
215330
|
}
|
|
215227
215331
|
}
|
|
215228
|
-
return `${_cmdStr()}: (${ecosystem}) ${
|
|
215332
|
+
return `${_cmdStr()}: (${ecosystem}) ${relative12(this.rootWorkingDir, join20(subprojectPath, workspacePath)) || "."}`;
|
|
215229
215333
|
}
|
|
215230
215334
|
getProjectPath(subprojectPath) {
|
|
215231
|
-
return this.options.runWithoutDocker ? subprojectPath : posix2.resolve("/project",
|
|
215335
|
+
return this.options.runWithoutDocker ? subprojectPath : posix2.resolve("/project", relative12(this.rootWorkingDir, subprojectPath).replaceAll(sep3, posix2.sep));
|
|
215232
215336
|
}
|
|
215233
215337
|
// options shared between package-management and reachability-analyzers
|
|
215234
215338
|
commonOptions = once6(
|
|
@@ -215288,7 +215392,7 @@ var OtherModulesCommunicator = class {
|
|
|
215288
215392
|
COANA_API_KEY: this.apiKey.type === "present" ? this.apiKey.value : ""
|
|
215289
215393
|
}
|
|
215290
215394
|
);
|
|
215291
|
-
return JSON.parse(await
|
|
215395
|
+
return JSON.parse(await readFile25(outputFilePathThisProcess, "utf-8")).result;
|
|
215292
215396
|
}
|
|
215293
215397
|
async runReachabilityAnalyzerCommand(commandName, ecosystem, subprojectPath, workspacePath, args2, env) {
|
|
215294
215398
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
@@ -215349,7 +215453,7 @@ var OtherModulesCommunicator = class {
|
|
|
215349
215453
|
[...args2, "-o", outputFilePathOtherProcess],
|
|
215350
215454
|
env
|
|
215351
215455
|
);
|
|
215352
|
-
return JSON.parse(await
|
|
215456
|
+
return JSON.parse(await readFile25(outputFilePathThisProcess, "utf-8")).result;
|
|
215353
215457
|
}
|
|
215354
215458
|
async runInDocker(ecosystem, image, entryPoint, commandName, args2, subprojectPath, tmpDir, env = process.env) {
|
|
215355
215459
|
if (!await pullDockerImage(image)) return false;
|
|
@@ -215368,7 +215472,7 @@ var OtherModulesCommunicator = class {
|
|
|
215368
215472
|
"getWorkspacePathsMultipleSubprojects",
|
|
215369
215473
|
packageManagerName,
|
|
215370
215474
|
this.rootWorkingDir,
|
|
215371
|
-
subprojectPaths.map((subprojectPath) =>
|
|
215475
|
+
subprojectPaths.map((subprojectPath) => relative12(this.rootWorkingDir, subprojectPath) || ".")
|
|
215372
215476
|
);
|
|
215373
215477
|
}
|
|
215374
215478
|
async getProvidedArgsForSubproject(subprojectPath, providedOptions) {
|
|
@@ -215495,7 +215599,7 @@ function abbreviateList(items, maxItems) {
|
|
|
215495
215599
|
}
|
|
215496
215600
|
|
|
215497
215601
|
// dist/cli-apply-fix.js
|
|
215498
|
-
import { resolve as
|
|
215602
|
+
import { resolve as resolve29 } from "path";
|
|
215499
215603
|
|
|
215500
215604
|
// ../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-ANXBDSUI.js
|
|
215501
215605
|
var s4 = { done: false, hasNext: false };
|
|
@@ -216006,7 +216110,7 @@ async function applyFix(path2, fixIds, options) {
|
|
|
216006
216110
|
}, (packageManagerName, subprojectPath) => `${packageManagerName}:${subprojectPath}`);
|
|
216007
216111
|
const memoizedGetFixingData = memoize2(async (packageManagerName, subprojectPath) => {
|
|
216008
216112
|
const workspacesWithFixes = memoizedGetWorkspacePathsWithFixes(packageManagerName, subprojectPath);
|
|
216009
|
-
return otherModulesCommunicator.getFixingData(packageManagerName,
|
|
216113
|
+
return otherModulesCommunicator.getFixingData(packageManagerName, resolve29(path2, subprojectPath), workspacesWithFixes);
|
|
216010
216114
|
}, (packageManagerName, subprojectPath) => `${packageManagerName}:${subprojectPath}`);
|
|
216011
216115
|
const memoizedGetFixesFromId = memoize2(async (fix) => {
|
|
216012
216116
|
const { vulnerabilityInstance: v, applyFixUuid } = fix;
|
|
@@ -216070,14 +216174,14 @@ async function verifyFixes(fixes, otherModulesCommunicator, rootPath) {
|
|
|
216070
216174
|
if (pathsForEachFixIdData.length !== new Set(pathsForEachFixIdData).size) {
|
|
216071
216175
|
throw new Error("Multiple fix IDs found for the same subproject, workspace and ecosystem");
|
|
216072
216176
|
}
|
|
216073
|
-
const subprojectsNotFound = uniq3(fixes.filter(({ vulnerabilityInstance: v }) => !existsSync17(
|
|
216177
|
+
const subprojectsNotFound = uniq3(fixes.filter(({ vulnerabilityInstance: v }) => !existsSync17(resolve29(rootPath, v.subprojectPath))).map(({ vulnerabilityInstance: v }) => `${v.subprojectPath}:${v.ecosystem}`));
|
|
216074
216178
|
if (subprojectsNotFound.length > 0) {
|
|
216075
216179
|
throw new Error(`Cannot find the following subprojects: ${subprojectsNotFound.join(", ")}`);
|
|
216076
216180
|
}
|
|
216077
216181
|
const workspacesNotFound = (await asyncFilter(fixes, async ({ vulnerabilityInstance: v }) => {
|
|
216078
216182
|
let workspaces = [];
|
|
216079
216183
|
try {
|
|
216080
|
-
workspaces = await otherModulesCommunicator.getWorkspacePaths(v.packageManagerName,
|
|
216184
|
+
workspaces = await otherModulesCommunicator.getWorkspacePaths(v.packageManagerName, resolve29(rootPath, v.subprojectPath));
|
|
216081
216185
|
} catch (e) {
|
|
216082
216186
|
}
|
|
216083
216187
|
return !workspaces.some((wsPath) => wsPath === v.workspacePath);
|
|
@@ -216869,22 +216973,22 @@ function getVulnerabilitiesFromReport(report) {
|
|
|
216869
216973
|
}
|
|
216870
216974
|
|
|
216871
216975
|
// ../project-management/src/project-management/project-manager.ts
|
|
216872
|
-
import { relative as
|
|
216976
|
+
import { relative as relative14, resolve as resolve33 } from "path";
|
|
216873
216977
|
|
|
216874
216978
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-manager.ts
|
|
216875
216979
|
var import_micromatch3 = __toESM(require_micromatch2(), 1);
|
|
216876
216980
|
import { readdir as readdir6 } from "fs/promises";
|
|
216877
|
-
import { join as join23, relative as
|
|
216981
|
+
import { join as join23, relative as relative13, resolve as resolve32 } from "path";
|
|
216878
216982
|
|
|
216879
216983
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-specs.ts
|
|
216880
216984
|
import { existsSync as existsSync19 } from "fs";
|
|
216881
|
-
import { readdir as readdir5, readFile as
|
|
216985
|
+
import { readdir as readdir5, readFile as readFile28 } from "fs/promises";
|
|
216882
216986
|
import { join as join22, sep as sep4 } from "path";
|
|
216883
216987
|
|
|
216884
216988
|
// ../utils/src/pip-utils.ts
|
|
216885
216989
|
import { existsSync as existsSync18 } from "fs";
|
|
216886
|
-
import { readFile as
|
|
216887
|
-
import { resolve as
|
|
216990
|
+
import { readFile as readFile27 } from "fs/promises";
|
|
216991
|
+
import { resolve as resolve31 } from "path";
|
|
216888
216992
|
import util4 from "util";
|
|
216889
216993
|
|
|
216890
216994
|
// ../utils/src/python-versions-manager.ts
|
|
@@ -216892,8 +216996,8 @@ var import_lodash13 = __toESM(require_lodash(), 1);
|
|
|
216892
216996
|
var import_semver5 = __toESM(require_semver2(), 1);
|
|
216893
216997
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
216894
216998
|
import { constants as constants2 } from "fs";
|
|
216895
|
-
import { access as access4, readFile as
|
|
216896
|
-
import { join as join21, resolve as
|
|
216999
|
+
import { access as access4, readFile as readFile26 } from "fs/promises";
|
|
217000
|
+
import { join as join21, resolve as resolve30 } from "path";
|
|
216897
217001
|
import util3 from "util";
|
|
216898
217002
|
var { once: once7 } = import_lodash13.default;
|
|
216899
217003
|
var systemPython = once7(() => {
|
|
@@ -216911,7 +217015,7 @@ var hasPyenv = once7(async () => !(await execNeverFail("which pyenv")).error);
|
|
|
216911
217015
|
|
|
216912
217016
|
// ../utils/src/pip-utils.ts
|
|
216913
217017
|
async function isSetupPySetuptools(file) {
|
|
216914
|
-
const content = await
|
|
217018
|
+
const content = await readFile27(file, "utf-8");
|
|
216915
217019
|
return content.includes("setup(") && (/^\s*from\s+(?:setuptools|distutils\.core)\s+import\s+.*setup/m.test(content) || /^\s*import\s+(?:setuptools|distutils\.core)/m.test(content));
|
|
216916
217020
|
}
|
|
216917
217021
|
|
|
@@ -216993,7 +217097,7 @@ function packageManagerIfPackageJSONExistsAndValid(packageManager) {
|
|
|
216993
217097
|
if (!existsSync19(join22(projectDir, "package.json"))) return void 0;
|
|
216994
217098
|
const packageJSONPath = join22(projectDir, "package.json");
|
|
216995
217099
|
try {
|
|
216996
|
-
JSON.parse(await
|
|
217100
|
+
JSON.parse(await readFile28(packageJSONPath, "utf-8"));
|
|
216997
217101
|
return packageManager;
|
|
216998
217102
|
} catch (e) {
|
|
216999
217103
|
throw new InvalidProjectFileError(projectDir, "package.json");
|
|
@@ -217042,15 +217146,15 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
217042
217146
|
newProjectDirsToProcess = [];
|
|
217043
217147
|
await asyncForEach([...packageManagerToProjectDirs.entries()], async ([packageManagerName, projectDirs]) => {
|
|
217044
217148
|
newProjectDirsToProcess.push(...projectDirs);
|
|
217045
|
-
const resolvedProjectDirs = projectDirs.map((projectDir) =>
|
|
217149
|
+
const resolvedProjectDirs = projectDirs.map((projectDir) => resolve32(projectDir));
|
|
217046
217150
|
const projectDirToWorkspacePaths = getPackageManagerSupport(packageManagerName).supportsTraditionalSCA ? await this.otherModulesCommunicator.getWorkspacePathsMultiple(packageManagerName, resolvedProjectDirs) : Object.fromEntries(resolvedProjectDirs.map((projectDir) => [projectDir, ["."]]));
|
|
217047
217151
|
for (let [relativeProjectDir, workspacePaths] of Object.entries(projectDirToWorkspacePaths)) {
|
|
217048
|
-
const resolvedProjectDir =
|
|
217152
|
+
const resolvedProjectDir = resolve32(mainProjectDir, relativeProjectDir);
|
|
217049
217153
|
if (config3.includeDirs.length > 0)
|
|
217050
217154
|
workspacePaths = workspacePaths.filter(
|
|
217051
|
-
(workspacePath) => isMatch3(
|
|
217155
|
+
(workspacePath) => isMatch3(relative13(mainProjectDir, join23(resolvedProjectDir, workspacePath)), config3.includeDirs)
|
|
217052
217156
|
);
|
|
217053
|
-
workspacePaths.filter((workspacePath) => workspacePath !== ".").forEach((workspacePath) => projectDirsAlreadyCovered.push(
|
|
217157
|
+
workspacePaths.filter((workspacePath) => workspacePath !== ".").forEach((workspacePath) => projectDirsAlreadyCovered.push(resolve32(resolvedProjectDir, workspacePath)));
|
|
217054
217158
|
if (workspacePaths.length > 0)
|
|
217055
217159
|
subprojects[resolvedProjectDir] = {
|
|
217056
217160
|
packageManagerName,
|
|
@@ -217089,7 +217193,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
217089
217193
|
return typeof packageManagerNameProvider === "function" ? await packageManagerNameProvider(projectDir) : packageManagerNameProvider;
|
|
217090
217194
|
} catch (e) {
|
|
217091
217195
|
if (e instanceof InvalidProjectFileError) {
|
|
217092
|
-
const projectDirRelative =
|
|
217196
|
+
const projectDirRelative = relative13(mainProjectDir, projectDir) || ".";
|
|
217093
217197
|
logger.error(
|
|
217094
217198
|
`Invalid ${e.fileName} file in ${projectDirRelative}. If the project is intentionally invalid, and you want Coana to skip it in the scan, then add "--exclude-dirs ${projectDirRelative}" to the Coana command.`
|
|
217095
217199
|
);
|
|
@@ -217181,7 +217285,7 @@ function shouldIgnoreDir(dir) {
|
|
|
217181
217285
|
return dirsToIgnore.includes(dir);
|
|
217182
217286
|
}
|
|
217183
217287
|
function shouldIgnoreDueToExcludeDirsOrChangedFiles({ mainProjectDir, excludeDirs, changedFiles }, fullPath) {
|
|
217184
|
-
const relativeToProjectDir =
|
|
217288
|
+
const relativeToProjectDir = relative13(mainProjectDir, fullPath) || ".";
|
|
217185
217289
|
return !!(isMatch3(relativeToProjectDir, excludeDirs) || changedFiles && !changedFiles.some((changedFile) => changedFile.startsWith(relativeToProjectDir)));
|
|
217186
217290
|
}
|
|
217187
217291
|
|
|
@@ -217221,7 +217325,7 @@ var ProjectManager = class _ProjectManager {
|
|
|
217221
217325
|
getSubproject(ecosystem, subprojectPath) {
|
|
217222
217326
|
const manager = this.ecosystemToEcosystemManager[ecosystem];
|
|
217223
217327
|
if (!manager) throw new Error(`Project manager was not created for the ${ecosystem} ecosystem`);
|
|
217224
|
-
return manager.findSubprojectWithPath(
|
|
217328
|
+
return manager.findSubprojectWithPath(resolve33(this.projectDir, subprojectPath));
|
|
217225
217329
|
}
|
|
217226
217330
|
getSubprojectsFoundTextSummary() {
|
|
217227
217331
|
const summaryString = Object.entries(this.ecosystemToEcosystemManager).map(([ecosystem, manager]) => {
|
|
@@ -217229,7 +217333,7 @@ var ProjectManager = class _ProjectManager {
|
|
|
217229
217333
|
if (subprojects.length === 0) return void 0;
|
|
217230
217334
|
return ` ${ecosystem}:
|
|
217231
217335
|
${subprojects.map(
|
|
217232
|
-
({ subprojectPath, workspacePaths }) => ` ${
|
|
217336
|
+
({ subprojectPath, workspacePaths }) => ` ${relative14(this.projectDir, subprojectPath) || ". (Root)"}${workspacePaths.length > 1 || workspacePaths[0] !== "." ? ` (${workspacePaths.length} ${ecosystem === "MAVEN" ? "modules" : "workspaces"})` : ""}`
|
|
217233
217337
|
).join("\n")}`;
|
|
217234
217338
|
}).filter((line) => line).join("\n");
|
|
217235
217339
|
const detailsString = Object.entries(this.ecosystemToEcosystemManager).map(([ecosystem, manager]) => {
|
|
@@ -217237,7 +217341,7 @@ ${subprojects.map(
|
|
|
217237
217341
|
if (subprojects.length === 0) return void 0;
|
|
217238
217342
|
const subprojectsString = subprojects.map(({ subprojectPath, workspacePaths, packageManagerName }) => {
|
|
217239
217343
|
if (workspacePaths.length === 1 && workspacePaths[0] === ".") return void 0;
|
|
217240
|
-
return ` ${
|
|
217344
|
+
return ` ${relative14(this.projectDir, subprojectPath) || ". (Root)"}
|
|
217241
217345
|
${workspacePaths.map((ws) => ` ${ws === "." ? ". (Root)" : ws} - ${packageManagerName}`).join("\n")}`;
|
|
217242
217346
|
}).filter((line) => line).join("\n");
|
|
217243
217347
|
if (!subprojectsString) return void 0;
|
|
@@ -217311,14 +217415,14 @@ var PromiseQueue = class {
|
|
|
217311
217415
|
this.runNextTask();
|
|
217312
217416
|
}
|
|
217313
217417
|
async onIdle() {
|
|
217314
|
-
return new Promise((
|
|
217418
|
+
return new Promise((resolve38, reject) => {
|
|
217315
217419
|
if (this.error) {
|
|
217316
217420
|
reject(this.error);
|
|
217317
217421
|
this.error = null;
|
|
217318
217422
|
} else if (this.queue.length === 0 && this.activeTasks === 0) {
|
|
217319
|
-
|
|
217423
|
+
resolve38();
|
|
217320
217424
|
} else {
|
|
217321
|
-
this.idleResolver =
|
|
217425
|
+
this.idleResolver = resolve38;
|
|
217322
217426
|
this.idleRejector = reject;
|
|
217323
217427
|
}
|
|
217324
217428
|
});
|
|
@@ -217326,7 +217430,7 @@ var PromiseQueue = class {
|
|
|
217326
217430
|
};
|
|
217327
217431
|
|
|
217328
217432
|
// dist/cli-upgrade-purl.js
|
|
217329
|
-
import { join as join25, relative as
|
|
217433
|
+
import { join as join25, relative as relative15, resolve as resolve34 } from "node:path";
|
|
217330
217434
|
|
|
217331
217435
|
// ../web-compat-utils/src/assertions.ts
|
|
217332
217436
|
function assertDefined(value) {
|
|
@@ -217339,14 +217443,14 @@ var import_packageurl_js3 = __toESM(require_packageurl_js(), 1);
|
|
|
217339
217443
|
|
|
217340
217444
|
// dist/internal/socket-mode-helpers-socket-dependency-trees.js
|
|
217341
217445
|
var import_packageurl_js2 = __toESM(require_packageurl_js(), 1);
|
|
217342
|
-
var
|
|
217343
|
-
import { basename as basename10, dirname as
|
|
217446
|
+
var import_picomatch6 = __toESM(require_picomatch2(), 1);
|
|
217447
|
+
import { basename as basename10, dirname as dirname14, join as join24, sep as sep5 } from "path";
|
|
217344
217448
|
var REQUIREMENTS_FILES_SEARCH_DEPTH2 = 3;
|
|
217345
217449
|
function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonProjects) {
|
|
217346
217450
|
switch (ecosystem) {
|
|
217347
217451
|
case "NPM": {
|
|
217348
217452
|
const base = basename10(manifestPath);
|
|
217349
|
-
const dir =
|
|
217453
|
+
const dir = dirname14(manifestPath);
|
|
217350
217454
|
return base === "package.json" ? dir || "." : void 0;
|
|
217351
217455
|
}
|
|
217352
217456
|
case "MAVEN": {
|
|
@@ -217354,7 +217458,7 @@ function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonPro
|
|
|
217354
217458
|
}
|
|
217355
217459
|
case "PIP": {
|
|
217356
217460
|
const base = basename10(manifestPath);
|
|
217357
|
-
const dir =
|
|
217461
|
+
const dir = dirname14(manifestPath);
|
|
217358
217462
|
const workspaceDir = dir === "" ? "." : dir;
|
|
217359
217463
|
if (properPythonProjects.includes(workspaceDir)) {
|
|
217360
217464
|
return workspaceDir;
|
|
@@ -217377,11 +217481,11 @@ function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonPro
|
|
|
217377
217481
|
return ".";
|
|
217378
217482
|
}
|
|
217379
217483
|
case "RUST": {
|
|
217380
|
-
return
|
|
217484
|
+
return dirname14(manifestPath) || ".";
|
|
217381
217485
|
}
|
|
217382
217486
|
case "GO": {
|
|
217383
217487
|
const base = basename10(manifestPath);
|
|
217384
|
-
const dir =
|
|
217488
|
+
const dir = dirname14(manifestPath);
|
|
217385
217489
|
return base === "go.mod" ? dir || "." : void 0;
|
|
217386
217490
|
}
|
|
217387
217491
|
default: {
|
|
@@ -217394,7 +217498,7 @@ function inferProjectFromManifestPath(ecosystem, manifestPath) {
|
|
|
217394
217498
|
case "NPM": {
|
|
217395
217499
|
const filename = basename10(manifestPath);
|
|
217396
217500
|
if (["package-lock.json", "pnpm-lock.yaml", "pnpm-lock.yml", "yarn.lock"].includes(filename)) {
|
|
217397
|
-
return
|
|
217501
|
+
return dirname14(manifestPath) || ".";
|
|
217398
217502
|
}
|
|
217399
217503
|
return void 0;
|
|
217400
217504
|
}
|
|
@@ -217459,7 +217563,7 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash,
|
|
|
217459
217563
|
const allFiles = await getFilesRelative(rootWorkingDirectory, venvExcludes);
|
|
217460
217564
|
for (const file of allFiles) {
|
|
217461
217565
|
const base = basename10(file);
|
|
217462
|
-
const workspaceDir =
|
|
217566
|
+
const workspaceDir = dirname14(file) || ".";
|
|
217463
217567
|
if (base === "pyproject.toml" || base === "setup.py" && await isSetupPySetuptools(join24(rootWorkingDirectory, file))) {
|
|
217464
217568
|
if (!properPythonProjects.includes(workspaceDir)) {
|
|
217465
217569
|
properPythonProjects.push(workspaceDir);
|
|
@@ -217483,11 +217587,11 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash,
|
|
|
217483
217587
|
const manifestFiles = [];
|
|
217484
217588
|
switch (ecosystem) {
|
|
217485
217589
|
case "MAVEN": {
|
|
217486
|
-
manifestFiles.push(...(await getFilesRelative(rootWorkingDirectory)).filter((file) => (0,
|
|
217590
|
+
manifestFiles.push(...(await getFilesRelative(rootWorkingDirectory)).filter((file) => (0, import_picomatch6.default)("{{*-*.,}pom{.xml,},gradle.lockfile}")(basename10(file))));
|
|
217487
217591
|
break;
|
|
217488
217592
|
}
|
|
217489
217593
|
case "NUGET": {
|
|
217490
|
-
manifestFiles.push(...(await getFilesRelative(rootWorkingDirectory)).filter((file) => (0,
|
|
217594
|
+
manifestFiles.push(...(await getFilesRelative(rootWorkingDirectory)).filter((file) => (0, import_picomatch6.default)("{*.csproj,packages.lock.json}")(basename10(file))));
|
|
217491
217595
|
break;
|
|
217492
217596
|
}
|
|
217493
217597
|
case "PIP": {
|
|
@@ -217704,7 +217808,7 @@ ${upgrades.map(({ purl, upgradeVersion }) => ` ${prettyPrintPurlUpgrade(purl, up
|
|
|
217704
217808
|
warn: "\u26A0\uFE0F",
|
|
217705
217809
|
error: "\u274C"
|
|
217706
217810
|
};
|
|
217707
|
-
logger.info(`${statusIcons[update2.status]} ${update2.message} \u2500 ${
|
|
217811
|
+
logger.info(`${statusIcons[update2.status]} ${update2.message} \u2500 ${relative15(rootDir, resolve34(rootDir, update2.file))}`);
|
|
217708
217812
|
update2.artifacts.forEach((idx, i7) => {
|
|
217709
217813
|
logger.info(`${" ".repeat(3)}${i7 === update2.artifacts.length - 1 ? "\u2514\u2500" : "\u251C\u2500"} ${prettyPrintSocketFactArtifactUpgrade(artifacts[idx], upgrades2.get(idx))}`);
|
|
217710
217814
|
});
|
|
@@ -217796,7 +217900,7 @@ ${workspacePathsMatchingGlob.map((wsPath) => ` ${wsPath}`).join("\n")}`);
|
|
|
217796
217900
|
logger.info(`No dependencies matching upgrade specs found for subproject ${subproject.subprojectPath}`);
|
|
217797
217901
|
return;
|
|
217798
217902
|
}
|
|
217799
|
-
await applySecurityFixes(subproject.packageManagerName, rootDir,
|
|
217903
|
+
await applySecurityFixes(subproject.packageManagerName, rootDir, relative15(rootDir, subproject.subprojectPath) || ".", otherModulesCommunicator, workspaceToFixes, fixingData, signalFixApplied);
|
|
217800
217904
|
});
|
|
217801
217905
|
});
|
|
217802
217906
|
await subprojectPromiseQueue.onIdle();
|
|
@@ -218134,7 +218238,7 @@ var bgWhiteBright = format5(107, 49);
|
|
|
218134
218238
|
// dist/cli-core.js
|
|
218135
218239
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
218136
218240
|
import os from "os";
|
|
218137
|
-
import { join as join27, relative as
|
|
218241
|
+
import { join as join27, relative as relative16, resolve as resolve36 } from "path";
|
|
218138
218242
|
|
|
218139
218243
|
// ../utils/src/dashboard-api/shared-api.ts
|
|
218140
218244
|
var DashboardAPI = class {
|
|
@@ -218381,21 +218485,21 @@ var DEFAULT_REPORT_FILENAME_BASE = "coana-report";
|
|
|
218381
218485
|
|
|
218382
218486
|
// dist/internal/exclude-dirs-from-configuration-files.js
|
|
218383
218487
|
import { existsSync as existsSync20 } from "fs";
|
|
218384
|
-
import { readFile as
|
|
218385
|
-
import { basename as basename11, resolve as
|
|
218488
|
+
import { readFile as readFile29 } from "fs/promises";
|
|
218489
|
+
import { basename as basename11, resolve as resolve35 } from "path";
|
|
218386
218490
|
var import_yaml2 = __toESM(require_dist12(), 1);
|
|
218387
218491
|
async function inferExcludeDirsFromConfigurationFiles(rootWorkingDir) {
|
|
218388
|
-
const socketYmlConfigFile =
|
|
218492
|
+
const socketYmlConfigFile = resolve35(rootWorkingDir, "socket.yml");
|
|
218389
218493
|
if (existsSync20(socketYmlConfigFile))
|
|
218390
218494
|
return inferExcludeDirsFromSocketConfig(socketYmlConfigFile);
|
|
218391
|
-
const socketYamlConfigFile =
|
|
218495
|
+
const socketYamlConfigFile = resolve35(rootWorkingDir, "socket.yaml");
|
|
218392
218496
|
if (existsSync20(socketYamlConfigFile))
|
|
218393
218497
|
return inferExcludeDirsFromSocketConfig(socketYamlConfigFile);
|
|
218394
218498
|
return void 0;
|
|
218395
218499
|
}
|
|
218396
218500
|
async function inferExcludeDirsFromSocketConfig(socketConfigFile) {
|
|
218397
218501
|
try {
|
|
218398
|
-
const config3 = (0, import_yaml2.parse)(await
|
|
218502
|
+
const config3 = (0, import_yaml2.parse)(await readFile29(socketConfigFile, "utf8"));
|
|
218399
218503
|
const version3 = config3.version;
|
|
218400
218504
|
const ignorePaths = config3[version3 === 1 ? "ignore" : "projectIgnorePaths"];
|
|
218401
218505
|
if (!ignorePaths)
|
|
@@ -218682,7 +218786,7 @@ function toSocketFactsSocketDependencyTree(artifacts, vulnerabilities, tier1Reac
|
|
|
218682
218786
|
}
|
|
218683
218787
|
|
|
218684
218788
|
// dist/internal/vulnerability-scanning.js
|
|
218685
|
-
import { readFile as
|
|
218789
|
+
import { readFile as readFile30 } from "fs/promises";
|
|
218686
218790
|
|
|
218687
218791
|
// ../security-auditor/security-auditor-builder/src/mongo-connection.ts
|
|
218688
218792
|
var import_mongodb = __toESM(require_lib30(), 1);
|
|
@@ -220336,10 +220440,10 @@ function compareDocumentPosition(nodeA, nodeB) {
|
|
|
220336
220440
|
function uniqueSort(nodes) {
|
|
220337
220441
|
nodes = nodes.filter((node, i7, arr) => !arr.includes(node, i7 + 1));
|
|
220338
220442
|
nodes.sort((a4, b) => {
|
|
220339
|
-
const
|
|
220340
|
-
if (
|
|
220443
|
+
const relative17 = compareDocumentPosition(a4, b);
|
|
220444
|
+
if (relative17 & DocumentPosition.PRECEDING) {
|
|
220341
220445
|
return -1;
|
|
220342
|
-
} else if (
|
|
220446
|
+
} else if (relative17 & DocumentPosition.FOLLOWING) {
|
|
220343
220447
|
return 1;
|
|
220344
220448
|
}
|
|
220345
220449
|
return 0;
|
|
@@ -232739,7 +232843,7 @@ async function computeAdvisoryDB() {
|
|
|
232739
232843
|
throw new Error("GITHUB_TOKEN env variable is not set");
|
|
232740
232844
|
}
|
|
232741
232845
|
const octokit = new import_octokit.Octokit({ auth: githubToken });
|
|
232742
|
-
const delay = async (ms) => new Promise((
|
|
232846
|
+
const delay = async (ms) => new Promise((resolve38) => setTimeout(resolve38, ms));
|
|
232743
232847
|
const vulnerabilityDB = {};
|
|
232744
232848
|
let hasNextPage = true;
|
|
232745
232849
|
let cursor;
|
|
@@ -233551,7 +233655,7 @@ async function scanForVulnerabilities(dependencyTree, offlineVulnerabilityScanne
|
|
|
233551
233655
|
}
|
|
233552
233656
|
async function offlineScan(dependencyTree, offlineVulnerabilityScannerDBPath) {
|
|
233553
233657
|
logger.info("using offline vulnerability scanner db");
|
|
233554
|
-
const offlineVulnerabilityScannerDB = JSON.parse(await
|
|
233658
|
+
const offlineVulnerabilityScannerDB = JSON.parse(await readFile30(offlineVulnerabilityScannerDBPath, "utf-8"));
|
|
233555
233659
|
const { ecosystemToUrlToVulnerabilityDetails, vulnerabilityDatabase } = offlineVulnerabilityScannerDB;
|
|
233556
233660
|
const coanaSupportedVulnerabilitiesLoader = CoanaSupportedVulnerabilitiesLoader.create(ecosystemToUrlToVulnerabilityDetails);
|
|
233557
233661
|
const vulnerabilityAccessPathLoader = CoanaSupportedVulnerabilitiesLoader.create(ecosystemToUrlToVulnerabilityDetails);
|
|
@@ -233569,7 +233673,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
233569
233673
|
}
|
|
233570
233674
|
|
|
233571
233675
|
// dist/version.js
|
|
233572
|
-
var version2 = "14.12.
|
|
233676
|
+
var version2 = "14.12.49";
|
|
233573
233677
|
|
|
233574
233678
|
// dist/cli-core.js
|
|
233575
233679
|
var { mapValues, omit, partition, pick } = import_lodash15.default;
|
|
@@ -233599,7 +233703,7 @@ var CliCore = class {
|
|
|
233599
233703
|
throw new Error("Invalid analysis timeout value");
|
|
233600
233704
|
}
|
|
233601
233705
|
}
|
|
233602
|
-
this.rootWorkingDirectory =
|
|
233706
|
+
this.rootWorkingDirectory = resolve36(rootWorkingDirectory);
|
|
233603
233707
|
this.spinner = Spinner.instance({
|
|
233604
233708
|
text: "Running Coana CLI",
|
|
233605
233709
|
isSilent: this.options.silentSpinner ?? this.options.silent
|
|
@@ -233772,7 +233876,7 @@ var CliCore = class {
|
|
|
233772
233876
|
this.sendProgress("RUN_ON_SUBPROJECT", false, this.rootWorkingDirectory);
|
|
233773
233877
|
}
|
|
233774
233878
|
const socketReport = toSocketFactsSocketDependencyTree(artifacts, vulnsWithResults, this.reportId);
|
|
233775
|
-
const outputFile =
|
|
233879
|
+
const outputFile = resolve36(this.options.socketMode);
|
|
233776
233880
|
await writeFile11(outputFile, JSON.stringify(socketReport, null, 2));
|
|
233777
233881
|
logger.info(kleur_default.green(`Socket report written to: ${outputFile}`));
|
|
233778
233882
|
}
|
|
@@ -233790,13 +233894,13 @@ var CliCore = class {
|
|
|
233790
233894
|
throw new Error("Dependency trees should be available when using --socket-mode");
|
|
233791
233895
|
}
|
|
233792
233896
|
const socketReport = toSocketFacts(report, this.reportDependencyTrees, subPjToWsPathToDirectDependencies);
|
|
233793
|
-
const outputFile =
|
|
233897
|
+
const outputFile = resolve36(this.options.socketMode);
|
|
233794
233898
|
await writeFile11(outputFile, JSON.stringify(socketReport, null, 2));
|
|
233795
233899
|
logger.info(kleur_default.green(`Socket report written to: ${outputFile}`));
|
|
233796
233900
|
return;
|
|
233797
233901
|
}
|
|
233798
233902
|
if (outputDir) {
|
|
233799
|
-
const jsonReportPath =
|
|
233903
|
+
const jsonReportPath = resolve36(outputDir, `${DEFAULT_REPORT_FILENAME_BASE}.json`);
|
|
233800
233904
|
await mkdir2(outputDir, { recursive: true });
|
|
233801
233905
|
writeFileSync3(jsonReportPath, JSON.stringify(report, null, 2));
|
|
233802
233906
|
logger.info(kleur_default.green(`JSON report written to: ${jsonReportPath}`));
|
|
@@ -233834,7 +233938,7 @@ var CliCore = class {
|
|
|
233834
233938
|
const { reachabilitySupport, traditionalScaSupport, noSupport } = manager.getSubprojectsWithWorkspacePaths();
|
|
233835
233939
|
await this.dashboardAPI.registerSubprojects([...reachabilitySupport, ...traditionalScaSupport, ...noSupport].map((sp) => ({
|
|
233836
233940
|
...sp,
|
|
233837
|
-
subprojectPath:
|
|
233941
|
+
subprojectPath: relative16(this.rootWorkingDirectory, sp.subprojectPath) || "."
|
|
233838
233942
|
})), this.reportId, this.apiKey);
|
|
233839
233943
|
for (const unsupported of noSupport)
|
|
233840
233944
|
logger.warn(unsupported.unsupportedMsg);
|
|
@@ -233863,7 +233967,7 @@ var CliCore = class {
|
|
|
233863
233967
|
await this.spinner.succeed();
|
|
233864
233968
|
} catch (error) {
|
|
233865
233969
|
if (this.options.ignoreFailingWorkspaces) {
|
|
233866
|
-
const relativeSubprojectPath =
|
|
233970
|
+
const relativeSubprojectPath = relative16(this.rootWorkingDirectory, subprojectAndWsPath.subprojectPath) || ".";
|
|
233867
233971
|
this.failedSubprojects.push({
|
|
233868
233972
|
subproject: relativeSubprojectPath,
|
|
233869
233973
|
error: error.message || "Unknown error"
|
|
@@ -233922,7 +234026,7 @@ Subproject: ${subproject}`);
|
|
|
233922
234026
|
}
|
|
233923
234027
|
async updateSpinnerTextOnNewSubproject(subprojectAndWsPath, numberSubprojects, index2) {
|
|
233924
234028
|
this.spinner.start();
|
|
233925
|
-
const relativeSubprojectPath =
|
|
234029
|
+
const relativeSubprojectPath = relative16(this.rootWorkingDirectory, subprojectAndWsPath.subprojectPath) || ".";
|
|
233926
234030
|
await this.spinner.setText(numberSubprojects > 1 ? `Processing subproject ${relativeSubprojectPath} (${index2 + 1}/${numberSubprojects})${+this.options.concurrency > 1 ? `. May process up to ${+this.options.concurrency - 1} other workspaces in parallel` : ""}` : `Processing ${relativeSubprojectPath}`);
|
|
233927
234031
|
}
|
|
233928
234032
|
async initialize() {
|
|
@@ -234000,7 +234104,7 @@ Subproject: ${subproject}`);
|
|
|
234000
234104
|
return workspaceToAugmentedVulnerabilities[workspacePath] !== void 0;
|
|
234001
234105
|
}).map((workspacePath) => {
|
|
234002
234106
|
return {
|
|
234003
|
-
subprojectPath:
|
|
234107
|
+
subprojectPath: relative16(this.rootWorkingDirectory, subprojectPath) || ".",
|
|
234004
234108
|
workspacePath,
|
|
234005
234109
|
directDependencies: projectInfo[workspacePath].dataForAnalysis.directDependenciesMap ?? {},
|
|
234006
234110
|
vulnerabilities: workspaceToAugmentedVulnerabilities[workspacePath],
|
|
@@ -234099,7 +234203,7 @@ Subproject: ${subproject}`);
|
|
|
234099
234203
|
excludeDirs: this.options.excludeDirs ?? [],
|
|
234100
234204
|
changedFiles: this.options.changedFiles,
|
|
234101
234205
|
includeDirs: this.options.includeDirs ?? []
|
|
234102
|
-
},
|
|
234206
|
+
}, resolve36(subprojectPath, workspacePath));
|
|
234103
234207
|
if (shouldExcludeWorkspaceForAnalysis) {
|
|
234104
234208
|
logger.info(`Skipping reachability analysis for workspace ${workspacePath} due to it being excluded.`);
|
|
234105
234209
|
}
|
|
@@ -234130,7 +234234,7 @@ Subproject: ${subproject}`);
|
|
|
234130
234234
|
async sendProgress(type, isStartEvent, subprojectPath, workspacePath) {
|
|
234131
234235
|
await this.dashboardAPI.registerCLIProgress({
|
|
234132
234236
|
type,
|
|
234133
|
-
...subprojectPath ? { subprojectPath:
|
|
234237
|
+
...subprojectPath ? { subprojectPath: relative16(this.rootWorkingDirectory, subprojectPath) || "." } : {},
|
|
234134
234238
|
...workspacePath ? { workspacePath } : {}
|
|
234135
234239
|
}, isStartEvent, this.reportId, this.apiKey);
|
|
234136
234240
|
}
|
|
@@ -234186,7 +234290,7 @@ Subproject: ${subproject}`);
|
|
|
234186
234290
|
dependencyTree: workspaceToPlainDependencyTree[workspacePath],
|
|
234187
234291
|
ecosystem: workspaceToPlainDependencyTree[workspacePath].ecosystem ?? "NPM",
|
|
234188
234292
|
workspacePath,
|
|
234189
|
-
subprojectPath:
|
|
234293
|
+
subprojectPath: relative16(rootWorkingDirectory, subprojectPath) || "."
|
|
234190
234294
|
}));
|
|
234191
234295
|
if (this.options.socketMode) {
|
|
234192
234296
|
this.reportDependencyTrees = workspacePaths.map((workspacePath) => ({
|
|
@@ -234194,7 +234298,7 @@ Subproject: ${subproject}`);
|
|
|
234194
234298
|
dependencyTree: projectInfo[workspacePath].dataForAnalysis.data.dependencyTree,
|
|
234195
234299
|
ecosystem: projectInfo[workspacePath].dataForAnalysis.data.dependencyTree.ecosystem ?? "NPM",
|
|
234196
234300
|
workspacePath,
|
|
234197
|
-
subprojectPath:
|
|
234301
|
+
subprojectPath: relative16(rootWorkingDirectory, subprojectPath) || "."
|
|
234198
234302
|
}));
|
|
234199
234303
|
}
|
|
234200
234304
|
if (this.shareWithDashboard)
|
|
@@ -234210,7 +234314,7 @@ Subproject: ${subproject}`);
|
|
|
234210
234314
|
} catch (e) {
|
|
234211
234315
|
logger.error(`Scanning for vulnerabilities failed for subproject ${subprojectPath} in workspace ${workspacePath}`);
|
|
234212
234316
|
if (this.options.ignoreFailingWorkspaces) {
|
|
234213
|
-
const relativeSubprojectPath =
|
|
234317
|
+
const relativeSubprojectPath = relative16(this.rootWorkingDirectory, subprojectPath) || ".";
|
|
234214
234318
|
this.failedWorkspaces.push({
|
|
234215
234319
|
subproject: relativeSubprojectPath,
|
|
234216
234320
|
workspace: workspacePath,
|
|
@@ -234229,7 +234333,7 @@ Subproject: ${subproject}`);
|
|
|
234229
234333
|
}
|
|
234230
234334
|
};
|
|
234231
234335
|
function getRelativeSubprojectPath(subprojectPath, projectDir) {
|
|
234232
|
-
return
|
|
234336
|
+
return relative16(projectDir, subprojectPath) || ".";
|
|
234233
234337
|
}
|
|
234234
234338
|
function getDependencyType(vulnChainDetails, codeAwareScanResults, directDependencies, reachability) {
|
|
234235
234339
|
if (reachability === "UNREACHABLE" || reachability === "UNKNOWN") {
|
|
@@ -234327,8 +234431,8 @@ computeFixesAndUpgradePurlsCmd.name("compute-fixes-and-upgrade-purls").argument(
|
|
|
234327
234431
|
};
|
|
234328
234432
|
const output = await computeFixesAndUpgradePurls(path2, optionsToUse, logFile);
|
|
234329
234433
|
if (options.outputFile) {
|
|
234330
|
-
const outputFile =
|
|
234331
|
-
await mkdir3(
|
|
234434
|
+
const outputFile = resolve37(options.outputFile);
|
|
234435
|
+
await mkdir3(dirname15(outputFile), { recursive: true });
|
|
234332
234436
|
await writeFile12(outputFile, JSON.stringify(output, null, 2));
|
|
234333
234437
|
logger.info(`Result written to: ${outputFile}`);
|
|
234334
234438
|
}
|
|
@@ -234353,7 +234457,7 @@ async function initializeComputeFixesAndUpgradePurls(path2, options) {
|
|
|
234353
234457
|
var compareReportsCommand = new Command();
|
|
234354
234458
|
compareReportsCommand.name("compare-reports").argument("<baselineReportPath>", "Path to the baseline report").argument("<newReportPath>", "Path to the new report").option("--api-key <key>", "Set the Coana dashboard API key.").option("-d, --debug", "Enable debug logging", false).option("--no-pr-comment", "Disable pull request comments (only relevant when run from a PR)", true).option("--no-block", "Do not fail with a non-zero exit code when new reachable vulnerabilities are detected", true).option("--ignore-undeterminable-reachability", "Ignore vulnerabilities with undeterminable reachability", false).action(async (baselineReportPath, newReportPath, options) => {
|
|
234355
234459
|
async function readReport(reportPath) {
|
|
234356
|
-
return JSON.parse(await
|
|
234460
|
+
return JSON.parse(await readFile31(reportPath, "utf-8"));
|
|
234357
234461
|
}
|
|
234358
234462
|
const baselineReport = await readReport(baselineReportPath);
|
|
234359
234463
|
const newReport = await readReport(newReportPath);
|