@coana-tech/cli 14.10.3 → 14.10.4
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 +657 -586
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -6151,7 +6151,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
6151
6151
|
return circularValue;
|
|
6152
6152
|
}
|
|
6153
6153
|
let res = "";
|
|
6154
|
-
let
|
|
6154
|
+
let join23 = ",";
|
|
6155
6155
|
const originalIndentation = indentation;
|
|
6156
6156
|
if (Array.isArray(value)) {
|
|
6157
6157
|
if (value.length === 0) {
|
|
@@ -6165,7 +6165,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
6165
6165
|
indentation += spacer;
|
|
6166
6166
|
res += `
|
|
6167
6167
|
${indentation}`;
|
|
6168
|
-
|
|
6168
|
+
join23 = `,
|
|
6169
6169
|
${indentation}`;
|
|
6170
6170
|
}
|
|
6171
6171
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -6173,13 +6173,13 @@ ${indentation}`;
|
|
|
6173
6173
|
for (; i6 < maximumValuesToStringify - 1; i6++) {
|
|
6174
6174
|
const tmp2 = stringifyFnReplacer(String(i6), value, stack2, replacer, spacer, indentation);
|
|
6175
6175
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
6176
|
-
res +=
|
|
6176
|
+
res += join23;
|
|
6177
6177
|
}
|
|
6178
6178
|
const tmp = stringifyFnReplacer(String(i6), value, stack2, replacer, spacer, indentation);
|
|
6179
6179
|
res += tmp !== void 0 ? tmp : "null";
|
|
6180
6180
|
if (value.length - 1 > maximumBreadth) {
|
|
6181
6181
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
6182
|
-
res += `${
|
|
6182
|
+
res += `${join23}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
6183
6183
|
}
|
|
6184
6184
|
if (spacer !== "") {
|
|
6185
6185
|
res += `
|
|
@@ -6200,7 +6200,7 @@ ${originalIndentation}`;
|
|
|
6200
6200
|
let separator = "";
|
|
6201
6201
|
if (spacer !== "") {
|
|
6202
6202
|
indentation += spacer;
|
|
6203
|
-
|
|
6203
|
+
join23 = `,
|
|
6204
6204
|
${indentation}`;
|
|
6205
6205
|
whitespace2 = " ";
|
|
6206
6206
|
}
|
|
@@ -6214,13 +6214,13 @@ ${indentation}`;
|
|
|
6214
6214
|
const tmp = stringifyFnReplacer(key2, value, stack2, replacer, spacer, indentation);
|
|
6215
6215
|
if (tmp !== void 0) {
|
|
6216
6216
|
res += `${separator}${strEscape(key2)}:${whitespace2}${tmp}`;
|
|
6217
|
-
separator =
|
|
6217
|
+
separator = join23;
|
|
6218
6218
|
}
|
|
6219
6219
|
}
|
|
6220
6220
|
if (keyLength > maximumBreadth) {
|
|
6221
6221
|
const removedKeys = keyLength - maximumBreadth;
|
|
6222
6222
|
res += `${separator}"...":${whitespace2}"${getItemCount(removedKeys)} not stringified"`;
|
|
6223
|
-
separator =
|
|
6223
|
+
separator = join23;
|
|
6224
6224
|
}
|
|
6225
6225
|
if (spacer !== "" && separator.length > 1) {
|
|
6226
6226
|
res = `
|
|
@@ -6261,7 +6261,7 @@ ${originalIndentation}`;
|
|
|
6261
6261
|
}
|
|
6262
6262
|
const originalIndentation = indentation;
|
|
6263
6263
|
let res = "";
|
|
6264
|
-
let
|
|
6264
|
+
let join23 = ",";
|
|
6265
6265
|
if (Array.isArray(value)) {
|
|
6266
6266
|
if (value.length === 0) {
|
|
6267
6267
|
return "[]";
|
|
@@ -6274,7 +6274,7 @@ ${originalIndentation}`;
|
|
|
6274
6274
|
indentation += spacer;
|
|
6275
6275
|
res += `
|
|
6276
6276
|
${indentation}`;
|
|
6277
|
-
|
|
6277
|
+
join23 = `,
|
|
6278
6278
|
${indentation}`;
|
|
6279
6279
|
}
|
|
6280
6280
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -6282,13 +6282,13 @@ ${indentation}`;
|
|
|
6282
6282
|
for (; i6 < maximumValuesToStringify - 1; i6++) {
|
|
6283
6283
|
const tmp2 = stringifyArrayReplacer(String(i6), value[i6], stack2, replacer, spacer, indentation);
|
|
6284
6284
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
6285
|
-
res +=
|
|
6285
|
+
res += join23;
|
|
6286
6286
|
}
|
|
6287
6287
|
const tmp = stringifyArrayReplacer(String(i6), value[i6], stack2, replacer, spacer, indentation);
|
|
6288
6288
|
res += tmp !== void 0 ? tmp : "null";
|
|
6289
6289
|
if (value.length - 1 > maximumBreadth) {
|
|
6290
6290
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
6291
|
-
res += `${
|
|
6291
|
+
res += `${join23}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
6292
6292
|
}
|
|
6293
6293
|
if (spacer !== "") {
|
|
6294
6294
|
res += `
|
|
@@ -6301,7 +6301,7 @@ ${originalIndentation}`;
|
|
|
6301
6301
|
let whitespace2 = "";
|
|
6302
6302
|
if (spacer !== "") {
|
|
6303
6303
|
indentation += spacer;
|
|
6304
|
-
|
|
6304
|
+
join23 = `,
|
|
6305
6305
|
${indentation}`;
|
|
6306
6306
|
whitespace2 = " ";
|
|
6307
6307
|
}
|
|
@@ -6310,7 +6310,7 @@ ${indentation}`;
|
|
|
6310
6310
|
const tmp = stringifyArrayReplacer(key2, value[key2], stack2, replacer, spacer, indentation);
|
|
6311
6311
|
if (tmp !== void 0) {
|
|
6312
6312
|
res += `${separator}${strEscape(key2)}:${whitespace2}${tmp}`;
|
|
6313
|
-
separator =
|
|
6313
|
+
separator = join23;
|
|
6314
6314
|
}
|
|
6315
6315
|
}
|
|
6316
6316
|
if (spacer !== "" && separator.length > 1) {
|
|
@@ -6368,20 +6368,20 @@ ${originalIndentation}`;
|
|
|
6368
6368
|
indentation += spacer;
|
|
6369
6369
|
let res2 = `
|
|
6370
6370
|
${indentation}`;
|
|
6371
|
-
const
|
|
6371
|
+
const join24 = `,
|
|
6372
6372
|
${indentation}`;
|
|
6373
6373
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
6374
6374
|
let i6 = 0;
|
|
6375
6375
|
for (; i6 < maximumValuesToStringify - 1; i6++) {
|
|
6376
6376
|
const tmp2 = stringifyIndent(String(i6), value[i6], stack2, spacer, indentation);
|
|
6377
6377
|
res2 += tmp2 !== void 0 ? tmp2 : "null";
|
|
6378
|
-
res2 +=
|
|
6378
|
+
res2 += join24;
|
|
6379
6379
|
}
|
|
6380
6380
|
const tmp = stringifyIndent(String(i6), value[i6], stack2, spacer, indentation);
|
|
6381
6381
|
res2 += tmp !== void 0 ? tmp : "null";
|
|
6382
6382
|
if (value.length - 1 > maximumBreadth) {
|
|
6383
6383
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
6384
|
-
res2 += `${
|
|
6384
|
+
res2 += `${join24}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
6385
6385
|
}
|
|
6386
6386
|
res2 += `
|
|
6387
6387
|
${originalIndentation}`;
|
|
@@ -6397,16 +6397,16 @@ ${originalIndentation}`;
|
|
|
6397
6397
|
return '"[Object]"';
|
|
6398
6398
|
}
|
|
6399
6399
|
indentation += spacer;
|
|
6400
|
-
const
|
|
6400
|
+
const join23 = `,
|
|
6401
6401
|
${indentation}`;
|
|
6402
6402
|
let res = "";
|
|
6403
6403
|
let separator = "";
|
|
6404
6404
|
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
|
|
6405
6405
|
if (isTypedArrayWithEntries(value)) {
|
|
6406
|
-
res += stringifyTypedArray(value,
|
|
6406
|
+
res += stringifyTypedArray(value, join23, maximumBreadth);
|
|
6407
6407
|
keys = keys.slice(value.length);
|
|
6408
6408
|
maximumPropertiesToStringify -= value.length;
|
|
6409
|
-
separator =
|
|
6409
|
+
separator = join23;
|
|
6410
6410
|
}
|
|
6411
6411
|
if (deterministic) {
|
|
6412
6412
|
keys = insertSort(keys);
|
|
@@ -6417,13 +6417,13 @@ ${indentation}`;
|
|
|
6417
6417
|
const tmp = stringifyIndent(key2, value[key2], stack2, spacer, indentation);
|
|
6418
6418
|
if (tmp !== void 0) {
|
|
6419
6419
|
res += `${separator}${strEscape(key2)}: ${tmp}`;
|
|
6420
|
-
separator =
|
|
6420
|
+
separator = join23;
|
|
6421
6421
|
}
|
|
6422
6422
|
}
|
|
6423
6423
|
if (keyLength > maximumBreadth) {
|
|
6424
6424
|
const removedKeys = keyLength - maximumBreadth;
|
|
6425
6425
|
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
|
|
6426
|
-
separator =
|
|
6426
|
+
separator = join23;
|
|
6427
6427
|
}
|
|
6428
6428
|
if (separator !== "") {
|
|
6429
6429
|
res = `
|
|
@@ -7990,7 +7990,7 @@ var require_buffer_list = __commonJS({
|
|
|
7990
7990
|
}
|
|
7991
7991
|
}, {
|
|
7992
7992
|
key: "join",
|
|
7993
|
-
value: function
|
|
7993
|
+
value: function join23(s4) {
|
|
7994
7994
|
if (this.length === 0) return "";
|
|
7995
7995
|
var p3 = this.head;
|
|
7996
7996
|
var ret = "" + p3.data;
|
|
@@ -8536,14 +8536,14 @@ var require_async_iterator = __commonJS({
|
|
|
8536
8536
|
};
|
|
8537
8537
|
}
|
|
8538
8538
|
function readAndResolve(iter) {
|
|
8539
|
-
var
|
|
8540
|
-
if (
|
|
8539
|
+
var resolve26 = iter[kLastResolve];
|
|
8540
|
+
if (resolve26 !== null) {
|
|
8541
8541
|
var data2 = iter[kStream].read();
|
|
8542
8542
|
if (data2 !== null) {
|
|
8543
8543
|
iter[kLastPromise] = null;
|
|
8544
8544
|
iter[kLastResolve] = null;
|
|
8545
8545
|
iter[kLastReject] = null;
|
|
8546
|
-
|
|
8546
|
+
resolve26(createIterResult(data2, false));
|
|
8547
8547
|
}
|
|
8548
8548
|
}
|
|
8549
8549
|
}
|
|
@@ -8551,13 +8551,13 @@ var require_async_iterator = __commonJS({
|
|
|
8551
8551
|
process.nextTick(readAndResolve, iter);
|
|
8552
8552
|
}
|
|
8553
8553
|
function wrapForNext(lastPromise, iter) {
|
|
8554
|
-
return function(
|
|
8554
|
+
return function(resolve26, reject) {
|
|
8555
8555
|
lastPromise.then(function() {
|
|
8556
8556
|
if (iter[kEnded]) {
|
|
8557
|
-
|
|
8557
|
+
resolve26(createIterResult(void 0, true));
|
|
8558
8558
|
return;
|
|
8559
8559
|
}
|
|
8560
|
-
iter[kHandlePromise](
|
|
8560
|
+
iter[kHandlePromise](resolve26, reject);
|
|
8561
8561
|
}, reject);
|
|
8562
8562
|
};
|
|
8563
8563
|
}
|
|
@@ -8577,12 +8577,12 @@ var require_async_iterator = __commonJS({
|
|
|
8577
8577
|
return Promise.resolve(createIterResult(void 0, true));
|
|
8578
8578
|
}
|
|
8579
8579
|
if (this[kStream].destroyed) {
|
|
8580
|
-
return new Promise(function(
|
|
8580
|
+
return new Promise(function(resolve26, reject) {
|
|
8581
8581
|
process.nextTick(function() {
|
|
8582
8582
|
if (_this[kError]) {
|
|
8583
8583
|
reject(_this[kError]);
|
|
8584
8584
|
} else {
|
|
8585
|
-
|
|
8585
|
+
resolve26(createIterResult(void 0, true));
|
|
8586
8586
|
}
|
|
8587
8587
|
});
|
|
8588
8588
|
});
|
|
@@ -8605,13 +8605,13 @@ var require_async_iterator = __commonJS({
|
|
|
8605
8605
|
return this;
|
|
8606
8606
|
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
|
|
8607
8607
|
var _this2 = this;
|
|
8608
|
-
return new Promise(function(
|
|
8608
|
+
return new Promise(function(resolve26, reject) {
|
|
8609
8609
|
_this2[kStream].destroy(null, function(err) {
|
|
8610
8610
|
if (err) {
|
|
8611
8611
|
reject(err);
|
|
8612
8612
|
return;
|
|
8613
8613
|
}
|
|
8614
|
-
|
|
8614
|
+
resolve26(createIterResult(void 0, true));
|
|
8615
8615
|
});
|
|
8616
8616
|
});
|
|
8617
8617
|
}), _Object$setPrototypeO), AsyncIteratorPrototype);
|
|
@@ -8633,15 +8633,15 @@ var require_async_iterator = __commonJS({
|
|
|
8633
8633
|
value: stream11._readableState.endEmitted,
|
|
8634
8634
|
writable: true
|
|
8635
8635
|
}), _defineProperty(_Object$create, kHandlePromise, {
|
|
8636
|
-
value: function value(
|
|
8636
|
+
value: function value(resolve26, reject) {
|
|
8637
8637
|
var data2 = iterator3[kStream].read();
|
|
8638
8638
|
if (data2) {
|
|
8639
8639
|
iterator3[kLastPromise] = null;
|
|
8640
8640
|
iterator3[kLastResolve] = null;
|
|
8641
8641
|
iterator3[kLastReject] = null;
|
|
8642
|
-
|
|
8642
|
+
resolve26(createIterResult(data2, false));
|
|
8643
8643
|
} else {
|
|
8644
|
-
iterator3[kLastResolve] =
|
|
8644
|
+
iterator3[kLastResolve] = resolve26;
|
|
8645
8645
|
iterator3[kLastReject] = reject;
|
|
8646
8646
|
}
|
|
8647
8647
|
},
|
|
@@ -8660,12 +8660,12 @@ var require_async_iterator = __commonJS({
|
|
|
8660
8660
|
iterator3[kError] = err;
|
|
8661
8661
|
return;
|
|
8662
8662
|
}
|
|
8663
|
-
var
|
|
8664
|
-
if (
|
|
8663
|
+
var resolve26 = iterator3[kLastResolve];
|
|
8664
|
+
if (resolve26 !== null) {
|
|
8665
8665
|
iterator3[kLastPromise] = null;
|
|
8666
8666
|
iterator3[kLastResolve] = null;
|
|
8667
8667
|
iterator3[kLastReject] = null;
|
|
8668
|
-
|
|
8668
|
+
resolve26(createIterResult(void 0, true));
|
|
8669
8669
|
}
|
|
8670
8670
|
iterator3[kEnded] = true;
|
|
8671
8671
|
});
|
|
@@ -8680,7 +8680,7 @@ var require_async_iterator = __commonJS({
|
|
|
8680
8680
|
var require_from = __commonJS({
|
|
8681
8681
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
|
|
8682
8682
|
"use strict";
|
|
8683
|
-
function asyncGeneratorStep(gen,
|
|
8683
|
+
function asyncGeneratorStep(gen, resolve26, reject, _next, _throw, key, arg) {
|
|
8684
8684
|
try {
|
|
8685
8685
|
var info = gen[key](arg);
|
|
8686
8686
|
var value = info.value;
|
|
@@ -8689,7 +8689,7 @@ var require_from = __commonJS({
|
|
|
8689
8689
|
return;
|
|
8690
8690
|
}
|
|
8691
8691
|
if (info.done) {
|
|
8692
|
-
|
|
8692
|
+
resolve26(value);
|
|
8693
8693
|
} else {
|
|
8694
8694
|
Promise.resolve(value).then(_next, _throw);
|
|
8695
8695
|
}
|
|
@@ -8697,13 +8697,13 @@ var require_from = __commonJS({
|
|
|
8697
8697
|
function _asyncToGenerator(fn2) {
|
|
8698
8698
|
return function() {
|
|
8699
8699
|
var self2 = this, args2 = arguments;
|
|
8700
|
-
return new Promise(function(
|
|
8700
|
+
return new Promise(function(resolve26, reject) {
|
|
8701
8701
|
var gen = fn2.apply(self2, args2);
|
|
8702
8702
|
function _next(value) {
|
|
8703
|
-
asyncGeneratorStep(gen,
|
|
8703
|
+
asyncGeneratorStep(gen, resolve26, reject, _next, _throw, "next", value);
|
|
8704
8704
|
}
|
|
8705
8705
|
function _throw(err) {
|
|
8706
|
-
asyncGeneratorStep(gen,
|
|
8706
|
+
asyncGeneratorStep(gen, resolve26, reject, _next, _throw, "throw", err);
|
|
8707
8707
|
}
|
|
8708
8708
|
_next(void 0);
|
|
8709
8709
|
});
|
|
@@ -10540,10 +10540,10 @@ var require_awaitify = __commonJS({
|
|
|
10540
10540
|
if (typeof args2[arity - 1] === "function") {
|
|
10541
10541
|
return asyncFn.apply(this, args2);
|
|
10542
10542
|
}
|
|
10543
|
-
return new Promise((
|
|
10543
|
+
return new Promise((resolve26, reject) => {
|
|
10544
10544
|
args2[arity - 1] = (err, ...cbArgs) => {
|
|
10545
10545
|
if (err) return reject(err);
|
|
10546
|
-
|
|
10546
|
+
resolve26(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
|
|
10547
10547
|
};
|
|
10548
10548
|
asyncFn.apply(this, args2);
|
|
10549
10549
|
});
|
|
@@ -11172,13 +11172,13 @@ var require_diagnostics = __commonJS({
|
|
|
11172
11172
|
if (adapters[i6](namespace2)) return true;
|
|
11173
11173
|
}
|
|
11174
11174
|
if (!async.length) return false;
|
|
11175
|
-
return new Promise(function pinky(
|
|
11175
|
+
return new Promise(function pinky(resolve26) {
|
|
11176
11176
|
Promise.all(
|
|
11177
11177
|
async.map(function prebind(fn2) {
|
|
11178
11178
|
return fn2(namespace2);
|
|
11179
11179
|
})
|
|
11180
11180
|
).then(function resolved(values) {
|
|
11181
|
-
|
|
11181
|
+
resolve26(values.some(Boolean));
|
|
11182
11182
|
});
|
|
11183
11183
|
});
|
|
11184
11184
|
}
|
|
@@ -19073,7 +19073,7 @@ var require_lodash = __commonJS({
|
|
|
19073
19073
|
}
|
|
19074
19074
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
19075
19075
|
});
|
|
19076
|
-
function
|
|
19076
|
+
function join23(array, separator) {
|
|
19077
19077
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
19078
19078
|
}
|
|
19079
19079
|
function last2(array) {
|
|
@@ -20992,7 +20992,7 @@ var require_lodash = __commonJS({
|
|
|
20992
20992
|
lodash16.isUndefined = isUndefined4;
|
|
20993
20993
|
lodash16.isWeakMap = isWeakMap;
|
|
20994
20994
|
lodash16.isWeakSet = isWeakSet;
|
|
20995
|
-
lodash16.join =
|
|
20995
|
+
lodash16.join = join23;
|
|
20996
20996
|
lodash16.kebabCase = kebabCase;
|
|
20997
20997
|
lodash16.last = last2;
|
|
20998
20998
|
lodash16.lastIndexOf = lastIndexOf;
|
|
@@ -29988,7 +29988,7 @@ var require_builder = __commonJS({
|
|
|
29988
29988
|
}
|
|
29989
29989
|
};
|
|
29990
29990
|
exports2.SeqBuilder = SeqBuilder;
|
|
29991
|
-
function
|
|
29991
|
+
function join23(first2, second, ...others) {
|
|
29992
29992
|
const seq = new SeqBuilder(first2, second);
|
|
29993
29993
|
if (!others.length) {
|
|
29994
29994
|
return seq;
|
|
@@ -29997,7 +29997,7 @@ var require_builder = __commonJS({
|
|
|
29997
29997
|
return res.join(query);
|
|
29998
29998
|
}, seq);
|
|
29999
29999
|
}
|
|
30000
|
-
exports2.join =
|
|
30000
|
+
exports2.join = join23;
|
|
30001
30001
|
var SymBuilder = class extends AbstractBuilder {
|
|
30002
30002
|
constructor(opts) {
|
|
30003
30003
|
super();
|
|
@@ -50461,13 +50461,13 @@ var require_lib12 = __commonJS({
|
|
|
50461
50461
|
};
|
|
50462
50462
|
}
|
|
50463
50463
|
function serializeActiveFile(absoluteName) {
|
|
50464
|
-
return new Promise((
|
|
50464
|
+
return new Promise((resolve26) => {
|
|
50465
50465
|
if (!activeFiles[absoluteName]) {
|
|
50466
50466
|
activeFiles[absoluteName] = [];
|
|
50467
50467
|
}
|
|
50468
|
-
activeFiles[absoluteName].push(
|
|
50468
|
+
activeFiles[absoluteName].push(resolve26);
|
|
50469
50469
|
if (activeFiles[absoluteName].length === 1) {
|
|
50470
|
-
|
|
50470
|
+
resolve26();
|
|
50471
50471
|
}
|
|
50472
50472
|
});
|
|
50473
50473
|
}
|
|
@@ -51739,12 +51739,12 @@ var require_isexe = __commonJS({
|
|
|
51739
51739
|
if (typeof Promise !== "function") {
|
|
51740
51740
|
throw new TypeError("callback not provided");
|
|
51741
51741
|
}
|
|
51742
|
-
return new Promise(function(
|
|
51742
|
+
return new Promise(function(resolve26, reject) {
|
|
51743
51743
|
isexe(path2, options || {}, function(er, is4) {
|
|
51744
51744
|
if (er) {
|
|
51745
51745
|
reject(er);
|
|
51746
51746
|
} else {
|
|
51747
|
-
|
|
51747
|
+
resolve26(is4);
|
|
51748
51748
|
}
|
|
51749
51749
|
});
|
|
51750
51750
|
});
|
|
@@ -51806,27 +51806,27 @@ var require_which = __commonJS({
|
|
|
51806
51806
|
opt = {};
|
|
51807
51807
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
51808
51808
|
const found = [];
|
|
51809
|
-
const step = (i6) => new Promise((
|
|
51809
|
+
const step = (i6) => new Promise((resolve26, reject) => {
|
|
51810
51810
|
if (i6 === pathEnv.length)
|
|
51811
|
-
return opt.all && found.length ?
|
|
51811
|
+
return opt.all && found.length ? resolve26(found) : reject(getNotFoundError(cmd));
|
|
51812
51812
|
const ppRaw = pathEnv[i6];
|
|
51813
51813
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
51814
51814
|
const pCmd = path2.join(pathPart, cmd);
|
|
51815
51815
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
51816
|
-
|
|
51816
|
+
resolve26(subStep(p3, i6, 0));
|
|
51817
51817
|
});
|
|
51818
|
-
const subStep = (p3, i6, ii) => new Promise((
|
|
51818
|
+
const subStep = (p3, i6, ii) => new Promise((resolve26, reject) => {
|
|
51819
51819
|
if (ii === pathExt.length)
|
|
51820
|
-
return
|
|
51820
|
+
return resolve26(step(i6 + 1));
|
|
51821
51821
|
const ext2 = pathExt[ii];
|
|
51822
51822
|
isexe(p3 + ext2, { pathExt: pathExtExe }, (er, is4) => {
|
|
51823
51823
|
if (!er && is4) {
|
|
51824
51824
|
if (opt.all)
|
|
51825
51825
|
found.push(p3 + ext2);
|
|
51826
51826
|
else
|
|
51827
|
-
return
|
|
51827
|
+
return resolve26(p3 + ext2);
|
|
51828
51828
|
}
|
|
51829
|
-
return
|
|
51829
|
+
return resolve26(subStep(p3, i6, ii + 1));
|
|
51830
51830
|
});
|
|
51831
51831
|
});
|
|
51832
51832
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -51902,27 +51902,27 @@ var require_which2 = __commonJS({
|
|
|
51902
51902
|
opt = {};
|
|
51903
51903
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
51904
51904
|
const found = [];
|
|
51905
|
-
const step = (i6) => new Promise((
|
|
51905
|
+
const step = (i6) => new Promise((resolve26, reject) => {
|
|
51906
51906
|
if (i6 === pathEnv.length)
|
|
51907
|
-
return opt.all && found.length ?
|
|
51907
|
+
return opt.all && found.length ? resolve26(found) : reject(getNotFoundError(cmd));
|
|
51908
51908
|
const ppRaw = pathEnv[i6];
|
|
51909
51909
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
51910
51910
|
const pCmd = path2.join(pathPart, cmd);
|
|
51911
51911
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
51912
|
-
|
|
51912
|
+
resolve26(subStep(p3, i6, 0));
|
|
51913
51913
|
});
|
|
51914
|
-
const subStep = (p3, i6, ii) => new Promise((
|
|
51914
|
+
const subStep = (p3, i6, ii) => new Promise((resolve26, reject) => {
|
|
51915
51915
|
if (ii === pathExt.length)
|
|
51916
|
-
return
|
|
51916
|
+
return resolve26(step(i6 + 1));
|
|
51917
51917
|
const ext2 = pathExt[ii];
|
|
51918
51918
|
isexe(p3 + ext2, { pathExt: pathExtExe }, (er, is4) => {
|
|
51919
51919
|
if (!er && is4) {
|
|
51920
51920
|
if (opt.all)
|
|
51921
51921
|
found.push(p3 + ext2);
|
|
51922
51922
|
else
|
|
51923
|
-
return
|
|
51923
|
+
return resolve26(p3 + ext2);
|
|
51924
51924
|
}
|
|
51925
|
-
return
|
|
51925
|
+
return resolve26(subStep(p3, i6, ii + 1));
|
|
51926
51926
|
});
|
|
51927
51927
|
});
|
|
51928
51928
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -52864,7 +52864,7 @@ var require_kill = __commonJS({
|
|
|
52864
52864
|
return spawnedPromise;
|
|
52865
52865
|
}
|
|
52866
52866
|
let timeoutId;
|
|
52867
|
-
const timeoutPromise = new Promise((
|
|
52867
|
+
const timeoutPromise = new Promise((resolve26, reject) => {
|
|
52868
52868
|
timeoutId = setTimeout(() => {
|
|
52869
52869
|
timeoutKill(spawned, killSignal, reject);
|
|
52870
52870
|
}, timeout);
|
|
@@ -52970,7 +52970,7 @@ var require_get_stream = __commonJS({
|
|
|
52970
52970
|
};
|
|
52971
52971
|
const { maxBuffer } = options;
|
|
52972
52972
|
const stream12 = bufferStream(options);
|
|
52973
|
-
await new Promise((
|
|
52973
|
+
await new Promise((resolve26, reject) => {
|
|
52974
52974
|
const rejectPromise = (error) => {
|
|
52975
52975
|
if (error && stream12.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
52976
52976
|
error.bufferedData = stream12.getBufferedValue();
|
|
@@ -52980,7 +52980,7 @@ var require_get_stream = __commonJS({
|
|
|
52980
52980
|
(async () => {
|
|
52981
52981
|
try {
|
|
52982
52982
|
await streamPipelinePromisified(inputStream, stream12);
|
|
52983
|
-
|
|
52983
|
+
resolve26();
|
|
52984
52984
|
} catch (error) {
|
|
52985
52985
|
rejectPromise(error);
|
|
52986
52986
|
}
|
|
@@ -53137,9 +53137,9 @@ var require_promise = __commonJS({
|
|
|
53137
53137
|
return spawned;
|
|
53138
53138
|
};
|
|
53139
53139
|
var getSpawnedPromise = (spawned) => {
|
|
53140
|
-
return new Promise((
|
|
53140
|
+
return new Promise((resolve26, reject) => {
|
|
53141
53141
|
spawned.on("exit", (exitCode, signal) => {
|
|
53142
|
-
|
|
53142
|
+
resolve26({ exitCode, signal });
|
|
53143
53143
|
});
|
|
53144
53144
|
spawned.on("error", (error) => {
|
|
53145
53145
|
reject(error);
|
|
@@ -54209,9 +54209,9 @@ var require_graceful_git = __commonJS({
|
|
|
54209
54209
|
async function gracefulGit(args2, opts) {
|
|
54210
54210
|
opts = opts || {};
|
|
54211
54211
|
const operation = retry.operation(Object.assign({}, RETRY_OPTIONS, opts));
|
|
54212
|
-
return new Promise((
|
|
54212
|
+
return new Promise((resolve26, reject) => {
|
|
54213
54213
|
operation.attempt((currentAttempt) => {
|
|
54214
|
-
noRetry(args2, opts).then(
|
|
54214
|
+
noRetry(args2, opts).then(resolve26).catch((err) => {
|
|
54215
54215
|
if (operation.retry(err)) {
|
|
54216
54216
|
return;
|
|
54217
54217
|
}
|
|
@@ -55603,7 +55603,7 @@ var require_dist3 = __commonJS({
|
|
|
55603
55603
|
};
|
|
55604
55604
|
var supportedSchemas = /* @__PURE__ */ new Set(["data:", "http:", "https:"]);
|
|
55605
55605
|
async function fetch3(url5, options_) {
|
|
55606
|
-
return new Promise((
|
|
55606
|
+
return new Promise((resolve26, reject) => {
|
|
55607
55607
|
const request = new Request2(url5, options_);
|
|
55608
55608
|
const options = getNodeRequestOptions(request);
|
|
55609
55609
|
if (!supportedSchemas.has(options.protocol)) {
|
|
@@ -55612,7 +55612,7 @@ var require_dist3 = __commonJS({
|
|
|
55612
55612
|
if (options.protocol === "data:") {
|
|
55613
55613
|
const data2 = dataUriToBuffer(request.url);
|
|
55614
55614
|
const response2 = new Response2(data2, { headers: { "Content-Type": data2.typeFull } });
|
|
55615
|
-
|
|
55615
|
+
resolve26(response2);
|
|
55616
55616
|
return;
|
|
55617
55617
|
}
|
|
55618
55618
|
const send = (options.protocol === "https:" ? https4 : http4).request;
|
|
@@ -55701,7 +55701,7 @@ var require_dist3 = __commonJS({
|
|
|
55701
55701
|
requestOptions.body = void 0;
|
|
55702
55702
|
requestOptions.headers.delete("content-length");
|
|
55703
55703
|
}
|
|
55704
|
-
|
|
55704
|
+
resolve26(fetch3(new Request2(locationURL, requestOptions)));
|
|
55705
55705
|
finalize();
|
|
55706
55706
|
return;
|
|
55707
55707
|
}
|
|
@@ -55730,7 +55730,7 @@ var require_dist3 = __commonJS({
|
|
|
55730
55730
|
const codings = headers.get("Content-Encoding");
|
|
55731
55731
|
if (!request.compress || request.method === "HEAD" || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
|
|
55732
55732
|
response = new Response2(body, responseOptions);
|
|
55733
|
-
|
|
55733
|
+
resolve26(response);
|
|
55734
55734
|
return;
|
|
55735
55735
|
}
|
|
55736
55736
|
const zlibOptions4 = {
|
|
@@ -55742,7 +55742,7 @@ var require_dist3 = __commonJS({
|
|
|
55742
55742
|
reject(error);
|
|
55743
55743
|
});
|
|
55744
55744
|
response = new Response2(body, responseOptions);
|
|
55745
|
-
|
|
55745
|
+
resolve26(response);
|
|
55746
55746
|
return;
|
|
55747
55747
|
}
|
|
55748
55748
|
if (codings === "deflate" || codings === "x-deflate") {
|
|
@@ -55760,7 +55760,7 @@ var require_dist3 = __commonJS({
|
|
|
55760
55760
|
});
|
|
55761
55761
|
}
|
|
55762
55762
|
response = new Response2(body, responseOptions);
|
|
55763
|
-
|
|
55763
|
+
resolve26(response);
|
|
55764
55764
|
});
|
|
55765
55765
|
return;
|
|
55766
55766
|
}
|
|
@@ -55769,11 +55769,11 @@ var require_dist3 = __commonJS({
|
|
|
55769
55769
|
reject(error);
|
|
55770
55770
|
});
|
|
55771
55771
|
response = new Response2(body, responseOptions);
|
|
55772
|
-
|
|
55772
|
+
resolve26(response);
|
|
55773
55773
|
return;
|
|
55774
55774
|
}
|
|
55775
55775
|
response = new Response2(body, responseOptions);
|
|
55776
|
-
|
|
55776
|
+
resolve26(response);
|
|
55777
55777
|
});
|
|
55778
55778
|
writeToStream(request_, request);
|
|
55779
55779
|
});
|
|
@@ -55851,14 +55851,14 @@ var require_fetch = __commonJS({
|
|
|
55851
55851
|
retries: maxRetries
|
|
55852
55852
|
});
|
|
55853
55853
|
try {
|
|
55854
|
-
return await new Promise((
|
|
55854
|
+
return await new Promise((resolve26, reject) => {
|
|
55855
55855
|
op.attempt(async (attempt) => {
|
|
55856
55856
|
try {
|
|
55857
55857
|
const res = await (0, node_fetch_1.default)(url4, opts);
|
|
55858
55858
|
if (res.status >= 500 && res.status < 600 || [408, 409, 420, 429].includes(res.status)) {
|
|
55859
55859
|
throw new ResponseError(res);
|
|
55860
55860
|
} else {
|
|
55861
|
-
|
|
55861
|
+
resolve26(res);
|
|
55862
55862
|
}
|
|
55863
55863
|
} catch (error) {
|
|
55864
55864
|
(0, assert_1.default)(util_1.default.types.isNativeError(error));
|
|
@@ -58133,12 +58133,12 @@ var require_promisify = __commonJS({
|
|
|
58133
58133
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58134
58134
|
function promisify2(fn2) {
|
|
58135
58135
|
return function(req, opts) {
|
|
58136
|
-
return new Promise((
|
|
58136
|
+
return new Promise((resolve26, reject) => {
|
|
58137
58137
|
fn2.call(this, req, opts, (err, rtn) => {
|
|
58138
58138
|
if (err) {
|
|
58139
58139
|
reject(err);
|
|
58140
58140
|
} else {
|
|
58141
|
-
|
|
58141
|
+
resolve26(rtn);
|
|
58142
58142
|
}
|
|
58143
58143
|
});
|
|
58144
58144
|
});
|
|
@@ -58342,7 +58342,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
58342
58342
|
var debug_1 = __importDefault(require_src3());
|
|
58343
58343
|
var debug = debug_1.default("https-proxy-agent:parse-proxy-response");
|
|
58344
58344
|
function parseProxyResponse(socket) {
|
|
58345
|
-
return new Promise((
|
|
58345
|
+
return new Promise((resolve26, reject) => {
|
|
58346
58346
|
let buffersLength = 0;
|
|
58347
58347
|
const buffers = [];
|
|
58348
58348
|
function read() {
|
|
@@ -58382,7 +58382,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
58382
58382
|
const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
|
|
58383
58383
|
const statusCode = +firstLine.split(" ")[1];
|
|
58384
58384
|
debug("got proxy server response: %o", firstLine);
|
|
58385
|
-
|
|
58385
|
+
resolve26({
|
|
58386
58386
|
statusCode,
|
|
58387
58387
|
buffered
|
|
58388
58388
|
});
|
|
@@ -58403,11 +58403,11 @@ var require_agent2 = __commonJS({
|
|
|
58403
58403
|
"use strict";
|
|
58404
58404
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
58405
58405
|
function adopt(value) {
|
|
58406
|
-
return value instanceof P ? value : new P(function(
|
|
58407
|
-
|
|
58406
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
58407
|
+
resolve26(value);
|
|
58408
58408
|
});
|
|
58409
58409
|
}
|
|
58410
|
-
return new (P || (P = Promise))(function(
|
|
58410
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
58411
58411
|
function fulfilled(value) {
|
|
58412
58412
|
try {
|
|
58413
58413
|
step(generator.next(value));
|
|
@@ -58423,7 +58423,7 @@ var require_agent2 = __commonJS({
|
|
|
58423
58423
|
}
|
|
58424
58424
|
}
|
|
58425
58425
|
function step(result) {
|
|
58426
|
-
result.done ?
|
|
58426
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
58427
58427
|
}
|
|
58428
58428
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
58429
58429
|
});
|
|
@@ -58563,7 +58563,7 @@ var require_dist4 = __commonJS({
|
|
|
58563
58563
|
"use strict";
|
|
58564
58564
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58565
58565
|
function once8(emitter, name, { signal } = {}) {
|
|
58566
|
-
return new Promise((
|
|
58566
|
+
return new Promise((resolve26, reject) => {
|
|
58567
58567
|
function cleanup() {
|
|
58568
58568
|
signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", cleanup);
|
|
58569
58569
|
emitter.removeListener(name, onEvent);
|
|
@@ -58571,7 +58571,7 @@ var require_dist4 = __commonJS({
|
|
|
58571
58571
|
}
|
|
58572
58572
|
function onEvent(...args2) {
|
|
58573
58573
|
cleanup();
|
|
58574
|
-
|
|
58574
|
+
resolve26(args2);
|
|
58575
58575
|
}
|
|
58576
58576
|
function onError(err) {
|
|
58577
58577
|
cleanup();
|
|
@@ -58592,11 +58592,11 @@ var require_agent3 = __commonJS({
|
|
|
58592
58592
|
"use strict";
|
|
58593
58593
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
58594
58594
|
function adopt(value) {
|
|
58595
|
-
return value instanceof P ? value : new P(function(
|
|
58596
|
-
|
|
58595
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
58596
|
+
resolve26(value);
|
|
58597
58597
|
});
|
|
58598
58598
|
}
|
|
58599
|
-
return new (P || (P = Promise))(function(
|
|
58599
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
58600
58600
|
function fulfilled(value) {
|
|
58601
58601
|
try {
|
|
58602
58602
|
step(generator.next(value));
|
|
@@ -58612,7 +58612,7 @@ var require_agent3 = __commonJS({
|
|
|
58612
58612
|
}
|
|
58613
58613
|
}
|
|
58614
58614
|
function step(result) {
|
|
58615
|
-
result.done ?
|
|
58615
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
58616
58616
|
}
|
|
58617
58617
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
58618
58618
|
});
|
|
@@ -60540,11 +60540,11 @@ var require_socksclient = __commonJS({
|
|
|
60540
60540
|
"use strict";
|
|
60541
60541
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
60542
60542
|
function adopt(value) {
|
|
60543
|
-
return value instanceof P ? value : new P(function(
|
|
60544
|
-
|
|
60543
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
60544
|
+
resolve26(value);
|
|
60545
60545
|
});
|
|
60546
60546
|
}
|
|
60547
|
-
return new (P || (P = Promise))(function(
|
|
60547
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
60548
60548
|
function fulfilled(value) {
|
|
60549
60549
|
try {
|
|
60550
60550
|
step(generator.next(value));
|
|
@@ -60560,7 +60560,7 @@ var require_socksclient = __commonJS({
|
|
|
60560
60560
|
}
|
|
60561
60561
|
}
|
|
60562
60562
|
function step(result) {
|
|
60563
|
-
result.done ?
|
|
60563
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
60564
60564
|
}
|
|
60565
60565
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
60566
60566
|
});
|
|
@@ -60594,13 +60594,13 @@ var require_socksclient = __commonJS({
|
|
|
60594
60594
|
* @returns { Promise }
|
|
60595
60595
|
*/
|
|
60596
60596
|
static createConnection(options, callback) {
|
|
60597
|
-
return new Promise((
|
|
60597
|
+
return new Promise((resolve26, reject) => {
|
|
60598
60598
|
try {
|
|
60599
60599
|
(0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
|
|
60600
60600
|
} catch (err) {
|
|
60601
60601
|
if (typeof callback === "function") {
|
|
60602
60602
|
callback(err);
|
|
60603
|
-
return
|
|
60603
|
+
return resolve26(err);
|
|
60604
60604
|
} else {
|
|
60605
60605
|
return reject(err);
|
|
60606
60606
|
}
|
|
@@ -60611,16 +60611,16 @@ var require_socksclient = __commonJS({
|
|
|
60611
60611
|
client.removeAllListeners();
|
|
60612
60612
|
if (typeof callback === "function") {
|
|
60613
60613
|
callback(null, info);
|
|
60614
|
-
|
|
60614
|
+
resolve26(info);
|
|
60615
60615
|
} else {
|
|
60616
|
-
|
|
60616
|
+
resolve26(info);
|
|
60617
60617
|
}
|
|
60618
60618
|
});
|
|
60619
60619
|
client.once("error", (err) => {
|
|
60620
60620
|
client.removeAllListeners();
|
|
60621
60621
|
if (typeof callback === "function") {
|
|
60622
60622
|
callback(err);
|
|
60623
|
-
|
|
60623
|
+
resolve26(err);
|
|
60624
60624
|
} else {
|
|
60625
60625
|
reject(err);
|
|
60626
60626
|
}
|
|
@@ -60637,13 +60637,13 @@ var require_socksclient = __commonJS({
|
|
|
60637
60637
|
* @returns { Promise }
|
|
60638
60638
|
*/
|
|
60639
60639
|
static createConnectionChain(options, callback) {
|
|
60640
|
-
return new Promise((
|
|
60640
|
+
return new Promise((resolve26, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
60641
60641
|
try {
|
|
60642
60642
|
(0, helpers_1.validateSocksClientChainOptions)(options);
|
|
60643
60643
|
} catch (err) {
|
|
60644
60644
|
if (typeof callback === "function") {
|
|
60645
60645
|
callback(err);
|
|
60646
|
-
return
|
|
60646
|
+
return resolve26(err);
|
|
60647
60647
|
} else {
|
|
60648
60648
|
return reject(err);
|
|
60649
60649
|
}
|
|
@@ -60669,14 +60669,14 @@ var require_socksclient = __commonJS({
|
|
|
60669
60669
|
}
|
|
60670
60670
|
if (typeof callback === "function") {
|
|
60671
60671
|
callback(null, { socket: sock });
|
|
60672
|
-
|
|
60672
|
+
resolve26({ socket: sock });
|
|
60673
60673
|
} else {
|
|
60674
|
-
|
|
60674
|
+
resolve26({ socket: sock });
|
|
60675
60675
|
}
|
|
60676
60676
|
} catch (err) {
|
|
60677
60677
|
if (typeof callback === "function") {
|
|
60678
60678
|
callback(err);
|
|
60679
|
-
|
|
60679
|
+
resolve26(err);
|
|
60680
60680
|
} else {
|
|
60681
60681
|
reject(err);
|
|
60682
60682
|
}
|
|
@@ -61244,11 +61244,11 @@ var require_agent4 = __commonJS({
|
|
|
61244
61244
|
"use strict";
|
|
61245
61245
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
61246
61246
|
function adopt(value) {
|
|
61247
|
-
return value instanceof P ? value : new P(function(
|
|
61248
|
-
|
|
61247
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
61248
|
+
resolve26(value);
|
|
61249
61249
|
});
|
|
61250
61250
|
}
|
|
61251
|
-
return new (P || (P = Promise))(function(
|
|
61251
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
61252
61252
|
function fulfilled(value) {
|
|
61253
61253
|
try {
|
|
61254
61254
|
step(generator.next(value));
|
|
@@ -61264,7 +61264,7 @@ var require_agent4 = __commonJS({
|
|
|
61264
61264
|
}
|
|
61265
61265
|
}
|
|
61266
61266
|
function step(result) {
|
|
61267
|
-
result.done ?
|
|
61267
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
61268
61268
|
}
|
|
61269
61269
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
61270
61270
|
});
|
|
@@ -61281,12 +61281,12 @@ var require_agent4 = __commonJS({
|
|
|
61281
61281
|
var socks_1 = require_build();
|
|
61282
61282
|
var debug = debug_1.default("socks-proxy-agent");
|
|
61283
61283
|
function dnsLookup(host) {
|
|
61284
|
-
return new Promise((
|
|
61284
|
+
return new Promise((resolve26, reject) => {
|
|
61285
61285
|
dns_1.default.lookup(host, (err, res) => {
|
|
61286
61286
|
if (err) {
|
|
61287
61287
|
reject(err);
|
|
61288
61288
|
} else {
|
|
61289
|
-
|
|
61289
|
+
resolve26(res);
|
|
61290
61290
|
}
|
|
61291
61291
|
});
|
|
61292
61292
|
});
|
|
@@ -64099,9 +64099,9 @@ var require_write = __commonJS({
|
|
|
64099
64099
|
var lockfileName_1 = require_lockfileName();
|
|
64100
64100
|
var lockfileFormatConverters_1 = require_lockfileFormatConverters();
|
|
64101
64101
|
async function writeFileAtomic(filename, data2) {
|
|
64102
|
-
return new Promise((
|
|
64102
|
+
return new Promise((resolve26, reject) => {
|
|
64103
64103
|
(0, write_file_atomic_1.default)(filename, data2, {}, (err) => {
|
|
64104
|
-
err != null ? reject(err) :
|
|
64104
|
+
err != null ? reject(err) : resolve26();
|
|
64105
64105
|
});
|
|
64106
64106
|
});
|
|
64107
64107
|
}
|
|
@@ -64205,14 +64205,14 @@ var require_existsWantedLockfile = __commonJS({
|
|
|
64205
64205
|
mergeGitBranchLockfiles: false
|
|
64206
64206
|
}) {
|
|
64207
64207
|
const wantedLockfile = await (0, lockfileName_1.getWantedLockfileName)(opts);
|
|
64208
|
-
return new Promise((
|
|
64208
|
+
return new Promise((resolve26, reject) => {
|
|
64209
64209
|
fs_1.default.access(path_1.default.join(pkgPath, wantedLockfile), (err) => {
|
|
64210
64210
|
if (err == null) {
|
|
64211
|
-
|
|
64211
|
+
resolve26(true);
|
|
64212
64212
|
return;
|
|
64213
64213
|
}
|
|
64214
64214
|
if (err.code === "ENOENT") {
|
|
64215
|
-
|
|
64215
|
+
resolve26(false);
|
|
64216
64216
|
return;
|
|
64217
64217
|
}
|
|
64218
64218
|
reject(err);
|
|
@@ -81093,7 +81093,7 @@ var require_lockfile = __commonJS({
|
|
|
81093
81093
|
exports3.default = function(fn2) {
|
|
81094
81094
|
return function() {
|
|
81095
81095
|
var gen = fn2.apply(this, arguments);
|
|
81096
|
-
return new _promise2.default(function(
|
|
81096
|
+
return new _promise2.default(function(resolve26, reject) {
|
|
81097
81097
|
function step(key, arg) {
|
|
81098
81098
|
try {
|
|
81099
81099
|
var info = gen[key](arg);
|
|
@@ -81103,7 +81103,7 @@ var require_lockfile = __commonJS({
|
|
|
81103
81103
|
return;
|
|
81104
81104
|
}
|
|
81105
81105
|
if (info.done) {
|
|
81106
|
-
|
|
81106
|
+
resolve26(value);
|
|
81107
81107
|
} else {
|
|
81108
81108
|
return _promise2.default.resolve(value).then(function(value2) {
|
|
81109
81109
|
step("next", value2);
|
|
@@ -82071,12 +82071,12 @@ var require_lockfile = __commonJS({
|
|
|
82071
82071
|
return copyBulk([{ src, dest }], reporter);
|
|
82072
82072
|
}
|
|
82073
82073
|
function _readFile(loc, encoding) {
|
|
82074
|
-
return new Promise((
|
|
82074
|
+
return new Promise((resolve26, reject) => {
|
|
82075
82075
|
(_fs || _load_fs()).default.readFile(loc, encoding, function(err, content) {
|
|
82076
82076
|
if (err) {
|
|
82077
82077
|
reject(err);
|
|
82078
82078
|
} else {
|
|
82079
|
-
|
|
82079
|
+
resolve26(content);
|
|
82080
82080
|
}
|
|
82081
82081
|
});
|
|
82082
82082
|
});
|
|
@@ -82309,8 +82309,8 @@ var require_lockfile = __commonJS({
|
|
|
82309
82309
|
return true;
|
|
82310
82310
|
}
|
|
82311
82311
|
function sleep(ms) {
|
|
82312
|
-
return new Promise((
|
|
82313
|
-
setTimeout(
|
|
82312
|
+
return new Promise((resolve26) => {
|
|
82313
|
+
setTimeout(resolve26, ms);
|
|
82314
82314
|
});
|
|
82315
82315
|
}
|
|
82316
82316
|
},
|
|
@@ -82767,13 +82767,13 @@ var require_lockfile = __commonJS({
|
|
|
82767
82767
|
exports3.promisify = promisify2;
|
|
82768
82768
|
exports3.queue = queue;
|
|
82769
82769
|
function wait(delay) {
|
|
82770
|
-
return new Promise((
|
|
82771
|
-
setTimeout(
|
|
82770
|
+
return new Promise((resolve26) => {
|
|
82771
|
+
setTimeout(resolve26, delay);
|
|
82772
82772
|
});
|
|
82773
82773
|
}
|
|
82774
82774
|
function promisify2(fn2, firstData) {
|
|
82775
82775
|
return function(...args2) {
|
|
82776
|
-
return new Promise(function(
|
|
82776
|
+
return new Promise(function(resolve26, reject) {
|
|
82777
82777
|
args2.push(function(err, ...result) {
|
|
82778
82778
|
let res = result;
|
|
82779
82779
|
if (result.length <= 1) {
|
|
@@ -82786,7 +82786,7 @@ var require_lockfile = __commonJS({
|
|
|
82786
82786
|
if (err) {
|
|
82787
82787
|
reject(err);
|
|
82788
82788
|
} else {
|
|
82789
|
-
|
|
82789
|
+
resolve26(res);
|
|
82790
82790
|
}
|
|
82791
82791
|
});
|
|
82792
82792
|
fn2.apply(null, args2);
|
|
@@ -82801,7 +82801,7 @@ var require_lockfile = __commonJS({
|
|
|
82801
82801
|
if (!total) {
|
|
82802
82802
|
return Promise.resolve(results);
|
|
82803
82803
|
}
|
|
82804
|
-
return new Promise((
|
|
82804
|
+
return new Promise((resolve26, reject) => {
|
|
82805
82805
|
for (let i6 = 0; i6 < concurrency; i6++) {
|
|
82806
82806
|
next2();
|
|
82807
82807
|
}
|
|
@@ -82812,7 +82812,7 @@ var require_lockfile = __commonJS({
|
|
|
82812
82812
|
results.push(result);
|
|
82813
82813
|
total--;
|
|
82814
82814
|
if (total === 0) {
|
|
82815
|
-
|
|
82815
|
+
resolve26(results);
|
|
82816
82816
|
} else {
|
|
82817
82817
|
if (arr.length) {
|
|
82818
82818
|
next2();
|
|
@@ -83170,7 +83170,7 @@ var require_lockfile = __commonJS({
|
|
|
83170
83170
|
opts = opts || {};
|
|
83171
83171
|
const P = opts.Promise || Promise;
|
|
83172
83172
|
const istream = integrityStream(opts);
|
|
83173
|
-
return new P((
|
|
83173
|
+
return new P((resolve26, reject) => {
|
|
83174
83174
|
stream11.pipe(istream);
|
|
83175
83175
|
stream11.on("error", reject);
|
|
83176
83176
|
istream.on("error", reject);
|
|
@@ -83178,7 +83178,7 @@ var require_lockfile = __commonJS({
|
|
|
83178
83178
|
istream.on("integrity", (s4) => {
|
|
83179
83179
|
sri = s4;
|
|
83180
83180
|
});
|
|
83181
|
-
istream.on("end", () =>
|
|
83181
|
+
istream.on("end", () => resolve26(sri));
|
|
83182
83182
|
istream.on("data", () => {
|
|
83183
83183
|
});
|
|
83184
83184
|
});
|
|
@@ -83231,7 +83231,7 @@ var require_lockfile = __commonJS({
|
|
|
83231
83231
|
const checker = integrityStream(Object.assign({}, opts, {
|
|
83232
83232
|
integrity: sri
|
|
83233
83233
|
}));
|
|
83234
|
-
return new P((
|
|
83234
|
+
return new P((resolve26, reject) => {
|
|
83235
83235
|
stream11.pipe(checker);
|
|
83236
83236
|
stream11.on("error", reject);
|
|
83237
83237
|
checker.on("error", reject);
|
|
@@ -83239,7 +83239,7 @@ var require_lockfile = __commonJS({
|
|
|
83239
83239
|
checker.on("verified", (s4) => {
|
|
83240
83240
|
sri2 = s4;
|
|
83241
83241
|
});
|
|
83242
|
-
checker.on("end", () =>
|
|
83242
|
+
checker.on("end", () => resolve26(sri2));
|
|
83243
83243
|
checker.on("data", () => {
|
|
83244
83244
|
});
|
|
83245
83245
|
});
|
|
@@ -83980,13 +83980,13 @@ var require_lockfile = __commonJS({
|
|
|
83980
83980
|
"use strict";
|
|
83981
83981
|
var aFunction = __webpack_require__(46);
|
|
83982
83982
|
function PromiseCapability(C2) {
|
|
83983
|
-
var
|
|
83983
|
+
var resolve26, reject;
|
|
83984
83984
|
this.promise = new C2(function($$resolve, $$reject) {
|
|
83985
|
-
if (
|
|
83986
|
-
|
|
83985
|
+
if (resolve26 !== void 0 || reject !== void 0) throw TypeError("Bad Promise constructor");
|
|
83986
|
+
resolve26 = $$resolve;
|
|
83987
83987
|
reject = $$reject;
|
|
83988
83988
|
});
|
|
83989
|
-
this.resolve = aFunction(
|
|
83989
|
+
this.resolve = aFunction(resolve26);
|
|
83990
83990
|
this.reject = aFunction(reject);
|
|
83991
83991
|
}
|
|
83992
83992
|
module3.exports.f = function(C2) {
|
|
@@ -85015,9 +85015,9 @@ var require_lockfile = __commonJS({
|
|
|
85015
85015
|
} else {
|
|
85016
85016
|
this.stillActive();
|
|
85017
85017
|
}
|
|
85018
|
-
return new Promise((
|
|
85018
|
+
return new Promise((resolve26, reject) => {
|
|
85019
85019
|
const queue = this.queue[key] = this.queue[key] || [];
|
|
85020
|
-
queue.push({ factory, resolve:
|
|
85020
|
+
queue.push({ factory, resolve: resolve26, reject });
|
|
85021
85021
|
if (!this.running[key]) {
|
|
85022
85022
|
this.shift(key);
|
|
85023
85023
|
}
|
|
@@ -85041,7 +85041,7 @@ var require_lockfile = __commonJS({
|
|
|
85041
85041
|
return;
|
|
85042
85042
|
}
|
|
85043
85043
|
var _queue$shift = queue.shift();
|
|
85044
|
-
const
|
|
85044
|
+
const resolve26 = _queue$shift.resolve, reject = _queue$shift.reject, factory = _queue$shift.factory;
|
|
85045
85045
|
if (!queue.length) {
|
|
85046
85046
|
delete this.queue[key];
|
|
85047
85047
|
}
|
|
@@ -85053,7 +85053,7 @@ var require_lockfile = __commonJS({
|
|
|
85053
85053
|
this.running[key] = true;
|
|
85054
85054
|
this.runningCount++;
|
|
85055
85055
|
factory().then(function(val2) {
|
|
85056
|
-
|
|
85056
|
+
resolve26(val2);
|
|
85057
85057
|
next2();
|
|
85058
85058
|
return null;
|
|
85059
85059
|
}).catch(function(err) {
|
|
@@ -85236,8 +85236,8 @@ var require_lockfile = __commonJS({
|
|
|
85236
85236
|
anObject(C2);
|
|
85237
85237
|
if (isObject4(x2) && x2.constructor === C2) return x2;
|
|
85238
85238
|
var promiseCapability = newPromiseCapability.f(C2);
|
|
85239
|
-
var
|
|
85240
|
-
|
|
85239
|
+
var resolve26 = promiseCapability.resolve;
|
|
85240
|
+
resolve26(x2);
|
|
85241
85241
|
return promiseCapability.promise;
|
|
85242
85242
|
};
|
|
85243
85243
|
},
|
|
@@ -86136,11 +86136,11 @@ ${indent2}`);
|
|
|
86136
86136
|
})();
|
|
86137
86137
|
const copyFilePoly = (src, dest, flags, data2) => {
|
|
86138
86138
|
if ((_fs || _load_fs()).default.copyFile) {
|
|
86139
|
-
return new Promise((
|
|
86139
|
+
return new Promise((resolve26, reject) => (_fs || _load_fs()).default.copyFile(src, dest, flags, (err) => {
|
|
86140
86140
|
if (err) {
|
|
86141
86141
|
reject(err);
|
|
86142
86142
|
} else {
|
|
86143
|
-
fixTimes(void 0, dest, data2).then(() =>
|
|
86143
|
+
fixTimes(void 0, dest, data2).then(() => resolve26()).catch((ex) => reject(ex));
|
|
86144
86144
|
}
|
|
86145
86145
|
}));
|
|
86146
86146
|
} else {
|
|
@@ -87049,7 +87049,7 @@ ${indent2}`);
|
|
|
87049
87049
|
var i6 = 0;
|
|
87050
87050
|
var run3 = function(reaction) {
|
|
87051
87051
|
var handler = ok ? reaction.ok : reaction.fail;
|
|
87052
|
-
var
|
|
87052
|
+
var resolve26 = reaction.resolve;
|
|
87053
87053
|
var reject = reaction.reject;
|
|
87054
87054
|
var domain = reaction.domain;
|
|
87055
87055
|
var result, then, exited;
|
|
@@ -87071,8 +87071,8 @@ ${indent2}`);
|
|
|
87071
87071
|
if (result === reaction.promise) {
|
|
87072
87072
|
reject(TypeError2("Promise-chain cycle"));
|
|
87073
87073
|
} else if (then = isThenable4(result)) {
|
|
87074
|
-
then.call(result,
|
|
87075
|
-
} else
|
|
87074
|
+
then.call(result, resolve26, reject);
|
|
87075
|
+
} else resolve26(result);
|
|
87076
87076
|
} else reject(value);
|
|
87077
87077
|
} catch (e) {
|
|
87078
87078
|
if (domain && !exited) domain.exit();
|
|
@@ -87217,7 +87217,7 @@ ${indent2}`);
|
|
|
87217
87217
|
});
|
|
87218
87218
|
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
|
|
87219
87219
|
// 25.4.4.6 Promise.resolve(x)
|
|
87220
|
-
resolve: function
|
|
87220
|
+
resolve: function resolve26(x2) {
|
|
87221
87221
|
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x2);
|
|
87222
87222
|
}
|
|
87223
87223
|
});
|
|
@@ -87228,7 +87228,7 @@ ${indent2}`);
|
|
|
87228
87228
|
all: function all7(iterable) {
|
|
87229
87229
|
var C2 = this;
|
|
87230
87230
|
var capability = newPromiseCapability(C2);
|
|
87231
|
-
var
|
|
87231
|
+
var resolve26 = capability.resolve;
|
|
87232
87232
|
var reject = capability.reject;
|
|
87233
87233
|
var result = perform(function() {
|
|
87234
87234
|
var values = [];
|
|
@@ -87243,10 +87243,10 @@ ${indent2}`);
|
|
|
87243
87243
|
if (alreadyCalled) return;
|
|
87244
87244
|
alreadyCalled = true;
|
|
87245
87245
|
values[$index] = value;
|
|
87246
|
-
--remaining ||
|
|
87246
|
+
--remaining || resolve26(values);
|
|
87247
87247
|
}, reject);
|
|
87248
87248
|
});
|
|
87249
|
-
--remaining ||
|
|
87249
|
+
--remaining || resolve26(values);
|
|
87250
87250
|
});
|
|
87251
87251
|
if (result.e) reject(result.v);
|
|
87252
87252
|
return capability.promise;
|
|
@@ -96255,8 +96255,8 @@ var require_util4 = __commonJS({
|
|
|
96255
96255
|
function createDeferredPromise() {
|
|
96256
96256
|
let res;
|
|
96257
96257
|
let rej;
|
|
96258
|
-
const promise = new Promise((
|
|
96259
|
-
res =
|
|
96258
|
+
const promise = new Promise((resolve26, reject) => {
|
|
96259
|
+
res = resolve26;
|
|
96260
96260
|
rej = reject;
|
|
96261
96261
|
});
|
|
96262
96262
|
return { promise, resolve: res, reject: rej };
|
|
@@ -97760,8 +97760,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
97760
97760
|
});
|
|
97761
97761
|
}
|
|
97762
97762
|
});
|
|
97763
|
-
const busboyResolve = new Promise((
|
|
97764
|
-
busboy.on("finish",
|
|
97763
|
+
const busboyResolve = new Promise((resolve26, reject) => {
|
|
97764
|
+
busboy.on("finish", resolve26);
|
|
97765
97765
|
busboy.on("error", (err) => reject(new TypeError(err)));
|
|
97766
97766
|
});
|
|
97767
97767
|
if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk);
|
|
@@ -98295,9 +98295,9 @@ var require_dispatcher_base = __commonJS({
|
|
|
98295
98295
|
}
|
|
98296
98296
|
close(callback) {
|
|
98297
98297
|
if (callback === void 0) {
|
|
98298
|
-
return new Promise((
|
|
98298
|
+
return new Promise((resolve26, reject) => {
|
|
98299
98299
|
this.close((err, data2) => {
|
|
98300
|
-
return err ? reject(err) :
|
|
98300
|
+
return err ? reject(err) : resolve26(data2);
|
|
98301
98301
|
});
|
|
98302
98302
|
});
|
|
98303
98303
|
}
|
|
@@ -98335,12 +98335,12 @@ var require_dispatcher_base = __commonJS({
|
|
|
98335
98335
|
err = null;
|
|
98336
98336
|
}
|
|
98337
98337
|
if (callback === void 0) {
|
|
98338
|
-
return new Promise((
|
|
98338
|
+
return new Promise((resolve26, reject) => {
|
|
98339
98339
|
this.destroy(err, (err2, data2) => {
|
|
98340
98340
|
return err2 ? (
|
|
98341
98341
|
/* istanbul ignore next: should never error */
|
|
98342
98342
|
reject(err2)
|
|
98343
|
-
) :
|
|
98343
|
+
) : resolve26(data2);
|
|
98344
98344
|
});
|
|
98345
98345
|
});
|
|
98346
98346
|
}
|
|
@@ -99400,16 +99400,16 @@ var require_client = __commonJS({
|
|
|
99400
99400
|
return this[kNeedDrain] < 2;
|
|
99401
99401
|
}
|
|
99402
99402
|
async [kClose]() {
|
|
99403
|
-
return new Promise((
|
|
99403
|
+
return new Promise((resolve26) => {
|
|
99404
99404
|
if (!this[kSize]) {
|
|
99405
|
-
|
|
99405
|
+
resolve26(null);
|
|
99406
99406
|
} else {
|
|
99407
|
-
this[kClosedResolve] =
|
|
99407
|
+
this[kClosedResolve] = resolve26;
|
|
99408
99408
|
}
|
|
99409
99409
|
});
|
|
99410
99410
|
}
|
|
99411
99411
|
async [kDestroy](err) {
|
|
99412
|
-
return new Promise((
|
|
99412
|
+
return new Promise((resolve26) => {
|
|
99413
99413
|
const requests = this[kQueue].splice(this[kPendingIdx]);
|
|
99414
99414
|
for (let i6 = 0; i6 < requests.length; i6++) {
|
|
99415
99415
|
const request = requests[i6];
|
|
@@ -99420,7 +99420,7 @@ var require_client = __commonJS({
|
|
|
99420
99420
|
this[kClosedResolve]();
|
|
99421
99421
|
this[kClosedResolve] = null;
|
|
99422
99422
|
}
|
|
99423
|
-
|
|
99423
|
+
resolve26();
|
|
99424
99424
|
};
|
|
99425
99425
|
if (this[kHTTP2Session] != null) {
|
|
99426
99426
|
util9.destroy(this[kHTTP2Session], err);
|
|
@@ -100000,7 +100000,7 @@ var require_client = __commonJS({
|
|
|
100000
100000
|
});
|
|
100001
100001
|
}
|
|
100002
100002
|
try {
|
|
100003
|
-
const socket = await new Promise((
|
|
100003
|
+
const socket = await new Promise((resolve26, reject) => {
|
|
100004
100004
|
client[kConnector]({
|
|
100005
100005
|
host,
|
|
100006
100006
|
hostname,
|
|
@@ -100012,7 +100012,7 @@ var require_client = __commonJS({
|
|
|
100012
100012
|
if (err) {
|
|
100013
100013
|
reject(err);
|
|
100014
100014
|
} else {
|
|
100015
|
-
|
|
100015
|
+
resolve26(socket2);
|
|
100016
100016
|
}
|
|
100017
100017
|
});
|
|
100018
100018
|
});
|
|
@@ -100636,12 +100636,12 @@ upgrade: ${upgrade}\r
|
|
|
100636
100636
|
cb();
|
|
100637
100637
|
}
|
|
100638
100638
|
}
|
|
100639
|
-
const waitForDrain = () => new Promise((
|
|
100639
|
+
const waitForDrain = () => new Promise((resolve26, reject) => {
|
|
100640
100640
|
assert4(callback === null);
|
|
100641
100641
|
if (socket[kError]) {
|
|
100642
100642
|
reject(socket[kError]);
|
|
100643
100643
|
} else {
|
|
100644
|
-
callback =
|
|
100644
|
+
callback = resolve26;
|
|
100645
100645
|
}
|
|
100646
100646
|
});
|
|
100647
100647
|
if (client[kHTTPConnVersion] === "h2") {
|
|
@@ -100986,8 +100986,8 @@ var require_pool_base = __commonJS({
|
|
|
100986
100986
|
if (this[kQueue].isEmpty()) {
|
|
100987
100987
|
return Promise.all(this[kClients].map((c3) => c3.close()));
|
|
100988
100988
|
} else {
|
|
100989
|
-
return new Promise((
|
|
100990
|
-
this[kClosedResolve] =
|
|
100989
|
+
return new Promise((resolve26) => {
|
|
100990
|
+
this[kClosedResolve] = resolve26;
|
|
100991
100991
|
});
|
|
100992
100992
|
}
|
|
100993
100993
|
}
|
|
@@ -101557,7 +101557,7 @@ var require_readable2 = __commonJS({
|
|
|
101557
101557
|
if (this.closed) {
|
|
101558
101558
|
return Promise.resolve(null);
|
|
101559
101559
|
}
|
|
101560
|
-
return new Promise((
|
|
101560
|
+
return new Promise((resolve26, reject) => {
|
|
101561
101561
|
const signalListenerCleanup = signal ? util9.addAbortListener(signal, () => {
|
|
101562
101562
|
this.destroy();
|
|
101563
101563
|
}) : noop4;
|
|
@@ -101566,7 +101566,7 @@ var require_readable2 = __commonJS({
|
|
|
101566
101566
|
if (signal && signal.aborted) {
|
|
101567
101567
|
reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" }));
|
|
101568
101568
|
} else {
|
|
101569
|
-
|
|
101569
|
+
resolve26(null);
|
|
101570
101570
|
}
|
|
101571
101571
|
}).on("error", noop4).on("data", function(chunk) {
|
|
101572
101572
|
limit -= chunk.length;
|
|
@@ -101588,11 +101588,11 @@ var require_readable2 = __commonJS({
|
|
|
101588
101588
|
throw new TypeError("unusable");
|
|
101589
101589
|
}
|
|
101590
101590
|
assert4(!stream11[kConsume]);
|
|
101591
|
-
return new Promise((
|
|
101591
|
+
return new Promise((resolve26, reject) => {
|
|
101592
101592
|
stream11[kConsume] = {
|
|
101593
101593
|
type,
|
|
101594
101594
|
stream: stream11,
|
|
101595
|
-
resolve:
|
|
101595
|
+
resolve: resolve26,
|
|
101596
101596
|
reject,
|
|
101597
101597
|
length: 0,
|
|
101598
101598
|
body: []
|
|
@@ -101627,12 +101627,12 @@ var require_readable2 = __commonJS({
|
|
|
101627
101627
|
}
|
|
101628
101628
|
}
|
|
101629
101629
|
function consumeEnd(consume2) {
|
|
101630
|
-
const { type, body, resolve:
|
|
101630
|
+
const { type, body, resolve: resolve26, stream: stream11, length } = consume2;
|
|
101631
101631
|
try {
|
|
101632
101632
|
if (type === "text") {
|
|
101633
|
-
|
|
101633
|
+
resolve26(toUSVString(Buffer.concat(body)));
|
|
101634
101634
|
} else if (type === "json") {
|
|
101635
|
-
|
|
101635
|
+
resolve26(JSON.parse(Buffer.concat(body)));
|
|
101636
101636
|
} else if (type === "arrayBuffer") {
|
|
101637
101637
|
const dst = new Uint8Array(length);
|
|
101638
101638
|
let pos = 0;
|
|
@@ -101640,12 +101640,12 @@ var require_readable2 = __commonJS({
|
|
|
101640
101640
|
dst.set(buf, pos);
|
|
101641
101641
|
pos += buf.byteLength;
|
|
101642
101642
|
}
|
|
101643
|
-
|
|
101643
|
+
resolve26(dst.buffer);
|
|
101644
101644
|
} else if (type === "blob") {
|
|
101645
101645
|
if (!Blob2) {
|
|
101646
101646
|
Blob2 = __require("buffer").Blob;
|
|
101647
101647
|
}
|
|
101648
|
-
|
|
101648
|
+
resolve26(new Blob2(body, { type: stream11[kContentType] }));
|
|
101649
101649
|
}
|
|
101650
101650
|
consumeFinish(consume2);
|
|
101651
101651
|
} catch (err) {
|
|
@@ -101900,9 +101900,9 @@ var require_api_request = __commonJS({
|
|
|
101900
101900
|
};
|
|
101901
101901
|
function request(opts, callback) {
|
|
101902
101902
|
if (callback === void 0) {
|
|
101903
|
-
return new Promise((
|
|
101903
|
+
return new Promise((resolve26, reject) => {
|
|
101904
101904
|
request.call(this, opts, (err, data2) => {
|
|
101905
|
-
return err ? reject(err) :
|
|
101905
|
+
return err ? reject(err) : resolve26(data2);
|
|
101906
101906
|
});
|
|
101907
101907
|
});
|
|
101908
101908
|
}
|
|
@@ -102075,9 +102075,9 @@ var require_api_stream = __commonJS({
|
|
|
102075
102075
|
};
|
|
102076
102076
|
function stream11(opts, factory, callback) {
|
|
102077
102077
|
if (callback === void 0) {
|
|
102078
|
-
return new Promise((
|
|
102078
|
+
return new Promise((resolve26, reject) => {
|
|
102079
102079
|
stream11.call(this, opts, factory, (err, data2) => {
|
|
102080
|
-
return err ? reject(err) :
|
|
102080
|
+
return err ? reject(err) : resolve26(data2);
|
|
102081
102081
|
});
|
|
102082
102082
|
});
|
|
102083
102083
|
}
|
|
@@ -102358,9 +102358,9 @@ var require_api_upgrade = __commonJS({
|
|
|
102358
102358
|
};
|
|
102359
102359
|
function upgrade(opts, callback) {
|
|
102360
102360
|
if (callback === void 0) {
|
|
102361
|
-
return new Promise((
|
|
102361
|
+
return new Promise((resolve26, reject) => {
|
|
102362
102362
|
upgrade.call(this, opts, (err, data2) => {
|
|
102363
|
-
return err ? reject(err) :
|
|
102363
|
+
return err ? reject(err) : resolve26(data2);
|
|
102364
102364
|
});
|
|
102365
102365
|
});
|
|
102366
102366
|
}
|
|
@@ -102449,9 +102449,9 @@ var require_api_connect = __commonJS({
|
|
|
102449
102449
|
};
|
|
102450
102450
|
function connect(opts, callback) {
|
|
102451
102451
|
if (callback === void 0) {
|
|
102452
|
-
return new Promise((
|
|
102452
|
+
return new Promise((resolve26, reject) => {
|
|
102453
102453
|
connect.call(this, opts, (err, data2) => {
|
|
102454
|
-
return err ? reject(err) :
|
|
102454
|
+
return err ? reject(err) : resolve26(data2);
|
|
102455
102455
|
});
|
|
102456
102456
|
});
|
|
102457
102457
|
}
|
|
@@ -106069,7 +106069,7 @@ var require_fetch2 = __commonJS({
|
|
|
106069
106069
|
async function dispatch({ body }) {
|
|
106070
106070
|
const url4 = requestCurrentURL(request);
|
|
106071
106071
|
const agent = fetchParams.controller.dispatcher;
|
|
106072
|
-
return new Promise((
|
|
106072
|
+
return new Promise((resolve26, reject) => agent.dispatch(
|
|
106073
106073
|
{
|
|
106074
106074
|
path: url4.pathname + url4.search,
|
|
106075
106075
|
origin: url4.origin,
|
|
@@ -106145,7 +106145,7 @@ var require_fetch2 = __commonJS({
|
|
|
106145
106145
|
}
|
|
106146
106146
|
}
|
|
106147
106147
|
}
|
|
106148
|
-
|
|
106148
|
+
resolve26({
|
|
106149
106149
|
status,
|
|
106150
106150
|
statusText,
|
|
106151
106151
|
headersList: headers[kHeadersList],
|
|
@@ -106188,7 +106188,7 @@ var require_fetch2 = __commonJS({
|
|
|
106188
106188
|
const val2 = headersList[n2 + 1].toString("latin1");
|
|
106189
106189
|
headers[kHeadersList].append(key, val2);
|
|
106190
106190
|
}
|
|
106191
|
-
|
|
106191
|
+
resolve26({
|
|
106192
106192
|
status,
|
|
106193
106193
|
statusText: STATUS_CODES[status],
|
|
106194
106194
|
headersList: headers[kHeadersList],
|
|
@@ -109556,11 +109556,11 @@ var require_lib27 = __commonJS({
|
|
|
109556
109556
|
};
|
|
109557
109557
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
109558
109558
|
function adopt(value) {
|
|
109559
|
-
return value instanceof P ? value : new P(function(
|
|
109560
|
-
|
|
109559
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
109560
|
+
resolve26(value);
|
|
109561
109561
|
});
|
|
109562
109562
|
}
|
|
109563
|
-
return new (P || (P = Promise))(function(
|
|
109563
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
109564
109564
|
function fulfilled(value) {
|
|
109565
109565
|
try {
|
|
109566
109566
|
step(generator.next(value));
|
|
@@ -109576,7 +109576,7 @@ var require_lib27 = __commonJS({
|
|
|
109576
109576
|
}
|
|
109577
109577
|
}
|
|
109578
109578
|
function step(result) {
|
|
109579
|
-
result.done ?
|
|
109579
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
109580
109580
|
}
|
|
109581
109581
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
109582
109582
|
});
|
|
@@ -109662,26 +109662,26 @@ var require_lib27 = __commonJS({
|
|
|
109662
109662
|
}
|
|
109663
109663
|
readBody() {
|
|
109664
109664
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109665
|
-
return new Promise((
|
|
109665
|
+
return new Promise((resolve26) => __awaiter(this, void 0, void 0, function* () {
|
|
109666
109666
|
let output = Buffer.alloc(0);
|
|
109667
109667
|
this.message.on("data", (chunk) => {
|
|
109668
109668
|
output = Buffer.concat([output, chunk]);
|
|
109669
109669
|
});
|
|
109670
109670
|
this.message.on("end", () => {
|
|
109671
|
-
|
|
109671
|
+
resolve26(output.toString());
|
|
109672
109672
|
});
|
|
109673
109673
|
}));
|
|
109674
109674
|
});
|
|
109675
109675
|
}
|
|
109676
109676
|
readBodyBuffer() {
|
|
109677
109677
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109678
|
-
return new Promise((
|
|
109678
|
+
return new Promise((resolve26) => __awaiter(this, void 0, void 0, function* () {
|
|
109679
109679
|
const chunks = [];
|
|
109680
109680
|
this.message.on("data", (chunk) => {
|
|
109681
109681
|
chunks.push(chunk);
|
|
109682
109682
|
});
|
|
109683
109683
|
this.message.on("end", () => {
|
|
109684
|
-
|
|
109684
|
+
resolve26(Buffer.concat(chunks));
|
|
109685
109685
|
});
|
|
109686
109686
|
}));
|
|
109687
109687
|
});
|
|
@@ -109890,14 +109890,14 @@ var require_lib27 = __commonJS({
|
|
|
109890
109890
|
*/
|
|
109891
109891
|
requestRaw(info, data2) {
|
|
109892
109892
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109893
|
-
return new Promise((
|
|
109893
|
+
return new Promise((resolve26, reject) => {
|
|
109894
109894
|
function callbackForResult(err, res) {
|
|
109895
109895
|
if (err) {
|
|
109896
109896
|
reject(err);
|
|
109897
109897
|
} else if (!res) {
|
|
109898
109898
|
reject(new Error("Unknown error"));
|
|
109899
109899
|
} else {
|
|
109900
|
-
|
|
109900
|
+
resolve26(res);
|
|
109901
109901
|
}
|
|
109902
109902
|
}
|
|
109903
109903
|
this.requestRawWithCallback(info, data2, callbackForResult);
|
|
@@ -110079,12 +110079,12 @@ var require_lib27 = __commonJS({
|
|
|
110079
110079
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110080
110080
|
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
|
|
110081
110081
|
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
|
|
110082
|
-
return new Promise((
|
|
110082
|
+
return new Promise((resolve26) => setTimeout(() => resolve26(), ms));
|
|
110083
110083
|
});
|
|
110084
110084
|
}
|
|
110085
110085
|
_processResponse(res, options) {
|
|
110086
110086
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110087
|
-
return new Promise((
|
|
110087
|
+
return new Promise((resolve26, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
110088
110088
|
const statusCode = res.message.statusCode || 0;
|
|
110089
110089
|
const response = {
|
|
110090
110090
|
statusCode,
|
|
@@ -110092,7 +110092,7 @@ var require_lib27 = __commonJS({
|
|
|
110092
110092
|
headers: {}
|
|
110093
110093
|
};
|
|
110094
110094
|
if (statusCode === HttpCodes.NotFound) {
|
|
110095
|
-
|
|
110095
|
+
resolve26(response);
|
|
110096
110096
|
}
|
|
110097
110097
|
function dateTimeDeserializer(key, value) {
|
|
110098
110098
|
if (typeof value === "string") {
|
|
@@ -110131,7 +110131,7 @@ var require_lib27 = __commonJS({
|
|
|
110131
110131
|
err.result = response.result;
|
|
110132
110132
|
reject(err);
|
|
110133
110133
|
} else {
|
|
110134
|
-
|
|
110134
|
+
resolve26(response);
|
|
110135
110135
|
}
|
|
110136
110136
|
}));
|
|
110137
110137
|
});
|
|
@@ -110148,11 +110148,11 @@ var require_auth = __commonJS({
|
|
|
110148
110148
|
"use strict";
|
|
110149
110149
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
110150
110150
|
function adopt(value) {
|
|
110151
|
-
return value instanceof P ? value : new P(function(
|
|
110152
|
-
|
|
110151
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
110152
|
+
resolve26(value);
|
|
110153
110153
|
});
|
|
110154
110154
|
}
|
|
110155
|
-
return new (P || (P = Promise))(function(
|
|
110155
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
110156
110156
|
function fulfilled(value) {
|
|
110157
110157
|
try {
|
|
110158
110158
|
step(generator.next(value));
|
|
@@ -110168,7 +110168,7 @@ var require_auth = __commonJS({
|
|
|
110168
110168
|
}
|
|
110169
110169
|
}
|
|
110170
110170
|
function step(result) {
|
|
110171
|
-
result.done ?
|
|
110171
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
110172
110172
|
}
|
|
110173
110173
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
110174
110174
|
});
|
|
@@ -110252,11 +110252,11 @@ var require_oidc_utils = __commonJS({
|
|
|
110252
110252
|
"use strict";
|
|
110253
110253
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
110254
110254
|
function adopt(value) {
|
|
110255
|
-
return value instanceof P ? value : new P(function(
|
|
110256
|
-
|
|
110255
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
110256
|
+
resolve26(value);
|
|
110257
110257
|
});
|
|
110258
110258
|
}
|
|
110259
|
-
return new (P || (P = Promise))(function(
|
|
110259
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
110260
110260
|
function fulfilled(value) {
|
|
110261
110261
|
try {
|
|
110262
110262
|
step(generator.next(value));
|
|
@@ -110272,7 +110272,7 @@ var require_oidc_utils = __commonJS({
|
|
|
110272
110272
|
}
|
|
110273
110273
|
}
|
|
110274
110274
|
function step(result) {
|
|
110275
|
-
result.done ?
|
|
110275
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
110276
110276
|
}
|
|
110277
110277
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
110278
110278
|
});
|
|
@@ -110350,11 +110350,11 @@ var require_summary = __commonJS({
|
|
|
110350
110350
|
"use strict";
|
|
110351
110351
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
110352
110352
|
function adopt(value) {
|
|
110353
|
-
return value instanceof P ? value : new P(function(
|
|
110354
|
-
|
|
110353
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
110354
|
+
resolve26(value);
|
|
110355
110355
|
});
|
|
110356
110356
|
}
|
|
110357
|
-
return new (P || (P = Promise))(function(
|
|
110357
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
110358
110358
|
function fulfilled(value) {
|
|
110359
110359
|
try {
|
|
110360
110360
|
step(generator.next(value));
|
|
@@ -110370,7 +110370,7 @@ var require_summary = __commonJS({
|
|
|
110370
110370
|
}
|
|
110371
110371
|
}
|
|
110372
110372
|
function step(result) {
|
|
110373
|
-
result.done ?
|
|
110373
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
110374
110374
|
}
|
|
110375
110375
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
110376
110376
|
});
|
|
@@ -110712,11 +110712,11 @@ var require_core4 = __commonJS({
|
|
|
110712
110712
|
};
|
|
110713
110713
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
110714
110714
|
function adopt(value) {
|
|
110715
|
-
return value instanceof P ? value : new P(function(
|
|
110716
|
-
|
|
110715
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
110716
|
+
resolve26(value);
|
|
110717
110717
|
});
|
|
110718
110718
|
}
|
|
110719
|
-
return new (P || (P = Promise))(function(
|
|
110719
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
110720
110720
|
function fulfilled(value) {
|
|
110721
110721
|
try {
|
|
110722
110722
|
step(generator.next(value));
|
|
@@ -110732,7 +110732,7 @@ var require_core4 = __commonJS({
|
|
|
110732
110732
|
}
|
|
110733
110733
|
}
|
|
110734
110734
|
function step(result) {
|
|
110735
|
-
result.done ?
|
|
110735
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
110736
110736
|
}
|
|
110737
110737
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
110738
110738
|
});
|
|
@@ -114296,11 +114296,11 @@ var require_utils7 = __commonJS({
|
|
|
114296
114296
|
"use strict";
|
|
114297
114297
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
114298
114298
|
function adopt(value) {
|
|
114299
|
-
return value instanceof P ? value : new P(function(
|
|
114300
|
-
|
|
114299
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
114300
|
+
resolve26(value);
|
|
114301
114301
|
});
|
|
114302
114302
|
}
|
|
114303
|
-
return new (P || (P = Promise))(function(
|
|
114303
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
114304
114304
|
function fulfilled(value) {
|
|
114305
114305
|
try {
|
|
114306
114306
|
step(generator.next(value));
|
|
@@ -114316,7 +114316,7 @@ var require_utils7 = __commonJS({
|
|
|
114316
114316
|
}
|
|
114317
114317
|
}
|
|
114318
114318
|
function step(result) {
|
|
114319
|
-
result.done ?
|
|
114319
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
114320
114320
|
}
|
|
114321
114321
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
114322
114322
|
});
|
|
@@ -114526,19 +114526,19 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)}
|
|
|
114526
114526
|
exports2.getProperRetention = getProperRetention;
|
|
114527
114527
|
function sleep(milliseconds) {
|
|
114528
114528
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114529
|
-
return new Promise((
|
|
114529
|
+
return new Promise((resolve26) => setTimeout(resolve26, milliseconds));
|
|
114530
114530
|
});
|
|
114531
114531
|
}
|
|
114532
114532
|
exports2.sleep = sleep;
|
|
114533
114533
|
function digestForStream(stream11) {
|
|
114534
114534
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114535
|
-
return new Promise((
|
|
114535
|
+
return new Promise((resolve26, reject) => {
|
|
114536
114536
|
const crc64 = new crc64_1.default();
|
|
114537
114537
|
const md52 = crypto_1.default.createHash("md5");
|
|
114538
114538
|
stream11.on("data", (data2) => {
|
|
114539
114539
|
crc64.update(data2);
|
|
114540
114540
|
md52.update(data2);
|
|
114541
|
-
}).on("end", () =>
|
|
114541
|
+
}).on("end", () => resolve26({
|
|
114542
114542
|
crc64: crc64.digest("base64"),
|
|
114543
114543
|
md5: md52.digest("base64")
|
|
114544
114544
|
})).on("error", reject);
|
|
@@ -114662,11 +114662,11 @@ var require_upload_gzip = __commonJS({
|
|
|
114662
114662
|
};
|
|
114663
114663
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
114664
114664
|
function adopt(value) {
|
|
114665
|
-
return value instanceof P ? value : new P(function(
|
|
114666
|
-
|
|
114665
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
114666
|
+
resolve26(value);
|
|
114667
114667
|
});
|
|
114668
114668
|
}
|
|
114669
|
-
return new (P || (P = Promise))(function(
|
|
114669
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
114670
114670
|
function fulfilled(value) {
|
|
114671
114671
|
try {
|
|
114672
114672
|
step(generator.next(value));
|
|
@@ -114682,7 +114682,7 @@ var require_upload_gzip = __commonJS({
|
|
|
114682
114682
|
}
|
|
114683
114683
|
}
|
|
114684
114684
|
function step(result) {
|
|
114685
|
-
result.done ?
|
|
114685
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
114686
114686
|
}
|
|
114687
114687
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
114688
114688
|
});
|
|
@@ -114695,14 +114695,14 @@ var require_upload_gzip = __commonJS({
|
|
|
114695
114695
|
}, i6);
|
|
114696
114696
|
function verb(n2) {
|
|
114697
114697
|
i6[n2] = o7[n2] && function(v) {
|
|
114698
|
-
return new Promise(function(
|
|
114699
|
-
v = o7[n2](v), settle4(
|
|
114698
|
+
return new Promise(function(resolve26, reject) {
|
|
114699
|
+
v = o7[n2](v), settle4(resolve26, reject, v.done, v.value);
|
|
114700
114700
|
});
|
|
114701
114701
|
};
|
|
114702
114702
|
}
|
|
114703
|
-
function settle4(
|
|
114703
|
+
function settle4(resolve26, reject, d3, v) {
|
|
114704
114704
|
Promise.resolve(v).then(function(v2) {
|
|
114705
|
-
|
|
114705
|
+
resolve26({ value: v2, done: d3 });
|
|
114706
114706
|
}, reject);
|
|
114707
114707
|
}
|
|
114708
114708
|
};
|
|
@@ -114743,14 +114743,14 @@ var require_upload_gzip = __commonJS({
|
|
|
114743
114743
|
return Number.MAX_SAFE_INTEGER;
|
|
114744
114744
|
}
|
|
114745
114745
|
}
|
|
114746
|
-
return new Promise((
|
|
114746
|
+
return new Promise((resolve26, reject) => {
|
|
114747
114747
|
const inputStream = fs.createReadStream(originalFilePath);
|
|
114748
114748
|
const gzip = zlib4.createGzip();
|
|
114749
114749
|
const outputStream = fs.createWriteStream(tempFilePath);
|
|
114750
114750
|
inputStream.pipe(gzip).pipe(outputStream);
|
|
114751
114751
|
outputStream.on("finish", () => __awaiter(this, void 0, void 0, function* () {
|
|
114752
114752
|
const size = (yield stat5(tempFilePath)).size;
|
|
114753
|
-
|
|
114753
|
+
resolve26(size);
|
|
114754
114754
|
}));
|
|
114755
114755
|
outputStream.on("error", (error) => {
|
|
114756
114756
|
console.log(error);
|
|
@@ -114762,7 +114762,7 @@ var require_upload_gzip = __commonJS({
|
|
|
114762
114762
|
exports2.createGZipFileOnDisk = createGZipFileOnDisk;
|
|
114763
114763
|
function createGZipFileInBuffer(originalFilePath) {
|
|
114764
114764
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114765
|
-
return new Promise((
|
|
114765
|
+
return new Promise((resolve26) => __awaiter(this, void 0, void 0, function* () {
|
|
114766
114766
|
var _a2, e_1, _b, _c;
|
|
114767
114767
|
const inputStream = fs.createReadStream(originalFilePath);
|
|
114768
114768
|
const gzip = zlib4.createGzip();
|
|
@@ -114788,7 +114788,7 @@ var require_upload_gzip = __commonJS({
|
|
|
114788
114788
|
if (e_1) throw e_1.error;
|
|
114789
114789
|
}
|
|
114790
114790
|
}
|
|
114791
|
-
|
|
114791
|
+
resolve26(Buffer.concat(chunks));
|
|
114792
114792
|
}));
|
|
114793
114793
|
});
|
|
114794
114794
|
}
|
|
@@ -114829,11 +114829,11 @@ var require_requestUtils = __commonJS({
|
|
|
114829
114829
|
};
|
|
114830
114830
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
114831
114831
|
function adopt(value) {
|
|
114832
|
-
return value instanceof P ? value : new P(function(
|
|
114833
|
-
|
|
114832
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
114833
|
+
resolve26(value);
|
|
114834
114834
|
});
|
|
114835
114835
|
}
|
|
114836
|
-
return new (P || (P = Promise))(function(
|
|
114836
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
114837
114837
|
function fulfilled(value) {
|
|
114838
114838
|
try {
|
|
114839
114839
|
step(generator.next(value));
|
|
@@ -114849,7 +114849,7 @@ var require_requestUtils = __commonJS({
|
|
|
114849
114849
|
}
|
|
114850
114850
|
}
|
|
114851
114851
|
function step(result) {
|
|
114852
|
-
result.done ?
|
|
114852
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
114853
114853
|
}
|
|
114854
114854
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
114855
114855
|
});
|
|
@@ -114946,11 +114946,11 @@ var require_upload_http_client = __commonJS({
|
|
|
114946
114946
|
};
|
|
114947
114947
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
114948
114948
|
function adopt(value) {
|
|
114949
|
-
return value instanceof P ? value : new P(function(
|
|
114950
|
-
|
|
114949
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
114950
|
+
resolve26(value);
|
|
114951
114951
|
});
|
|
114952
114952
|
}
|
|
114953
|
-
return new (P || (P = Promise))(function(
|
|
114953
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
114954
114954
|
function fulfilled(value) {
|
|
114955
114955
|
try {
|
|
114956
114956
|
step(generator.next(value));
|
|
@@ -114966,7 +114966,7 @@ var require_upload_http_client = __commonJS({
|
|
|
114966
114966
|
}
|
|
114967
114967
|
}
|
|
114968
114968
|
function step(result) {
|
|
114969
|
-
result.done ?
|
|
114969
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
114970
114970
|
}
|
|
114971
114971
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
114972
114972
|
});
|
|
@@ -115338,11 +115338,11 @@ var require_download_http_client = __commonJS({
|
|
|
115338
115338
|
};
|
|
115339
115339
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
115340
115340
|
function adopt(value) {
|
|
115341
|
-
return value instanceof P ? value : new P(function(
|
|
115342
|
-
|
|
115341
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
115342
|
+
resolve26(value);
|
|
115343
115343
|
});
|
|
115344
115344
|
}
|
|
115345
|
-
return new (P || (P = Promise))(function(
|
|
115345
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
115346
115346
|
function fulfilled(value) {
|
|
115347
115347
|
try {
|
|
115348
115348
|
step(generator.next(value));
|
|
@@ -115358,7 +115358,7 @@ var require_download_http_client = __commonJS({
|
|
|
115358
115358
|
}
|
|
115359
115359
|
}
|
|
115360
115360
|
function step(result) {
|
|
115361
|
-
result.done ?
|
|
115361
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
115362
115362
|
}
|
|
115363
115363
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
115364
115364
|
});
|
|
@@ -115491,10 +115491,10 @@ var require_download_http_client = __commonJS({
|
|
|
115491
115491
|
};
|
|
115492
115492
|
const resetDestinationStream = (fileDownloadPath) => __awaiter(this, void 0, void 0, function* () {
|
|
115493
115493
|
destinationStream.close();
|
|
115494
|
-
yield new Promise((
|
|
115495
|
-
destinationStream.on("close",
|
|
115494
|
+
yield new Promise((resolve26) => {
|
|
115495
|
+
destinationStream.on("close", resolve26);
|
|
115496
115496
|
if (destinationStream.writableFinished) {
|
|
115497
|
-
|
|
115497
|
+
resolve26();
|
|
115498
115498
|
}
|
|
115499
115499
|
});
|
|
115500
115500
|
yield (0, utils_1.rmFile)(fileDownloadPath);
|
|
@@ -115543,7 +115543,7 @@ var require_download_http_client = __commonJS({
|
|
|
115543
115543
|
*/
|
|
115544
115544
|
pipeResponseToFile(response, destinationStream, isGzip) {
|
|
115545
115545
|
return __awaiter(this, void 0, void 0, function* () {
|
|
115546
|
-
yield new Promise((
|
|
115546
|
+
yield new Promise((resolve26, reject) => {
|
|
115547
115547
|
if (isGzip) {
|
|
115548
115548
|
const gunzip = zlib4.createGunzip();
|
|
115549
115549
|
response.message.on("error", (error) => {
|
|
@@ -115556,7 +115556,7 @@ var require_download_http_client = __commonJS({
|
|
|
115556
115556
|
destinationStream.close();
|
|
115557
115557
|
reject(error);
|
|
115558
115558
|
}).pipe(destinationStream).on("close", () => {
|
|
115559
|
-
|
|
115559
|
+
resolve26();
|
|
115560
115560
|
}).on("error", (error) => {
|
|
115561
115561
|
core2.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
|
115562
115562
|
reject(error);
|
|
@@ -115567,7 +115567,7 @@ var require_download_http_client = __commonJS({
|
|
|
115567
115567
|
destinationStream.close();
|
|
115568
115568
|
reject(error);
|
|
115569
115569
|
}).pipe(destinationStream).on("close", () => {
|
|
115570
|
-
|
|
115570
|
+
resolve26();
|
|
115571
115571
|
}).on("error", (error) => {
|
|
115572
115572
|
core2.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
|
115573
115573
|
reject(error);
|
|
@@ -115681,11 +115681,11 @@ var require_artifact_client = __commonJS({
|
|
|
115681
115681
|
};
|
|
115682
115682
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
115683
115683
|
function adopt(value) {
|
|
115684
|
-
return value instanceof P ? value : new P(function(
|
|
115685
|
-
|
|
115684
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
115685
|
+
resolve26(value);
|
|
115686
115686
|
});
|
|
115687
115687
|
}
|
|
115688
|
-
return new (P || (P = Promise))(function(
|
|
115688
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
115689
115689
|
function fulfilled(value) {
|
|
115690
115690
|
try {
|
|
115691
115691
|
step(generator.next(value));
|
|
@@ -115701,7 +115701,7 @@ var require_artifact_client = __commonJS({
|
|
|
115701
115701
|
}
|
|
115702
115702
|
}
|
|
115703
115703
|
function step(result) {
|
|
115704
|
-
result.done ?
|
|
115704
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
115705
115705
|
}
|
|
115706
115706
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
115707
115707
|
});
|
|
@@ -117586,9 +117586,9 @@ var require_dispatcher_base2 = __commonJS({
|
|
|
117586
117586
|
}
|
|
117587
117587
|
close(callback) {
|
|
117588
117588
|
if (callback === void 0) {
|
|
117589
|
-
return new Promise((
|
|
117589
|
+
return new Promise((resolve26, reject) => {
|
|
117590
117590
|
this.close((err, data2) => {
|
|
117591
|
-
return err ? reject(err) :
|
|
117591
|
+
return err ? reject(err) : resolve26(data2);
|
|
117592
117592
|
});
|
|
117593
117593
|
});
|
|
117594
117594
|
}
|
|
@@ -117626,12 +117626,12 @@ var require_dispatcher_base2 = __commonJS({
|
|
|
117626
117626
|
err = null;
|
|
117627
117627
|
}
|
|
117628
117628
|
if (callback === void 0) {
|
|
117629
|
-
return new Promise((
|
|
117629
|
+
return new Promise((resolve26, reject) => {
|
|
117630
117630
|
this.destroy(err, (err2, data2) => {
|
|
117631
117631
|
return err2 ? (
|
|
117632
117632
|
/* istanbul ignore next: should never error */
|
|
117633
117633
|
reject(err2)
|
|
117634
|
-
) :
|
|
117634
|
+
) : resolve26(data2);
|
|
117635
117635
|
});
|
|
117636
117636
|
});
|
|
117637
117637
|
}
|
|
@@ -119898,8 +119898,8 @@ var require_util11 = __commonJS({
|
|
|
119898
119898
|
function createDeferredPromise() {
|
|
119899
119899
|
let res;
|
|
119900
119900
|
let rej;
|
|
119901
|
-
const promise = new Promise((
|
|
119902
|
-
res =
|
|
119901
|
+
const promise = new Promise((resolve26, reject) => {
|
|
119902
|
+
res = resolve26;
|
|
119903
119903
|
rej = reject;
|
|
119904
119904
|
});
|
|
119905
119905
|
return { promise, resolve: res, reject: rej };
|
|
@@ -122042,12 +122042,12 @@ upgrade: ${upgrade}\r
|
|
|
122042
122042
|
cb();
|
|
122043
122043
|
}
|
|
122044
122044
|
}
|
|
122045
|
-
const waitForDrain = () => new Promise((
|
|
122045
|
+
const waitForDrain = () => new Promise((resolve26, reject) => {
|
|
122046
122046
|
assert4(callback === null);
|
|
122047
122047
|
if (socket[kError]) {
|
|
122048
122048
|
reject(socket[kError]);
|
|
122049
122049
|
} else {
|
|
122050
|
-
callback =
|
|
122050
|
+
callback = resolve26;
|
|
122051
122051
|
}
|
|
122052
122052
|
});
|
|
122053
122053
|
socket.on("close", onDrain).on("drain", onDrain);
|
|
@@ -122684,12 +122684,12 @@ var require_client_h2 = __commonJS({
|
|
|
122684
122684
|
cb();
|
|
122685
122685
|
}
|
|
122686
122686
|
}
|
|
122687
|
-
const waitForDrain = () => new Promise((
|
|
122687
|
+
const waitForDrain = () => new Promise((resolve26, reject) => {
|
|
122688
122688
|
assert4(callback === null);
|
|
122689
122689
|
if (socket[kError]) {
|
|
122690
122690
|
reject(socket[kError]);
|
|
122691
122691
|
} else {
|
|
122692
|
-
callback =
|
|
122692
|
+
callback = resolve26;
|
|
122693
122693
|
}
|
|
122694
122694
|
});
|
|
122695
122695
|
h2stream.on("close", onDrain).on("drain", onDrain);
|
|
@@ -123166,16 +123166,16 @@ var require_client2 = __commonJS({
|
|
|
123166
123166
|
return this[kNeedDrain] < 2;
|
|
123167
123167
|
}
|
|
123168
123168
|
async [kClose]() {
|
|
123169
|
-
return new Promise((
|
|
123169
|
+
return new Promise((resolve26) => {
|
|
123170
123170
|
if (this[kSize]) {
|
|
123171
|
-
this[kClosedResolve] =
|
|
123171
|
+
this[kClosedResolve] = resolve26;
|
|
123172
123172
|
} else {
|
|
123173
|
-
|
|
123173
|
+
resolve26(null);
|
|
123174
123174
|
}
|
|
123175
123175
|
});
|
|
123176
123176
|
}
|
|
123177
123177
|
async [kDestroy](err) {
|
|
123178
|
-
return new Promise((
|
|
123178
|
+
return new Promise((resolve26) => {
|
|
123179
123179
|
const requests = this[kQueue].splice(this[kPendingIdx]);
|
|
123180
123180
|
for (let i6 = 0; i6 < requests.length; i6++) {
|
|
123181
123181
|
const request = requests[i6];
|
|
@@ -123186,7 +123186,7 @@ var require_client2 = __commonJS({
|
|
|
123186
123186
|
this[kClosedResolve]();
|
|
123187
123187
|
this[kClosedResolve] = null;
|
|
123188
123188
|
}
|
|
123189
|
-
|
|
123189
|
+
resolve26(null);
|
|
123190
123190
|
};
|
|
123191
123191
|
if (this[kHTTPContext]) {
|
|
123192
123192
|
this[kHTTPContext].destroy(err, callback);
|
|
@@ -123237,7 +123237,7 @@ var require_client2 = __commonJS({
|
|
|
123237
123237
|
});
|
|
123238
123238
|
}
|
|
123239
123239
|
try {
|
|
123240
|
-
const socket = await new Promise((
|
|
123240
|
+
const socket = await new Promise((resolve26, reject) => {
|
|
123241
123241
|
client[kConnector]({
|
|
123242
123242
|
host,
|
|
123243
123243
|
hostname,
|
|
@@ -123249,7 +123249,7 @@ var require_client2 = __commonJS({
|
|
|
123249
123249
|
if (err) {
|
|
123250
123250
|
reject(err);
|
|
123251
123251
|
} else {
|
|
123252
|
-
|
|
123252
|
+
resolve26(socket2);
|
|
123253
123253
|
}
|
|
123254
123254
|
});
|
|
123255
123255
|
});
|
|
@@ -123585,8 +123585,8 @@ var require_pool_base2 = __commonJS({
|
|
|
123585
123585
|
if (this[kQueue].isEmpty()) {
|
|
123586
123586
|
await Promise.all(this[kClients].map((c3) => c3.close()));
|
|
123587
123587
|
} else {
|
|
123588
|
-
await new Promise((
|
|
123589
|
-
this[kClosedResolve] =
|
|
123588
|
+
await new Promise((resolve26) => {
|
|
123589
|
+
this[kClosedResolve] = resolve26;
|
|
123590
123590
|
});
|
|
123591
123591
|
}
|
|
123592
123592
|
}
|
|
@@ -124733,7 +124733,7 @@ var require_readable3 = __commonJS({
|
|
|
124733
124733
|
if (this._readableState.closeEmitted) {
|
|
124734
124734
|
return null;
|
|
124735
124735
|
}
|
|
124736
|
-
return await new Promise((
|
|
124736
|
+
return await new Promise((resolve26, reject) => {
|
|
124737
124737
|
if (this[kContentLength] > limit) {
|
|
124738
124738
|
this.destroy(new AbortError());
|
|
124739
124739
|
}
|
|
@@ -124746,7 +124746,7 @@ var require_readable3 = __commonJS({
|
|
|
124746
124746
|
if (signal?.aborted) {
|
|
124747
124747
|
reject(signal.reason ?? new AbortError());
|
|
124748
124748
|
} else {
|
|
124749
|
-
|
|
124749
|
+
resolve26(null);
|
|
124750
124750
|
}
|
|
124751
124751
|
}).on("error", noop4).on("data", function(chunk) {
|
|
124752
124752
|
limit -= chunk.length;
|
|
@@ -124765,7 +124765,7 @@ var require_readable3 = __commonJS({
|
|
|
124765
124765
|
}
|
|
124766
124766
|
async function consume(stream11, type) {
|
|
124767
124767
|
assert4(!stream11[kConsume]);
|
|
124768
|
-
return new Promise((
|
|
124768
|
+
return new Promise((resolve26, reject) => {
|
|
124769
124769
|
if (isUnusable(stream11)) {
|
|
124770
124770
|
const rState = stream11._readableState;
|
|
124771
124771
|
if (rState.destroyed && rState.closeEmitted === false) {
|
|
@@ -124782,7 +124782,7 @@ var require_readable3 = __commonJS({
|
|
|
124782
124782
|
stream11[kConsume] = {
|
|
124783
124783
|
type,
|
|
124784
124784
|
stream: stream11,
|
|
124785
|
-
resolve:
|
|
124785
|
+
resolve: resolve26,
|
|
124786
124786
|
reject,
|
|
124787
124787
|
length: 0,
|
|
124788
124788
|
body: []
|
|
@@ -124852,18 +124852,18 @@ var require_readable3 = __commonJS({
|
|
|
124852
124852
|
return buffer;
|
|
124853
124853
|
}
|
|
124854
124854
|
function consumeEnd(consume2) {
|
|
124855
|
-
const { type, body, resolve:
|
|
124855
|
+
const { type, body, resolve: resolve26, stream: stream11, length } = consume2;
|
|
124856
124856
|
try {
|
|
124857
124857
|
if (type === "text") {
|
|
124858
|
-
|
|
124858
|
+
resolve26(chunksDecode(body, length));
|
|
124859
124859
|
} else if (type === "json") {
|
|
124860
|
-
|
|
124860
|
+
resolve26(JSON.parse(chunksDecode(body, length)));
|
|
124861
124861
|
} else if (type === "arrayBuffer") {
|
|
124862
|
-
|
|
124862
|
+
resolve26(chunksConcat(body, length).buffer);
|
|
124863
124863
|
} else if (type === "blob") {
|
|
124864
|
-
|
|
124864
|
+
resolve26(new Blob(body, { type: stream11[kContentType] }));
|
|
124865
124865
|
} else if (type === "bytes") {
|
|
124866
|
-
|
|
124866
|
+
resolve26(chunksConcat(body, length));
|
|
124867
124867
|
}
|
|
124868
124868
|
consumeFinish(consume2);
|
|
124869
124869
|
} catch (err) {
|
|
@@ -125120,9 +125120,9 @@ var require_api_request2 = __commonJS({
|
|
|
125120
125120
|
};
|
|
125121
125121
|
function request(opts, callback) {
|
|
125122
125122
|
if (callback === void 0) {
|
|
125123
|
-
return new Promise((
|
|
125123
|
+
return new Promise((resolve26, reject) => {
|
|
125124
125124
|
request.call(this, opts, (err, data2) => {
|
|
125125
|
-
return err ? reject(err) :
|
|
125125
|
+
return err ? reject(err) : resolve26(data2);
|
|
125126
125126
|
});
|
|
125127
125127
|
});
|
|
125128
125128
|
}
|
|
@@ -125345,9 +125345,9 @@ var require_api_stream2 = __commonJS({
|
|
|
125345
125345
|
};
|
|
125346
125346
|
function stream11(opts, factory, callback) {
|
|
125347
125347
|
if (callback === void 0) {
|
|
125348
|
-
return new Promise((
|
|
125348
|
+
return new Promise((resolve26, reject) => {
|
|
125349
125349
|
stream11.call(this, opts, factory, (err, data2) => {
|
|
125350
|
-
return err ? reject(err) :
|
|
125350
|
+
return err ? reject(err) : resolve26(data2);
|
|
125351
125351
|
});
|
|
125352
125352
|
});
|
|
125353
125353
|
}
|
|
@@ -125632,9 +125632,9 @@ var require_api_upgrade2 = __commonJS({
|
|
|
125632
125632
|
};
|
|
125633
125633
|
function upgrade(opts, callback) {
|
|
125634
125634
|
if (callback === void 0) {
|
|
125635
|
-
return new Promise((
|
|
125635
|
+
return new Promise((resolve26, reject) => {
|
|
125636
125636
|
upgrade.call(this, opts, (err, data2) => {
|
|
125637
|
-
return err ? reject(err) :
|
|
125637
|
+
return err ? reject(err) : resolve26(data2);
|
|
125638
125638
|
});
|
|
125639
125639
|
});
|
|
125640
125640
|
}
|
|
@@ -125726,9 +125726,9 @@ var require_api_connect2 = __commonJS({
|
|
|
125726
125726
|
};
|
|
125727
125727
|
function connect(opts, callback) {
|
|
125728
125728
|
if (callback === void 0) {
|
|
125729
|
-
return new Promise((
|
|
125729
|
+
return new Promise((resolve26, reject) => {
|
|
125730
125730
|
connect.call(this, opts, (err, data2) => {
|
|
125731
|
-
return err ? reject(err) :
|
|
125731
|
+
return err ? reject(err) : resolve26(data2);
|
|
125732
125732
|
});
|
|
125733
125733
|
});
|
|
125734
125734
|
}
|
|
@@ -129582,7 +129582,7 @@ var require_fetch3 = __commonJS({
|
|
|
129582
129582
|
function dispatch({ body }) {
|
|
129583
129583
|
const url4 = requestCurrentURL(request);
|
|
129584
129584
|
const agent = fetchParams.controller.dispatcher;
|
|
129585
|
-
return new Promise((
|
|
129585
|
+
return new Promise((resolve26, reject) => agent.dispatch(
|
|
129586
129586
|
{
|
|
129587
129587
|
path: url4.pathname + url4.search,
|
|
129588
129588
|
origin: url4.origin,
|
|
@@ -129656,7 +129656,7 @@ var require_fetch3 = __commonJS({
|
|
|
129656
129656
|
}
|
|
129657
129657
|
}
|
|
129658
129658
|
const onError = this.onError.bind(this);
|
|
129659
|
-
|
|
129659
|
+
resolve26({
|
|
129660
129660
|
status,
|
|
129661
129661
|
statusText,
|
|
129662
129662
|
headersList,
|
|
@@ -129702,7 +129702,7 @@ var require_fetch3 = __commonJS({
|
|
|
129702
129702
|
for (let i6 = 0; i6 < rawHeaders.length; i6 += 2) {
|
|
129703
129703
|
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i6]), rawHeaders[i6 + 1].toString("latin1"), true);
|
|
129704
129704
|
}
|
|
129705
|
-
|
|
129705
|
+
resolve26({
|
|
129706
129706
|
status,
|
|
129707
129707
|
statusText: STATUS_CODES[status],
|
|
129708
129708
|
headersList,
|
|
@@ -133295,8 +133295,8 @@ var require_util17 = __commonJS({
|
|
|
133295
133295
|
return true;
|
|
133296
133296
|
}
|
|
133297
133297
|
function delay(ms) {
|
|
133298
|
-
return new Promise((
|
|
133299
|
-
setTimeout(
|
|
133298
|
+
return new Promise((resolve26) => {
|
|
133299
|
+
setTimeout(resolve26, ms).unref();
|
|
133300
133300
|
});
|
|
133301
133301
|
}
|
|
133302
133302
|
module2.exports = {
|
|
@@ -134009,11 +134009,11 @@ var require_utils9 = __commonJS({
|
|
|
134009
134009
|
};
|
|
134010
134010
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
134011
134011
|
function adopt(value) {
|
|
134012
|
-
return value instanceof P ? value : new P(function(
|
|
134013
|
-
|
|
134012
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
134013
|
+
resolve26(value);
|
|
134014
134014
|
});
|
|
134015
134015
|
}
|
|
134016
|
-
return new (P || (P = Promise))(function(
|
|
134016
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
134017
134017
|
function fulfilled(value) {
|
|
134018
134018
|
try {
|
|
134019
134019
|
step(generator.next(value));
|
|
@@ -134029,7 +134029,7 @@ var require_utils9 = __commonJS({
|
|
|
134029
134029
|
}
|
|
134030
134030
|
}
|
|
134031
134031
|
function step(result) {
|
|
134032
|
-
result.done ?
|
|
134032
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
134033
134033
|
}
|
|
134034
134034
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
134035
134035
|
});
|
|
@@ -151454,7 +151454,7 @@ var require_utils12 = __commonJS({
|
|
|
151454
151454
|
}
|
|
151455
151455
|
exports2.matchesParentDomain = matchesParentDomain;
|
|
151456
151456
|
async function request(uri, options = {}) {
|
|
151457
|
-
return new Promise((
|
|
151457
|
+
return new Promise((resolve26, reject) => {
|
|
151458
151458
|
const requestOptions = {
|
|
151459
151459
|
method: "GET",
|
|
151460
151460
|
timeout: 1e4,
|
|
@@ -151470,12 +151470,12 @@ var require_utils12 = __commonJS({
|
|
|
151470
151470
|
});
|
|
151471
151471
|
res.once("end", () => {
|
|
151472
151472
|
if (options.json === false) {
|
|
151473
|
-
|
|
151473
|
+
resolve26(data2);
|
|
151474
151474
|
return;
|
|
151475
151475
|
}
|
|
151476
151476
|
try {
|
|
151477
151477
|
const parsed = JSON.parse(data2);
|
|
151478
|
-
|
|
151478
|
+
resolve26(parsed);
|
|
151479
151479
|
} catch {
|
|
151480
151480
|
reject(new error_1.MongoRuntimeError(`Invalid JSON response: "${data2}"`));
|
|
151481
151481
|
}
|
|
@@ -157133,11 +157133,11 @@ var require_drop = __commonJS({
|
|
|
157133
157133
|
})().then((result) => callback(void 0, result), (err) => callback(err));
|
|
157134
157134
|
}
|
|
157135
157135
|
executeWithoutEncryptedFieldsCheck(server, session) {
|
|
157136
|
-
return new Promise((
|
|
157136
|
+
return new Promise((resolve26, reject) => {
|
|
157137
157137
|
super.executeCommand(server, session, { drop: this.name }, (err, result) => {
|
|
157138
157138
|
if (err)
|
|
157139
157139
|
return reject(err);
|
|
157140
|
-
|
|
157140
|
+
resolve26(!!result.ok);
|
|
157141
157141
|
});
|
|
157142
157142
|
});
|
|
157143
157143
|
}
|
|
@@ -158597,7 +158597,7 @@ var require_create_collection = __commonJS({
|
|
|
158597
158597
|
})().then((coll) => callback(void 0, coll), (err) => callback(err));
|
|
158598
158598
|
}
|
|
158599
158599
|
executeWithoutEncryptedFieldsCheck(server, session) {
|
|
158600
|
-
return new Promise((
|
|
158600
|
+
return new Promise((resolve26, reject) => {
|
|
158601
158601
|
const db = this.db;
|
|
158602
158602
|
const name = this.name;
|
|
158603
158603
|
const options = this.options;
|
|
@@ -158605,7 +158605,7 @@ var require_create_collection = __commonJS({
|
|
|
158605
158605
|
if (err) {
|
|
158606
158606
|
return reject(err);
|
|
158607
158607
|
}
|
|
158608
|
-
|
|
158608
|
+
resolve26(new collection_1.Collection(db, name, options));
|
|
158609
158609
|
};
|
|
158610
158610
|
const cmd = { create: name };
|
|
158611
158611
|
for (const n2 in options) {
|
|
@@ -170602,7 +170602,7 @@ var require_mongo_client = __commonJS({
|
|
|
170602
170602
|
}
|
|
170603
170603
|
const topology = this.topology;
|
|
170604
170604
|
this.topology = void 0;
|
|
170605
|
-
await new Promise((
|
|
170605
|
+
await new Promise((resolve26, reject) => {
|
|
170606
170606
|
topology.close({ force }, (error) => {
|
|
170607
170607
|
if (error)
|
|
170608
170608
|
return reject(error);
|
|
@@ -170611,10 +170611,10 @@ var require_mongo_client = __commonJS({
|
|
|
170611
170611
|
return encrypter.close(this, force, (error2) => {
|
|
170612
170612
|
if (error2)
|
|
170613
170613
|
return reject(error2);
|
|
170614
|
-
|
|
170614
|
+
resolve26();
|
|
170615
170615
|
});
|
|
170616
170616
|
}
|
|
170617
|
-
|
|
170617
|
+
resolve26();
|
|
170618
170618
|
});
|
|
170619
170619
|
});
|
|
170620
170620
|
}
|
|
@@ -173301,8 +173301,8 @@ var require_light = __commonJS({
|
|
|
173301
173301
|
return this.Promise.resolve();
|
|
173302
173302
|
}
|
|
173303
173303
|
yieldLoop(t4 = 0) {
|
|
173304
|
-
return new this.Promise(function(
|
|
173305
|
-
return setTimeout(
|
|
173304
|
+
return new this.Promise(function(resolve26, reject) {
|
|
173305
|
+
return setTimeout(resolve26, t4);
|
|
173306
173306
|
});
|
|
173307
173307
|
}
|
|
173308
173308
|
computePenalty() {
|
|
@@ -173513,15 +173513,15 @@ var require_light = __commonJS({
|
|
|
173513
173513
|
return this._queue.length === 0;
|
|
173514
173514
|
}
|
|
173515
173515
|
async _tryToRun() {
|
|
173516
|
-
var args2, cb, error, reject,
|
|
173516
|
+
var args2, cb, error, reject, resolve26, returned, task;
|
|
173517
173517
|
if (this._running < 1 && this._queue.length > 0) {
|
|
173518
173518
|
this._running++;
|
|
173519
|
-
({ task, args: args2, resolve:
|
|
173519
|
+
({ task, args: args2, resolve: resolve26, reject } = this._queue.shift());
|
|
173520
173520
|
cb = await async function() {
|
|
173521
173521
|
try {
|
|
173522
173522
|
returned = await task(...args2);
|
|
173523
173523
|
return function() {
|
|
173524
|
-
return
|
|
173524
|
+
return resolve26(returned);
|
|
173525
173525
|
};
|
|
173526
173526
|
} catch (error1) {
|
|
173527
173527
|
error = error1;
|
|
@@ -173536,13 +173536,13 @@ var require_light = __commonJS({
|
|
|
173536
173536
|
}
|
|
173537
173537
|
}
|
|
173538
173538
|
schedule(task, ...args2) {
|
|
173539
|
-
var promise, reject,
|
|
173540
|
-
|
|
173539
|
+
var promise, reject, resolve26;
|
|
173540
|
+
resolve26 = reject = null;
|
|
173541
173541
|
promise = new this.Promise(function(_resolve, _reject) {
|
|
173542
|
-
|
|
173542
|
+
resolve26 = _resolve;
|
|
173543
173543
|
return reject = _reject;
|
|
173544
173544
|
});
|
|
173545
|
-
this._queue.push({ task, args: args2, resolve:
|
|
173545
|
+
this._queue.push({ task, args: args2, resolve: resolve26, reject });
|
|
173546
173546
|
this._tryToRun();
|
|
173547
173547
|
return promise;
|
|
173548
173548
|
}
|
|
@@ -173943,14 +173943,14 @@ var require_light = __commonJS({
|
|
|
173943
173943
|
counts = this._states.counts;
|
|
173944
173944
|
return counts[0] + counts[1] + counts[2] + counts[3] === at;
|
|
173945
173945
|
};
|
|
173946
|
-
return new this.Promise((
|
|
173946
|
+
return new this.Promise((resolve26, reject) => {
|
|
173947
173947
|
if (finished()) {
|
|
173948
|
-
return
|
|
173948
|
+
return resolve26();
|
|
173949
173949
|
} else {
|
|
173950
173950
|
return this.on("done", () => {
|
|
173951
173951
|
if (finished()) {
|
|
173952
173952
|
this.removeAllListeners("done");
|
|
173953
|
-
return
|
|
173953
|
+
return resolve26();
|
|
173954
173954
|
}
|
|
173955
173955
|
});
|
|
173956
173956
|
}
|
|
@@ -174043,9 +174043,9 @@ var require_light = __commonJS({
|
|
|
174043
174043
|
options = parser$5.load(options, this.jobDefaults);
|
|
174044
174044
|
}
|
|
174045
174045
|
task = (...args3) => {
|
|
174046
|
-
return new this.Promise(function(
|
|
174046
|
+
return new this.Promise(function(resolve26, reject) {
|
|
174047
174047
|
return fn2(...args3, function(...args4) {
|
|
174048
|
-
return (args4[0] != null ? reject :
|
|
174048
|
+
return (args4[0] != null ? reject : resolve26)(args4);
|
|
174049
174049
|
});
|
|
174050
174050
|
});
|
|
174051
174051
|
};
|
|
@@ -175001,7 +175001,7 @@ var require_dist_node16 = __commonJS({
|
|
|
175001
175001
|
return newScope === currentScope ? authentication : false;
|
|
175002
175002
|
}
|
|
175003
175003
|
async function wait(seconds) {
|
|
175004
|
-
await new Promise((
|
|
175004
|
+
await new Promise((resolve26) => setTimeout(resolve26, seconds * 1e3));
|
|
175005
175005
|
}
|
|
175006
175006
|
async function waitForAccessToken(request, clientId, clientType, verification) {
|
|
175007
175007
|
try {
|
|
@@ -179013,7 +179013,7 @@ var require_dist_node20 = __commonJS({
|
|
|
179013
179013
|
state.log.warn(
|
|
179014
179014
|
`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)`
|
|
179015
179015
|
);
|
|
179016
|
-
await new Promise((
|
|
179016
|
+
await new Promise((resolve26) => setTimeout(resolve26, awaitTime));
|
|
179017
179017
|
return sendRequestWithRetries(state, request, options, createdAt, retries);
|
|
179018
179018
|
}
|
|
179019
179019
|
}
|
|
@@ -179766,9 +179766,9 @@ var require_dist_node22 = __commonJS({
|
|
|
179766
179766
|
function parseRequest(request) {
|
|
179767
179767
|
const { method, url: url4, headers } = request;
|
|
179768
179768
|
async function text3() {
|
|
179769
|
-
const text22 = await new Promise((
|
|
179769
|
+
const text22 = await new Promise((resolve26, reject) => {
|
|
179770
179770
|
let bodyChunks = [];
|
|
179771
|
-
request.on("error", reject).on("data", (chunk) => bodyChunks.push(chunk)).on("end", () =>
|
|
179771
|
+
request.on("error", reject).on("data", (chunk) => bodyChunks.push(chunk)).on("end", () => resolve26(Buffer.concat(bodyChunks).toString()));
|
|
179772
179772
|
});
|
|
179773
179773
|
return text22;
|
|
179774
179774
|
}
|
|
@@ -180625,7 +180625,7 @@ var require_dist_node24 = __commonJS({
|
|
|
180625
180625
|
return Promise.resolve(request.body);
|
|
180626
180626
|
}
|
|
180627
180627
|
}
|
|
180628
|
-
return new Promise((
|
|
180628
|
+
return new Promise((resolve26, reject) => {
|
|
180629
180629
|
let data2 = [];
|
|
180630
180630
|
request.on("error", (error) => reject(new import_aggregate_error3.default([error])));
|
|
180631
180631
|
request.on("data", (chunk) => data2.push(chunk));
|
|
@@ -180635,7 +180635,7 @@ var require_dist_node24 = __commonJS({
|
|
|
180635
180635
|
// setImmediate improves the throughput by reducing the pressure from
|
|
180636
180636
|
// the event loop
|
|
180637
180637
|
setImmediate(
|
|
180638
|
-
|
|
180638
|
+
resolve26,
|
|
180639
180639
|
data2.length === 1 ? data2[0].toString("utf8") : Buffer.concat(data2).toString("utf8")
|
|
180640
180640
|
)
|
|
180641
180641
|
)
|
|
@@ -181342,11 +181342,11 @@ var require_p_finally = __commonJS({
|
|
|
181342
181342
|
onFinally = onFinally || (() => {
|
|
181343
181343
|
});
|
|
181344
181344
|
return promise.then(
|
|
181345
|
-
(val2) => new Promise((
|
|
181346
|
-
|
|
181345
|
+
(val2) => new Promise((resolve26) => {
|
|
181346
|
+
resolve26(onFinally());
|
|
181347
181347
|
}).then(() => val2),
|
|
181348
|
-
(err) => new Promise((
|
|
181349
|
-
|
|
181348
|
+
(err) => new Promise((resolve26) => {
|
|
181349
|
+
resolve26(onFinally());
|
|
181350
181350
|
}).then(() => {
|
|
181351
181351
|
throw err;
|
|
181352
181352
|
})
|
|
@@ -181366,18 +181366,18 @@ var require_p_timeout = __commonJS({
|
|
|
181366
181366
|
this.name = "TimeoutError";
|
|
181367
181367
|
}
|
|
181368
181368
|
};
|
|
181369
|
-
var pTimeout = (promise, milliseconds, fallback) => new Promise((
|
|
181369
|
+
var pTimeout = (promise, milliseconds, fallback) => new Promise((resolve26, reject) => {
|
|
181370
181370
|
if (typeof milliseconds !== "number" || milliseconds < 0) {
|
|
181371
181371
|
throw new TypeError("Expected `milliseconds` to be a positive number");
|
|
181372
181372
|
}
|
|
181373
181373
|
if (milliseconds === Infinity) {
|
|
181374
|
-
|
|
181374
|
+
resolve26(promise);
|
|
181375
181375
|
return;
|
|
181376
181376
|
}
|
|
181377
181377
|
const timer = setTimeout(() => {
|
|
181378
181378
|
if (typeof fallback === "function") {
|
|
181379
181379
|
try {
|
|
181380
|
-
|
|
181380
|
+
resolve26(fallback());
|
|
181381
181381
|
} catch (error) {
|
|
181382
181382
|
reject(error);
|
|
181383
181383
|
}
|
|
@@ -181392,7 +181392,7 @@ var require_p_timeout = __commonJS({
|
|
|
181392
181392
|
}, milliseconds);
|
|
181393
181393
|
pFinally(
|
|
181394
181394
|
// eslint-disable-next-line promise/prefer-await-to-then
|
|
181395
|
-
promise.then(
|
|
181395
|
+
promise.then(resolve26, reject),
|
|
181396
181396
|
() => {
|
|
181397
181397
|
clearTimeout(timer);
|
|
181398
181398
|
}
|
|
@@ -181610,7 +181610,7 @@ var require_dist12 = __commonJS({
|
|
|
181610
181610
|
Adds a sync or async task to the queue. Always returns a promise.
|
|
181611
181611
|
*/
|
|
181612
181612
|
async add(fn2, options = {}) {
|
|
181613
|
-
return new Promise((
|
|
181613
|
+
return new Promise((resolve26, reject) => {
|
|
181614
181614
|
const run3 = async () => {
|
|
181615
181615
|
this._pendingCount++;
|
|
181616
181616
|
this._intervalCount++;
|
|
@@ -181621,7 +181621,7 @@ var require_dist12 = __commonJS({
|
|
|
181621
181621
|
}
|
|
181622
181622
|
return void 0;
|
|
181623
181623
|
});
|
|
181624
|
-
|
|
181624
|
+
resolve26(await operation);
|
|
181625
181625
|
} catch (error) {
|
|
181626
181626
|
reject(error);
|
|
181627
181627
|
}
|
|
@@ -181672,11 +181672,11 @@ var require_dist12 = __commonJS({
|
|
|
181672
181672
|
if (this._queue.size === 0) {
|
|
181673
181673
|
return;
|
|
181674
181674
|
}
|
|
181675
|
-
return new Promise((
|
|
181675
|
+
return new Promise((resolve26) => {
|
|
181676
181676
|
const existingResolve = this._resolveEmpty;
|
|
181677
181677
|
this._resolveEmpty = () => {
|
|
181678
181678
|
existingResolve();
|
|
181679
|
-
|
|
181679
|
+
resolve26();
|
|
181680
181680
|
};
|
|
181681
181681
|
});
|
|
181682
181682
|
}
|
|
@@ -181689,11 +181689,11 @@ var require_dist12 = __commonJS({
|
|
|
181689
181689
|
if (this._pendingCount === 0 && this._queue.size === 0) {
|
|
181690
181690
|
return;
|
|
181691
181691
|
}
|
|
181692
|
-
return new Promise((
|
|
181692
|
+
return new Promise((resolve26) => {
|
|
181693
181693
|
const existingResolve = this._resolveIdle;
|
|
181694
181694
|
this._resolveIdle = () => {
|
|
181695
181695
|
existingResolve();
|
|
181696
|
-
|
|
181696
|
+
resolve26();
|
|
181697
181697
|
};
|
|
181698
181698
|
});
|
|
181699
181699
|
}
|
|
@@ -181773,7 +181773,7 @@ var require_p_retry = __commonJS({
|
|
|
181773
181773
|
return error;
|
|
181774
181774
|
};
|
|
181775
181775
|
var isNetworkError2 = (errorMessage) => networkErrorMsgs.includes(errorMessage);
|
|
181776
|
-
var pRetry = (input, options) => new Promise((
|
|
181776
|
+
var pRetry = (input, options) => new Promise((resolve26, reject) => {
|
|
181777
181777
|
options = {
|
|
181778
181778
|
onFailedAttempt: () => {
|
|
181779
181779
|
},
|
|
@@ -181783,7 +181783,7 @@ var require_p_retry = __commonJS({
|
|
|
181783
181783
|
const operation = retry.operation(options);
|
|
181784
181784
|
operation.attempt(async (attemptNumber) => {
|
|
181785
181785
|
try {
|
|
181786
|
-
|
|
181786
|
+
resolve26(await input(attemptNumber));
|
|
181787
181787
|
} catch (error) {
|
|
181788
181788
|
if (!(error instanceof Error)) {
|
|
181789
181789
|
reject(new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`));
|
|
@@ -183027,10 +183027,10 @@ var require_axios = __commonJS({
|
|
|
183027
183027
|
utils$1.inherits(CanceledError7, AxiosError7, {
|
|
183028
183028
|
__CANCEL__: true
|
|
183029
183029
|
});
|
|
183030
|
-
function settle4(
|
|
183030
|
+
function settle4(resolve26, reject, response) {
|
|
183031
183031
|
const validateStatus4 = response.config.validateStatus;
|
|
183032
183032
|
if (!response.status || !validateStatus4 || validateStatus4(response.status)) {
|
|
183033
|
-
|
|
183033
|
+
resolve26(response);
|
|
183034
183034
|
} else {
|
|
183035
183035
|
reject(new AxiosError7(
|
|
183036
183036
|
"Request failed with status code " + response.status,
|
|
@@ -183479,7 +183479,7 @@ var require_axios = __commonJS({
|
|
|
183479
183479
|
}
|
|
183480
183480
|
var isHttpAdapterSupported4 = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
183481
183481
|
var wrapAsync4 = (asyncExecutor) => {
|
|
183482
|
-
return new Promise((
|
|
183482
|
+
return new Promise((resolve26, reject) => {
|
|
183483
183483
|
let onDone;
|
|
183484
183484
|
let isDone;
|
|
183485
183485
|
const done = (value, isRejected) => {
|
|
@@ -183489,7 +183489,7 @@ var require_axios = __commonJS({
|
|
|
183489
183489
|
};
|
|
183490
183490
|
const _resolve = (value) => {
|
|
183491
183491
|
done(value);
|
|
183492
|
-
|
|
183492
|
+
resolve26(value);
|
|
183493
183493
|
};
|
|
183494
183494
|
const _reject = (reason) => {
|
|
183495
183495
|
done(reason, true);
|
|
@@ -183509,7 +183509,7 @@ var require_axios = __commonJS({
|
|
|
183509
183509
|
};
|
|
183510
183510
|
var buildAddressEntry4 = (address, family) => resolveFamily4(utils$1.isObject(address) ? address : { address, family });
|
|
183511
183511
|
var httpAdapter4 = isHttpAdapterSupported4 && function httpAdapter5(config3) {
|
|
183512
|
-
return wrapAsync4(async function dispatchHttpRequest(
|
|
183512
|
+
return wrapAsync4(async function dispatchHttpRequest(resolve26, reject, onDone) {
|
|
183513
183513
|
let { data: data2, lookup, family } = config3;
|
|
183514
183514
|
const { responseType, responseEncoding } = config3;
|
|
183515
183515
|
const method = config3.method.toUpperCase();
|
|
@@ -183561,7 +183561,7 @@ var require_axios = __commonJS({
|
|
|
183561
183561
|
if (protocol === "data:") {
|
|
183562
183562
|
let convertedData;
|
|
183563
183563
|
if (method !== "GET") {
|
|
183564
|
-
return settle4(
|
|
183564
|
+
return settle4(resolve26, reject, {
|
|
183565
183565
|
status: 405,
|
|
183566
183566
|
statusText: "method not allowed",
|
|
183567
183567
|
headers: {},
|
|
@@ -183583,7 +183583,7 @@ var require_axios = __commonJS({
|
|
|
183583
183583
|
} else if (responseType === "stream") {
|
|
183584
183584
|
convertedData = stream__default["default"].Readable.from(convertedData);
|
|
183585
183585
|
}
|
|
183586
|
-
return settle4(
|
|
183586
|
+
return settle4(resolve26, reject, {
|
|
183587
183587
|
data: convertedData,
|
|
183588
183588
|
status: 200,
|
|
183589
183589
|
statusText: "OK",
|
|
@@ -183801,7 +183801,7 @@ var require_axios = __commonJS({
|
|
|
183801
183801
|
};
|
|
183802
183802
|
if (responseType === "stream") {
|
|
183803
183803
|
response.data = responseStream;
|
|
183804
|
-
settle4(
|
|
183804
|
+
settle4(resolve26, reject, response);
|
|
183805
183805
|
} else {
|
|
183806
183806
|
const responseBuffer = [];
|
|
183807
183807
|
let totalResponseBytes = 0;
|
|
@@ -183849,7 +183849,7 @@ var require_axios = __commonJS({
|
|
|
183849
183849
|
} catch (err) {
|
|
183850
183850
|
return reject(AxiosError7.from(err, null, config3, response.request, response));
|
|
183851
183851
|
}
|
|
183852
|
-
settle4(
|
|
183852
|
+
settle4(resolve26, reject, response);
|
|
183853
183853
|
});
|
|
183854
183854
|
}
|
|
183855
183855
|
emitter.once("abort", (err) => {
|
|
@@ -184066,7 +184066,7 @@ var require_axios = __commonJS({
|
|
|
184066
184066
|
};
|
|
184067
184067
|
var isXHRAdapterSupported4 = typeof XMLHttpRequest !== "undefined";
|
|
184068
184068
|
var xhrAdapter = isXHRAdapterSupported4 && function(config3) {
|
|
184069
|
-
return new Promise(function dispatchXhrRequest(
|
|
184069
|
+
return new Promise(function dispatchXhrRequest(resolve26, reject) {
|
|
184070
184070
|
const _config = resolveConfig(config3);
|
|
184071
184071
|
let requestData = _config.data;
|
|
184072
184072
|
const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
|
@@ -184100,7 +184100,7 @@ var require_axios = __commonJS({
|
|
|
184100
184100
|
request
|
|
184101
184101
|
};
|
|
184102
184102
|
settle4(function _resolve(value) {
|
|
184103
|
-
|
|
184103
|
+
resolve26(value);
|
|
184104
184104
|
done();
|
|
184105
184105
|
}, function _reject(err) {
|
|
184106
184106
|
reject(err);
|
|
@@ -184437,8 +184437,8 @@ var require_axios = __commonJS({
|
|
|
184437
184437
|
responseType = responseType || "text";
|
|
184438
184438
|
let responseData = await resolvers4[utils$1.findKey(resolvers4, responseType) || "text"](response, config3);
|
|
184439
184439
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
184440
|
-
return await new Promise((
|
|
184441
|
-
settle4(
|
|
184440
|
+
return await new Promise((resolve26, reject) => {
|
|
184441
|
+
settle4(resolve26, reject, {
|
|
184442
184442
|
data: responseData,
|
|
184443
184443
|
headers: AxiosHeaders$1.from(response.headers),
|
|
184444
184444
|
status: response.status,
|
|
@@ -184794,8 +184794,8 @@ var require_axios = __commonJS({
|
|
|
184794
184794
|
throw new TypeError("executor must be a function.");
|
|
184795
184795
|
}
|
|
184796
184796
|
let resolvePromise;
|
|
184797
|
-
this.promise = new Promise(function promiseExecutor(
|
|
184798
|
-
resolvePromise =
|
|
184797
|
+
this.promise = new Promise(function promiseExecutor(resolve26) {
|
|
184798
|
+
resolvePromise = resolve26;
|
|
184799
184799
|
});
|
|
184800
184800
|
const token = this;
|
|
184801
184801
|
this.promise.then((cancel) => {
|
|
@@ -184808,9 +184808,9 @@ var require_axios = __commonJS({
|
|
|
184808
184808
|
});
|
|
184809
184809
|
this.promise.then = (onfulfilled) => {
|
|
184810
184810
|
let _resolve;
|
|
184811
|
-
const promise = new Promise((
|
|
184812
|
-
token.subscribe(
|
|
184813
|
-
_resolve =
|
|
184811
|
+
const promise = new Promise((resolve26) => {
|
|
184812
|
+
token.subscribe(resolve26);
|
|
184813
|
+
_resolve = resolve26;
|
|
184814
184814
|
}).then(onfulfilled);
|
|
184815
184815
|
promise.cancel = function reject() {
|
|
184816
184816
|
token.unsubscribe(_resolve);
|
|
@@ -186499,8 +186499,8 @@ var require_helpers2 = __commonJS({
|
|
|
186499
186499
|
"use strict";
|
|
186500
186500
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
186501
186501
|
function delay(ms) {
|
|
186502
|
-
return new Promise((
|
|
186503
|
-
setTimeout(
|
|
186502
|
+
return new Promise((resolve26) => {
|
|
186503
|
+
setTimeout(resolve26, ms);
|
|
186504
186504
|
});
|
|
186505
186505
|
}
|
|
186506
186506
|
exports2.default = delay;
|
|
@@ -186587,7 +186587,7 @@ var require_file_upload = __commonJS({
|
|
|
186587
186587
|
exports2.getFileDataLength = getFileDataLength;
|
|
186588
186588
|
async function getFileDataAsStream(readable) {
|
|
186589
186589
|
const chunks = [];
|
|
186590
|
-
return new Promise((
|
|
186590
|
+
return new Promise((resolve26, reject) => {
|
|
186591
186591
|
readable.on("readable", () => {
|
|
186592
186592
|
let chunk;
|
|
186593
186593
|
while ((chunk = readable.read()) !== null) {
|
|
@@ -186597,7 +186597,7 @@ var require_file_upload = __commonJS({
|
|
|
186597
186597
|
readable.on("end", () => {
|
|
186598
186598
|
if (chunks.length > 0) {
|
|
186599
186599
|
const content = Buffer.concat(chunks);
|
|
186600
|
-
|
|
186600
|
+
resolve26(content);
|
|
186601
186601
|
} else {
|
|
186602
186602
|
reject(Error("No data in supplied file"));
|
|
186603
186603
|
}
|
|
@@ -186808,14 +186808,14 @@ var require_WebClient = __commonJS({
|
|
|
186808
186808
|
}, i6);
|
|
186809
186809
|
function verb(n2) {
|
|
186810
186810
|
i6[n2] = o7[n2] && function(v) {
|
|
186811
|
-
return new Promise(function(
|
|
186812
|
-
v = o7[n2](v), settle4(
|
|
186811
|
+
return new Promise(function(resolve26, reject) {
|
|
186812
|
+
v = o7[n2](v), settle4(resolve26, reject, v.done, v.value);
|
|
186813
186813
|
});
|
|
186814
186814
|
};
|
|
186815
186815
|
}
|
|
186816
|
-
function settle4(
|
|
186816
|
+
function settle4(resolve26, reject, d3, v) {
|
|
186817
186817
|
Promise.resolve(v).then(function(v2) {
|
|
186818
|
-
|
|
186818
|
+
resolve26({ value: v2, done: d3 });
|
|
186819
186819
|
}, reject);
|
|
186820
186820
|
}
|
|
186821
186821
|
};
|
|
@@ -187220,12 +187220,12 @@ var require_WebClient = __commonJS({
|
|
|
187220
187220
|
const isGzipResponse = response.headers["content-type"] === "application/gzip";
|
|
187221
187221
|
if (isGzipResponse) {
|
|
187222
187222
|
try {
|
|
187223
|
-
const unzippedData = await new Promise((
|
|
187223
|
+
const unzippedData = await new Promise((resolve26, reject) => {
|
|
187224
187224
|
zlib_1.default.unzip(data2, (err, buf) => {
|
|
187225
187225
|
if (err) {
|
|
187226
187226
|
return reject(err);
|
|
187227
187227
|
}
|
|
187228
|
-
return
|
|
187228
|
+
return resolve26(buf.toString().split("\n"));
|
|
187229
187229
|
});
|
|
187230
187230
|
}).then((res) => res).catch((err) => {
|
|
187231
187231
|
throw err;
|
|
@@ -189061,20 +189061,20 @@ var CLILogger = class {
|
|
|
189061
189061
|
* in errors that are swallowed by the 'error' event listener in this function.
|
|
189062
189062
|
*/
|
|
189063
189063
|
async finish() {
|
|
189064
|
-
return new Promise((
|
|
189064
|
+
return new Promise((resolve26) => {
|
|
189065
189065
|
if (this.logger instanceof Console || this.logger.writableEnded) {
|
|
189066
|
-
|
|
189066
|
+
resolve26();
|
|
189067
189067
|
return;
|
|
189068
189068
|
}
|
|
189069
189069
|
this.logger.on("error", () => {
|
|
189070
189070
|
});
|
|
189071
189071
|
this.logger.end(() => {
|
|
189072
189072
|
if (!this.writeStream || this.writeStream.writableEnded) {
|
|
189073
|
-
|
|
189073
|
+
resolve26();
|
|
189074
189074
|
return;
|
|
189075
189075
|
}
|
|
189076
189076
|
if (!this.writeStream.writableEnded) {
|
|
189077
|
-
this.writeStream.end(
|
|
189077
|
+
this.writeStream.end(resolve26);
|
|
189078
189078
|
}
|
|
189079
189079
|
});
|
|
189080
189080
|
});
|
|
@@ -189099,11 +189099,11 @@ var E_ALREADY_LOCKED = new Error("mutex already locked");
|
|
|
189099
189099
|
var E_CANCELED = new Error("request for lock canceled");
|
|
189100
189100
|
var __awaiter$2 = function(thisArg, _arguments, P, generator) {
|
|
189101
189101
|
function adopt(value) {
|
|
189102
|
-
return value instanceof P ? value : new P(function(
|
|
189103
|
-
|
|
189102
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
189103
|
+
resolve26(value);
|
|
189104
189104
|
});
|
|
189105
189105
|
}
|
|
189106
|
-
return new (P || (P = Promise))(function(
|
|
189106
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
189107
189107
|
function fulfilled(value) {
|
|
189108
189108
|
try {
|
|
189109
189109
|
step(generator.next(value));
|
|
@@ -189119,7 +189119,7 @@ var __awaiter$2 = function(thisArg, _arguments, P, generator) {
|
|
|
189119
189119
|
}
|
|
189120
189120
|
}
|
|
189121
189121
|
function step(result) {
|
|
189122
|
-
result.done ?
|
|
189122
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
189123
189123
|
}
|
|
189124
189124
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
189125
189125
|
});
|
|
@@ -189134,8 +189134,8 @@ var Semaphore = class {
|
|
|
189134
189134
|
acquire(weight = 1, priority = 0) {
|
|
189135
189135
|
if (weight <= 0)
|
|
189136
189136
|
throw new Error(`invalid weight ${weight}: must be positive`);
|
|
189137
|
-
return new Promise((
|
|
189138
|
-
const task = { resolve:
|
|
189137
|
+
return new Promise((resolve26, reject) => {
|
|
189138
|
+
const task = { resolve: resolve26, reject, weight, priority };
|
|
189139
189139
|
const i6 = findIndexFromEnd(this._queue, (other) => priority <= other.priority);
|
|
189140
189140
|
if (i6 === -1 && weight <= this._value) {
|
|
189141
189141
|
this._dispatchItem(task);
|
|
@@ -189160,10 +189160,10 @@ var Semaphore = class {
|
|
|
189160
189160
|
if (this._couldLockImmediately(weight, priority)) {
|
|
189161
189161
|
return Promise.resolve();
|
|
189162
189162
|
} else {
|
|
189163
|
-
return new Promise((
|
|
189163
|
+
return new Promise((resolve26) => {
|
|
189164
189164
|
if (!this._weightedWaiters[weight - 1])
|
|
189165
189165
|
this._weightedWaiters[weight - 1] = [];
|
|
189166
|
-
insertSorted(this._weightedWaiters[weight - 1], { resolve:
|
|
189166
|
+
insertSorted(this._weightedWaiters[weight - 1], { resolve: resolve26, priority });
|
|
189167
189167
|
});
|
|
189168
189168
|
}
|
|
189169
189169
|
}
|
|
@@ -189246,11 +189246,11 @@ function findIndexFromEnd(a4, predicate) {
|
|
|
189246
189246
|
}
|
|
189247
189247
|
var __awaiter$1 = function(thisArg, _arguments, P, generator) {
|
|
189248
189248
|
function adopt(value) {
|
|
189249
|
-
return value instanceof P ? value : new P(function(
|
|
189250
|
-
|
|
189249
|
+
return value instanceof P ? value : new P(function(resolve26) {
|
|
189250
|
+
resolve26(value);
|
|
189251
189251
|
});
|
|
189252
189252
|
}
|
|
189253
|
-
return new (P || (P = Promise))(function(
|
|
189253
|
+
return new (P || (P = Promise))(function(resolve26, reject) {
|
|
189254
189254
|
function fulfilled(value) {
|
|
189255
189255
|
try {
|
|
189256
189256
|
step(generator.next(value));
|
|
@@ -189266,7 +189266,7 @@ var __awaiter$1 = function(thisArg, _arguments, P, generator) {
|
|
|
189266
189266
|
}
|
|
189267
189267
|
}
|
|
189268
189268
|
function step(result) {
|
|
189269
|
-
result.done ?
|
|
189269
|
+
result.done ? resolve26(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
189270
189270
|
}
|
|
189271
189271
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
189272
189272
|
});
|
|
@@ -189447,7 +189447,7 @@ ${stderr}`) ? em.slice(0, -stderr.length - 1) : em}`);
|
|
|
189447
189447
|
logger.info(`stderr: ${stderr}`);
|
|
189448
189448
|
}
|
|
189449
189449
|
async function execNeverFail(cmd, dir, options) {
|
|
189450
|
-
return new Promise((
|
|
189450
|
+
return new Promise((resolve26) => {
|
|
189451
189451
|
let args2;
|
|
189452
189452
|
if (typeof cmd !== "string") [cmd, ...args2] = cmd;
|
|
189453
189453
|
const childProcess = execFile(
|
|
@@ -189455,7 +189455,7 @@ async function execNeverFail(cmd, dir, options) {
|
|
|
189455
189455
|
args2,
|
|
189456
189456
|
{ ...options, cwd: dir, maxBuffer: 1024 * 1024 * 1024, shell: args2 === void 0 },
|
|
189457
189457
|
(error, stdout, stderr) => {
|
|
189458
|
-
|
|
189458
|
+
resolve26({ error, stdout, stderr });
|
|
189459
189459
|
}
|
|
189460
189460
|
);
|
|
189461
189461
|
if (options?.pipe) {
|
|
@@ -194086,10 +194086,10 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
|
194086
194086
|
var CanceledError_default = CanceledError;
|
|
194087
194087
|
|
|
194088
194088
|
// ../../node_modules/.pnpm/axios@1.8.2/node_modules/axios/lib/core/settle.js
|
|
194089
|
-
function settle(
|
|
194089
|
+
function settle(resolve26, reject, response) {
|
|
194090
194090
|
const validateStatus4 = response.config.validateStatus;
|
|
194091
194091
|
if (!response.status || !validateStatus4 || validateStatus4(response.status)) {
|
|
194092
|
-
|
|
194092
|
+
resolve26(response);
|
|
194093
194093
|
} else {
|
|
194094
194094
|
reject(new AxiosError_default(
|
|
194095
194095
|
"Request failed with status code " + response.status,
|
|
@@ -194590,7 +194590,7 @@ function setProxy(options, configProxy, location) {
|
|
|
194590
194590
|
}
|
|
194591
194591
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
194592
194592
|
var wrapAsync = (asyncExecutor) => {
|
|
194593
|
-
return new Promise((
|
|
194593
|
+
return new Promise((resolve26, reject) => {
|
|
194594
194594
|
let onDone;
|
|
194595
194595
|
let isDone;
|
|
194596
194596
|
const done = (value, isRejected) => {
|
|
@@ -194600,7 +194600,7 @@ var wrapAsync = (asyncExecutor) => {
|
|
|
194600
194600
|
};
|
|
194601
194601
|
const _resolve = (value) => {
|
|
194602
194602
|
done(value);
|
|
194603
|
-
|
|
194603
|
+
resolve26(value);
|
|
194604
194604
|
};
|
|
194605
194605
|
const _reject = (reason) => {
|
|
194606
194606
|
done(reason, true);
|
|
@@ -194620,7 +194620,7 @@ var resolveFamily = ({ address, family }) => {
|
|
|
194620
194620
|
};
|
|
194621
194621
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
194622
194622
|
var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
194623
|
-
return wrapAsync(async function dispatchHttpRequest(
|
|
194623
|
+
return wrapAsync(async function dispatchHttpRequest(resolve26, reject, onDone) {
|
|
194624
194624
|
let { data: data2, lookup, family } = config3;
|
|
194625
194625
|
const { responseType, responseEncoding } = config3;
|
|
194626
194626
|
const method = config3.method.toUpperCase();
|
|
@@ -194672,7 +194672,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
194672
194672
|
if (protocol === "data:") {
|
|
194673
194673
|
let convertedData;
|
|
194674
194674
|
if (method !== "GET") {
|
|
194675
|
-
return settle(
|
|
194675
|
+
return settle(resolve26, reject, {
|
|
194676
194676
|
status: 405,
|
|
194677
194677
|
statusText: "method not allowed",
|
|
194678
194678
|
headers: {},
|
|
@@ -194694,7 +194694,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
194694
194694
|
} else if (responseType === "stream") {
|
|
194695
194695
|
convertedData = stream3.Readable.from(convertedData);
|
|
194696
194696
|
}
|
|
194697
|
-
return settle(
|
|
194697
|
+
return settle(resolve26, reject, {
|
|
194698
194698
|
data: convertedData,
|
|
194699
194699
|
status: 200,
|
|
194700
194700
|
statusText: "OK",
|
|
@@ -194912,7 +194912,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
194912
194912
|
};
|
|
194913
194913
|
if (responseType === "stream") {
|
|
194914
194914
|
response.data = responseStream;
|
|
194915
|
-
settle(
|
|
194915
|
+
settle(resolve26, reject, response);
|
|
194916
194916
|
} else {
|
|
194917
194917
|
const responseBuffer = [];
|
|
194918
194918
|
let totalResponseBytes = 0;
|
|
@@ -194960,7 +194960,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config3) {
|
|
|
194960
194960
|
} catch (err) {
|
|
194961
194961
|
return reject(AxiosError_default.from(err, null, config3, response.request, response));
|
|
194962
194962
|
}
|
|
194963
|
-
settle(
|
|
194963
|
+
settle(resolve26, reject, response);
|
|
194964
194964
|
});
|
|
194965
194965
|
}
|
|
194966
194966
|
emitter.once("abort", (err) => {
|
|
@@ -195187,7 +195187,7 @@ var resolveConfig_default = (config3) => {
|
|
|
195187
195187
|
// ../../node_modules/.pnpm/axios@1.8.2/node_modules/axios/lib/adapters/xhr.js
|
|
195188
195188
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
195189
195189
|
var xhr_default = isXHRAdapterSupported && function(config3) {
|
|
195190
|
-
return new Promise(function dispatchXhrRequest(
|
|
195190
|
+
return new Promise(function dispatchXhrRequest(resolve26, reject) {
|
|
195191
195191
|
const _config = resolveConfig_default(config3);
|
|
195192
195192
|
let requestData = _config.data;
|
|
195193
195193
|
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
@@ -195221,7 +195221,7 @@ var xhr_default = isXHRAdapterSupported && function(config3) {
|
|
|
195221
195221
|
request
|
|
195222
195222
|
};
|
|
195223
195223
|
settle(function _resolve(value) {
|
|
195224
|
-
|
|
195224
|
+
resolve26(value);
|
|
195225
195225
|
done();
|
|
195226
195226
|
}, function _reject(err) {
|
|
195227
195227
|
reject(err);
|
|
@@ -195564,8 +195564,8 @@ var fetch_default = isFetchSupported && (async (config3) => {
|
|
|
195564
195564
|
responseType = responseType || "text";
|
|
195565
195565
|
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config3);
|
|
195566
195566
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
195567
|
-
return await new Promise((
|
|
195568
|
-
settle(
|
|
195567
|
+
return await new Promise((resolve26, reject) => {
|
|
195568
|
+
settle(resolve26, reject, {
|
|
195569
195569
|
data: responseData,
|
|
195570
195570
|
headers: AxiosHeaders_default.from(response.headers),
|
|
195571
195571
|
status: response.status,
|
|
@@ -195931,8 +195931,8 @@ var CancelToken = class _CancelToken {
|
|
|
195931
195931
|
throw new TypeError("executor must be a function.");
|
|
195932
195932
|
}
|
|
195933
195933
|
let resolvePromise;
|
|
195934
|
-
this.promise = new Promise(function promiseExecutor(
|
|
195935
|
-
resolvePromise =
|
|
195934
|
+
this.promise = new Promise(function promiseExecutor(resolve26) {
|
|
195935
|
+
resolvePromise = resolve26;
|
|
195936
195936
|
});
|
|
195937
195937
|
const token = this;
|
|
195938
195938
|
this.promise.then((cancel) => {
|
|
@@ -195945,9 +195945,9 @@ var CancelToken = class _CancelToken {
|
|
|
195945
195945
|
});
|
|
195946
195946
|
this.promise.then = (onfulfilled) => {
|
|
195947
195947
|
let _resolve;
|
|
195948
|
-
const promise = new Promise((
|
|
195949
|
-
token.subscribe(
|
|
195950
|
-
_resolve =
|
|
195948
|
+
const promise = new Promise((resolve26) => {
|
|
195949
|
+
token.subscribe(resolve26);
|
|
195950
|
+
_resolve = resolve26;
|
|
195951
195951
|
}).then(onfulfilled);
|
|
195952
195952
|
promise.cancel = function reject() {
|
|
195953
195953
|
token.unsubscribe(_resolve);
|
|
@@ -199599,10 +199599,10 @@ var Minipass = class extends EventEmitter2 {
|
|
|
199599
199599
|
* Return a void Promise that resolves once the stream ends.
|
|
199600
199600
|
*/
|
|
199601
199601
|
async promise() {
|
|
199602
|
-
return new Promise((
|
|
199602
|
+
return new Promise((resolve26, reject) => {
|
|
199603
199603
|
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
199604
199604
|
this.on("error", (er) => reject(er));
|
|
199605
|
-
this.on("end", () =>
|
|
199605
|
+
this.on("end", () => resolve26());
|
|
199606
199606
|
});
|
|
199607
199607
|
}
|
|
199608
199608
|
/**
|
|
@@ -199626,7 +199626,7 @@ var Minipass = class extends EventEmitter2 {
|
|
|
199626
199626
|
return Promise.resolve({ done: false, value: res });
|
|
199627
199627
|
if (this[EOF])
|
|
199628
199628
|
return stop();
|
|
199629
|
-
let
|
|
199629
|
+
let resolve26;
|
|
199630
199630
|
let reject;
|
|
199631
199631
|
const onerr = (er) => {
|
|
199632
199632
|
this.off("data", ondata);
|
|
@@ -199640,19 +199640,19 @@ var Minipass = class extends EventEmitter2 {
|
|
|
199640
199640
|
this.off("end", onend);
|
|
199641
199641
|
this.off(DESTROYED, ondestroy);
|
|
199642
199642
|
this.pause();
|
|
199643
|
-
|
|
199643
|
+
resolve26({ value, done: !!this[EOF] });
|
|
199644
199644
|
};
|
|
199645
199645
|
const onend = () => {
|
|
199646
199646
|
this.off("error", onerr);
|
|
199647
199647
|
this.off("data", ondata);
|
|
199648
199648
|
this.off(DESTROYED, ondestroy);
|
|
199649
199649
|
stop();
|
|
199650
|
-
|
|
199650
|
+
resolve26({ done: true, value: void 0 });
|
|
199651
199651
|
};
|
|
199652
199652
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
199653
199653
|
return new Promise((res2, rej) => {
|
|
199654
199654
|
reject = rej;
|
|
199655
|
-
|
|
199655
|
+
resolve26 = res2;
|
|
199656
199656
|
this.once(DESTROYED, ondestroy);
|
|
199657
199657
|
this.once("error", onerr);
|
|
199658
199658
|
this.once("end", onend);
|
|
@@ -200622,9 +200622,9 @@ var PathBase = class {
|
|
|
200622
200622
|
if (this.#asyncReaddirInFlight) {
|
|
200623
200623
|
await this.#asyncReaddirInFlight;
|
|
200624
200624
|
} else {
|
|
200625
|
-
let
|
|
200625
|
+
let resolve26 = () => {
|
|
200626
200626
|
};
|
|
200627
|
-
this.#asyncReaddirInFlight = new Promise((res) =>
|
|
200627
|
+
this.#asyncReaddirInFlight = new Promise((res) => resolve26 = res);
|
|
200628
200628
|
try {
|
|
200629
200629
|
for (const e of await this.#fs.promises.readdir(fullpath, {
|
|
200630
200630
|
withFileTypes: true
|
|
@@ -200637,7 +200637,7 @@ var PathBase = class {
|
|
|
200637
200637
|
children2.provisional = 0;
|
|
200638
200638
|
}
|
|
200639
200639
|
this.#asyncReaddirInFlight = void 0;
|
|
200640
|
-
|
|
200640
|
+
resolve26();
|
|
200641
200641
|
}
|
|
200642
200642
|
return children2.slice(0, children2.provisional);
|
|
200643
200643
|
}
|
|
@@ -202689,12 +202689,12 @@ ${stderr}`) ? em.slice(0, -stderr.length - 1) : em}`);
|
|
|
202689
202689
|
logger.info(`stderr: ${stderr}`);
|
|
202690
202690
|
}
|
|
202691
202691
|
async function execNeverFail2(cmd, dir, options) {
|
|
202692
|
-
return new Promise((
|
|
202692
|
+
return new Promise((resolve26) => {
|
|
202693
202693
|
let args2;
|
|
202694
202694
|
if (typeof cmd !== "string")
|
|
202695
202695
|
[cmd, ...args2] = cmd;
|
|
202696
202696
|
const childProcess = execFile2(cmd, args2, { ...options, cwd: dir, maxBuffer: 1024 * 1024 * 1024, shell: args2 === void 0 }, (error, stdout, stderr) => {
|
|
202697
|
-
|
|
202697
|
+
resolve26({ error, stdout, stderr });
|
|
202698
202698
|
});
|
|
202699
202699
|
if (options?.pipe) {
|
|
202700
202700
|
childProcess.stdout?.on("data", (data2) => {
|
|
@@ -205151,10 +205151,10 @@ utils_default2.inherits(CanceledError3, AxiosError_default2, {
|
|
|
205151
205151
|
var CanceledError_default2 = CanceledError3;
|
|
205152
205152
|
|
|
205153
205153
|
// ../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/settle.js
|
|
205154
|
-
function settle2(
|
|
205154
|
+
function settle2(resolve26, reject, response) {
|
|
205155
205155
|
const validateStatus4 = response.config.validateStatus;
|
|
205156
205156
|
if (!response.status || !validateStatus4 || validateStatus4(response.status)) {
|
|
205157
|
-
|
|
205157
|
+
resolve26(response);
|
|
205158
205158
|
} else {
|
|
205159
205159
|
reject(new AxiosError_default2(
|
|
205160
205160
|
"Request failed with status code " + response.status,
|
|
@@ -205655,7 +205655,7 @@ function setProxy2(options, configProxy, location) {
|
|
|
205655
205655
|
}
|
|
205656
205656
|
var isHttpAdapterSupported2 = typeof process !== "undefined" && utils_default2.kindOf(process) === "process";
|
|
205657
205657
|
var wrapAsync2 = (asyncExecutor) => {
|
|
205658
|
-
return new Promise((
|
|
205658
|
+
return new Promise((resolve26, reject) => {
|
|
205659
205659
|
let onDone;
|
|
205660
205660
|
let isDone;
|
|
205661
205661
|
const done = (value, isRejected) => {
|
|
@@ -205665,7 +205665,7 @@ var wrapAsync2 = (asyncExecutor) => {
|
|
|
205665
205665
|
};
|
|
205666
205666
|
const _resolve = (value) => {
|
|
205667
205667
|
done(value);
|
|
205668
|
-
|
|
205668
|
+
resolve26(value);
|
|
205669
205669
|
};
|
|
205670
205670
|
const _reject = (reason) => {
|
|
205671
205671
|
done(reason, true);
|
|
@@ -205685,7 +205685,7 @@ var resolveFamily2 = ({ address, family }) => {
|
|
|
205685
205685
|
};
|
|
205686
205686
|
var buildAddressEntry2 = (address, family) => resolveFamily2(utils_default2.isObject(address) ? address : { address, family });
|
|
205687
205687
|
var http_default2 = isHttpAdapterSupported2 && function httpAdapter2(config3) {
|
|
205688
|
-
return wrapAsync2(async function dispatchHttpRequest(
|
|
205688
|
+
return wrapAsync2(async function dispatchHttpRequest(resolve26, reject, onDone) {
|
|
205689
205689
|
let { data: data2, lookup, family } = config3;
|
|
205690
205690
|
const { responseType, responseEncoding } = config3;
|
|
205691
205691
|
const method = config3.method.toUpperCase();
|
|
@@ -205737,7 +205737,7 @@ var http_default2 = isHttpAdapterSupported2 && function httpAdapter2(config3) {
|
|
|
205737
205737
|
if (protocol === "data:") {
|
|
205738
205738
|
let convertedData;
|
|
205739
205739
|
if (method !== "GET") {
|
|
205740
|
-
return settle2(
|
|
205740
|
+
return settle2(resolve26, reject, {
|
|
205741
205741
|
status: 405,
|
|
205742
205742
|
statusText: "method not allowed",
|
|
205743
205743
|
headers: {},
|
|
@@ -205759,7 +205759,7 @@ var http_default2 = isHttpAdapterSupported2 && function httpAdapter2(config3) {
|
|
|
205759
205759
|
} else if (responseType === "stream") {
|
|
205760
205760
|
convertedData = stream7.Readable.from(convertedData);
|
|
205761
205761
|
}
|
|
205762
|
-
return settle2(
|
|
205762
|
+
return settle2(resolve26, reject, {
|
|
205763
205763
|
data: convertedData,
|
|
205764
205764
|
status: 200,
|
|
205765
205765
|
statusText: "OK",
|
|
@@ -205977,7 +205977,7 @@ var http_default2 = isHttpAdapterSupported2 && function httpAdapter2(config3) {
|
|
|
205977
205977
|
};
|
|
205978
205978
|
if (responseType === "stream") {
|
|
205979
205979
|
response.data = responseStream;
|
|
205980
|
-
settle2(
|
|
205980
|
+
settle2(resolve26, reject, response);
|
|
205981
205981
|
} else {
|
|
205982
205982
|
const responseBuffer = [];
|
|
205983
205983
|
let totalResponseBytes = 0;
|
|
@@ -206025,7 +206025,7 @@ var http_default2 = isHttpAdapterSupported2 && function httpAdapter2(config3) {
|
|
|
206025
206025
|
} catch (err) {
|
|
206026
206026
|
return reject(AxiosError_default2.from(err, null, config3, response.request, response));
|
|
206027
206027
|
}
|
|
206028
|
-
settle2(
|
|
206028
|
+
settle2(resolve26, reject, response);
|
|
206029
206029
|
});
|
|
206030
206030
|
}
|
|
206031
206031
|
emitter.once("abort", (err) => {
|
|
@@ -206252,7 +206252,7 @@ var resolveConfig_default2 = (config3) => {
|
|
|
206252
206252
|
// ../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/xhr.js
|
|
206253
206253
|
var isXHRAdapterSupported2 = typeof XMLHttpRequest !== "undefined";
|
|
206254
206254
|
var xhr_default2 = isXHRAdapterSupported2 && function(config3) {
|
|
206255
|
-
return new Promise(function dispatchXhrRequest(
|
|
206255
|
+
return new Promise(function dispatchXhrRequest(resolve26, reject) {
|
|
206256
206256
|
const _config = resolveConfig_default2(config3);
|
|
206257
206257
|
let requestData = _config.data;
|
|
206258
206258
|
const requestHeaders = AxiosHeaders_default2.from(_config.headers).normalize();
|
|
@@ -206286,7 +206286,7 @@ var xhr_default2 = isXHRAdapterSupported2 && function(config3) {
|
|
|
206286
206286
|
request
|
|
206287
206287
|
};
|
|
206288
206288
|
settle2(function _resolve(value) {
|
|
206289
|
-
|
|
206289
|
+
resolve26(value);
|
|
206290
206290
|
done();
|
|
206291
206291
|
}, function _reject(err) {
|
|
206292
206292
|
reject(err);
|
|
@@ -206629,8 +206629,8 @@ var fetch_default2 = isFetchSupported2 && (async (config3) => {
|
|
|
206629
206629
|
responseType = responseType || "text";
|
|
206630
206630
|
let responseData = await resolvers2[utils_default2.findKey(resolvers2, responseType) || "text"](response, config3);
|
|
206631
206631
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
206632
|
-
return await new Promise((
|
|
206633
|
-
settle2(
|
|
206632
|
+
return await new Promise((resolve26, reject) => {
|
|
206633
|
+
settle2(resolve26, reject, {
|
|
206634
206634
|
data: responseData,
|
|
206635
206635
|
headers: AxiosHeaders_default2.from(response.headers),
|
|
206636
206636
|
status: response.status,
|
|
@@ -206996,8 +206996,8 @@ var CancelToken3 = class _CancelToken {
|
|
|
206996
206996
|
throw new TypeError("executor must be a function.");
|
|
206997
206997
|
}
|
|
206998
206998
|
let resolvePromise;
|
|
206999
|
-
this.promise = new Promise(function promiseExecutor(
|
|
207000
|
-
resolvePromise =
|
|
206999
|
+
this.promise = new Promise(function promiseExecutor(resolve26) {
|
|
207000
|
+
resolvePromise = resolve26;
|
|
207001
207001
|
});
|
|
207002
207002
|
const token = this;
|
|
207003
207003
|
this.promise.then((cancel) => {
|
|
@@ -207010,9 +207010,9 @@ var CancelToken3 = class _CancelToken {
|
|
|
207010
207010
|
});
|
|
207011
207011
|
this.promise.then = (onfulfilled) => {
|
|
207012
207012
|
let _resolve;
|
|
207013
|
-
const promise = new Promise((
|
|
207014
|
-
token.subscribe(
|
|
207015
|
-
_resolve =
|
|
207013
|
+
const promise = new Promise((resolve26) => {
|
|
207014
|
+
token.subscribe(resolve26);
|
|
207015
|
+
_resolve = resolve26;
|
|
207016
207016
|
}).then(onfulfilled);
|
|
207017
207017
|
promise.cancel = function reject() {
|
|
207018
207018
|
token.unsubscribe(_resolve);
|
|
@@ -207550,7 +207550,7 @@ var MavenSocketUpgradeManager = class {
|
|
|
207550
207550
|
};
|
|
207551
207551
|
|
|
207552
207552
|
// ../fixing-management/src/fixing-management/npm/npm-ecosystem-socket-fixing-manager.ts
|
|
207553
|
-
import { dirname as dirname5,
|
|
207553
|
+
import { dirname as dirname5, join as join9, relative as relative6 } from "path";
|
|
207554
207554
|
var NpmSocketUpgradeManager = class {
|
|
207555
207555
|
constructor(rootDir) {
|
|
207556
207556
|
this.rootDir = rootDir;
|
|
@@ -207581,13 +207581,13 @@ var NpmSocketUpgradeManager = class {
|
|
|
207581
207581
|
)
|
|
207582
207582
|
);
|
|
207583
207583
|
for (const lockFile of lockFiles ?? []) {
|
|
207584
|
-
const subprojectDir =
|
|
207584
|
+
const subprojectDir = dirname5(lockFile.file);
|
|
207585
207585
|
const isPnpmLockFile = lockFile.file.endsWith("pnpm-lock.yaml") || lockFile.file.endsWith("pnpm-lock.yml");
|
|
207586
207586
|
const workspaces = isPnpmLockFile ? await getWorkspacePathsFromPnpmLockFile(subprojectDir, true) : await getWorkspacePathsFromPackageJSON(subprojectDir, true);
|
|
207587
207587
|
for (const workspace of workspaces) {
|
|
207588
|
-
workspaceToSubproject.set(
|
|
207588
|
+
workspaceToSubproject.set(join9(subprojectDir, workspace), subprojectDir);
|
|
207589
207589
|
workspaceToPackageManager.set(
|
|
207590
|
-
|
|
207590
|
+
join9(subprojectDir, workspace),
|
|
207591
207591
|
isPnpmLockFile ? "PNPM" : lockFile.file.endsWith("yarn.lock") ? "YARN" : "NPM"
|
|
207592
207592
|
);
|
|
207593
207593
|
}
|
|
@@ -207599,7 +207599,7 @@ var NpmSocketUpgradeManager = class {
|
|
|
207599
207599
|
if (!subprojectToUpgrade.has(subprojectDir)) {
|
|
207600
207600
|
subprojectToUpgrade.set(subprojectDir, /* @__PURE__ */ new Map());
|
|
207601
207601
|
}
|
|
207602
|
-
const workspacePath = relative6(subprojectDir, packageJsonDir);
|
|
207602
|
+
const workspacePath = relative6(subprojectDir, packageJsonDir) || ".";
|
|
207603
207603
|
if (!subprojectToUpgrade.get(subprojectDir)?.has(workspacePath)) {
|
|
207604
207604
|
subprojectToUpgrade.get(subprojectDir)?.set(workspacePath, []);
|
|
207605
207605
|
}
|
|
@@ -207622,12 +207622,12 @@ var NpmSocketUpgradeManager = class {
|
|
|
207622
207622
|
}));
|
|
207623
207623
|
await fixingManager.applySecurityFixesSpecificPackageManager(upgradesTransformed);
|
|
207624
207624
|
const upgradesToDirectDependencies = upgrades.filter((upgrade) => artifacts[upgrade.idx].direct);
|
|
207625
|
-
if (upgradesToDirectDependencies.length === 0)
|
|
207625
|
+
if (upgradesToDirectDependencies.length === 0) continue;
|
|
207626
207626
|
for (const isDev of [false, true]) {
|
|
207627
207627
|
const upgradesOfDirectDependenciesOfType = upgradesToDirectDependencies.filter((upgrade) => artifacts[upgrade.idx].dev === isDev).map(
|
|
207628
207628
|
({ idx, upgradeVersion }) => `${artifacts[idx].namespace ? `${artifacts[idx].namespace}/` : ""}${artifacts[idx].name}@${upgradeVersion}`
|
|
207629
207629
|
);
|
|
207630
|
-
if (upgradesOfDirectDependenciesOfType.length === 0)
|
|
207630
|
+
if (upgradesOfDirectDependenciesOfType.length === 0) continue;
|
|
207631
207631
|
await fixingManager.installSpecificPackages(workspacePath, isDev, upgradesOfDirectDependenciesOfType);
|
|
207632
207632
|
}
|
|
207633
207633
|
}
|
|
@@ -207695,18 +207695,18 @@ import { execFileSync } from "child_process";
|
|
|
207695
207695
|
|
|
207696
207696
|
// ../docker-management/src/constants.ts
|
|
207697
207697
|
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
207698
|
-
import { resolve as
|
|
207698
|
+
import { resolve as resolve15 } from "path";
|
|
207699
207699
|
|
|
207700
207700
|
// ../utils/dist/constants.js
|
|
207701
207701
|
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
207702
|
-
import { dirname as dirname6, resolve as
|
|
207702
|
+
import { dirname as dirname6, resolve as resolve14 } from "node:path";
|
|
207703
207703
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
207704
207704
|
|
|
207705
207705
|
// ../utils/dist/file-utils.js
|
|
207706
207706
|
var import_lodash4 = __toESM(require_lodash(), 1);
|
|
207707
207707
|
var import_micromatch = __toESM(require_micromatch(), 1);
|
|
207708
207708
|
import { access as access2, cp, readdir as readdir4, stat as stat3 } from "fs/promises";
|
|
207709
|
-
import { basename as basename3, join as
|
|
207709
|
+
import { basename as basename3, join as join10, relative as relative7, resolve as resolve13 } from "path";
|
|
207710
207710
|
var { uniq } = import_lodash4.default;
|
|
207711
207711
|
var { isMatch } = import_micromatch.default;
|
|
207712
207712
|
function findParent(dir, predicate, wholePath) {
|
|
@@ -207717,7 +207717,7 @@ function findParent(dir, predicate, wholePath) {
|
|
|
207717
207717
|
if (predicate(name))
|
|
207718
207718
|
return curr;
|
|
207719
207719
|
last2 = curr;
|
|
207720
|
-
curr =
|
|
207720
|
+
curr = resolve13(curr, "..");
|
|
207721
207721
|
} while (curr !== last2);
|
|
207722
207722
|
return void 0;
|
|
207723
207723
|
}
|
|
@@ -207734,13 +207734,13 @@ var COANA_ROOT = once2(() => {
|
|
|
207734
207734
|
return coanaRoot;
|
|
207735
207735
|
});
|
|
207736
207736
|
var COANA_REPOS_PATH = once2(() => {
|
|
207737
|
-
return process.env.COANA_REPOS_PATH ??
|
|
207737
|
+
return process.env.COANA_REPOS_PATH ?? resolve14(COANA_ROOT(), "coana-repos");
|
|
207738
207738
|
});
|
|
207739
207739
|
|
|
207740
207740
|
// ../docker-management/src/constants.ts
|
|
207741
207741
|
var { once: once3 } = import_lodash6.default;
|
|
207742
207742
|
var DOCKERFILES_ROOT = once3(() => {
|
|
207743
|
-
return
|
|
207743
|
+
return resolve15(COANA_ROOT(), "packages", "docker-management", "docker");
|
|
207744
207744
|
});
|
|
207745
207745
|
var REPOSITORY = process.env.DOCKER_REPOSITORY ?? "coanapublic.azurecr.io";
|
|
207746
207746
|
var getImageTag = () => {
|
|
@@ -207748,32 +207748,32 @@ var getImageTag = () => {
|
|
|
207748
207748
|
};
|
|
207749
207749
|
|
|
207750
207750
|
// ../docker-management/src/docker-spec.ts
|
|
207751
|
-
import { join as
|
|
207751
|
+
import { join as join11 } from "path";
|
|
207752
207752
|
var builderSpecs = [
|
|
207753
207753
|
{
|
|
207754
207754
|
name: "maven-builder",
|
|
207755
|
-
file:
|
|
207755
|
+
file: join11("builders", "maven", "Dockerfile"),
|
|
207756
207756
|
isBuilder: true
|
|
207757
207757
|
},
|
|
207758
207758
|
{
|
|
207759
207759
|
name: "python-builder",
|
|
207760
|
-
file:
|
|
207760
|
+
file: join11("builders", "python", "Dockerfile"),
|
|
207761
207761
|
isBuilder: true
|
|
207762
207762
|
},
|
|
207763
207763
|
{
|
|
207764
207764
|
name: "go-builder",
|
|
207765
|
-
file:
|
|
207765
|
+
file: join11("builders", "go", "Dockerfile"),
|
|
207766
207766
|
isBuilder: true
|
|
207767
207767
|
}
|
|
207768
207768
|
];
|
|
207769
207769
|
var packageManagerDockerSpecs = [
|
|
207770
207770
|
{
|
|
207771
207771
|
name: "npm-package-managers",
|
|
207772
|
-
file:
|
|
207772
|
+
file: join11("package-management", "npm", "Dockerfile")
|
|
207773
207773
|
},
|
|
207774
207774
|
{
|
|
207775
207775
|
name: "maven-package-managers",
|
|
207776
|
-
file:
|
|
207776
|
+
file: join11("package-management", "maven", "Dockerfile"),
|
|
207777
207777
|
variants: {
|
|
207778
207778
|
jdk8: {
|
|
207779
207779
|
JDK_URL_AMD64: "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u442-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u442b06.tar.gz",
|
|
@@ -207798,57 +207798,57 @@ var packageManagerDockerSpecs = [
|
|
|
207798
207798
|
},
|
|
207799
207799
|
{
|
|
207800
207800
|
name: "pip-package-managers",
|
|
207801
|
-
file:
|
|
207801
|
+
file: join11("package-management", "pip", "Dockerfile"),
|
|
207802
207802
|
from: {
|
|
207803
207803
|
name: "python-builder"
|
|
207804
207804
|
}
|
|
207805
207805
|
},
|
|
207806
207806
|
{
|
|
207807
207807
|
name: "go-package-manager",
|
|
207808
|
-
file:
|
|
207808
|
+
file: join11("package-management", "go", "Dockerfile"),
|
|
207809
207809
|
from: {
|
|
207810
207810
|
name: "go-builder"
|
|
207811
207811
|
}
|
|
207812
207812
|
},
|
|
207813
207813
|
{
|
|
207814
207814
|
name: "nuget-package-manager",
|
|
207815
|
-
file:
|
|
207815
|
+
file: join11("package-management", "nuget", "Dockerfile")
|
|
207816
207816
|
},
|
|
207817
207817
|
{
|
|
207818
207818
|
name: "cargo-package-manager",
|
|
207819
|
-
file:
|
|
207819
|
+
file: join11("package-management", "cargo", "Dockerfile")
|
|
207820
207820
|
}
|
|
207821
207821
|
];
|
|
207822
207822
|
var reachabilityAnalyzerDockerSpecs = [
|
|
207823
207823
|
{
|
|
207824
207824
|
name: "jelly-analyzer",
|
|
207825
|
-
file:
|
|
207825
|
+
file: join11("reachability-analyzers", "jelly", "Dockerfile")
|
|
207826
207826
|
},
|
|
207827
207827
|
{
|
|
207828
207828
|
name: "alucard-analyzer",
|
|
207829
|
-
file:
|
|
207829
|
+
file: join11("reachability-analyzers", "alucard", "Dockerfile")
|
|
207830
207830
|
},
|
|
207831
207831
|
{
|
|
207832
207832
|
name: "mambalade-analyzer",
|
|
207833
|
-
file:
|
|
207833
|
+
file: join11("reachability-analyzers", "mambalade", "Dockerfile"),
|
|
207834
207834
|
from: {
|
|
207835
207835
|
name: "python-builder"
|
|
207836
207836
|
}
|
|
207837
207837
|
},
|
|
207838
207838
|
{
|
|
207839
207839
|
name: "goana-analyzer",
|
|
207840
|
-
file:
|
|
207840
|
+
file: join11("reachability-analyzers", "goana", "Dockerfile"),
|
|
207841
207841
|
from: {
|
|
207842
207842
|
name: "go-builder"
|
|
207843
207843
|
}
|
|
207844
207844
|
},
|
|
207845
207845
|
{
|
|
207846
207846
|
name: "cocoa-analyzer",
|
|
207847
|
-
file:
|
|
207847
|
+
file: join11("reachability-analyzers", "cocoa", "Dockerfile")
|
|
207848
207848
|
},
|
|
207849
207849
|
{
|
|
207850
207850
|
name: "rustica-analyzer",
|
|
207851
|
-
file:
|
|
207851
|
+
file: join11("reachability-analyzers", "rustica", "Dockerfile")
|
|
207852
207852
|
}
|
|
207853
207853
|
];
|
|
207854
207854
|
function getAllPackageManagerSpecs() {
|
|
@@ -208379,20 +208379,20 @@ var CLILogger2 = class {
|
|
|
208379
208379
|
* in errors that are swallowed by the 'error' event listener in this function.
|
|
208380
208380
|
*/
|
|
208381
208381
|
async finish() {
|
|
208382
|
-
return new Promise((
|
|
208382
|
+
return new Promise((resolve26) => {
|
|
208383
208383
|
if (this.logger instanceof Console2 || this.logger.writableEnded) {
|
|
208384
|
-
|
|
208384
|
+
resolve26();
|
|
208385
208385
|
return;
|
|
208386
208386
|
}
|
|
208387
208387
|
this.logger.on("error", () => {
|
|
208388
208388
|
});
|
|
208389
208389
|
this.logger.end(() => {
|
|
208390
208390
|
if (!this.writeStream || this.writeStream.writableEnded) {
|
|
208391
|
-
|
|
208391
|
+
resolve26();
|
|
208392
208392
|
return;
|
|
208393
208393
|
}
|
|
208394
208394
|
if (!this.writeStream.writableEnded) {
|
|
208395
|
-
this.writeStream.end(
|
|
208395
|
+
this.writeStream.end(resolve26);
|
|
208396
208396
|
}
|
|
208397
208397
|
});
|
|
208398
208398
|
});
|
|
@@ -208435,13 +208435,13 @@ async function detectVariantMaven(projectDir) {
|
|
|
208435
208435
|
|
|
208436
208436
|
// ../docker-management/src/maven/gradle-version-detector.ts
|
|
208437
208437
|
import { existsSync as existsSync10 } from "fs";
|
|
208438
|
-
import { join as
|
|
208438
|
+
import { join as join12 } from "path";
|
|
208439
208439
|
import { readFile as readFile14 } from "fs/promises";
|
|
208440
208440
|
async function detectVariantGradle(projectDir) {
|
|
208441
208441
|
return sanitizeJvmVariant("GRADLE", projectDir, await detect(projectDir));
|
|
208442
208442
|
}
|
|
208443
208443
|
async function detect(projectDir) {
|
|
208444
|
-
const gradleWrapperPropertiesPath =
|
|
208444
|
+
const gradleWrapperPropertiesPath = join12(projectDir, "gradle", "wrapper", "gradle-wrapper.properties");
|
|
208445
208445
|
const gradleWrapperProperties = existsSync10(gradleWrapperPropertiesPath) ? (await readFile14(gradleWrapperPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
208446
208446
|
if (!gradleWrapperProperties) return void 0;
|
|
208447
208447
|
const distributionUrlRegex = /.*gradle-(\d+(\.\d+(\.\d+)?)?)/;
|
|
@@ -208457,13 +208457,13 @@ async function detect(projectDir) {
|
|
|
208457
208457
|
|
|
208458
208458
|
// ../docker-management/src/maven/sbt-version-detector.ts
|
|
208459
208459
|
import { existsSync as existsSync11 } from "fs";
|
|
208460
|
-
import { join as
|
|
208460
|
+
import { join as join13 } from "path";
|
|
208461
208461
|
import { readFile as readFile15 } from "fs/promises";
|
|
208462
208462
|
async function detectVariantSbt(projectDir) {
|
|
208463
208463
|
return sanitizeJvmVariant("SBT", projectDir, await detect2(projectDir));
|
|
208464
208464
|
}
|
|
208465
208465
|
async function detect2(projectDir) {
|
|
208466
|
-
const sbtBuildPropertiesPath =
|
|
208466
|
+
const sbtBuildPropertiesPath = join13(projectDir, "project", "build.properties");
|
|
208467
208467
|
const sbtBuildProperties = existsSync11(sbtBuildPropertiesPath) ? (await readFile15(sbtBuildPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
208468
208468
|
if (!sbtBuildProperties) return void 0;
|
|
208469
208469
|
for (const prop2 of sbtBuildProperties) {
|
|
@@ -208580,13 +208580,13 @@ var import_lodash10 = __toESM(require_lodash(), 1);
|
|
|
208580
208580
|
import { rmSync } from "fs";
|
|
208581
208581
|
import { mkdir, readFile as readFile16, writeFile as writeFile7 } from "fs/promises";
|
|
208582
208582
|
import { platform } from "os";
|
|
208583
|
-
import { join as
|
|
208583
|
+
import { join as join16, posix as posix2, relative as relative9, sep as sep3 } from "path";
|
|
208584
208584
|
|
|
208585
208585
|
// ../utils/src/file-utils.ts
|
|
208586
208586
|
var import_lodash7 = __toESM(require_lodash(), 1);
|
|
208587
208587
|
var import_micromatch2 = __toESM(require_micromatch(), 1);
|
|
208588
208588
|
import { access as access3, cp as cp2, readdir as readdir5, stat as stat4 } from "fs/promises";
|
|
208589
|
-
import { basename as basename4, join as
|
|
208589
|
+
import { basename as basename4, join as join14, relative as relative8, resolve as resolve16 } from "path";
|
|
208590
208590
|
var { uniq: uniq2 } = import_lodash7.default;
|
|
208591
208591
|
var { isMatch: isMatch2 } = import_micromatch2.default;
|
|
208592
208592
|
function findParent2(dir, predicate, wholePath) {
|
|
@@ -208596,7 +208596,7 @@ function findParent2(dir, predicate, wholePath) {
|
|
|
208596
208596
|
const name = wholePath ? curr : basename4(curr);
|
|
208597
208597
|
if (predicate(name)) return curr;
|
|
208598
208598
|
last2 = curr;
|
|
208599
|
-
curr =
|
|
208599
|
+
curr = resolve16(curr, "..");
|
|
208600
208600
|
} while (curr !== last2);
|
|
208601
208601
|
return void 0;
|
|
208602
208602
|
}
|
|
@@ -208612,10 +208612,10 @@ async function exists(path2, mode) {
|
|
|
208612
208612
|
// ../utils/src/tmp-file.ts
|
|
208613
208613
|
import { rm, mkdtemp } from "fs/promises";
|
|
208614
208614
|
import { tmpdir } from "os";
|
|
208615
|
-
import { join as
|
|
208615
|
+
import { join as join15 } from "path";
|
|
208616
208616
|
async function createTmpDirectory(prefix) {
|
|
208617
208617
|
try {
|
|
208618
|
-
const tmpDir = await mkdtemp(
|
|
208618
|
+
const tmpDir = await mkdtemp(join15(tmpdir(), prefix));
|
|
208619
208619
|
return tmpDir;
|
|
208620
208620
|
} catch (err) {
|
|
208621
208621
|
console.log("Error creating tmp directory", err);
|
|
@@ -208829,11 +208829,11 @@ var PACKAGE_MANAGER_TO_SUPPORT2 = n(u3(t2(ecosystemToSupport2), ([_, support]) =
|
|
|
208829
208829
|
|
|
208830
208830
|
// ../other-modules-communicator/src/constants.ts
|
|
208831
208831
|
var import_lodash9 = __toESM(require_lodash(), 1);
|
|
208832
|
-
import { resolve as
|
|
208832
|
+
import { resolve as resolve18 } from "path";
|
|
208833
208833
|
|
|
208834
208834
|
// ../utils/src/constants.ts
|
|
208835
208835
|
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
208836
|
-
import { dirname as dirname7, resolve as
|
|
208836
|
+
import { dirname as dirname7, resolve as resolve17 } from "node:path";
|
|
208837
208837
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
208838
208838
|
var { once: once4 } = import_lodash8.default;
|
|
208839
208839
|
var fileName2 = fileURLToPath4(import.meta.url);
|
|
@@ -208846,17 +208846,17 @@ var COANA_ROOT2 = once4(() => {
|
|
|
208846
208846
|
return coanaRoot;
|
|
208847
208847
|
});
|
|
208848
208848
|
var COANA_REPOS_PATH2 = once4(() => {
|
|
208849
|
-
return process.env.COANA_REPOS_PATH ??
|
|
208849
|
+
return process.env.COANA_REPOS_PATH ?? resolve17(COANA_ROOT2(), "coana-repos");
|
|
208850
208850
|
});
|
|
208851
208851
|
var REQUIREMENTS_FILES_SEARCH_DEPTH = 2;
|
|
208852
208852
|
|
|
208853
208853
|
// ../other-modules-communicator/src/constants.ts
|
|
208854
208854
|
var { once: once5 } = import_lodash9.default;
|
|
208855
208855
|
var PACKAGE_MANAGER_SCRIPT_PATH = once5(() => {
|
|
208856
|
-
return process.env.PACKAGE_MANAGER_SCRIPT_PATH ??
|
|
208856
|
+
return process.env.PACKAGE_MANAGER_SCRIPT_PATH ?? resolve18(COANA_ROOT2(), "packages", "package-management", "dist", "package-management-cli.js");
|
|
208857
208857
|
});
|
|
208858
208858
|
var REACHABILITY_ANALYZERS_SCRIPT_PATH = once5(() => {
|
|
208859
|
-
return process.env.REACHABILITY_ANALYZERS_SCRIPT_PATH ??
|
|
208859
|
+
return process.env.REACHABILITY_ANALYZERS_SCRIPT_PATH ?? resolve18(COANA_ROOT2(), "packages", "reachability-analyzers", "dist", "reachability-analyzers-cli.js");
|
|
208860
208860
|
});
|
|
208861
208861
|
var DOCKER_ENV_WHITE_LIST = [
|
|
208862
208862
|
"GITHUB_",
|
|
@@ -208935,7 +208935,7 @@ var OtherModulesCommunicator = class {
|
|
|
208935
208935
|
return "Running reachability analysis on package registry package";
|
|
208936
208936
|
}
|
|
208937
208937
|
}
|
|
208938
|
-
return `${_cmdStr()}: (${ecosystem}) ${relative9(this.rootWorkingDir,
|
|
208938
|
+
return `${_cmdStr()}: (${ecosystem}) ${relative9(this.rootWorkingDir, join16(subprojectPath, workspacePath)) || "."}`;
|
|
208939
208939
|
}
|
|
208940
208940
|
getProjectPath(subprojectPath) {
|
|
208941
208941
|
return this.options.runWithoutDocker ? subprojectPath : posix2.resolve("/project", relative9(this.rootWorkingDir, subprojectPath).replaceAll(sep3, posix2.sep));
|
|
@@ -208984,7 +208984,7 @@ var OtherModulesCommunicator = class {
|
|
|
208984
208984
|
async runPackageManagerCommandWithOutput(commandName, packageManagerName, subprojectPath, args2 = [], extraDockerArgs, env) {
|
|
208985
208985
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
208986
208986
|
const outputFileName = `${v4_default()}-${commandName}-output.json`;
|
|
208987
|
-
const outputFilePathThisProcess =
|
|
208987
|
+
const outputFilePathThisProcess = join16(tmpDir, outputFileName);
|
|
208988
208988
|
const outputFilePathOtherProcess = this.options.runWithoutDocker ? outputFilePathThisProcess : posix2.join(TMP_DIR_IN_DOCKER, outputFileName);
|
|
208989
208989
|
await this.runPackageManagerCommand(
|
|
208990
208990
|
commandName,
|
|
@@ -209046,7 +209046,7 @@ var OtherModulesCommunicator = class {
|
|
|
209046
209046
|
async runReachabilityAnalyzerCommandWithOutput(commandName, ecosystem, subprojectPath, workspacePath, args2, env) {
|
|
209047
209047
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
209048
209048
|
const outputFileName = `${v4_default()}-${commandName}-output.json`;
|
|
209049
|
-
const outputFilePathThisProcess =
|
|
209049
|
+
const outputFilePathThisProcess = join16(tmpDir, outputFileName);
|
|
209050
209050
|
const outputFilePathOtherProcess = this.options.runWithoutDocker ? outputFilePathThisProcess : posix2.join(TMP_DIR_IN_DOCKER, outputFileName);
|
|
209051
209051
|
await this.runReachabilityAnalyzerCommand(
|
|
209052
209052
|
commandName,
|
|
@@ -209083,7 +209083,7 @@ var OtherModulesCommunicator = class {
|
|
|
209083
209083
|
if (providedOptions.type === "providee") {
|
|
209084
209084
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
209085
209085
|
const providerFileName = "provider.json";
|
|
209086
|
-
const providerFileThisProcess =
|
|
209086
|
+
const providerFileThisProcess = join16(tmpDir, providerFileName);
|
|
209087
209087
|
const providerFileOtherProcess = this.options.runWithoutDocker ? providerFileThisProcess : posix2.join(TMP_DIR_IN_DOCKER, providerFileName);
|
|
209088
209088
|
await writeFile7(providerFileThisProcess, JSON.stringify(providedOptions.provider));
|
|
209089
209089
|
return ["--provider", providerFileOtherProcess];
|
|
@@ -209127,7 +209127,7 @@ var OtherModulesCommunicator = class {
|
|
|
209127
209127
|
async runReachabilityAnalysis(subprojectPath, workspacePath, workspaceData, ecosystem, vulnerabilities, reachabilityAnalysisOptions, otherAnalysisOptions) {
|
|
209128
209128
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
209129
209129
|
const inputFileName = `${v4_default()}-runReachabilityAnalysis-input.json`;
|
|
209130
|
-
const inputFileThisProcess =
|
|
209130
|
+
const inputFileThisProcess = join16(tmpDir, inputFileName);
|
|
209131
209131
|
const inputFileOtherProcess = this.options.runWithoutDocker ? inputFileThisProcess : posix2.join(TMP_DIR_IN_DOCKER, inputFileName);
|
|
209132
209132
|
await writeFile7(
|
|
209133
209133
|
inputFileThisProcess,
|
|
@@ -209169,7 +209169,7 @@ var setUpGoModuleCache = once6(async () => {
|
|
|
209169
209169
|
execFileSync("chmod", ["--recursive", "+rw", tmpDir]);
|
|
209170
209170
|
rmSync(tmpDir, { recursive: true, force: true });
|
|
209171
209171
|
});
|
|
209172
|
-
const [upper, work] = [
|
|
209172
|
+
const [upper, work] = [join16(tmpDir, "upper"), join16(tmpDir, "work")];
|
|
209173
209173
|
for (const dir of [upper, work]) await mkdir(dir);
|
|
209174
209174
|
const o7 = await execNeverFail(
|
|
209175
209175
|
cmdt`docker volume create --driver local --opt type=overlay
|
|
@@ -209202,7 +209202,7 @@ function abbreviateList(items, maxItems) {
|
|
|
209202
209202
|
}
|
|
209203
209203
|
|
|
209204
209204
|
// dist/cli-apply-fix.js
|
|
209205
|
-
import { resolve as
|
|
209205
|
+
import { resolve as resolve19 } from "path";
|
|
209206
209206
|
|
|
209207
209207
|
// ../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-ANXBDSUI.js
|
|
209208
209208
|
var s3 = { done: false, hasNext: false };
|
|
@@ -209423,8 +209423,8 @@ var axiosRetry = (axiosInstance, defaultOptions2) => {
|
|
|
209423
209423
|
}
|
|
209424
209424
|
config3.transformRequest = [(data2) => data2];
|
|
209425
209425
|
await onRetry(currentState.retryCount, error, config3);
|
|
209426
|
-
return new Promise((
|
|
209427
|
-
setTimeout(() =>
|
|
209426
|
+
return new Promise((resolve26) => {
|
|
209427
|
+
setTimeout(() => resolve26(axiosInstance(config3)), delay);
|
|
209428
209428
|
});
|
|
209429
209429
|
}
|
|
209430
209430
|
await handleMaxRetryTimesExceeded(currentState, error);
|
|
@@ -209817,7 +209817,7 @@ async function applyFix(path2, fixIds, options) {
|
|
|
209817
209817
|
}, (packageManagerName, subprojectPath) => `${packageManagerName}:${subprojectPath}`);
|
|
209818
209818
|
const memoizedGetFixingData = memoize2(async (packageManagerName, subprojectPath) => {
|
|
209819
209819
|
const workspacesWithFixes = memoizedGetWorkspacePathsWithFixes(packageManagerName, subprojectPath);
|
|
209820
|
-
return otherModulesCommunicator.getFixingData(packageManagerName,
|
|
209820
|
+
return otherModulesCommunicator.getFixingData(packageManagerName, resolve19(path2, subprojectPath), workspacesWithFixes);
|
|
209821
209821
|
}, (packageManagerName, subprojectPath) => `${packageManagerName}:${subprojectPath}`);
|
|
209822
209822
|
const memoizedGetFixesFromId = memoize2(async (fix) => {
|
|
209823
209823
|
const { vulnerabilityInstance: v, applyFixUuid } = fix;
|
|
@@ -209881,14 +209881,14 @@ async function verifyFixes(fixes, otherModulesCommunicator, rootPath) {
|
|
|
209881
209881
|
if (pathsForEachFixIdData.length !== new Set(pathsForEachFixIdData).size) {
|
|
209882
209882
|
throw new Error("Multiple fix IDs found for the same subproject, workspace and ecosystem");
|
|
209883
209883
|
}
|
|
209884
|
-
const subprojectsNotFound = uniq3(fixes.filter(({ vulnerabilityInstance: v }) => !existsSync12(
|
|
209884
|
+
const subprojectsNotFound = uniq3(fixes.filter(({ vulnerabilityInstance: v }) => !existsSync12(resolve19(rootPath, v.subprojectPath))).map(({ vulnerabilityInstance: v }) => `${v.subprojectPath}:${v.ecosystem}`));
|
|
209885
209885
|
if (subprojectsNotFound.length > 0) {
|
|
209886
209886
|
throw new Error(`Cannot find the following subprojects: ${subprojectsNotFound.join(", ")}`);
|
|
209887
209887
|
}
|
|
209888
209888
|
const workspacesNotFound = (await asyncFilter(fixes, async ({ vulnerabilityInstance: v }) => {
|
|
209889
209889
|
let workspaces = [];
|
|
209890
209890
|
try {
|
|
209891
|
-
workspaces = await otherModulesCommunicator.getWorkspacePaths(v.packageManagerName,
|
|
209891
|
+
workspaces = await otherModulesCommunicator.getWorkspacePaths(v.packageManagerName, resolve19(rootPath, v.subprojectPath));
|
|
209892
209892
|
} catch (e) {
|
|
209893
209893
|
}
|
|
209894
209894
|
return !workspaces.some((wsPath) => wsPath === v.workspacePath);
|
|
@@ -210794,25 +210794,25 @@ var kleur_default = $;
|
|
|
210794
210794
|
// dist/cli-core.js
|
|
210795
210795
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
210796
210796
|
import os from "os";
|
|
210797
|
-
import { join as
|
|
210797
|
+
import { join as join21, relative as relative12, resolve as resolve25 } from "path";
|
|
210798
210798
|
|
|
210799
210799
|
// ../project-management/src/project-management/project-manager.ts
|
|
210800
|
-
import { relative as relative11, resolve as
|
|
210800
|
+
import { relative as relative11, resolve as resolve23 } from "path";
|
|
210801
210801
|
|
|
210802
210802
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-manager.ts
|
|
210803
210803
|
var import_micromatch3 = __toESM(require_micromatch2(), 1);
|
|
210804
210804
|
import { readdir as readdir7 } from "fs/promises";
|
|
210805
|
-
import { join as
|
|
210805
|
+
import { join as join19, relative as relative10, resolve as resolve22 } from "path";
|
|
210806
210806
|
|
|
210807
210807
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-specs.ts
|
|
210808
210808
|
import { existsSync as existsSync14 } from "fs";
|
|
210809
210809
|
import { readdir as readdir6, readFile as readFile19 } from "fs/promises";
|
|
210810
|
-
import { join as
|
|
210810
|
+
import { join as join18, sep as sep4 } from "path";
|
|
210811
210811
|
|
|
210812
210812
|
// ../utils/src/pip-utils.ts
|
|
210813
210813
|
import { existsSync as existsSync13 } from "fs";
|
|
210814
210814
|
import { readFile as readFile18 } from "fs/promises";
|
|
210815
|
-
import { resolve as
|
|
210815
|
+
import { resolve as resolve21 } from "path";
|
|
210816
210816
|
import util6 from "util";
|
|
210817
210817
|
|
|
210818
210818
|
// ../utils/src/python-versions-manager.ts
|
|
@@ -210821,7 +210821,7 @@ var import_semver4 = __toESM(require_semver2(), 1);
|
|
|
210821
210821
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
210822
210822
|
import { constants as constants2 } from "fs";
|
|
210823
210823
|
import { access as access4, readFile as readFile17 } from "fs/promises";
|
|
210824
|
-
import { join as
|
|
210824
|
+
import { join as join17, resolve as resolve20 } from "path";
|
|
210825
210825
|
import util5 from "util";
|
|
210826
210826
|
var { once: once7 } = import_lodash13.default;
|
|
210827
210827
|
var systemPython = once7(() => execFileSync2("which", ["python"], { encoding: "utf8" }).trim());
|
|
@@ -210863,7 +210863,7 @@ var specs = {
|
|
|
210863
210863
|
[
|
|
210864
210864
|
/^(pyproject.toml|setup.py|requirements.*\.txt)/,
|
|
210865
210865
|
async (projectDir) => {
|
|
210866
|
-
const isPythonProject = await exists(
|
|
210866
|
+
const isPythonProject = await exists(join18(projectDir, "pyproject.toml")) || await exists(join18(projectDir, "setup.py")) && await isSetupPySetuptools(join18(projectDir, "setup.py"));
|
|
210867
210867
|
if (isPythonProject) {
|
|
210868
210868
|
properPythonProjects.push(projectDir + sep4);
|
|
210869
210869
|
return "PIP_REQUIREMENTS";
|
|
@@ -210886,7 +210886,7 @@ var specs = {
|
|
|
210886
210886
|
[
|
|
210887
210887
|
"uv.lock",
|
|
210888
210888
|
async (projectDir) => {
|
|
210889
|
-
if (await exists(
|
|
210889
|
+
if (await exists(join18(projectDir, "pyproject.toml"))) {
|
|
210890
210890
|
logger.warn("uv is not supported yet, using plain pyproject.toml as a fallback");
|
|
210891
210891
|
return "PIP_REQUIREMENTS";
|
|
210892
210892
|
} else logger.error("uv.lock found without pyproject.toml");
|
|
@@ -210907,8 +210907,8 @@ function getEcosystemSpecs(ecosystems) {
|
|
|
210907
210907
|
}
|
|
210908
210908
|
function packageManagerIfPackageJSONExistsAndValid(packageManager) {
|
|
210909
210909
|
return async (projectDir) => {
|
|
210910
|
-
if (!existsSync14(
|
|
210911
|
-
const packageJSONPath =
|
|
210910
|
+
if (!existsSync14(join18(projectDir, "package.json"))) return void 0;
|
|
210911
|
+
const packageJSONPath = join18(projectDir, "package.json");
|
|
210912
210912
|
try {
|
|
210913
210913
|
JSON.parse(await readFile19(packageJSONPath, "utf-8"));
|
|
210914
210914
|
return packageManager;
|
|
@@ -210959,15 +210959,15 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
210959
210959
|
newProjectDirsToProcess = [];
|
|
210960
210960
|
await asyncForEach([...packageManagerToProjectDirs.entries()], async ([packageManagerName, projectDirs]) => {
|
|
210961
210961
|
newProjectDirsToProcess.push(...projectDirs);
|
|
210962
|
-
const resolvedProjectDirs = projectDirs.map((projectDir) =>
|
|
210962
|
+
const resolvedProjectDirs = projectDirs.map((projectDir) => resolve22(projectDir));
|
|
210963
210963
|
const projectDirToWorkspacePaths = getPackageManagerSupport(packageManagerName).supportsTraditionalSCA ? await this.otherModulesCommunicator.getWorkspacePathsMultiple(packageManagerName, resolvedProjectDirs) : Object.fromEntries(resolvedProjectDirs.map((projectDir) => [projectDir, ["."]]));
|
|
210964
210964
|
for (let [relativeProjectDir, workspacePaths] of Object.entries(projectDirToWorkspacePaths)) {
|
|
210965
|
-
const resolvedProjectDir =
|
|
210965
|
+
const resolvedProjectDir = resolve22(mainProjectDir, relativeProjectDir);
|
|
210966
210966
|
if (config3.includeDirs.length > 0)
|
|
210967
210967
|
workspacePaths = workspacePaths.filter(
|
|
210968
|
-
(workspacePath) => isMatch3(relative10(mainProjectDir,
|
|
210968
|
+
(workspacePath) => isMatch3(relative10(mainProjectDir, join19(resolvedProjectDir, workspacePath)), config3.includeDirs)
|
|
210969
210969
|
);
|
|
210970
|
-
workspacePaths.filter((workspacePath) => workspacePath !== ".").forEach((workspacePath) => projectDirsAlreadyCovered.push(
|
|
210970
|
+
workspacePaths.filter((workspacePath) => workspacePath !== ".").forEach((workspacePath) => projectDirsAlreadyCovered.push(resolve22(resolvedProjectDir, workspacePath)));
|
|
210971
210971
|
if (workspacePaths.length > 0)
|
|
210972
210972
|
subprojects[resolvedProjectDir] = {
|
|
210973
210973
|
packageManagerName,
|
|
@@ -210993,7 +210993,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
210993
210993
|
}
|
|
210994
210994
|
}
|
|
210995
210995
|
for (const dir of directoriesToTraverse) {
|
|
210996
|
-
await recHelper(
|
|
210996
|
+
await recHelper(join19(projectDir, dir), true);
|
|
210997
210997
|
}
|
|
210998
210998
|
}
|
|
210999
210999
|
async function getPackageManagerName(projectDir, foundProjectFiles, foundLockFiles) {
|
|
@@ -211022,7 +211022,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
211022
211022
|
const filesAndDirectories = await readdir7(projectDir, { withFileTypes: true });
|
|
211023
211023
|
for (const dirent of filesAndDirectories) {
|
|
211024
211024
|
const fileOrDirectory = dirent.name;
|
|
211025
|
-
const fullPath =
|
|
211025
|
+
const fullPath = join19(projectDir, fileOrDirectory);
|
|
211026
211026
|
if (dirent.isDirectory()) {
|
|
211027
211027
|
if (shouldIgnoreDir(fileOrDirectory) || shouldIgnoreDueToExcludeDirsOrChangedFiles(config3, fullPath))
|
|
211028
211028
|
continue;
|
|
@@ -211049,7 +211049,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
211049
211049
|
packageManagerName,
|
|
211050
211050
|
subprojectPath,
|
|
211051
211051
|
workspacePaths: workspacePaths.filter(
|
|
211052
|
-
(workspacePath) => !shouldIgnoreDueToExcludeDirsOrChangedFiles(this.config,
|
|
211052
|
+
(workspacePath) => !shouldIgnoreDueToExcludeDirsOrChangedFiles(this.config, join19(subprojectPath, workspacePath))
|
|
211053
211053
|
)
|
|
211054
211054
|
}));
|
|
211055
211055
|
}
|
|
@@ -211138,7 +211138,7 @@ var ProjectManager = class _ProjectManager {
|
|
|
211138
211138
|
getSubproject(ecosystem, subprojectPath) {
|
|
211139
211139
|
const manager = this.ecosystemToEcosystemManager[ecosystem];
|
|
211140
211140
|
if (!manager) throw new Error(`Project manager was not created for the ${ecosystem} ecosystem`);
|
|
211141
|
-
return manager.findSubprojectWithPath(
|
|
211141
|
+
return manager.findSubprojectWithPath(resolve23(this.projectDir, subprojectPath));
|
|
211142
211142
|
}
|
|
211143
211143
|
getSubprojectsFoundTextSummary() {
|
|
211144
211144
|
const summaryString = Object.entries(this.ecosystemToEcosystemManager).map(([ecosystem, manager]) => {
|
|
@@ -211228,14 +211228,14 @@ var PromiseQueue = class {
|
|
|
211228
211228
|
this.runNextTask();
|
|
211229
211229
|
}
|
|
211230
211230
|
async onIdle() {
|
|
211231
|
-
return new Promise((
|
|
211231
|
+
return new Promise((resolve26, reject) => {
|
|
211232
211232
|
if (this.error) {
|
|
211233
211233
|
reject(this.error);
|
|
211234
211234
|
this.error = null;
|
|
211235
211235
|
} else if (this.queue.length === 0 && this.activeTasks === 0) {
|
|
211236
|
-
|
|
211236
|
+
resolve26();
|
|
211237
211237
|
} else {
|
|
211238
|
-
this.idleResolver =
|
|
211238
|
+
this.idleResolver = resolve26;
|
|
211239
211239
|
this.idleRejector = reject;
|
|
211240
211240
|
}
|
|
211241
211241
|
});
|
|
@@ -211381,13 +211381,13 @@ var DEFAULT_REPORT_FILENAME_BASE = "coana-report";
|
|
|
211381
211381
|
// dist/internal/exclude-dirs-from-configuration-files.js
|
|
211382
211382
|
import { existsSync as existsSync15 } from "fs";
|
|
211383
211383
|
import { readFile as readFile20 } from "fs/promises";
|
|
211384
|
-
import { basename as basename5, resolve as
|
|
211384
|
+
import { basename as basename5, resolve as resolve24 } from "path";
|
|
211385
211385
|
var import_yaml2 = __toESM(require_dist11(), 1);
|
|
211386
211386
|
async function inferExcludeDirsFromConfigurationFiles(rootWorkingDir) {
|
|
211387
|
-
const socketYmlConfigFile =
|
|
211387
|
+
const socketYmlConfigFile = resolve24(rootWorkingDir, "socket.yml");
|
|
211388
211388
|
if (existsSync15(socketYmlConfigFile))
|
|
211389
211389
|
return inferExcludeDirsFromSocketConfig(socketYmlConfigFile);
|
|
211390
|
-
const socketYamlConfigFile =
|
|
211390
|
+
const socketYamlConfigFile = resolve24(rootWorkingDir, "socket.yaml");
|
|
211391
211391
|
if (existsSync15(socketYamlConfigFile))
|
|
211392
211392
|
return inferExcludeDirsFromSocketConfig(socketYamlConfigFile);
|
|
211393
211393
|
return void 0;
|
|
@@ -224925,7 +224925,7 @@ var { root: root2 } = static_exports;
|
|
|
224925
224925
|
// ../utils/src/maven-utils.ts
|
|
224926
224926
|
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
224927
224927
|
import { existsSync as existsSync16, readdirSync as readdirSync4, statSync as statSync4 } from "fs";
|
|
224928
|
-
import { join as
|
|
224928
|
+
import { join as join20 } from "path";
|
|
224929
224929
|
var { memoize: memoize3 } = import_lodash14.default;
|
|
224930
224930
|
var memoizedParseShellArgs = memoize3(parseShellArgs);
|
|
224931
224931
|
var MAVEN_PUBLIC_REPOSITORIES = [
|
|
@@ -225460,7 +225460,7 @@ async function computeAdvisoryDB() {
|
|
|
225460
225460
|
throw new Error("GITHUB_TOKEN env variable is not set");
|
|
225461
225461
|
}
|
|
225462
225462
|
const octokit = new import_octokit.Octokit({ auth: githubToken });
|
|
225463
|
-
const delay = async (ms) => new Promise((
|
|
225463
|
+
const delay = async (ms) => new Promise((resolve26) => setTimeout(resolve26, ms));
|
|
225464
225464
|
const vulnerabilityDB = {};
|
|
225465
225465
|
let hasNextPage = true;
|
|
225466
225466
|
let cursor;
|
|
@@ -226296,7 +226296,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
226296
226296
|
}
|
|
226297
226297
|
|
|
226298
226298
|
// dist/version.js
|
|
226299
|
-
var version2 = "14.10.
|
|
226299
|
+
var version2 = "14.10.4";
|
|
226300
226300
|
|
|
226301
226301
|
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/bind.js
|
|
226302
226302
|
function bind3(fn2, thisArg) {
|
|
@@ -227535,10 +227535,10 @@ utils_default3.inherits(CanceledError5, AxiosError_default3, {
|
|
|
227535
227535
|
var CanceledError_default3 = CanceledError5;
|
|
227536
227536
|
|
|
227537
227537
|
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/core/settle.js
|
|
227538
|
-
function settle3(
|
|
227538
|
+
function settle3(resolve26, reject, response) {
|
|
227539
227539
|
const validateStatus4 = response.config.validateStatus;
|
|
227540
227540
|
if (!response.status || !validateStatus4 || validateStatus4(response.status)) {
|
|
227541
|
-
|
|
227541
|
+
resolve26(response);
|
|
227542
227542
|
} else {
|
|
227543
227543
|
reject(new AxiosError_default3(
|
|
227544
227544
|
"Request failed with status code " + response.status,
|
|
@@ -228039,7 +228039,7 @@ function setProxy3(options, configProxy, location) {
|
|
|
228039
228039
|
}
|
|
228040
228040
|
var isHttpAdapterSupported3 = typeof process !== "undefined" && utils_default3.kindOf(process) === "process";
|
|
228041
228041
|
var wrapAsync3 = (asyncExecutor) => {
|
|
228042
|
-
return new Promise((
|
|
228042
|
+
return new Promise((resolve26, reject) => {
|
|
228043
228043
|
let onDone;
|
|
228044
228044
|
let isDone;
|
|
228045
228045
|
const done = (value, isRejected) => {
|
|
@@ -228049,7 +228049,7 @@ var wrapAsync3 = (asyncExecutor) => {
|
|
|
228049
228049
|
};
|
|
228050
228050
|
const _resolve = (value) => {
|
|
228051
228051
|
done(value);
|
|
228052
|
-
|
|
228052
|
+
resolve26(value);
|
|
228053
228053
|
};
|
|
228054
228054
|
const _reject = (reason) => {
|
|
228055
228055
|
done(reason, true);
|
|
@@ -228069,7 +228069,7 @@ var resolveFamily3 = ({ address, family }) => {
|
|
|
228069
228069
|
};
|
|
228070
228070
|
var buildAddressEntry3 = (address, family) => resolveFamily3(utils_default3.isObject(address) ? address : { address, family });
|
|
228071
228071
|
var http_default3 = isHttpAdapterSupported3 && function httpAdapter3(config3) {
|
|
228072
|
-
return wrapAsync3(async function dispatchHttpRequest(
|
|
228072
|
+
return wrapAsync3(async function dispatchHttpRequest(resolve26, reject, onDone) {
|
|
228073
228073
|
let { data: data2, lookup, family } = config3;
|
|
228074
228074
|
const { responseType, responseEncoding } = config3;
|
|
228075
228075
|
const method = config3.method.toUpperCase();
|
|
@@ -228121,7 +228121,7 @@ var http_default3 = isHttpAdapterSupported3 && function httpAdapter3(config3) {
|
|
|
228121
228121
|
if (protocol === "data:") {
|
|
228122
228122
|
let convertedData;
|
|
228123
228123
|
if (method !== "GET") {
|
|
228124
|
-
return settle3(
|
|
228124
|
+
return settle3(resolve26, reject, {
|
|
228125
228125
|
status: 405,
|
|
228126
228126
|
statusText: "method not allowed",
|
|
228127
228127
|
headers: {},
|
|
@@ -228143,7 +228143,7 @@ var http_default3 = isHttpAdapterSupported3 && function httpAdapter3(config3) {
|
|
|
228143
228143
|
} else if (responseType === "stream") {
|
|
228144
228144
|
convertedData = stream10.Readable.from(convertedData);
|
|
228145
228145
|
}
|
|
228146
|
-
return settle3(
|
|
228146
|
+
return settle3(resolve26, reject, {
|
|
228147
228147
|
data: convertedData,
|
|
228148
228148
|
status: 200,
|
|
228149
228149
|
statusText: "OK",
|
|
@@ -228361,7 +228361,7 @@ var http_default3 = isHttpAdapterSupported3 && function httpAdapter3(config3) {
|
|
|
228361
228361
|
};
|
|
228362
228362
|
if (responseType === "stream") {
|
|
228363
228363
|
response.data = responseStream;
|
|
228364
|
-
settle3(
|
|
228364
|
+
settle3(resolve26, reject, response);
|
|
228365
228365
|
} else {
|
|
228366
228366
|
const responseBuffer = [];
|
|
228367
228367
|
let totalResponseBytes = 0;
|
|
@@ -228409,7 +228409,7 @@ var http_default3 = isHttpAdapterSupported3 && function httpAdapter3(config3) {
|
|
|
228409
228409
|
} catch (err) {
|
|
228410
228410
|
return reject(AxiosError_default3.from(err, null, config3, response.request, response));
|
|
228411
228411
|
}
|
|
228412
|
-
settle3(
|
|
228412
|
+
settle3(resolve26, reject, response);
|
|
228413
228413
|
});
|
|
228414
228414
|
}
|
|
228415
228415
|
emitter.once("abort", (err) => {
|
|
@@ -228636,7 +228636,7 @@ var resolveConfig_default3 = (config3) => {
|
|
|
228636
228636
|
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/adapters/xhr.js
|
|
228637
228637
|
var isXHRAdapterSupported3 = typeof XMLHttpRequest !== "undefined";
|
|
228638
228638
|
var xhr_default3 = isXHRAdapterSupported3 && function(config3) {
|
|
228639
|
-
return new Promise(function dispatchXhrRequest(
|
|
228639
|
+
return new Promise(function dispatchXhrRequest(resolve26, reject) {
|
|
228640
228640
|
const _config = resolveConfig_default3(config3);
|
|
228641
228641
|
let requestData = _config.data;
|
|
228642
228642
|
const requestHeaders = AxiosHeaders_default3.from(_config.headers).normalize();
|
|
@@ -228670,7 +228670,7 @@ var xhr_default3 = isXHRAdapterSupported3 && function(config3) {
|
|
|
228670
228670
|
request
|
|
228671
228671
|
};
|
|
228672
228672
|
settle3(function _resolve(value) {
|
|
228673
|
-
|
|
228673
|
+
resolve26(value);
|
|
228674
228674
|
done();
|
|
228675
228675
|
}, function _reject(err) {
|
|
228676
228676
|
reject(err);
|
|
@@ -229013,8 +229013,8 @@ var fetch_default3 = isFetchSupported3 && (async (config3) => {
|
|
|
229013
229013
|
responseType = responseType || "text";
|
|
229014
229014
|
let responseData = await resolvers3[utils_default3.findKey(resolvers3, responseType) || "text"](response, config3);
|
|
229015
229015
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
229016
|
-
return await new Promise((
|
|
229017
|
-
settle3(
|
|
229016
|
+
return await new Promise((resolve26, reject) => {
|
|
229017
|
+
settle3(resolve26, reject, {
|
|
229018
229018
|
data: responseData,
|
|
229019
229019
|
headers: AxiosHeaders_default3.from(response.headers),
|
|
229020
229020
|
status: response.status,
|
|
@@ -229380,8 +229380,8 @@ var CancelToken5 = class _CancelToken {
|
|
|
229380
229380
|
throw new TypeError("executor must be a function.");
|
|
229381
229381
|
}
|
|
229382
229382
|
let resolvePromise;
|
|
229383
|
-
this.promise = new Promise(function promiseExecutor(
|
|
229384
|
-
resolvePromise =
|
|
229383
|
+
this.promise = new Promise(function promiseExecutor(resolve26) {
|
|
229384
|
+
resolvePromise = resolve26;
|
|
229385
229385
|
});
|
|
229386
229386
|
const token = this;
|
|
229387
229387
|
this.promise.then((cancel) => {
|
|
@@ -229394,9 +229394,9 @@ var CancelToken5 = class _CancelToken {
|
|
|
229394
229394
|
});
|
|
229395
229395
|
this.promise.then = (onfulfilled) => {
|
|
229396
229396
|
let _resolve;
|
|
229397
|
-
const promise = new Promise((
|
|
229398
|
-
token.subscribe(
|
|
229399
|
-
_resolve =
|
|
229397
|
+
const promise = new Promise((resolve26) => {
|
|
229398
|
+
token.subscribe(resolve26);
|
|
229399
|
+
_resolve = resolve26;
|
|
229400
229400
|
}).then(onfulfilled);
|
|
229401
229401
|
promise.cancel = function reject() {
|
|
229402
229402
|
token.unsubscribe(_resolve);
|
|
@@ -230072,6 +230072,9 @@ var CliCore = class {
|
|
|
230072
230072
|
rootWorkingDirectory;
|
|
230073
230073
|
analysisTimeoutInSeconds;
|
|
230074
230074
|
analysisMemoryLimitInMb;
|
|
230075
|
+
// Track failed workspaces and subprojects when --ignore-failing-workspaces option is enabled
|
|
230076
|
+
failedWorkspaces = [];
|
|
230077
|
+
failedSubprojects = [];
|
|
230075
230078
|
coanaLogPath = "";
|
|
230076
230079
|
shareWithDashboard;
|
|
230077
230080
|
reportId;
|
|
@@ -230088,7 +230091,7 @@ var CliCore = class {
|
|
|
230088
230091
|
throw new Error("Invalid analysis timeout value");
|
|
230089
230092
|
}
|
|
230090
230093
|
}
|
|
230091
|
-
this.rootWorkingDirectory =
|
|
230094
|
+
this.rootWorkingDirectory = resolve25(rootWorkingDirectory);
|
|
230092
230095
|
this.spinner = Spinner.instance({ text: "Running Coana CLI", isSilent: this.options.silent });
|
|
230093
230096
|
this.shareWithDashboard = !this.options.socketMode && !!(this.options.apiKey && !this.options.disableReportSubmission && (this.options.repoUrl ?? this.options.projectName));
|
|
230094
230097
|
}
|
|
@@ -230150,7 +230153,7 @@ var CliCore = class {
|
|
|
230150
230153
|
}
|
|
230151
230154
|
}
|
|
230152
230155
|
async main() {
|
|
230153
|
-
this.coanaLogPath =
|
|
230156
|
+
this.coanaLogPath = join21(await createTmpDirectory("coana-cli-"), "coana-log.txt");
|
|
230154
230157
|
logger.initWinstonLogger(this.options.debug, this.coanaLogPath);
|
|
230155
230158
|
logger.silent = this.options.silent;
|
|
230156
230159
|
try {
|
|
@@ -230207,7 +230210,7 @@ var CliCore = class {
|
|
|
230207
230210
|
)).flat());
|
|
230208
230211
|
}
|
|
230209
230212
|
const socketReport = toSocketFactsSocketDependencyTree(artifacts, vulnsWithResults);
|
|
230210
|
-
const outputFile =
|
|
230213
|
+
const outputFile = resolve25(this.options.socketMode);
|
|
230211
230214
|
await writeFile9(outputFile, JSON.stringify(socketReport, null, 2));
|
|
230212
230215
|
logger.info(kleur_default.green(`Socket report written to: ${outputFile}`));
|
|
230213
230216
|
}
|
|
@@ -230237,13 +230240,13 @@ var CliCore = class {
|
|
|
230237
230240
|
throw new Error("Dependency trees should be available when using --socket-mode");
|
|
230238
230241
|
}
|
|
230239
230242
|
const socketReport = toSocketFacts(report, this.reportDependencyTrees, subPjToWsPathToDirectDependencies);
|
|
230240
|
-
const outputFile =
|
|
230243
|
+
const outputFile = resolve25(this.options.socketMode);
|
|
230241
230244
|
await writeFile9(outputFile, JSON.stringify(socketReport, null, 2));
|
|
230242
230245
|
logger.info(kleur_default.green(`Socket report written to: ${outputFile}`));
|
|
230243
230246
|
return;
|
|
230244
230247
|
}
|
|
230245
230248
|
if (outputDir) {
|
|
230246
|
-
const jsonReportPath =
|
|
230249
|
+
const jsonReportPath = resolve25(outputDir, `${DEFAULT_REPORT_FILENAME_BASE}.json`);
|
|
230247
230250
|
await mkdir2(outputDir, { recursive: true });
|
|
230248
230251
|
writeFileSync3(jsonReportPath, JSON.stringify(report, null, 2));
|
|
230249
230252
|
logger.info(kleur_default.green(`JSON report written to: ${jsonReportPath}`));
|
|
@@ -230304,14 +230307,52 @@ var CliCore = class {
|
|
|
230304
230307
|
supportedSubprojects.forEach(([subprojectAndWsPath, reachabilitySupported], idx) => {
|
|
230305
230308
|
workspacePromiseQueue.enqueueTask(async () => {
|
|
230306
230309
|
await this.updateSpinnerTextOnNewSubproject(subprojectAndWsPath, supportedSubprojects.length, idx);
|
|
230307
|
-
|
|
230308
|
-
|
|
230310
|
+
try {
|
|
230311
|
+
workspacesOutput.push(...await this.runOnSubproject(otherModulesCommunicator, subprojectAndWsPath, reachabilitySupported));
|
|
230312
|
+
await this.spinner.succeed();
|
|
230313
|
+
} catch (error) {
|
|
230314
|
+
if (this.options.ignoreFailingWorkspaces) {
|
|
230315
|
+
const relativeSubprojectPath = relative12(this.rootWorkingDirectory, subprojectAndWsPath.subprojectPath) || ".";
|
|
230316
|
+
this.failedSubprojects.push({
|
|
230317
|
+
subproject: relativeSubprojectPath,
|
|
230318
|
+
error: error.message || "Unknown error"
|
|
230319
|
+
});
|
|
230320
|
+
await this.spinner.fail();
|
|
230321
|
+
logger.error(`Failed to process subproject ${relativeSubprojectPath}: ${error.message}`);
|
|
230322
|
+
} else {
|
|
230323
|
+
throw error;
|
|
230324
|
+
}
|
|
230325
|
+
}
|
|
230309
230326
|
});
|
|
230310
230327
|
});
|
|
230311
230328
|
await workspacePromiseQueue.onIdle();
|
|
230312
230329
|
await this.spinner.setText(`Compiling report`);
|
|
230313
230330
|
const allVulnerabilities = workspacesOutput.flatMap(({ vulnerabilities }) => vulnerabilities);
|
|
230314
230331
|
this.spinner.stop();
|
|
230332
|
+
if (this.options.ignoreFailingWorkspaces && (this.failedSubprojects.length > 0 || this.failedWorkspaces.length > 0)) {
|
|
230333
|
+
logger.warn("\n===== Failed Subprojects and Workspaces Summary =====");
|
|
230334
|
+
if (this.failedSubprojects.length > 0) {
|
|
230335
|
+
logger.warn(`
|
|
230336
|
+
Total failed subprojects: ${this.failedSubprojects.length}`);
|
|
230337
|
+
this.failedSubprojects.forEach(({ subproject, error }) => {
|
|
230338
|
+
logger.warn(`
|
|
230339
|
+
Subproject: ${subproject}`);
|
|
230340
|
+
logger.warn(`Error: ${error}`);
|
|
230341
|
+
});
|
|
230342
|
+
}
|
|
230343
|
+
if (this.failedWorkspaces.length > 0) {
|
|
230344
|
+
logger.warn(`
|
|
230345
|
+
Total failed workspaces: ${this.failedWorkspaces.length}`);
|
|
230346
|
+
this.failedWorkspaces.forEach(({ subproject, workspace, error, phase }) => {
|
|
230347
|
+
logger.warn(`
|
|
230348
|
+
Subproject: ${subproject}`);
|
|
230349
|
+
logger.warn(`Workspace: ${workspace}`);
|
|
230350
|
+
logger.warn(`Phase: ${phase}`);
|
|
230351
|
+
logger.warn(`Error: ${error}`);
|
|
230352
|
+
});
|
|
230353
|
+
}
|
|
230354
|
+
logger.warn("\n======================================================\n");
|
|
230355
|
+
}
|
|
230315
230356
|
const report = {
|
|
230316
230357
|
reportType: "v8",
|
|
230317
230358
|
vulnerabilities: allVulnerabilities,
|
|
@@ -230404,7 +230445,9 @@ var CliCore = class {
|
|
|
230404
230445
|
const { projectInfo, workspaceToVulnerabilities } = await this.getDependencyTreeAndVulnerabilities(otherModulesCommunicator, subProjAndWsPath);
|
|
230405
230446
|
const workspacePathToDataForAnalysis = Object.fromEntries(Object.entries(projectInfo).map(([workspacePath, projectInfo2]) => [workspacePath, projectInfo2.dataForAnalysis]));
|
|
230406
230447
|
const workspaceToAugmentedVulnerabilities = await this.runReachabilityAnalysisForWorkspaces(workspacePathToDataForAnalysis, workspaceToVulnerabilities, Object.fromEntries(workspacePaths.map((wsPath) => [wsPath, projectInfo[wsPath].dataForAnalysis.directDependenciesMap ?? {}])), otherModulesCommunicator, subprojectPath, ecosystem, reachabilitySupported);
|
|
230407
|
-
return workspacePaths.
|
|
230448
|
+
return workspacePaths.filter((workspacePath) => {
|
|
230449
|
+
return workspaceToAugmentedVulnerabilities[workspacePath] !== void 0;
|
|
230450
|
+
}).map((workspacePath) => {
|
|
230408
230451
|
return {
|
|
230409
230452
|
subprojectPath: relative12(this.rootWorkingDirectory, subprojectPath) || ".",
|
|
230410
230453
|
workspacePath,
|
|
@@ -230419,21 +230462,37 @@ var CliCore = class {
|
|
|
230419
230462
|
}
|
|
230420
230463
|
async runReachabilityAnalysisForWorkspaces(workspacePathToDataForAnalysis, workspaceToVulnerabilities, workspaceToDirectDependencies, otherModulesCommunicator, subprojectPath, ecosystem, reachabilitySupported) {
|
|
230421
230464
|
const workspaceToAugmentedVulnerabilities = Object.fromEntries(await asyncMap(Object.keys(workspacePathToDataForAnalysis), async (workspacePath) => {
|
|
230422
|
-
|
|
230423
|
-
|
|
230424
|
-
|
|
230425
|
-
|
|
230426
|
-
|
|
230427
|
-
|
|
230428
|
-
|
|
230465
|
+
try {
|
|
230466
|
+
const dataForAnalysis = workspacePathToDataForAnalysis[workspacePath];
|
|
230467
|
+
const vulnerabilities = workspaceToVulnerabilities[workspacePath];
|
|
230468
|
+
const augmentedVulnerabilities = reachabilitySupported ? await this.runReachabilityAnalysis(otherModulesCommunicator, subprojectPath, workspacePath, dataForAnalysis, ecosystem, vulnerabilities) : vulnerabilities.map((v) => ({
|
|
230469
|
+
...v,
|
|
230470
|
+
results: {
|
|
230471
|
+
type: "otherError",
|
|
230472
|
+
message: `Reachability analysis for languages using ${ecosystem} not supported yet`
|
|
230473
|
+
}
|
|
230474
|
+
}));
|
|
230475
|
+
return [workspacePath, augmentedVulnerabilities];
|
|
230476
|
+
} catch (e) {
|
|
230477
|
+
logger.error(`Reachability analysis failed for workspace ${workspacePath} in subproject ${subprojectPath}: ${e.message}`);
|
|
230478
|
+
if (this.options.ignoreFailingWorkspaces) {
|
|
230479
|
+
const relativeSubprojectPath = relative12(this.rootWorkingDirectory, subprojectPath) || ".";
|
|
230480
|
+
this.failedWorkspaces.push({
|
|
230481
|
+
subproject: relativeSubprojectPath,
|
|
230482
|
+
workspace: workspacePath,
|
|
230483
|
+
error: e.message || "Unknown error",
|
|
230484
|
+
phase: "reachability-analysis"
|
|
230485
|
+
});
|
|
230486
|
+
return [workspacePath, void 0];
|
|
230429
230487
|
}
|
|
230430
|
-
|
|
230431
|
-
|
|
230488
|
+
throw e;
|
|
230489
|
+
}
|
|
230432
230490
|
}));
|
|
230491
|
+
const successfulWorkspaceToAugmentedVulnerabilities = Object.fromEntries(Object.entries(workspaceToAugmentedVulnerabilities).filter(([_, vulns]) => vulns !== void 0));
|
|
230433
230492
|
if (ecosystem === "MAVEN" || ecosystem === "NUGET" || ecosystem === "RUST") {
|
|
230434
|
-
pruneVulnerablePathsToShortestPathsOnly(ecosystem,
|
|
230493
|
+
pruneVulnerablePathsToShortestPathsOnly(ecosystem, successfulWorkspaceToAugmentedVulnerabilities);
|
|
230435
230494
|
}
|
|
230436
|
-
return mapValues(
|
|
230495
|
+
return mapValues(successfulWorkspaceToAugmentedVulnerabilities, (augmentedVulnerabilities, workspacePath) => this.transformToReportVulnerabilities(augmentedVulnerabilities, workspaceToDirectDependencies[workspacePath] ?? {}, subprojectPath, workspacePath, this.rootWorkingDirectory));
|
|
230437
230496
|
function pruneVulnerablePathsToShortestPathsOnly(ecosystem2, workspaceToAugmentedVulnerabilities2) {
|
|
230438
230497
|
const vulnerabilityToWorkspaceToCodeAwareScanSuccess = {};
|
|
230439
230498
|
for (const [workspacePath, augmentedVulnerabilities] of Object.entries(workspaceToAugmentedVulnerabilities2)) {
|
|
@@ -230584,12 +230643,23 @@ var CliCore = class {
|
|
|
230584
230643
|
];
|
|
230585
230644
|
} catch (e) {
|
|
230586
230645
|
logger.error(`Scanning for vulnerabilities failed for subproject ${subprojectPath} in workspace ${workspacePath}`);
|
|
230646
|
+
if (this.options.ignoreFailingWorkspaces) {
|
|
230647
|
+
const relativeSubprojectPath = relative12(this.rootWorkingDirectory, subprojectPath) || ".";
|
|
230648
|
+
this.failedWorkspaces.push({
|
|
230649
|
+
subproject: relativeSubprojectPath,
|
|
230650
|
+
workspace: workspacePath,
|
|
230651
|
+
error: e.message || "Unknown error",
|
|
230652
|
+
phase: "vulnerability-scanning"
|
|
230653
|
+
});
|
|
230654
|
+
return [workspacePath, void 0];
|
|
230655
|
+
}
|
|
230587
230656
|
throw e;
|
|
230588
230657
|
} finally {
|
|
230589
230658
|
this.sendProgress("SCAN_FOR_VULNERABILITIES", false, subprojectPath, workspacePath);
|
|
230590
230659
|
}
|
|
230591
230660
|
})));
|
|
230592
|
-
|
|
230661
|
+
const successfulWorkspaceToVulnerabilities = Object.fromEntries(Object.entries(workspaceToVulnerabilities).filter(([_, vulns]) => vulns !== void 0));
|
|
230662
|
+
return { projectInfo, workspaceToVulnerabilities: successfulWorkspaceToVulnerabilities };
|
|
230593
230663
|
}
|
|
230594
230664
|
};
|
|
230595
230665
|
function getRelativeSubprojectPath(subprojectPath, projectDir) {
|
|
@@ -230638,7 +230708,7 @@ async function getGitDataToMetadataIfAvailable(rootWorkingDirectory) {
|
|
|
230638
230708
|
}
|
|
230639
230709
|
|
|
230640
230710
|
// dist/cli-upgrade-purl.js
|
|
230641
|
-
import { join as
|
|
230711
|
+
import { join as join22, relative as relative13 } from "node:path";
|
|
230642
230712
|
var import_packageurl_js = __toESM(require_packageurl_js(), 1);
|
|
230643
230713
|
async function upgradePurl(path2, upgrades, options) {
|
|
230644
230714
|
logger.initWinstonLogger(options.debug);
|
|
@@ -230689,7 +230759,7 @@ ${upgrades.map((upgrade) => ` ${upgrade.purl} -> ${upgrade.upgradeVersion}`).joi
|
|
|
230689
230759
|
const subprojectPromiseQueue = new PromiseQueue(Number(options.concurrency));
|
|
230690
230760
|
supportedSubprojects.forEach((subproject) => {
|
|
230691
230761
|
subprojectPromiseQueue.enqueueTask(async () => {
|
|
230692
|
-
const workspacePathsMatchingGlob = subproject.workspacePaths.filter((wsPath) => minimatch(
|
|
230762
|
+
const workspacePathsMatchingGlob = subproject.workspacePaths.filter((wsPath) => minimatch(join22(subproject.subprojectPath, wsPath), options.globPattern ?? "**"));
|
|
230693
230763
|
if (workspacePathsMatchingGlob.length === 0)
|
|
230694
230764
|
return;
|
|
230695
230765
|
logger.info(`Found workspaces for subproject ${subproject.subprojectPath}${options.globPattern ? `matching glob ${options.globPattern}` : ""}:
|
|
@@ -230718,7 +230788,7 @@ ${workspacePathsMatchingGlob.map((wsPath) => ` ${wsPath}`).join("\n")}`);
|
|
|
230718
230788
|
});
|
|
230719
230789
|
if (vulnerabilityFixes.length === 0)
|
|
230720
230790
|
return;
|
|
230721
|
-
logger.info(`Found ${vulnerabilityFixes.length} ${vulnerabilityFixes.length === 1 ? "dependency" : "dependencies"} matching upgrade specs for ${
|
|
230791
|
+
logger.info(`Found ${vulnerabilityFixes.length} ${vulnerabilityFixes.length === 1 ? "dependency" : "dependencies"} matching upgrade specs for ${join22(subproject.subprojectPath, wsPath)}`);
|
|
230722
230792
|
workspaceToFixes[wsPath] = [
|
|
230723
230793
|
{
|
|
230724
230794
|
fixId: "dummy",
|
|
@@ -230739,7 +230809,7 @@ ${workspacePathsMatchingGlob.map((wsPath) => ` ${wsPath}`).join("\n")}`);
|
|
|
230739
230809
|
}
|
|
230740
230810
|
}
|
|
230741
230811
|
var signalFixApplied = (_fixId, subprojectPath, workspacePath, vulnerabilityFixes) => {
|
|
230742
|
-
logger.info(`Successfully upgraded purls for: ${
|
|
230812
|
+
logger.info(`Successfully upgraded purls for: ${join22(subprojectPath, workspacePath)}`);
|
|
230743
230813
|
logger.info(`Upgraded:
|
|
230744
230814
|
${vulnerabilityFixes.map((fix) => ` ${fix.dependencyName} from ${fix.currentVersion} to ${fix.fixedVersion}`).join("\n")}`);
|
|
230745
230815
|
};
|
|
@@ -230914,7 +230984,7 @@ async function useSocketComputeFixEndpoint(artifacts, vulnerableArtifactIdsForGh
|
|
|
230914
230984
|
// dist/index.js
|
|
230915
230985
|
var program2 = new Command();
|
|
230916
230986
|
var run2 = new Command();
|
|
230917
|
-
run2.name("run").argument("<path>", "File system path to folder containing the project").option("-o, --output-dir <path>", "Write json report to <path>/coana-report.json").option("-d, --debug", "Enable debug logging", false).option("-s, --silent", "Silence all debug/warning output", false).option("-p, --print-report", "Print the report to the console", false).option("--offline-database <path>", "Path to a coana-offline-db.json file for running the CLI without internet connectivity", void 0).option("-t, --timeout <timeout>", "Set API <timeout> in milliseconds to Coana backend.", "300000").option("-a, --analysis-timeout <timeout>", "Set <timeout> in seconds for each reachability analysis run").option("--memory-limit <memoryInMB>", "Set memory limit for analysis to <memoryInMB> megabytes of memory.", "8192").option("-c, --concurrency <concurrency>", "Set the maximum number of concurrent reachability analysis runs. It's recommended to choose a concurrency level that ensures that each analysis run has at least the --memory-limit amount of memory available.", "1").option("--api-key <key>", "Set the Coana dashboard API key. By setting you also enable the dashboard integration.").addOption(new Option("--write-report-to-file", "Write the report dashboard-compatible report to dashboard-report.json. This report may help the Coana team debug issues with the report insertion mechanism.").default(false).hideHelp()).option("--project-name <repoName>", "Set the name of the repository. Used for dashboard integration.").option("--repo-url <repoUrl>", "Set the URL of the repository. Used for dashboard integration.").option("--include-dirs <relativeDirs...>", "globs for directories to include from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, projects that are not included may still be scanned if they are referenced from included projects.").option("--exclude-dirs <relativeDirs...>", "globs for directories to exclude from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, excluded projects may still be scanned if they are referenced from non-excluded projects.").option("--disable-analysis-splitting", "Limits Coana to at most 1 reachability analysis run per workspace").option("--print-analysis-log-file", "Store log output from the JavaScript/TypeScript reachability analysis in the file js-analysis.log file in the root of each workspace", false).option("--entry-points <entryPoints...>", "List of files to analyze for root workspace. The reachability analysis automatically analyzes all files used by the entry points. If not provided, all JavaScript and TypeScript files are considered entry points. For non-root workspaces, all JavaScript and TypeScript files are analyzed as well.").option("--include-projects-with-no-reachability-support", "Also runs Coana on projects where we support traditional SCA, but does not yet support reachability analysis.", false).option("--ecosystems <ecosystems...>", "List of ecosystems to analyze (space-separated). Currently NPM, PIP, MAVEN, NUGET and GO are supported. Default is all supported ecosystems.").option("--changed-files <files...>", "List of files that have changed. If provided, Coana only analyzes workspaces and modules that contain changed files.").option("--disable-report-submission", "Disable the submission of the report to the Coana dashboard. Used by the pipeline blocking feature.", false).option("--provider-project <path>", "File system path to folder containing the provider project (Only supported for Maven, Gradle, and SBT)").option("--provider-workspaces <dirs...>", "List of workspaces that build the provided runtime environment (Only supported for Maven, Gradle, and SBT)", (paths) => paths.split(" ")).option("--lightweight-reachability", "Runs Coana in lightweight mode. This increases analysis speed but also raises the risk of Coana misclassifying the reachability of certain complex vulnerabilities. Recommended only for use with Coana Guardrail mode.", false).addOption(new Option("--run-without-docker", "Run package managers and reachability analyzers without using docker").default(process.env.RUN_WITHOUT_DOCKER === "true").hideHelp()).addOption(new Option("--run-env <env>", "Specifies the environment in which the CLI is run. So far only MANAGED_SCAN and UNKNOWN are supported.").default("UNKNOWN").choices(["UNKNOWN", "MANAGED_SCAN"]).hideHelp()).addOption(new Option("--guardrail-mode", "Run Coana in guardrail mode. This mode is used to prevent new reachable vulnerabilities from being introduced into the codebase. Usually run as a CI check when pushing new commits to a pull request.")).addOption(new Option("--socket-mode <output-file>", "Run Coana in socket mode and write report to <output-file>").hideHelp()).addOption(new Option("--manifests-tar-hash <hash>", "Hash of the tarball containing all manifest files already uploaded to Socket. If provided, Socket will be used for computing dependency trees.").hideHelp()).version(version2).configureHelp({ sortOptions: true }).action(async (path2, options) => {
|
|
230987
|
+
run2.name("run").argument("<path>", "File system path to folder containing the project").option("-o, --output-dir <path>", "Write json report to <path>/coana-report.json").option("-d, --debug", "Enable debug logging", false).option("-s, --silent", "Silence all debug/warning output", false).option("-p, --print-report", "Print the report to the console", false).option("--offline-database <path>", "Path to a coana-offline-db.json file for running the CLI without internet connectivity", void 0).option("-t, --timeout <timeout>", "Set API <timeout> in milliseconds to Coana backend.", "300000").option("-a, --analysis-timeout <timeout>", "Set <timeout> in seconds for each reachability analysis run").option("--memory-limit <memoryInMB>", "Set memory limit for analysis to <memoryInMB> megabytes of memory.", "8192").option("-c, --concurrency <concurrency>", "Set the maximum number of concurrent reachability analysis runs. It's recommended to choose a concurrency level that ensures that each analysis run has at least the --memory-limit amount of memory available.", "1").option("--api-key <key>", "Set the Coana dashboard API key. By setting you also enable the dashboard integration.").addOption(new Option("--write-report-to-file", "Write the report dashboard-compatible report to dashboard-report.json. This report may help the Coana team debug issues with the report insertion mechanism.").default(false).hideHelp()).option("--project-name <repoName>", "Set the name of the repository. Used for dashboard integration.").option("--repo-url <repoUrl>", "Set the URL of the repository. Used for dashboard integration.").option("--include-dirs <relativeDirs...>", "globs for directories to include from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, projects that are not included may still be scanned if they are referenced from included projects.").option("--exclude-dirs <relativeDirs...>", "globs for directories to exclude from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, excluded projects may still be scanned if they are referenced from non-excluded projects.").option("--disable-analysis-splitting", "Limits Coana to at most 1 reachability analysis run per workspace").option("--print-analysis-log-file", "Store log output from the JavaScript/TypeScript reachability analysis in the file js-analysis.log file in the root of each workspace", false).option("--entry-points <entryPoints...>", "List of files to analyze for root workspace. The reachability analysis automatically analyzes all files used by the entry points. If not provided, all JavaScript and TypeScript files are considered entry points. For non-root workspaces, all JavaScript and TypeScript files are analyzed as well.").option("--include-projects-with-no-reachability-support", "Also runs Coana on projects where we support traditional SCA, but does not yet support reachability analysis.", false).option("--ecosystems <ecosystems...>", "List of ecosystems to analyze (space-separated). Currently NPM, PIP, MAVEN, NUGET and GO are supported. Default is all supported ecosystems.").option("--changed-files <files...>", "List of files that have changed. If provided, Coana only analyzes workspaces and modules that contain changed files.").option("--disable-report-submission", "Disable the submission of the report to the Coana dashboard. Used by the pipeline blocking feature.", false).option("--provider-project <path>", "File system path to folder containing the provider project (Only supported for Maven, Gradle, and SBT)").option("--provider-workspaces <dirs...>", "List of workspaces that build the provided runtime environment (Only supported for Maven, Gradle, and SBT)", (paths) => paths.split(" ")).option("--lightweight-reachability", "Runs Coana in lightweight mode. This increases analysis speed but also raises the risk of Coana misclassifying the reachability of certain complex vulnerabilities. Recommended only for use with Coana Guardrail mode.", false).addOption(new Option("--run-without-docker", "Run package managers and reachability analyzers without using docker").default(process.env.RUN_WITHOUT_DOCKER === "true").hideHelp()).addOption(new Option("--run-env <env>", "Specifies the environment in which the CLI is run. So far only MANAGED_SCAN and UNKNOWN are supported.").default("UNKNOWN").choices(["UNKNOWN", "MANAGED_SCAN"]).hideHelp()).addOption(new Option("--guardrail-mode", "Run Coana in guardrail mode. This mode is used to prevent new reachable vulnerabilities from being introduced into the codebase. Usually run as a CI check when pushing new commits to a pull request.")).option("--ignore-failing-workspaces", "Continue processing when a workspace fails instead of exiting. Failed workspaces will be logged at termination.", false).addOption(new Option("--socket-mode <output-file>", "Run Coana in socket mode and write report to <output-file>").hideHelp()).addOption(new Option("--manifests-tar-hash <hash>", "Hash of the tarball containing all manifest files already uploaded to Socket. If provided, Socket will be used for computing dependency trees.").hideHelp()).version(version2).configureHelp({ sortOptions: true }).action(async (path2, options) => {
|
|
230918
230988
|
process.env.DOCKER_IMAGE_TAG ??= version2;
|
|
230919
230989
|
options.ecosystems = options.ecosystems?.map((e) => e.toUpperCase());
|
|
230920
230990
|
await new CliCore(path2, options).main();
|
|
@@ -230970,7 +231040,8 @@ var defaultCliOptions = {
|
|
|
230970
231040
|
runWithoutDocker: false,
|
|
230971
231041
|
lightweightReachability: false,
|
|
230972
231042
|
runEnv: "UNKNOWN",
|
|
230973
|
-
guardrailMode: false
|
|
231043
|
+
guardrailMode: false,
|
|
231044
|
+
ignoreFailingWorkspaces: false
|
|
230974
231045
|
};
|
|
230975
231046
|
export {
|
|
230976
231047
|
defaultCliOptions
|