@coana-tech/cli 14.11.6 → 14.11.7
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 +237 -214
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +6014 -2208
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 join24 = ",";
|
|
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
|
+
join24 = `,
|
|
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 += join24;
|
|
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 += `${join24}"... ${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
|
+
join24 = `,
|
|
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 = join24;
|
|
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 = join24;
|
|
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 join24 = ",";
|
|
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
|
+
join24 = `,
|
|
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 += join24;
|
|
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 += `${join24}"... ${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
|
+
join24 = `,
|
|
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 = join24;
|
|
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 join25 = `,
|
|
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 += join25;
|
|
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 += `${join25}"... ${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 join24 = `,
|
|
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, join24, maximumBreadth);
|
|
6407
6407
|
keys = keys.slice(value.length);
|
|
6408
6408
|
maximumPropertiesToStringify -= value.length;
|
|
6409
|
-
separator =
|
|
6409
|
+
separator = join24;
|
|
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 = join24;
|
|
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 = join24;
|
|
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 join24(s4) {
|
|
7994
7994
|
if (this.length === 0) return "";
|
|
7995
7995
|
var p3 = this.head;
|
|
7996
7996
|
var ret = "" + p3.data;
|
|
@@ -13640,7 +13640,7 @@ var require_file = __commonJS({
|
|
|
13640
13640
|
stat(callback) {
|
|
13641
13641
|
const target = this._getFile();
|
|
13642
13642
|
const fullpath = path2.join(this.dirname, target);
|
|
13643
|
-
fs.stat(fullpath, (err,
|
|
13643
|
+
fs.stat(fullpath, (err, stat4) => {
|
|
13644
13644
|
if (err && err.code === "ENOENT") {
|
|
13645
13645
|
debug("ENOENT\xA0ok", fullpath);
|
|
13646
13646
|
this.filename = target;
|
|
@@ -13650,11 +13650,11 @@ var require_file = __commonJS({
|
|
|
13650
13650
|
debug(`err ${err.code} ${fullpath}`);
|
|
13651
13651
|
return callback(err);
|
|
13652
13652
|
}
|
|
13653
|
-
if (!
|
|
13653
|
+
if (!stat4 || this._needsNewFile(stat4.size)) {
|
|
13654
13654
|
return this._incFile(() => this.stat(callback));
|
|
13655
13655
|
}
|
|
13656
13656
|
this.filename = target;
|
|
13657
|
-
callback(null,
|
|
13657
|
+
callback(null, stat4.size);
|
|
13658
13658
|
});
|
|
13659
13659
|
}
|
|
13660
13660
|
/**
|
|
@@ -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 join24(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 = isUndefined2;
|
|
20993
20993
|
lodash16.isWeakMap = isWeakMap;
|
|
20994
20994
|
lodash16.isWeakSet = isWeakSet;
|
|
20995
|
-
lodash16.join =
|
|
20995
|
+
lodash16.join = join24;
|
|
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 join24(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 = join24;
|
|
30001
30001
|
var SymBuilder = class extends AbstractBuilder {
|
|
30002
30002
|
constructor(opts) {
|
|
30003
30003
|
super();
|
|
@@ -46561,13 +46561,13 @@ var require_form_data = __commonJS({
|
|
|
46561
46561
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
46562
46562
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
46563
46563
|
} else {
|
|
46564
|
-
fs.stat(value.path, function(err,
|
|
46564
|
+
fs.stat(value.path, function(err, stat4) {
|
|
46565
46565
|
var fileSize;
|
|
46566
46566
|
if (err) {
|
|
46567
46567
|
callback(err);
|
|
46568
46568
|
return;
|
|
46569
46569
|
}
|
|
46570
|
-
fileSize =
|
|
46570
|
+
fileSize = stat4.size - (value.start ? value.start : 0);
|
|
46571
46571
|
callback(null, fileSize);
|
|
46572
46572
|
});
|
|
46573
46573
|
}
|
|
@@ -48226,12 +48226,12 @@ var require_form_data2 = __commonJS({
|
|
|
48226
48226
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
48227
48227
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
48228
48228
|
} else {
|
|
48229
|
-
fs.stat(value.path, function(err,
|
|
48229
|
+
fs.stat(value.path, function(err, stat4) {
|
|
48230
48230
|
if (err) {
|
|
48231
48231
|
callback(err);
|
|
48232
48232
|
return;
|
|
48233
48233
|
}
|
|
48234
|
-
var fileSize =
|
|
48234
|
+
var fileSize = stat4.size - (value.start ? value.start : 0);
|
|
48235
48235
|
callback(null, fileSize);
|
|
48236
48236
|
});
|
|
48237
48237
|
}
|
|
@@ -53559,15 +53559,15 @@ var require_windows = __commonJS({
|
|
|
53559
53559
|
}
|
|
53560
53560
|
return false;
|
|
53561
53561
|
}
|
|
53562
|
-
function checkStat(
|
|
53563
|
-
if (!
|
|
53562
|
+
function checkStat(stat4, path2, options) {
|
|
53563
|
+
if (!stat4.isSymbolicLink() && !stat4.isFile()) {
|
|
53564
53564
|
return false;
|
|
53565
53565
|
}
|
|
53566
53566
|
return checkPathExt(path2, options);
|
|
53567
53567
|
}
|
|
53568
53568
|
function isexe(path2, options, cb) {
|
|
53569
|
-
fs.stat(path2, function(er,
|
|
53570
|
-
cb(er, er ? false : checkStat(
|
|
53569
|
+
fs.stat(path2, function(er, stat4) {
|
|
53570
|
+
cb(er, er ? false : checkStat(stat4, path2, options));
|
|
53571
53571
|
});
|
|
53572
53572
|
}
|
|
53573
53573
|
function sync2(path2, options) {
|
|
@@ -53583,20 +53583,20 @@ var require_mode = __commonJS({
|
|
|
53583
53583
|
isexe.sync = sync2;
|
|
53584
53584
|
var fs = __require("fs");
|
|
53585
53585
|
function isexe(path2, options, cb) {
|
|
53586
|
-
fs.stat(path2, function(er,
|
|
53587
|
-
cb(er, er ? false : checkStat(
|
|
53586
|
+
fs.stat(path2, function(er, stat4) {
|
|
53587
|
+
cb(er, er ? false : checkStat(stat4, options));
|
|
53588
53588
|
});
|
|
53589
53589
|
}
|
|
53590
53590
|
function sync2(path2, options) {
|
|
53591
53591
|
return checkStat(fs.statSync(path2), options);
|
|
53592
53592
|
}
|
|
53593
|
-
function checkStat(
|
|
53594
|
-
return
|
|
53593
|
+
function checkStat(stat4, options) {
|
|
53594
|
+
return stat4.isFile() && checkMode(stat4, options);
|
|
53595
53595
|
}
|
|
53596
|
-
function checkMode(
|
|
53597
|
-
var mod =
|
|
53598
|
-
var uid =
|
|
53599
|
-
var gid =
|
|
53596
|
+
function checkMode(stat4, options) {
|
|
53597
|
+
var mod = stat4.mode;
|
|
53598
|
+
var uid = stat4.uid;
|
|
53599
|
+
var gid = stat4.gid;
|
|
53600
53600
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
53601
53601
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
53602
53602
|
var u6 = parseInt("100", 8);
|
|
@@ -83093,7 +83093,7 @@ var require_lockfile = __commonJS({
|
|
|
83093
83093
|
const srcStat = yield lstat2(src);
|
|
83094
83094
|
let srcFiles;
|
|
83095
83095
|
if (srcStat.isDirectory()) {
|
|
83096
|
-
srcFiles = yield
|
|
83096
|
+
srcFiles = yield readdir7(src);
|
|
83097
83097
|
}
|
|
83098
83098
|
let destStat;
|
|
83099
83099
|
try {
|
|
@@ -83126,7 +83126,7 @@ var require_lockfile = __commonJS({
|
|
|
83126
83126
|
}
|
|
83127
83127
|
}
|
|
83128
83128
|
if (bothFolders) {
|
|
83129
|
-
const destFiles = yield
|
|
83129
|
+
const destFiles = yield readdir7(dest);
|
|
83130
83130
|
invariant(srcFiles, "src files not initialised");
|
|
83131
83131
|
for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator](); ; ) {
|
|
83132
83132
|
var _ref6;
|
|
@@ -83143,7 +83143,7 @@ var require_lockfile = __commonJS({
|
|
|
83143
83143
|
const loc = (_path || _load_path()).default.join(dest, file);
|
|
83144
83144
|
possibleExtraneous.add(loc);
|
|
83145
83145
|
if ((yield lstat2(loc)).isDirectory()) {
|
|
83146
|
-
for (var _iterator5 = yield
|
|
83146
|
+
for (var _iterator5 = yield readdir7(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator](); ; ) {
|
|
83147
83147
|
var _ref7;
|
|
83148
83148
|
if (_isArray5) {
|
|
83149
83149
|
if (_i5 >= _iterator5.length) break;
|
|
@@ -83322,7 +83322,7 @@ var require_lockfile = __commonJS({
|
|
|
83322
83322
|
const srcStat = yield lstat2(src);
|
|
83323
83323
|
let srcFiles;
|
|
83324
83324
|
if (srcStat.isDirectory()) {
|
|
83325
|
-
srcFiles = yield
|
|
83325
|
+
srcFiles = yield readdir7(src);
|
|
83326
83326
|
}
|
|
83327
83327
|
const destExists = yield exists2(dest);
|
|
83328
83328
|
if (destExists) {
|
|
@@ -83356,7 +83356,7 @@ var require_lockfile = __commonJS({
|
|
|
83356
83356
|
}
|
|
83357
83357
|
}
|
|
83358
83358
|
if (bothFolders) {
|
|
83359
|
-
const destFiles = yield
|
|
83359
|
+
const destFiles = yield readdir7(dest);
|
|
83360
83360
|
invariant(srcFiles, "src files not initialised");
|
|
83361
83361
|
for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator](); ; ) {
|
|
83362
83362
|
var _ref14;
|
|
@@ -83373,7 +83373,7 @@ var require_lockfile = __commonJS({
|
|
|
83373
83373
|
const loc = (_path || _load_path()).default.join(dest, file);
|
|
83374
83374
|
possibleExtraneous.add(loc);
|
|
83375
83375
|
if ((yield lstat2(loc)).isDirectory()) {
|
|
83376
|
-
for (var _iterator11 = yield
|
|
83376
|
+
for (var _iterator11 = yield readdir7(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator](); ; ) {
|
|
83377
83377
|
var _ref15;
|
|
83378
83378
|
if (_isArray11) {
|
|
83379
83379
|
if (_i11 >= _iterator11.length) break;
|
|
@@ -83704,7 +83704,7 @@ var require_lockfile = __commonJS({
|
|
|
83704
83704
|
let walk = exports3.walk = (() => {
|
|
83705
83705
|
var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = /* @__PURE__ */ new Set()) {
|
|
83706
83706
|
let files = [];
|
|
83707
|
-
let filenames = yield
|
|
83707
|
+
let filenames = yield readdir7(dir);
|
|
83708
83708
|
if (ignoreBasenames.size) {
|
|
83709
83709
|
filenames = filenames.filter(function(name) {
|
|
83710
83710
|
return !ignoreBasenames.has(name);
|
|
@@ -83723,14 +83723,14 @@ var require_lockfile = __commonJS({
|
|
|
83723
83723
|
const name = _ref28;
|
|
83724
83724
|
const relative13 = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name;
|
|
83725
83725
|
const loc = (_path || _load_path()).default.join(dir, name);
|
|
83726
|
-
const
|
|
83726
|
+
const stat5 = yield lstat2(loc);
|
|
83727
83727
|
files.push({
|
|
83728
83728
|
relative: relative13,
|
|
83729
83729
|
basename: name,
|
|
83730
83730
|
absolute: loc,
|
|
83731
|
-
mtime: +
|
|
83731
|
+
mtime: +stat5.mtime
|
|
83732
83732
|
});
|
|
83733
|
-
if (
|
|
83733
|
+
if (stat5.isDirectory()) {
|
|
83734
83734
|
files = files.concat(yield walk(loc, relative13, ignoreBasenames));
|
|
83735
83735
|
}
|
|
83736
83736
|
}
|
|
@@ -83742,8 +83742,8 @@ var require_lockfile = __commonJS({
|
|
|
83742
83742
|
})();
|
|
83743
83743
|
let getFileSizeOnDisk = exports3.getFileSizeOnDisk = (() => {
|
|
83744
83744
|
var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {
|
|
83745
|
-
const
|
|
83746
|
-
const size =
|
|
83745
|
+
const stat5 = yield lstat2(loc);
|
|
83746
|
+
const size = stat5.size, blockSize = stat5.blksize;
|
|
83747
83747
|
return Math.ceil(size / blockSize) * blockSize;
|
|
83748
83748
|
});
|
|
83749
83749
|
return function getFileSizeOnDisk2(_x28) {
|
|
@@ -83941,10 +83941,10 @@ var require_lockfile = __commonJS({
|
|
|
83941
83941
|
const writeFile10 = exports3.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile);
|
|
83942
83942
|
const readlink2 = exports3.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink);
|
|
83943
83943
|
const realpath2 = exports3.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath);
|
|
83944
|
-
const
|
|
83944
|
+
const readdir7 = exports3.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir);
|
|
83945
83945
|
const rename = exports3.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename);
|
|
83946
83946
|
const access5 = exports3.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access);
|
|
83947
|
-
const
|
|
83947
|
+
const stat4 = exports3.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat);
|
|
83948
83948
|
const mkdirp = exports3.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(116));
|
|
83949
83949
|
const exists2 = exports3.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true);
|
|
83950
83950
|
const lstat2 = exports3.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat);
|
|
@@ -85890,8 +85890,8 @@ var require_lockfile = __commonJS({
|
|
|
85890
85890
|
var def = __webpack_require__(50).f;
|
|
85891
85891
|
var has2 = __webpack_require__(49);
|
|
85892
85892
|
var TAG = __webpack_require__(13)("toStringTag");
|
|
85893
|
-
module3.exports = function(it, tag,
|
|
85894
|
-
if (it && !has2(it =
|
|
85893
|
+
module3.exports = function(it, tag, stat4) {
|
|
85894
|
+
if (it && !has2(it = stat4 ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
|
85895
85895
|
};
|
|
85896
85896
|
},
|
|
85897
85897
|
/* 72 */
|
|
@@ -86429,16 +86429,16 @@ var require_lockfile = __commonJS({
|
|
|
86429
86429
|
return cb();
|
|
86430
86430
|
}
|
|
86431
86431
|
var exists2;
|
|
86432
|
-
var
|
|
86433
|
-
if (
|
|
86434
|
-
if (
|
|
86435
|
-
return cb(null,
|
|
86432
|
+
var stat4 = this.statCache[abs];
|
|
86433
|
+
if (stat4 !== void 0) {
|
|
86434
|
+
if (stat4 === false)
|
|
86435
|
+
return cb(null, stat4);
|
|
86436
86436
|
else {
|
|
86437
|
-
var type =
|
|
86437
|
+
var type = stat4.isDirectory() ? "DIR" : "FILE";
|
|
86438
86438
|
if (needDir && type === "FILE")
|
|
86439
86439
|
return cb();
|
|
86440
86440
|
else
|
|
86441
|
-
return cb(null, type,
|
|
86441
|
+
return cb(null, type, stat4);
|
|
86442
86442
|
}
|
|
86443
86443
|
}
|
|
86444
86444
|
var self2 = this;
|
|
@@ -86447,33 +86447,33 @@ var require_lockfile = __commonJS({
|
|
|
86447
86447
|
fs.lstat(abs, statcb);
|
|
86448
86448
|
function lstatcb_(er, lstat2) {
|
|
86449
86449
|
if (lstat2 && lstat2.isSymbolicLink()) {
|
|
86450
|
-
return fs.stat(abs, function(er2,
|
|
86450
|
+
return fs.stat(abs, function(er2, stat5) {
|
|
86451
86451
|
if (er2)
|
|
86452
86452
|
self2._stat2(f5, abs, null, lstat2, cb);
|
|
86453
86453
|
else
|
|
86454
|
-
self2._stat2(f5, abs, er2,
|
|
86454
|
+
self2._stat2(f5, abs, er2, stat5, cb);
|
|
86455
86455
|
});
|
|
86456
86456
|
} else {
|
|
86457
86457
|
self2._stat2(f5, abs, er, lstat2, cb);
|
|
86458
86458
|
}
|
|
86459
86459
|
}
|
|
86460
86460
|
};
|
|
86461
|
-
Glob2.prototype._stat2 = function(f5, abs, er,
|
|
86461
|
+
Glob2.prototype._stat2 = function(f5, abs, er, stat4, cb) {
|
|
86462
86462
|
if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
|
|
86463
86463
|
this.statCache[abs] = false;
|
|
86464
86464
|
return cb();
|
|
86465
86465
|
}
|
|
86466
86466
|
var needDir = f5.slice(-1) === "/";
|
|
86467
|
-
this.statCache[abs] =
|
|
86468
|
-
if (abs.slice(-1) === "/" &&
|
|
86469
|
-
return cb(null, false,
|
|
86467
|
+
this.statCache[abs] = stat4;
|
|
86468
|
+
if (abs.slice(-1) === "/" && stat4 && !stat4.isDirectory())
|
|
86469
|
+
return cb(null, false, stat4);
|
|
86470
86470
|
var c3 = true;
|
|
86471
|
-
if (
|
|
86472
|
-
c3 =
|
|
86471
|
+
if (stat4)
|
|
86472
|
+
c3 = stat4.isDirectory() ? "DIR" : "FILE";
|
|
86473
86473
|
this.cache[abs] = this.cache[abs] || c3;
|
|
86474
86474
|
if (needDir && c3 === "FILE")
|
|
86475
86475
|
return cb();
|
|
86476
|
-
return cb(null, c3,
|
|
86476
|
+
return cb(null, c3, stat4);
|
|
86477
86477
|
};
|
|
86478
86478
|
},
|
|
86479
86479
|
/* 76 */
|
|
@@ -87681,8 +87681,8 @@ var require_lockfile = __commonJS({
|
|
|
87681
87681
|
// there already. If so, then hooray! If not, then something
|
|
87682
87682
|
// is borked.
|
|
87683
87683
|
default:
|
|
87684
|
-
xfs.stat(p3, function(er2,
|
|
87685
|
-
if (er2 || !
|
|
87684
|
+
xfs.stat(p3, function(er2, stat4) {
|
|
87685
|
+
if (er2 || !stat4.isDirectory()) cb(er, made);
|
|
87686
87686
|
else cb(null, made);
|
|
87687
87687
|
});
|
|
87688
87688
|
break;
|
|
@@ -87713,13 +87713,13 @@ var require_lockfile = __commonJS({
|
|
|
87713
87713
|
// there already. If so, then hooray! If not, then something
|
|
87714
87714
|
// is borked.
|
|
87715
87715
|
default:
|
|
87716
|
-
var
|
|
87716
|
+
var stat4;
|
|
87717
87717
|
try {
|
|
87718
|
-
|
|
87718
|
+
stat4 = xfs.statSync(p3);
|
|
87719
87719
|
} catch (err1) {
|
|
87720
87720
|
throw err0;
|
|
87721
87721
|
}
|
|
87722
|
-
if (!
|
|
87722
|
+
if (!stat4.isDirectory()) throw err0;
|
|
87723
87723
|
break;
|
|
87724
87724
|
}
|
|
87725
87725
|
}
|
|
@@ -89653,15 +89653,15 @@ ${indent2}`);
|
|
|
89653
89653
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
89654
89654
|
resolvedLink = cache[base];
|
|
89655
89655
|
} else {
|
|
89656
|
-
var
|
|
89657
|
-
if (!
|
|
89656
|
+
var stat4 = fs.lstatSync(base);
|
|
89657
|
+
if (!stat4.isSymbolicLink()) {
|
|
89658
89658
|
knownHard[base] = true;
|
|
89659
89659
|
if (cache) cache[base] = base;
|
|
89660
89660
|
continue;
|
|
89661
89661
|
}
|
|
89662
89662
|
var linkTarget = null;
|
|
89663
89663
|
if (!isWindows) {
|
|
89664
|
-
var id =
|
|
89664
|
+
var id = stat4.dev.toString(32) + ":" + stat4.ino.toString(32);
|
|
89665
89665
|
if (seenLinks.hasOwnProperty(id)) {
|
|
89666
89666
|
linkTarget = seenLinks[id];
|
|
89667
89667
|
}
|
|
@@ -89730,15 +89730,15 @@ ${indent2}`);
|
|
|
89730
89730
|
}
|
|
89731
89731
|
return fs.lstat(base, gotStat);
|
|
89732
89732
|
}
|
|
89733
|
-
function gotStat(err,
|
|
89733
|
+
function gotStat(err, stat4) {
|
|
89734
89734
|
if (err) return cb(err);
|
|
89735
|
-
if (!
|
|
89735
|
+
if (!stat4.isSymbolicLink()) {
|
|
89736
89736
|
knownHard[base] = true;
|
|
89737
89737
|
if (cache) cache[base] = base;
|
|
89738
89738
|
return process.nextTick(LOOP);
|
|
89739
89739
|
}
|
|
89740
89740
|
if (!isWindows) {
|
|
89741
|
-
var id =
|
|
89741
|
+
var id = stat4.dev.toString(32) + ":" + stat4.ino.toString(32);
|
|
89742
89742
|
if (seenLinks.hasOwnProperty(id)) {
|
|
89743
89743
|
return gotTarget(null, seenLinks[id], base);
|
|
89744
89744
|
}
|
|
@@ -89945,7 +89945,7 @@ ${indent2}`);
|
|
|
89945
89945
|
return this._readdir(abs, false);
|
|
89946
89946
|
var entries;
|
|
89947
89947
|
var lstat2;
|
|
89948
|
-
var
|
|
89948
|
+
var stat4;
|
|
89949
89949
|
try {
|
|
89950
89950
|
lstat2 = fs.lstatSync(abs);
|
|
89951
89951
|
} catch (er) {
|
|
@@ -90080,8 +90080,8 @@ ${indent2}`);
|
|
|
90080
90080
|
return false;
|
|
90081
90081
|
}
|
|
90082
90082
|
var exists2;
|
|
90083
|
-
var
|
|
90084
|
-
if (!
|
|
90083
|
+
var stat4 = this.statCache[abs];
|
|
90084
|
+
if (!stat4) {
|
|
90085
90085
|
var lstat2;
|
|
90086
90086
|
try {
|
|
90087
90087
|
lstat2 = fs.lstatSync(abs);
|
|
@@ -90093,18 +90093,18 @@ ${indent2}`);
|
|
|
90093
90093
|
}
|
|
90094
90094
|
if (lstat2 && lstat2.isSymbolicLink()) {
|
|
90095
90095
|
try {
|
|
90096
|
-
|
|
90096
|
+
stat4 = fs.statSync(abs);
|
|
90097
90097
|
} catch (er) {
|
|
90098
|
-
|
|
90098
|
+
stat4 = lstat2;
|
|
90099
90099
|
}
|
|
90100
90100
|
} else {
|
|
90101
|
-
|
|
90101
|
+
stat4 = lstat2;
|
|
90102
90102
|
}
|
|
90103
90103
|
}
|
|
90104
|
-
this.statCache[abs] =
|
|
90104
|
+
this.statCache[abs] = stat4;
|
|
90105
90105
|
var c3 = true;
|
|
90106
|
-
if (
|
|
90107
|
-
c3 =
|
|
90106
|
+
if (stat4)
|
|
90107
|
+
c3 = stat4.isDirectory() ? "DIR" : "FILE";
|
|
90108
90108
|
this.cache[abs] = this.cache[abs] || c3;
|
|
90109
90109
|
if (needDir && c3 === "FILE")
|
|
90110
90110
|
return false;
|
|
@@ -90367,7 +90367,7 @@ ${indent2}`);
|
|
|
90367
90367
|
var n2 = 0;
|
|
90368
90368
|
if (options.disableGlob || !glob2.hasMagic(p3))
|
|
90369
90369
|
return afterGlob(null, [p3]);
|
|
90370
|
-
options.lstat(p3, function(er,
|
|
90370
|
+
options.lstat(p3, function(er, stat4) {
|
|
90371
90371
|
if (!er)
|
|
90372
90372
|
return afterGlob(null, [p3]);
|
|
90373
90373
|
glob2(p3, options.glob, afterGlob);
|
|
@@ -112641,15 +112641,15 @@ var require_old = __commonJS({
|
|
|
112641
112641
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
112642
112642
|
resolvedLink = cache[base];
|
|
112643
112643
|
} else {
|
|
112644
|
-
var
|
|
112645
|
-
if (!
|
|
112644
|
+
var stat4 = fs.lstatSync(base);
|
|
112645
|
+
if (!stat4.isSymbolicLink()) {
|
|
112646
112646
|
knownHard[base] = true;
|
|
112647
112647
|
if (cache) cache[base] = base;
|
|
112648
112648
|
continue;
|
|
112649
112649
|
}
|
|
112650
112650
|
var linkTarget = null;
|
|
112651
112651
|
if (!isWindows) {
|
|
112652
|
-
var id =
|
|
112652
|
+
var id = stat4.dev.toString(32) + ":" + stat4.ino.toString(32);
|
|
112653
112653
|
if (seenLinks.hasOwnProperty(id)) {
|
|
112654
112654
|
linkTarget = seenLinks[id];
|
|
112655
112655
|
}
|
|
@@ -112718,15 +112718,15 @@ var require_old = __commonJS({
|
|
|
112718
112718
|
}
|
|
112719
112719
|
return fs.lstat(base, gotStat);
|
|
112720
112720
|
}
|
|
112721
|
-
function gotStat(err,
|
|
112721
|
+
function gotStat(err, stat4) {
|
|
112722
112722
|
if (err) return cb(err);
|
|
112723
|
-
if (!
|
|
112723
|
+
if (!stat4.isSymbolicLink()) {
|
|
112724
112724
|
knownHard[base] = true;
|
|
112725
112725
|
if (cache) cache[base] = base;
|
|
112726
112726
|
return process.nextTick(LOOP);
|
|
112727
112727
|
}
|
|
112728
112728
|
if (!isWindows) {
|
|
112729
|
-
var id =
|
|
112729
|
+
var id = stat4.dev.toString(32) + ":" + stat4.ino.toString(32);
|
|
112730
112730
|
if (seenLinks.hasOwnProperty(id)) {
|
|
112731
112731
|
return gotTarget(null, seenLinks[id], base);
|
|
112732
112732
|
}
|
|
@@ -113942,7 +113942,7 @@ var require_sync = __commonJS({
|
|
|
113942
113942
|
return this._readdir(abs, false);
|
|
113943
113943
|
var entries;
|
|
113944
113944
|
var lstat2;
|
|
113945
|
-
var
|
|
113945
|
+
var stat4;
|
|
113946
113946
|
try {
|
|
113947
113947
|
lstat2 = this.fs.lstatSync(abs);
|
|
113948
113948
|
} catch (er) {
|
|
@@ -114077,8 +114077,8 @@ var require_sync = __commonJS({
|
|
|
114077
114077
|
return false;
|
|
114078
114078
|
}
|
|
114079
114079
|
var exists2;
|
|
114080
|
-
var
|
|
114081
|
-
if (!
|
|
114080
|
+
var stat4 = this.statCache[abs];
|
|
114081
|
+
if (!stat4) {
|
|
114082
114082
|
var lstat2;
|
|
114083
114083
|
try {
|
|
114084
114084
|
lstat2 = this.fs.lstatSync(abs);
|
|
@@ -114090,18 +114090,18 @@ var require_sync = __commonJS({
|
|
|
114090
114090
|
}
|
|
114091
114091
|
if (lstat2 && lstat2.isSymbolicLink()) {
|
|
114092
114092
|
try {
|
|
114093
|
-
|
|
114093
|
+
stat4 = this.fs.statSync(abs);
|
|
114094
114094
|
} catch (er) {
|
|
114095
|
-
|
|
114095
|
+
stat4 = lstat2;
|
|
114096
114096
|
}
|
|
114097
114097
|
} else {
|
|
114098
|
-
|
|
114098
|
+
stat4 = lstat2;
|
|
114099
114099
|
}
|
|
114100
114100
|
}
|
|
114101
|
-
this.statCache[abs] =
|
|
114101
|
+
this.statCache[abs] = stat4;
|
|
114102
114102
|
var c3 = true;
|
|
114103
|
-
if (
|
|
114104
|
-
c3 =
|
|
114103
|
+
if (stat4)
|
|
114104
|
+
c3 = stat4.isDirectory() ? "DIR" : "FILE";
|
|
114105
114105
|
this.cache[abs] = this.cache[abs] || c3;
|
|
114106
114106
|
if (needDir && c3 === "FILE")
|
|
114107
114107
|
return false;
|
|
@@ -114743,16 +114743,16 @@ var require_glob = __commonJS({
|
|
|
114743
114743
|
return cb();
|
|
114744
114744
|
}
|
|
114745
114745
|
var exists2;
|
|
114746
|
-
var
|
|
114747
|
-
if (
|
|
114748
|
-
if (
|
|
114749
|
-
return cb(null,
|
|
114746
|
+
var stat4 = this.statCache[abs];
|
|
114747
|
+
if (stat4 !== void 0) {
|
|
114748
|
+
if (stat4 === false)
|
|
114749
|
+
return cb(null, stat4);
|
|
114750
114750
|
else {
|
|
114751
|
-
var type =
|
|
114751
|
+
var type = stat4.isDirectory() ? "DIR" : "FILE";
|
|
114752
114752
|
if (needDir && type === "FILE")
|
|
114753
114753
|
return cb();
|
|
114754
114754
|
else
|
|
114755
|
-
return cb(null, type,
|
|
114755
|
+
return cb(null, type, stat4);
|
|
114756
114756
|
}
|
|
114757
114757
|
}
|
|
114758
114758
|
var self2 = this;
|
|
@@ -114761,33 +114761,33 @@ var require_glob = __commonJS({
|
|
|
114761
114761
|
self2.fs.lstat(abs, statcb);
|
|
114762
114762
|
function lstatcb_(er, lstat2) {
|
|
114763
114763
|
if (lstat2 && lstat2.isSymbolicLink()) {
|
|
114764
|
-
return self2.fs.stat(abs, function(er2,
|
|
114764
|
+
return self2.fs.stat(abs, function(er2, stat5) {
|
|
114765
114765
|
if (er2)
|
|
114766
114766
|
self2._stat2(f5, abs, null, lstat2, cb);
|
|
114767
114767
|
else
|
|
114768
|
-
self2._stat2(f5, abs, er2,
|
|
114768
|
+
self2._stat2(f5, abs, er2, stat5, cb);
|
|
114769
114769
|
});
|
|
114770
114770
|
} else {
|
|
114771
114771
|
self2._stat2(f5, abs, er, lstat2, cb);
|
|
114772
114772
|
}
|
|
114773
114773
|
}
|
|
114774
114774
|
};
|
|
114775
|
-
Glob2.prototype._stat2 = function(f5, abs, er,
|
|
114775
|
+
Glob2.prototype._stat2 = function(f5, abs, er, stat4, cb) {
|
|
114776
114776
|
if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
|
|
114777
114777
|
this.statCache[abs] = false;
|
|
114778
114778
|
return cb();
|
|
114779
114779
|
}
|
|
114780
114780
|
var needDir = f5.slice(-1) === "/";
|
|
114781
|
-
this.statCache[abs] =
|
|
114782
|
-
if (abs.slice(-1) === "/" &&
|
|
114783
|
-
return cb(null, false,
|
|
114781
|
+
this.statCache[abs] = stat4;
|
|
114782
|
+
if (abs.slice(-1) === "/" && stat4 && !stat4.isDirectory())
|
|
114783
|
+
return cb(null, false, stat4);
|
|
114784
114784
|
var c3 = true;
|
|
114785
|
-
if (
|
|
114786
|
-
c3 =
|
|
114785
|
+
if (stat4)
|
|
114786
|
+
c3 = stat4.isDirectory() ? "DIR" : "FILE";
|
|
114787
114787
|
this.cache[abs] = this.cache[abs] || c3;
|
|
114788
114788
|
if (needDir && c3 === "FILE")
|
|
114789
114789
|
return cb();
|
|
114790
|
-
return cb(null, c3,
|
|
114790
|
+
return cb(null, c3, stat4);
|
|
114791
114791
|
};
|
|
114792
114792
|
}
|
|
114793
114793
|
});
|
|
@@ -114879,7 +114879,7 @@ var require_rimraf2 = __commonJS({
|
|
|
114879
114879
|
};
|
|
114880
114880
|
if (options.disableGlob || !glob2.hasMagic(p3))
|
|
114881
114881
|
return afterGlob(null, [p3]);
|
|
114882
|
-
options.lstat(p3, (er,
|
|
114882
|
+
options.lstat(p3, (er, stat4) => {
|
|
114883
114883
|
if (!er)
|
|
114884
114884
|
return afterGlob(null, [p3]);
|
|
114885
114885
|
glob2(p3, options.glob, afterGlob);
|
|
@@ -116226,7 +116226,7 @@ var require_upload_gzip = __commonJS({
|
|
|
116226
116226
|
var fs = __importStar(__require("fs"));
|
|
116227
116227
|
var zlib2 = __importStar(__require("zlib"));
|
|
116228
116228
|
var util_1 = __require("util");
|
|
116229
|
-
var
|
|
116229
|
+
var stat4 = (0, util_1.promisify)(fs.stat);
|
|
116230
116230
|
var gzipExemptFileExtensions = [
|
|
116231
116231
|
".gz",
|
|
116232
116232
|
".gzip",
|
|
@@ -116264,7 +116264,7 @@ var require_upload_gzip = __commonJS({
|
|
|
116264
116264
|
const outputStream = fs.createWriteStream(tempFilePath);
|
|
116265
116265
|
inputStream.pipe(gzip).pipe(outputStream);
|
|
116266
116266
|
outputStream.on("finish", () => __awaiter(this, void 0, void 0, function* () {
|
|
116267
|
-
const size = (yield
|
|
116267
|
+
const size = (yield stat4(tempFilePath)).size;
|
|
116268
116268
|
resolve26(size);
|
|
116269
116269
|
}));
|
|
116270
116270
|
outputStream.on("error", (error) => {
|
|
@@ -116502,7 +116502,7 @@ var require_upload_http_client = __commonJS({
|
|
|
116502
116502
|
var http_manager_1 = require_http_manager();
|
|
116503
116503
|
var upload_gzip_1 = require_upload_gzip();
|
|
116504
116504
|
var requestUtils_1 = require_requestUtils();
|
|
116505
|
-
var
|
|
116505
|
+
var stat4 = (0, util_1.promisify)(fs.stat);
|
|
116506
116506
|
var UploadHttpClient = class {
|
|
116507
116507
|
constructor() {
|
|
116508
116508
|
this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), "@actions/artifact-upload");
|
|
@@ -116625,7 +116625,7 @@ var require_upload_http_client = __commonJS({
|
|
|
116625
116625
|
*/
|
|
116626
116626
|
uploadFileAsync(httpClientIndex, parameters) {
|
|
116627
116627
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116628
|
-
const fileStat = yield
|
|
116628
|
+
const fileStat = yield stat4(parameters.file);
|
|
116629
116629
|
const totalFileSize = fileStat.size;
|
|
116630
116630
|
const isFIFO = fileStat.isFIFO();
|
|
116631
116631
|
let offset = 0;
|
|
@@ -186597,13 +186597,13 @@ var require_form_data3 = __commonJS({
|
|
|
186597
186597
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
186598
186598
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
186599
186599
|
} else {
|
|
186600
|
-
fs.stat(value.path, function(err,
|
|
186600
|
+
fs.stat(value.path, function(err, stat4) {
|
|
186601
186601
|
var fileSize;
|
|
186602
186602
|
if (err) {
|
|
186603
186603
|
callback(err);
|
|
186604
186604
|
return;
|
|
186605
186605
|
}
|
|
186606
|
-
fileSize =
|
|
186606
|
+
fileSize = stat4.size - (value.start ? value.start : 0);
|
|
186607
186607
|
callback(null, fileSize);
|
|
186608
186608
|
});
|
|
186609
186609
|
}
|
|
@@ -205979,11 +205979,9 @@ var RushFixingManager = class {
|
|
|
205979
205979
|
|
|
205980
205980
|
// ../fixing-management/src/fixing-management/nuget/nuget-fixing-manager.ts
|
|
205981
205981
|
import { readFile as readFile14, writeFile as writeFile6 } from "fs/promises";
|
|
205982
|
-
import { join as
|
|
205982
|
+
import { join as join9 } from "path";
|
|
205983
205983
|
|
|
205984
205984
|
// ../utils/src/nuget-utils.ts
|
|
205985
|
-
import { readdir as readdir3, stat as stat2 } from "fs/promises";
|
|
205986
|
-
import { join as join9 } from "path";
|
|
205987
205985
|
var Cache = class _Cache {
|
|
205988
205986
|
cache;
|
|
205989
205987
|
constructor() {
|
|
@@ -206082,7 +206080,7 @@ var NugetFixingManager = class {
|
|
|
206082
206080
|
const projectFiles = fixingInfo.projectFiles[wsPath];
|
|
206083
206081
|
if (projectFiles.length !== 1)
|
|
206084
206082
|
throw new Error("Applying fixes to workspaces with more than 1 project file currently not supported");
|
|
206085
|
-
const projectFilePath =
|
|
206083
|
+
const projectFilePath = join9(this.getAbsWsPath(wsPath), projectFiles[0]);
|
|
206086
206084
|
const initialProjectFile = await readFile14(projectFilePath, "utf-8");
|
|
206087
206085
|
const initialLockFile = await this.restoreWorkspaceAndParseLockFile(wsPath);
|
|
206088
206086
|
await applySeries(fixesWithId, async ({ fixId, vulnerabilityFixes }) => {
|
|
@@ -206102,21 +206100,21 @@ var NugetFixingManager = class {
|
|
|
206102
206100
|
const projectFiles = fixingInfo.projectFiles[wsPath];
|
|
206103
206101
|
if (projectFiles.length !== 1)
|
|
206104
206102
|
throw new Error("Applying fixes to workspaces with more than 1 project file currently not supported");
|
|
206105
|
-
await writeFile6(
|
|
206103
|
+
await writeFile6(join9(this.getAbsWsPath(wsPath), projectFiles[0]), finalProjectFile);
|
|
206106
206104
|
await writeFile6(this.getLockFilePath(wsPath), JSON.stringify(finalLockFile, null, 2));
|
|
206107
206105
|
});
|
|
206108
206106
|
if (solutionFiles) {
|
|
206109
206107
|
for (const solutionFile of solutionFiles) {
|
|
206110
206108
|
const succeeded = await execAndLogOnFailure(
|
|
206111
206109
|
cmdt`dotnet restore ${solutionFile} --use-lock-file`,
|
|
206112
|
-
|
|
206110
|
+
join9(this.rootDir, this.subprojectPath)
|
|
206113
206111
|
);
|
|
206114
206112
|
if (!succeeded) throw new Error(`Error applying fix - could not restore project ${this.subprojectPath}`);
|
|
206115
206113
|
}
|
|
206116
206114
|
} else {
|
|
206117
206115
|
const succeeded = await execAndLogOnFailure(
|
|
206118
206116
|
"dotnet restore --use-lock-file",
|
|
206119
|
-
|
|
206117
|
+
join9(this.rootDir, this.subprojectPath)
|
|
206120
206118
|
);
|
|
206121
206119
|
if (!succeeded) throw new Error(`Error applying fix - could not restore project ${this.subprojectPath}`);
|
|
206122
206120
|
}
|
|
@@ -206198,7 +206196,7 @@ var NugetFixingManager = class {
|
|
|
206198
206196
|
await writeFile6(this.getLockFilePath(wsPath), JSON.stringify(lockFileWithFixes, null, 2));
|
|
206199
206197
|
}
|
|
206200
206198
|
async addPackage(packageName, version3, framework, wsPath) {
|
|
206201
|
-
const dir =
|
|
206199
|
+
const dir = join9(this.rootDir, this.subprojectPath, wsPath);
|
|
206202
206200
|
const succeeded = await execAndLogOnFailure(
|
|
206203
206201
|
cmdt`dotnet add package ${packageName} --version ${version3} --no-restore --framework ${framework}`,
|
|
206204
206202
|
dir
|
|
@@ -206215,10 +206213,10 @@ var NugetFixingManager = class {
|
|
|
206215
206213
|
return JSON.parse(await readFile14(this.getLockFilePath(wsPath), "utf-8"));
|
|
206216
206214
|
}
|
|
206217
206215
|
getLockFilePath(wsPath, lockFileName = "packages.lock.json") {
|
|
206218
|
-
return
|
|
206216
|
+
return join9(this.getAbsWsPath(wsPath), lockFileName);
|
|
206219
206217
|
}
|
|
206220
206218
|
getAbsWsPath(wsPath) {
|
|
206221
|
-
return
|
|
206219
|
+
return join9(this.rootDir, this.subprojectPath, wsPath);
|
|
206222
206220
|
}
|
|
206223
206221
|
};
|
|
206224
206222
|
|
|
@@ -206251,7 +206249,7 @@ var RubyGemsFixingManager = class {
|
|
|
206251
206249
|
};
|
|
206252
206250
|
|
|
206253
206251
|
// ../fixing-management/src/fixing-management/rust/cargo-fixing-manager.ts
|
|
206254
|
-
import { join as
|
|
206252
|
+
import { join as join10 } from "node:path";
|
|
206255
206253
|
var CargoFixingManager = class {
|
|
206256
206254
|
constructor(rootDir, subprojectPath) {
|
|
206257
206255
|
this.rootDir = rootDir;
|
|
@@ -206267,7 +206265,7 @@ var CargoFixingManager = class {
|
|
|
206267
206265
|
});
|
|
206268
206266
|
}
|
|
206269
206267
|
async applySecurityFixesForWorkspace(workspacePath, fixes, dependencyTree) {
|
|
206270
|
-
const subprojectPath =
|
|
206268
|
+
const subprojectPath = join10(this.rootDir, this.subprojectPath, workspacePath);
|
|
206271
206269
|
for (const fix of fixes) {
|
|
206272
206270
|
const depTreeNode = dependencyTree.transitiveDependencies[fix.dependencyIdentifier];
|
|
206273
206271
|
if (!depTreeNode || depTreeNode.version !== fix.currentVersion) throw Error("Error applying fix!");
|
|
@@ -206349,8 +206347,8 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
|
206349
206347
|
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
206350
206348
|
var import_micromatch = __toESM(require_micromatch(), 1);
|
|
206351
206349
|
import { existsSync as existsSync11 } from "fs";
|
|
206352
|
-
import { access as access2, cp, readdir as
|
|
206353
|
-
import { basename as basename4, join as
|
|
206350
|
+
import { access as access2, cp, readdir as readdir3, stat as stat2 } from "fs/promises";
|
|
206351
|
+
import { basename as basename4, join as join11, relative as relative6, resolve as resolve13 } from "path";
|
|
206354
206352
|
var { uniq } = import_lodash5.default;
|
|
206355
206353
|
var { isMatch } = import_micromatch.default;
|
|
206356
206354
|
function findParent(dir, predicate, wholePath) {
|
|
@@ -206392,32 +206390,32 @@ var getImageTag = () => {
|
|
|
206392
206390
|
};
|
|
206393
206391
|
|
|
206394
206392
|
// ../docker-management/src/docker-spec.ts
|
|
206395
|
-
import { join as
|
|
206393
|
+
import { join as join12 } from "path";
|
|
206396
206394
|
var builderSpecs = [
|
|
206397
206395
|
{
|
|
206398
206396
|
name: "maven-builder",
|
|
206399
|
-
file:
|
|
206397
|
+
file: join12("builders", "maven", "Dockerfile"),
|
|
206400
206398
|
isBuilder: true
|
|
206401
206399
|
},
|
|
206402
206400
|
{
|
|
206403
206401
|
name: "python-builder",
|
|
206404
|
-
file:
|
|
206402
|
+
file: join12("builders", "python", "Dockerfile"),
|
|
206405
206403
|
isBuilder: true
|
|
206406
206404
|
},
|
|
206407
206405
|
{
|
|
206408
206406
|
name: "go-builder",
|
|
206409
|
-
file:
|
|
206407
|
+
file: join12("builders", "go", "Dockerfile"),
|
|
206410
206408
|
isBuilder: true
|
|
206411
206409
|
}
|
|
206412
206410
|
];
|
|
206413
206411
|
var packageManagerDockerSpecs = [
|
|
206414
206412
|
{
|
|
206415
206413
|
name: "npm-package-managers",
|
|
206416
|
-
file:
|
|
206414
|
+
file: join12("package-management", "npm", "Dockerfile")
|
|
206417
206415
|
},
|
|
206418
206416
|
{
|
|
206419
206417
|
name: "maven-package-managers",
|
|
206420
|
-
file:
|
|
206418
|
+
file: join12("package-management", "maven", "Dockerfile"),
|
|
206421
206419
|
variants: {
|
|
206422
206420
|
jdk8: {
|
|
206423
206421
|
JDK_URL_AMD64: "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u442-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u442b06.tar.gz",
|
|
@@ -206442,57 +206440,57 @@ var packageManagerDockerSpecs = [
|
|
|
206442
206440
|
},
|
|
206443
206441
|
{
|
|
206444
206442
|
name: "pip-package-managers",
|
|
206445
|
-
file:
|
|
206443
|
+
file: join12("package-management", "pip", "Dockerfile"),
|
|
206446
206444
|
from: {
|
|
206447
206445
|
name: "python-builder"
|
|
206448
206446
|
}
|
|
206449
206447
|
},
|
|
206450
206448
|
{
|
|
206451
206449
|
name: "go-package-manager",
|
|
206452
|
-
file:
|
|
206450
|
+
file: join12("package-management", "go", "Dockerfile"),
|
|
206453
206451
|
from: {
|
|
206454
206452
|
name: "go-builder"
|
|
206455
206453
|
}
|
|
206456
206454
|
},
|
|
206457
206455
|
{
|
|
206458
206456
|
name: "nuget-package-manager",
|
|
206459
|
-
file:
|
|
206457
|
+
file: join12("package-management", "nuget", "Dockerfile")
|
|
206460
206458
|
},
|
|
206461
206459
|
{
|
|
206462
206460
|
name: "cargo-package-manager",
|
|
206463
|
-
file:
|
|
206461
|
+
file: join12("package-management", "cargo", "Dockerfile")
|
|
206464
206462
|
}
|
|
206465
206463
|
];
|
|
206466
206464
|
var reachabilityAnalyzerDockerSpecs = [
|
|
206467
206465
|
{
|
|
206468
206466
|
name: "jelly-analyzer",
|
|
206469
|
-
file:
|
|
206467
|
+
file: join12("reachability-analyzers", "jelly", "Dockerfile")
|
|
206470
206468
|
},
|
|
206471
206469
|
{
|
|
206472
206470
|
name: "alucard-analyzer",
|
|
206473
|
-
file:
|
|
206471
|
+
file: join12("reachability-analyzers", "alucard", "Dockerfile")
|
|
206474
206472
|
},
|
|
206475
206473
|
{
|
|
206476
206474
|
name: "mambalade-analyzer",
|
|
206477
|
-
file:
|
|
206475
|
+
file: join12("reachability-analyzers", "mambalade", "Dockerfile"),
|
|
206478
206476
|
from: {
|
|
206479
206477
|
name: "python-builder"
|
|
206480
206478
|
}
|
|
206481
206479
|
},
|
|
206482
206480
|
{
|
|
206483
206481
|
name: "goana-analyzer",
|
|
206484
|
-
file:
|
|
206482
|
+
file: join12("reachability-analyzers", "goana", "Dockerfile"),
|
|
206485
206483
|
from: {
|
|
206486
206484
|
name: "go-builder"
|
|
206487
206485
|
}
|
|
206488
206486
|
},
|
|
206489
206487
|
{
|
|
206490
206488
|
name: "cocoa-analyzer",
|
|
206491
|
-
file:
|
|
206489
|
+
file: join12("reachability-analyzers", "cocoa", "Dockerfile")
|
|
206492
206490
|
},
|
|
206493
206491
|
{
|
|
206494
206492
|
name: "rustica-analyzer",
|
|
206495
|
-
file:
|
|
206493
|
+
file: join12("reachability-analyzers", "rustica", "Dockerfile")
|
|
206496
206494
|
}
|
|
206497
206495
|
];
|
|
206498
206496
|
function getAllPackageManagerSpecs() {
|
|
@@ -207079,13 +207077,13 @@ async function detectVariantMaven(projectDir) {
|
|
|
207079
207077
|
|
|
207080
207078
|
// ../docker-management/src/maven/gradle-version-detector.ts
|
|
207081
207079
|
import { existsSync as existsSync12 } from "fs";
|
|
207082
|
-
import { join as
|
|
207080
|
+
import { join as join13 } from "path";
|
|
207083
207081
|
import { readFile as readFile15 } from "fs/promises";
|
|
207084
207082
|
async function detectVariantGradle(projectDir) {
|
|
207085
207083
|
return sanitizeJvmVariant("GRADLE", projectDir, await detect(projectDir));
|
|
207086
207084
|
}
|
|
207087
207085
|
async function detect(projectDir) {
|
|
207088
|
-
const gradleWrapperPropertiesPath =
|
|
207086
|
+
const gradleWrapperPropertiesPath = join13(projectDir, "gradle", "wrapper", "gradle-wrapper.properties");
|
|
207089
207087
|
const gradleWrapperProperties = existsSync12(gradleWrapperPropertiesPath) ? (await readFile15(gradleWrapperPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
207090
207088
|
if (!gradleWrapperProperties) return void 0;
|
|
207091
207089
|
const distributionUrlRegex = /.*gradle-(\d+(\.\d+(\.\d+)?)?)/;
|
|
@@ -207101,13 +207099,13 @@ async function detect(projectDir) {
|
|
|
207101
207099
|
|
|
207102
207100
|
// ../docker-management/src/maven/sbt-version-detector.ts
|
|
207103
207101
|
import { existsSync as existsSync13 } from "fs";
|
|
207104
|
-
import { join as
|
|
207102
|
+
import { join as join14 } from "path";
|
|
207105
207103
|
import { readFile as readFile16 } from "fs/promises";
|
|
207106
207104
|
async function detectVariantSbt(projectDir) {
|
|
207107
207105
|
return sanitizeJvmVariant("SBT", projectDir, await detect2(projectDir));
|
|
207108
207106
|
}
|
|
207109
207107
|
async function detect2(projectDir) {
|
|
207110
|
-
const sbtBuildPropertiesPath =
|
|
207108
|
+
const sbtBuildPropertiesPath = join14(projectDir, "project", "build.properties");
|
|
207111
207109
|
const sbtBuildProperties = existsSync13(sbtBuildPropertiesPath) ? (await readFile16(sbtBuildPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
207112
207110
|
if (!sbtBuildProperties) return void 0;
|
|
207113
207111
|
for (const prop2 of sbtBuildProperties) {
|
|
@@ -207224,14 +207222,14 @@ var import_lodash11 = __toESM(require_lodash(), 1);
|
|
|
207224
207222
|
import { rmSync } from "fs";
|
|
207225
207223
|
import { mkdir, readFile as readFile17, writeFile as writeFile7 } from "fs/promises";
|
|
207226
207224
|
import { platform } from "os";
|
|
207227
|
-
import { join as
|
|
207225
|
+
import { join as join17, posix as posix2, relative as relative8, sep as sep3 } from "path";
|
|
207228
207226
|
|
|
207229
207227
|
// ../utils/src/file-utils.ts
|
|
207230
207228
|
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
207231
207229
|
var import_micromatch2 = __toESM(require_micromatch(), 1);
|
|
207232
207230
|
import { existsSync as existsSync14 } from "fs";
|
|
207233
|
-
import { access as access3, cp as cp2, readdir as
|
|
207234
|
-
import { basename as basename5, join as
|
|
207231
|
+
import { access as access3, cp as cp2, readdir as readdir4, stat as stat3 } from "fs/promises";
|
|
207232
|
+
import { basename as basename5, join as join15, relative as relative7, resolve as resolve16 } from "path";
|
|
207235
207233
|
var { uniq: uniq2 } = import_lodash8.default;
|
|
207236
207234
|
var { isMatch: isMatch2 } = import_micromatch2.default;
|
|
207237
207235
|
function findParent2(dir, predicate, wholePath) {
|
|
@@ -207247,8 +207245,8 @@ function findParent2(dir, predicate, wholePath) {
|
|
|
207247
207245
|
}
|
|
207248
207246
|
async function getFilesRelative(dir, excludeDirs) {
|
|
207249
207247
|
async function helper(subDir, arrayOfFiles) {
|
|
207250
|
-
for (const item of await
|
|
207251
|
-
const itemPath =
|
|
207248
|
+
for (const item of await readdir4(join15(dir, subDir), { withFileTypes: true })) {
|
|
207249
|
+
const itemPath = join15(subDir, item.name);
|
|
207252
207250
|
if (item.isDirectory()) {
|
|
207253
207251
|
if (!excludeDirs?.includes(item.name)) await helper(itemPath, arrayOfFiles);
|
|
207254
207252
|
} else if (item.isFile()) {
|
|
@@ -207271,10 +207269,10 @@ async function exists(path2, mode) {
|
|
|
207271
207269
|
// ../utils/src/tmp-file.ts
|
|
207272
207270
|
import { rm, mkdtemp } from "fs/promises";
|
|
207273
207271
|
import { tmpdir } from "os";
|
|
207274
|
-
import { join as
|
|
207272
|
+
import { join as join16 } from "path";
|
|
207275
207273
|
async function createTmpDirectory(prefix) {
|
|
207276
207274
|
try {
|
|
207277
|
-
const tmpDir = await mkdtemp(
|
|
207275
|
+
const tmpDir = await mkdtemp(join16(tmpdir(), prefix));
|
|
207278
207276
|
return tmpDir;
|
|
207279
207277
|
} catch (err) {
|
|
207280
207278
|
console.log("Error creating tmp directory", err);
|
|
@@ -207594,7 +207592,7 @@ var OtherModulesCommunicator = class {
|
|
|
207594
207592
|
return "Running reachability analysis on package registry package";
|
|
207595
207593
|
}
|
|
207596
207594
|
}
|
|
207597
|
-
return `${_cmdStr()}: (${ecosystem}) ${relative8(this.rootWorkingDir,
|
|
207595
|
+
return `${_cmdStr()}: (${ecosystem}) ${relative8(this.rootWorkingDir, join17(subprojectPath, workspacePath)) || "."}`;
|
|
207598
207596
|
}
|
|
207599
207597
|
getProjectPath(subprojectPath) {
|
|
207600
207598
|
return this.options.runWithoutDocker ? subprojectPath : posix2.resolve("/project", relative8(this.rootWorkingDir, subprojectPath).replaceAll(sep3, posix2.sep));
|
|
@@ -207643,7 +207641,7 @@ var OtherModulesCommunicator = class {
|
|
|
207643
207641
|
async runPackageManagerCommandWithOutput(commandName, packageManagerName, subprojectPath, args2 = [], extraDockerArgs, env) {
|
|
207644
207642
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
207645
207643
|
const outputFileName = `${v4_default()}-${commandName}-output.json`;
|
|
207646
|
-
const outputFilePathThisProcess =
|
|
207644
|
+
const outputFilePathThisProcess = join17(tmpDir, outputFileName);
|
|
207647
207645
|
const outputFilePathOtherProcess = this.options.runWithoutDocker ? outputFilePathThisProcess : posix2.join(TMP_DIR_IN_DOCKER, outputFileName);
|
|
207648
207646
|
await this.runPackageManagerCommand(
|
|
207649
207647
|
commandName,
|
|
@@ -207708,7 +207706,7 @@ var OtherModulesCommunicator = class {
|
|
|
207708
207706
|
async runReachabilityAnalyzerCommandWithOutput(commandName, ecosystem, subprojectPath, workspacePath, args2, env) {
|
|
207709
207707
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
207710
207708
|
const outputFileName = `${v4_default()}-${commandName}-output.json`;
|
|
207711
|
-
const outputFilePathThisProcess =
|
|
207709
|
+
const outputFilePathThisProcess = join17(tmpDir, outputFileName);
|
|
207712
207710
|
const outputFilePathOtherProcess = this.options.runWithoutDocker ? outputFilePathThisProcess : posix2.join(TMP_DIR_IN_DOCKER, outputFileName);
|
|
207713
207711
|
await this.runReachabilityAnalyzerCommand(
|
|
207714
207712
|
commandName,
|
|
@@ -207745,7 +207743,7 @@ var OtherModulesCommunicator = class {
|
|
|
207745
207743
|
if (providedOptions.type === "providee") {
|
|
207746
207744
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
207747
207745
|
const providerFileName = "provider.json";
|
|
207748
|
-
const providerFileThisProcess =
|
|
207746
|
+
const providerFileThisProcess = join17(tmpDir, providerFileName);
|
|
207749
207747
|
const providerFileOtherProcess = this.options.runWithoutDocker ? providerFileThisProcess : posix2.join(TMP_DIR_IN_DOCKER, providerFileName);
|
|
207750
207748
|
await writeFile7(providerFileThisProcess, JSON.stringify(providedOptions.provider));
|
|
207751
207749
|
return ["--provider", providerFileOtherProcess];
|
|
@@ -207789,7 +207787,7 @@ var OtherModulesCommunicator = class {
|
|
|
207789
207787
|
async runReachabilityAnalysis(subprojectPath, workspacePath, workspaceData, ecosystem, vulnerabilities, reachabilityAnalysisOptions, otherAnalysisOptions) {
|
|
207790
207788
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
207791
207789
|
const inputFileName = `${v4_default()}-runReachabilityAnalysis-input.json`;
|
|
207792
|
-
const inputFileThisProcess =
|
|
207790
|
+
const inputFileThisProcess = join17(tmpDir, inputFileName);
|
|
207793
207791
|
const inputFileOtherProcess = this.options.runWithoutDocker ? inputFileThisProcess : posix2.join(TMP_DIR_IN_DOCKER, inputFileName);
|
|
207794
207792
|
await writeFile7(
|
|
207795
207793
|
inputFileThisProcess,
|
|
@@ -207831,7 +207829,7 @@ var setUpGoModuleCache = once6(async () => {
|
|
|
207831
207829
|
execFileSync("chmod", ["--recursive", "+rw", tmpDir]);
|
|
207832
207830
|
rmSync(tmpDir, { recursive: true, force: true });
|
|
207833
207831
|
});
|
|
207834
|
-
const [upper, work] = [
|
|
207832
|
+
const [upper, work] = [join17(tmpDir, "upper"), join17(tmpDir, "work")];
|
|
207835
207833
|
for (const dir of [upper, work]) await mkdir(dir);
|
|
207836
207834
|
const o7 = await execNeverFail(
|
|
207837
207835
|
cmdt`docker volume create --driver local --opt type=overlay
|
|
@@ -209148,13 +209146,13 @@ import { relative as relative10, resolve as resolve23 } from "path";
|
|
|
209148
209146
|
|
|
209149
209147
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-manager.ts
|
|
209150
209148
|
var import_micromatch3 = __toESM(require_micromatch2(), 1);
|
|
209151
|
-
import { readdir as
|
|
209152
|
-
import { join as
|
|
209149
|
+
import { readdir as readdir6 } from "fs/promises";
|
|
209150
|
+
import { join as join20, relative as relative9, resolve as resolve22 } from "path";
|
|
209153
209151
|
|
|
209154
209152
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-specs.ts
|
|
209155
209153
|
import { existsSync as existsSync17 } from "fs";
|
|
209156
|
-
import { readdir as
|
|
209157
|
-
import { join as
|
|
209154
|
+
import { readdir as readdir5, readFile as readFile20 } from "fs/promises";
|
|
209155
|
+
import { join as join19, sep as sep4 } from "path";
|
|
209158
209156
|
|
|
209159
209157
|
// ../utils/src/pip-utils.ts
|
|
209160
209158
|
import { existsSync as existsSync16 } from "fs";
|
|
@@ -209168,7 +209166,7 @@ var import_semver4 = __toESM(require_semver2(), 1);
|
|
|
209168
209166
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
209169
209167
|
import { constants as constants2 } from "fs";
|
|
209170
209168
|
import { access as access4, readFile as readFile18 } from "fs/promises";
|
|
209171
|
-
import { join as
|
|
209169
|
+
import { join as join18, resolve as resolve20 } from "path";
|
|
209172
209170
|
import util3 from "util";
|
|
209173
209171
|
var { once: once7 } = import_lodash13.default;
|
|
209174
209172
|
var systemPython = once7(() => execFileSync2("which", ["python"], { encoding: "utf8" }).trim());
|
|
@@ -209210,12 +209208,12 @@ var specs = {
|
|
|
209210
209208
|
[
|
|
209211
209209
|
/^(pyproject.toml|setup.py|requirements.*\.txt)/,
|
|
209212
209210
|
async (projectDir) => {
|
|
209213
|
-
const isPythonProject = await exists(
|
|
209211
|
+
const isPythonProject = await exists(join19(projectDir, "pyproject.toml")) || await exists(join19(projectDir, "setup.py")) && await isSetupPySetuptools(join19(projectDir, "setup.py"));
|
|
209214
209212
|
if (isPythonProject) {
|
|
209215
209213
|
properPythonProjects.push(projectDir + sep4);
|
|
209216
209214
|
return "PIP_REQUIREMENTS";
|
|
209217
209215
|
}
|
|
209218
|
-
if ((await
|
|
209216
|
+
if ((await readdir5(projectDir)).some((fileOrDir) => /requirements.*\.txt/.test(fileOrDir)) && !properPythonProjects.some(
|
|
209219
209217
|
(properProjectDir) => projectDir.startsWith(properProjectDir) && projectDir.replace(properProjectDir, "").split(sep4).length <= REQUIREMENTS_FILES_SEARCH_DEPTH
|
|
209220
209218
|
))
|
|
209221
209219
|
return "PIP_REQUIREMENTS";
|
|
@@ -209233,7 +209231,7 @@ var specs = {
|
|
|
209233
209231
|
[
|
|
209234
209232
|
"uv.lock",
|
|
209235
209233
|
async (projectDir) => {
|
|
209236
|
-
if (await exists(
|
|
209234
|
+
if (await exists(join19(projectDir, "pyproject.toml"))) {
|
|
209237
209235
|
logger.warn("uv is not supported yet, using plain pyproject.toml as a fallback");
|
|
209238
209236
|
return "PIP_REQUIREMENTS";
|
|
209239
209237
|
} else logger.error("uv.lock found without pyproject.toml");
|
|
@@ -209254,8 +209252,8 @@ function getEcosystemSpecs(ecosystems) {
|
|
|
209254
209252
|
}
|
|
209255
209253
|
function packageManagerIfPackageJSONExistsAndValid(packageManager) {
|
|
209256
209254
|
return async (projectDir) => {
|
|
209257
|
-
if (!existsSync17(
|
|
209258
|
-
const packageJSONPath =
|
|
209255
|
+
if (!existsSync17(join19(projectDir, "package.json"))) return void 0;
|
|
209256
|
+
const packageJSONPath = join19(projectDir, "package.json");
|
|
209259
209257
|
try {
|
|
209260
209258
|
JSON.parse(await readFile20(packageJSONPath, "utf-8"));
|
|
209261
209259
|
return packageManager;
|
|
@@ -209312,7 +209310,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
209312
209310
|
const resolvedProjectDir = resolve22(mainProjectDir, relativeProjectDir);
|
|
209313
209311
|
if (config3.includeDirs.length > 0)
|
|
209314
209312
|
workspacePaths = workspacePaths.filter(
|
|
209315
|
-
(workspacePath) => isMatch3(relative9(mainProjectDir,
|
|
209313
|
+
(workspacePath) => isMatch3(relative9(mainProjectDir, join20(resolvedProjectDir, workspacePath)), config3.includeDirs)
|
|
209316
209314
|
);
|
|
209317
209315
|
workspacePaths.filter((workspacePath) => workspacePath !== ".").forEach((workspacePath) => projectDirsAlreadyCovered.push(resolve22(resolvedProjectDir, workspacePath)));
|
|
209318
209316
|
if (workspacePaths.length > 0)
|
|
@@ -209340,7 +209338,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
209340
209338
|
}
|
|
209341
209339
|
}
|
|
209342
209340
|
for (const dir of directoriesToTraverse) {
|
|
209343
|
-
await recHelper(
|
|
209341
|
+
await recHelper(join20(projectDir, dir), true);
|
|
209344
209342
|
}
|
|
209345
209343
|
}
|
|
209346
209344
|
async function getPackageManagerName(projectDir, foundProjectFiles, foundLockFiles) {
|
|
@@ -209366,10 +209364,10 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
209366
209364
|
const directoriesToTraverse = [];
|
|
209367
209365
|
const foundProjectFiles = /* @__PURE__ */ new Set();
|
|
209368
209366
|
const foundLockFiles = /* @__PURE__ */ new Set();
|
|
209369
|
-
const filesAndDirectories = await
|
|
209367
|
+
const filesAndDirectories = await readdir6(projectDir, { withFileTypes: true });
|
|
209370
209368
|
for (const dirent of filesAndDirectories) {
|
|
209371
209369
|
const fileOrDirectory = dirent.name;
|
|
209372
|
-
const fullPath =
|
|
209370
|
+
const fullPath = join20(projectDir, fileOrDirectory);
|
|
209373
209371
|
if (dirent.isDirectory()) {
|
|
209374
209372
|
if (shouldIgnoreDir(fileOrDirectory) || shouldIgnoreDueToExcludeDirsOrChangedFiles(config3, fullPath))
|
|
209375
209373
|
continue;
|
|
@@ -209396,7 +209394,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
209396
209394
|
packageManagerName,
|
|
209397
209395
|
subprojectPath,
|
|
209398
209396
|
workspacePaths: workspacePaths.filter(
|
|
209399
|
-
(workspacePath) => !shouldIgnoreDueToExcludeDirsOrChangedFiles(this.config,
|
|
209397
|
+
(workspacePath) => !shouldIgnoreDueToExcludeDirsOrChangedFiles(this.config, join20(subprojectPath, workspacePath))
|
|
209400
209398
|
)
|
|
209401
209399
|
}));
|
|
209402
209400
|
}
|
|
@@ -209623,7 +209621,7 @@ var kleur_default = $;
|
|
|
209623
209621
|
// dist/cli-core.js
|
|
209624
209622
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
209625
209623
|
import os from "os";
|
|
209626
|
-
import { join as
|
|
209624
|
+
import { join as join22, relative as relative11, resolve as resolve25 } from "path";
|
|
209627
209625
|
|
|
209628
209626
|
// ../utils/src/dashboard-api/shared-api.ts
|
|
209629
209627
|
var DashboardAPI = class {
|
|
@@ -210063,6 +210061,11 @@ import { basename as basename7, dirname as dirname8, sep as sep5 } from "path";
|
|
|
210063
210061
|
var REQUIREMENTS_FILES_SEARCH_DEPTH2 = 3;
|
|
210064
210062
|
function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonProjects) {
|
|
210065
210063
|
switch (ecosystem) {
|
|
210064
|
+
case "NPM": {
|
|
210065
|
+
const base = basename7(manifestPath);
|
|
210066
|
+
const dir = dirname8(manifestPath);
|
|
210067
|
+
return base === "package.json" ? dir === "" ? "." : dir : void 0;
|
|
210068
|
+
}
|
|
210066
210069
|
case "MAVEN": {
|
|
210067
210070
|
return ".";
|
|
210068
210071
|
}
|
|
@@ -210086,10 +210089,14 @@ function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonPro
|
|
|
210086
210089
|
logger.warn(`No workspace found for manifest file ${manifestPath}`);
|
|
210087
210090
|
return void 0;
|
|
210088
210091
|
}
|
|
210092
|
+
case "NUGET": {
|
|
210093
|
+
return ".";
|
|
210094
|
+
}
|
|
210095
|
+
case "RUST": {
|
|
210096
|
+
return dirname8(manifestPath) || ".";
|
|
210097
|
+
}
|
|
210089
210098
|
default: {
|
|
210090
|
-
|
|
210091
|
-
const dir = dirname8(manifestPath);
|
|
210092
|
-
return base === "package.json" ? dir === "" ? "." : dir : void 0;
|
|
210099
|
+
return void 0;
|
|
210093
210100
|
}
|
|
210094
210101
|
}
|
|
210095
210102
|
}
|
|
@@ -210159,16 +210166,32 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash)
|
|
|
210159
210166
|
artifacts: []
|
|
210160
210167
|
}
|
|
210161
210168
|
};
|
|
210162
|
-
if (ecosystem === "MAVEN") {
|
|
210163
|
-
const allFiles2 = await getFilesRelative(rootWorkingDirectory);
|
|
210164
|
-
const manifestFiles2 = allFiles2.filter((file) => (0, import_picomatch2.default)("{Buildfile,build.sbt,gradle.lockfile,*.gradle{.kts,},ivy.xml,project.clj,{*-*.,}pom{.xml,}}")(basename7(file)));
|
|
210165
|
-
ecosystemToWorkspaceToAnalysisData[ecosystem][workspace].data.manifestFiles.push(...manifestFiles2);
|
|
210166
|
-
}
|
|
210167
210169
|
}
|
|
210168
210170
|
const workspaceData = ecosystemToWorkspaceToAnalysisData[ecosystem][workspace];
|
|
210169
210171
|
if (workspaceData.type === "socket") {
|
|
210170
|
-
|
|
210171
|
-
|
|
210172
|
+
switch (ecosystem) {
|
|
210173
|
+
case "MAVEN": {
|
|
210174
|
+
if (!workspaceData.data.manifestFiles.length) {
|
|
210175
|
+
const allFiles2 = await getFilesRelative(rootWorkingDirectory);
|
|
210176
|
+
const manifestFiles2 = allFiles2.filter((file) => (0, import_picomatch2.default)("{{*-*.,}pom{.xml,},gradle.lockfile}")(basename7(file)));
|
|
210177
|
+
workspaceData.data.manifestFiles.push(...manifestFiles2);
|
|
210178
|
+
}
|
|
210179
|
+
break;
|
|
210180
|
+
}
|
|
210181
|
+
case "NUGET": {
|
|
210182
|
+
if (!workspaceData.data.manifestFiles.length) {
|
|
210183
|
+
const allFiles2 = await getFilesRelative(rootWorkingDirectory);
|
|
210184
|
+
const manifestFiles2 = allFiles2.filter((file) => (0, import_picomatch2.default)("{*.csproj,packages.lock.json}")(basename7(file)));
|
|
210185
|
+
workspaceData.data.manifestFiles.push(...manifestFiles2);
|
|
210186
|
+
}
|
|
210187
|
+
break;
|
|
210188
|
+
}
|
|
210189
|
+
default: {
|
|
210190
|
+
if (!workspaceData.data.manifestFiles.includes(manifestFile)) {
|
|
210191
|
+
workspaceData.data.manifestFiles.push(manifestFile);
|
|
210192
|
+
}
|
|
210193
|
+
break;
|
|
210194
|
+
}
|
|
210172
210195
|
}
|
|
210173
210196
|
workspaceData.data.artifacts.push(artifact);
|
|
210174
210197
|
}
|
|
@@ -223944,7 +223967,7 @@ var { root: root2 } = static_exports;
|
|
|
223944
223967
|
// ../utils/src/maven-utils.ts
|
|
223945
223968
|
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
223946
223969
|
import { existsSync as existsSync19, readdirSync as readdirSync4, statSync as statSync4 } from "fs";
|
|
223947
|
-
import { join as
|
|
223970
|
+
import { join as join21 } from "path";
|
|
223948
223971
|
var { memoize: memoize3 } = import_lodash14.default;
|
|
223949
223972
|
var memoizedParseShellArgs = memoize3(parseShellArgs);
|
|
223950
223973
|
var MAVEN_PUBLIC_REPOSITORIES = [
|
|
@@ -225315,7 +225338,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
225315
225338
|
}
|
|
225316
225339
|
|
|
225317
225340
|
// dist/version.js
|
|
225318
|
-
var version2 = "14.11.
|
|
225341
|
+
var version2 = "14.11.7";
|
|
225319
225342
|
|
|
225320
225343
|
// dist/cli-core.js
|
|
225321
225344
|
var { mapValues, omit, partition, pick } = import_lodash15.default;
|
|
@@ -225408,7 +225431,7 @@ var CliCore = class {
|
|
|
225408
225431
|
}
|
|
225409
225432
|
}
|
|
225410
225433
|
async main() {
|
|
225411
|
-
this.coanaLogPath =
|
|
225434
|
+
this.coanaLogPath = join22(await createTmpDirectory("coana-cli-"), "coana-log.txt");
|
|
225412
225435
|
logger.initWinstonLogger(this.options.debug, this.coanaLogPath);
|
|
225413
225436
|
logger.silent = this.options.silent;
|
|
225414
225437
|
try {
|
|
@@ -225983,7 +226006,7 @@ async function getGitDataToMetadataIfAvailable(rootWorkingDirectory) {
|
|
|
225983
226006
|
}
|
|
225984
226007
|
|
|
225985
226008
|
// dist/cli-upgrade-purl.js
|
|
225986
|
-
import { join as
|
|
226009
|
+
import { join as join23, relative as relative12 } from "node:path";
|
|
225987
226010
|
var import_packageurl_js = __toESM(require_packageurl_js(), 1);
|
|
225988
226011
|
async function upgradePurl(path2, upgrades, options) {
|
|
225989
226012
|
logger.initWinstonLogger(options.debug);
|
|
@@ -226034,7 +226057,7 @@ ${upgrades.map((upgrade) => ` ${upgrade.purl} -> ${upgrade.upgradeVersion}`).joi
|
|
|
226034
226057
|
const subprojectPromiseQueue = new PromiseQueue(Number(options.concurrency));
|
|
226035
226058
|
supportedSubprojects.forEach((subproject) => {
|
|
226036
226059
|
subprojectPromiseQueue.enqueueTask(async () => {
|
|
226037
|
-
const workspacePathsMatchingGlob = subproject.workspacePaths.filter((wsPath) => minimatch(
|
|
226060
|
+
const workspacePathsMatchingGlob = subproject.workspacePaths.filter((wsPath) => minimatch(join23(subproject.subprojectPath, wsPath), options.globPattern ?? "**"));
|
|
226038
226061
|
if (workspacePathsMatchingGlob.length === 0)
|
|
226039
226062
|
return;
|
|
226040
226063
|
logger.info(`Found workspaces for subproject ${subproject.subprojectPath}${options.globPattern ? `matching glob ${options.globPattern}` : ""}:
|
|
@@ -226063,7 +226086,7 @@ ${workspacePathsMatchingGlob.map((wsPath) => ` ${wsPath}`).join("\n")}`);
|
|
|
226063
226086
|
});
|
|
226064
226087
|
if (vulnerabilityFixes.length === 0)
|
|
226065
226088
|
return;
|
|
226066
|
-
logger.info(`Found ${vulnerabilityFixes.length} ${vulnerabilityFixes.length === 1 ? "dependency" : "dependencies"} matching upgrade specs for ${
|
|
226089
|
+
logger.info(`Found ${vulnerabilityFixes.length} ${vulnerabilityFixes.length === 1 ? "dependency" : "dependencies"} matching upgrade specs for ${join23(subproject.subprojectPath, wsPath)}`);
|
|
226067
226090
|
workspaceToFixes[wsPath] = [
|
|
226068
226091
|
{
|
|
226069
226092
|
fixId: "dummy",
|
|
@@ -226084,7 +226107,7 @@ ${workspacePathsMatchingGlob.map((wsPath) => ` ${wsPath}`).join("\n")}`);
|
|
|
226084
226107
|
}
|
|
226085
226108
|
}
|
|
226086
226109
|
var signalFixApplied = (_fixId, subprojectPath, workspacePath, vulnerabilityFixes) => {
|
|
226087
|
-
logger.info(`Successfully upgraded purls for: ${
|
|
226110
|
+
logger.info(`Successfully upgraded purls for: ${join23(subprojectPath, workspacePath)}`);
|
|
226088
226111
|
logger.info(`Upgraded:
|
|
226089
226112
|
${vulnerabilityFixes.map((fix) => ` ${fix.dependencyName} from ${fix.currentVersion} to ${fix.fixedVersion}`).join("\n")}`);
|
|
226090
226113
|
};
|