@coana-tech/cli 15.0.13 → 15.1.1
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 +1018 -735
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +31 -10
- package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
- package/repos/coana-tech/javap-service/javap-service.jar +0 -0
package/cli.mjs
CHANGED
|
@@ -13382,7 +13382,7 @@ var require_ms = __commonJS({
|
|
|
13382
13382
|
var h = m4 * 60;
|
|
13383
13383
|
var d4 = h * 24;
|
|
13384
13384
|
var w = d4 * 7;
|
|
13385
|
-
var
|
|
13385
|
+
var y8 = d4 * 365.25;
|
|
13386
13386
|
module2.exports = function(val2, options) {
|
|
13387
13387
|
options = options || {};
|
|
13388
13388
|
var type = typeof val2;
|
|
@@ -13414,7 +13414,7 @@ var require_ms = __commonJS({
|
|
|
13414
13414
|
case "yrs":
|
|
13415
13415
|
case "yr":
|
|
13416
13416
|
case "y":
|
|
13417
|
-
return n2 *
|
|
13417
|
+
return n2 * y8;
|
|
13418
13418
|
case "weeks":
|
|
13419
13419
|
case "week":
|
|
13420
13420
|
case "w":
|
|
@@ -16020,9 +16020,9 @@ var require_picomatch = __commonJS({
|
|
|
16020
16020
|
var utils = require_utils();
|
|
16021
16021
|
var constants4 = require_constants();
|
|
16022
16022
|
var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2);
|
|
16023
|
-
var
|
|
16023
|
+
var picomatch12 = (glob2, options, returnState = false) => {
|
|
16024
16024
|
if (Array.isArray(glob2)) {
|
|
16025
|
-
const fns = glob2.map((input) =>
|
|
16025
|
+
const fns = glob2.map((input) => picomatch12(input, options, returnState));
|
|
16026
16026
|
const arrayMatcher = (str) => {
|
|
16027
16027
|
for (const isMatch4 of fns) {
|
|
16028
16028
|
const state2 = isMatch4(str);
|
|
@@ -16038,16 +16038,16 @@ var require_picomatch = __commonJS({
|
|
|
16038
16038
|
}
|
|
16039
16039
|
const opts = options || {};
|
|
16040
16040
|
const posix3 = opts.windows;
|
|
16041
|
-
const regex = isState ?
|
|
16041
|
+
const regex = isState ? picomatch12.compileRe(glob2, options) : picomatch12.makeRe(glob2, options, false, true);
|
|
16042
16042
|
const state = regex.state;
|
|
16043
16043
|
delete regex.state;
|
|
16044
16044
|
let isIgnored = () => false;
|
|
16045
16045
|
if (opts.ignore) {
|
|
16046
16046
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
16047
|
-
isIgnored =
|
|
16047
|
+
isIgnored = picomatch12(opts.ignore, ignoreOpts, returnState);
|
|
16048
16048
|
}
|
|
16049
16049
|
const matcher = (input, returnObject = false) => {
|
|
16050
|
-
const { isMatch: isMatch4, match: match2, output } =
|
|
16050
|
+
const { isMatch: isMatch4, match: match2, output } = picomatch12.test(input, regex, options, { glob: glob2, posix: posix3 });
|
|
16051
16051
|
const result = { glob: glob2, state, regex, posix: posix3, input, output, match: match2, isMatch: isMatch4 };
|
|
16052
16052
|
if (typeof opts.onResult === "function") {
|
|
16053
16053
|
opts.onResult(result);
|
|
@@ -16073,7 +16073,7 @@ var require_picomatch = __commonJS({
|
|
|
16073
16073
|
}
|
|
16074
16074
|
return matcher;
|
|
16075
16075
|
};
|
|
16076
|
-
|
|
16076
|
+
picomatch12.test = (input, regex, options, { glob: glob2, posix: posix3 } = {}) => {
|
|
16077
16077
|
if (typeof input !== "string") {
|
|
16078
16078
|
throw new TypeError("Expected input to be a string");
|
|
16079
16079
|
}
|
|
@@ -16090,24 +16090,24 @@ var require_picomatch = __commonJS({
|
|
|
16090
16090
|
}
|
|
16091
16091
|
if (match2 === false || opts.capture === true) {
|
|
16092
16092
|
if (opts.matchBase === true || opts.basename === true) {
|
|
16093
|
-
match2 =
|
|
16093
|
+
match2 = picomatch12.matchBase(input, regex, options, posix3);
|
|
16094
16094
|
} else {
|
|
16095
16095
|
match2 = regex.exec(output);
|
|
16096
16096
|
}
|
|
16097
16097
|
}
|
|
16098
16098
|
return { isMatch: Boolean(match2), match: match2, output };
|
|
16099
16099
|
};
|
|
16100
|
-
|
|
16101
|
-
const regex = glob2 instanceof RegExp ? glob2 :
|
|
16100
|
+
picomatch12.matchBase = (input, glob2, options) => {
|
|
16101
|
+
const regex = glob2 instanceof RegExp ? glob2 : picomatch12.makeRe(glob2, options);
|
|
16102
16102
|
return regex.test(utils.basename(input));
|
|
16103
16103
|
};
|
|
16104
|
-
|
|
16105
|
-
|
|
16106
|
-
if (Array.isArray(pattern)) return pattern.map((p3) =>
|
|
16104
|
+
picomatch12.isMatch = (str, patterns, options) => picomatch12(patterns, options)(str);
|
|
16105
|
+
picomatch12.parse = (pattern, options) => {
|
|
16106
|
+
if (Array.isArray(pattern)) return pattern.map((p3) => picomatch12.parse(p3, options));
|
|
16107
16107
|
return parse16(pattern, { ...options, fastpaths: false });
|
|
16108
16108
|
};
|
|
16109
|
-
|
|
16110
|
-
|
|
16109
|
+
picomatch12.scan = (input, options) => scan(input, options);
|
|
16110
|
+
picomatch12.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
16111
16111
|
if (returnOutput === true) {
|
|
16112
16112
|
return state.output;
|
|
16113
16113
|
}
|
|
@@ -16118,13 +16118,13 @@ var require_picomatch = __commonJS({
|
|
|
16118
16118
|
if (state && state.negated === true) {
|
|
16119
16119
|
source = `^(?!${source}).*$`;
|
|
16120
16120
|
}
|
|
16121
|
-
const regex =
|
|
16121
|
+
const regex = picomatch12.toRegex(source, options);
|
|
16122
16122
|
if (returnState === true) {
|
|
16123
16123
|
regex.state = state;
|
|
16124
16124
|
}
|
|
16125
16125
|
return regex;
|
|
16126
16126
|
};
|
|
16127
|
-
|
|
16127
|
+
picomatch12.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
16128
16128
|
if (!input || typeof input !== "string") {
|
|
16129
16129
|
throw new TypeError("Expected a non-empty string");
|
|
16130
16130
|
}
|
|
@@ -16135,9 +16135,9 @@ var require_picomatch = __commonJS({
|
|
|
16135
16135
|
if (!parsed.output) {
|
|
16136
16136
|
parsed = parse16(input, options);
|
|
16137
16137
|
}
|
|
16138
|
-
return
|
|
16138
|
+
return picomatch12.compileRe(parsed, options, returnOutput, returnState);
|
|
16139
16139
|
};
|
|
16140
|
-
|
|
16140
|
+
picomatch12.toRegex = (source, options) => {
|
|
16141
16141
|
try {
|
|
16142
16142
|
const opts = options || {};
|
|
16143
16143
|
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
@@ -16146,8 +16146,8 @@ var require_picomatch = __commonJS({
|
|
|
16146
16146
|
return /$^/;
|
|
16147
16147
|
}
|
|
16148
16148
|
};
|
|
16149
|
-
|
|
16150
|
-
module2.exports =
|
|
16149
|
+
picomatch12.constants = constants4;
|
|
16150
|
+
module2.exports = picomatch12;
|
|
16151
16151
|
}
|
|
16152
16152
|
});
|
|
16153
16153
|
|
|
@@ -16157,14 +16157,14 @@ var require_picomatch2 = __commonJS({
|
|
|
16157
16157
|
"use strict";
|
|
16158
16158
|
var pico = require_picomatch();
|
|
16159
16159
|
var utils = require_utils();
|
|
16160
|
-
function
|
|
16160
|
+
function picomatch12(glob2, options, returnState = false) {
|
|
16161
16161
|
if (options && (options.windows === null || options.windows === void 0)) {
|
|
16162
16162
|
options = { ...options, windows: utils.isWindows() };
|
|
16163
16163
|
}
|
|
16164
16164
|
return pico(glob2, options, returnState);
|
|
16165
16165
|
}
|
|
16166
|
-
Object.assign(
|
|
16167
|
-
module2.exports =
|
|
16166
|
+
Object.assign(picomatch12, pico);
|
|
16167
|
+
module2.exports = picomatch12;
|
|
16168
16168
|
}
|
|
16169
16169
|
});
|
|
16170
16170
|
|
|
@@ -17960,7 +17960,7 @@ var require_ms2 = __commonJS({
|
|
|
17960
17960
|
var h = m4 * 60;
|
|
17961
17961
|
var d4 = h * 24;
|
|
17962
17962
|
var w = d4 * 7;
|
|
17963
|
-
var
|
|
17963
|
+
var y8 = d4 * 365.25;
|
|
17964
17964
|
module2.exports = function(val2, options) {
|
|
17965
17965
|
options = options || {};
|
|
17966
17966
|
var type = typeof val2;
|
|
@@ -17992,7 +17992,7 @@ var require_ms2 = __commonJS({
|
|
|
17992
17992
|
case "yrs":
|
|
17993
17993
|
case "yr":
|
|
17994
17994
|
case "y":
|
|
17995
|
-
return n2 *
|
|
17995
|
+
return n2 * y8;
|
|
17996
17996
|
case "weeks":
|
|
17997
17997
|
case "week":
|
|
17998
17998
|
case "w":
|
|
@@ -23202,16 +23202,16 @@ var require_conversions = __commonJS({
|
|
|
23202
23202
|
var b = rgb[2] / 255;
|
|
23203
23203
|
var c3;
|
|
23204
23204
|
var m4;
|
|
23205
|
-
var
|
|
23205
|
+
var y8;
|
|
23206
23206
|
var k;
|
|
23207
23207
|
k = Math.min(1 - r3, 1 - g, 1 - b);
|
|
23208
23208
|
c3 = (1 - r3 - k) / (1 - k) || 0;
|
|
23209
23209
|
m4 = (1 - g - k) / (1 - k) || 0;
|
|
23210
|
-
|
|
23211
|
-
return [c3 * 100, m4 * 100,
|
|
23210
|
+
y8 = (1 - b - k) / (1 - k) || 0;
|
|
23211
|
+
return [c3 * 100, m4 * 100, y8 * 100, k * 100];
|
|
23212
23212
|
};
|
|
23213
|
-
function comparativeDistance(x2,
|
|
23214
|
-
return Math.pow(x2[0] -
|
|
23213
|
+
function comparativeDistance(x2, y8) {
|
|
23214
|
+
return Math.pow(x2[0] - y8[0], 2) + Math.pow(x2[1] - y8[1], 2) + Math.pow(x2[2] - y8[2], 2);
|
|
23215
23215
|
}
|
|
23216
23216
|
convert.rgb.keyword = function(rgb) {
|
|
23217
23217
|
var reversed = reverseKeywords[rgb];
|
|
@@ -23243,27 +23243,27 @@ var require_conversions = __commonJS({
|
|
|
23243
23243
|
g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
|
|
23244
23244
|
b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
|
|
23245
23245
|
var x2 = r3 * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
23246
|
-
var
|
|
23246
|
+
var y8 = r3 * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
23247
23247
|
var z = r3 * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
23248
|
-
return [x2 * 100,
|
|
23248
|
+
return [x2 * 100, y8 * 100, z * 100];
|
|
23249
23249
|
};
|
|
23250
23250
|
convert.rgb.lab = function(rgb) {
|
|
23251
23251
|
var xyz = convert.rgb.xyz(rgb);
|
|
23252
23252
|
var x2 = xyz[0];
|
|
23253
|
-
var
|
|
23253
|
+
var y8 = xyz[1];
|
|
23254
23254
|
var z = xyz[2];
|
|
23255
23255
|
var l6;
|
|
23256
23256
|
var a4;
|
|
23257
23257
|
var b;
|
|
23258
23258
|
x2 /= 95.047;
|
|
23259
|
-
|
|
23259
|
+
y8 /= 100;
|
|
23260
23260
|
z /= 108.883;
|
|
23261
23261
|
x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
|
|
23262
|
-
|
|
23262
|
+
y8 = y8 > 8856e-6 ? Math.pow(y8, 1 / 3) : 7.787 * y8 + 16 / 116;
|
|
23263
23263
|
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
|
|
23264
|
-
l6 = 116 *
|
|
23265
|
-
a4 = 500 * (x2 -
|
|
23266
|
-
b = 200 * (
|
|
23264
|
+
l6 = 116 * y8 - 16;
|
|
23265
|
+
a4 = 500 * (x2 - y8);
|
|
23266
|
+
b = 200 * (y8 - z);
|
|
23267
23267
|
return [l6, a4, b];
|
|
23268
23268
|
};
|
|
23269
23269
|
convert.hsl.rgb = function(hsl) {
|
|
@@ -23327,10 +23327,10 @@ var require_conversions = __commonJS({
|
|
|
23327
23327
|
var s6 = hsv[1] / 100;
|
|
23328
23328
|
var v = hsv[2] / 100;
|
|
23329
23329
|
var hi = Math.floor(h) % 6;
|
|
23330
|
-
var
|
|
23330
|
+
var f5 = h - Math.floor(h);
|
|
23331
23331
|
var p3 = 255 * v * (1 - s6);
|
|
23332
|
-
var q5 = 255 * v * (1 - s6 *
|
|
23333
|
-
var t4 = 255 * v * (1 - s6 * (1 -
|
|
23332
|
+
var q5 = 255 * v * (1 - s6 * f5);
|
|
23333
|
+
var t4 = 255 * v * (1 - s6 * (1 - f5));
|
|
23334
23334
|
v *= 255;
|
|
23335
23335
|
switch (hi) {
|
|
23336
23336
|
case 0:
|
|
@@ -23370,7 +23370,7 @@ var require_conversions = __commonJS({
|
|
|
23370
23370
|
var ratio = wh + bl;
|
|
23371
23371
|
var i7;
|
|
23372
23372
|
var v;
|
|
23373
|
-
var
|
|
23373
|
+
var f5;
|
|
23374
23374
|
var n2;
|
|
23375
23375
|
if (ratio > 1) {
|
|
23376
23376
|
wh /= ratio;
|
|
@@ -23378,11 +23378,11 @@ var require_conversions = __commonJS({
|
|
|
23378
23378
|
}
|
|
23379
23379
|
i7 = Math.floor(6 * h);
|
|
23380
23380
|
v = 1 - bl;
|
|
23381
|
-
|
|
23381
|
+
f5 = 6 * h - i7;
|
|
23382
23382
|
if ((i7 & 1) !== 0) {
|
|
23383
|
-
|
|
23383
|
+
f5 = 1 - f5;
|
|
23384
23384
|
}
|
|
23385
|
-
n2 = wh +
|
|
23385
|
+
n2 = wh + f5 * (v - wh);
|
|
23386
23386
|
var r3;
|
|
23387
23387
|
var g;
|
|
23388
23388
|
var b;
|
|
@@ -23425,26 +23425,26 @@ var require_conversions = __commonJS({
|
|
|
23425
23425
|
convert.cmyk.rgb = function(cmyk) {
|
|
23426
23426
|
var c3 = cmyk[0] / 100;
|
|
23427
23427
|
var m4 = cmyk[1] / 100;
|
|
23428
|
-
var
|
|
23428
|
+
var y8 = cmyk[2] / 100;
|
|
23429
23429
|
var k = cmyk[3] / 100;
|
|
23430
23430
|
var r3;
|
|
23431
23431
|
var g;
|
|
23432
23432
|
var b;
|
|
23433
23433
|
r3 = 1 - Math.min(1, c3 * (1 - k) + k);
|
|
23434
23434
|
g = 1 - Math.min(1, m4 * (1 - k) + k);
|
|
23435
|
-
b = 1 - Math.min(1,
|
|
23435
|
+
b = 1 - Math.min(1, y8 * (1 - k) + k);
|
|
23436
23436
|
return [r3 * 255, g * 255, b * 255];
|
|
23437
23437
|
};
|
|
23438
23438
|
convert.xyz.rgb = function(xyz) {
|
|
23439
23439
|
var x2 = xyz[0] / 100;
|
|
23440
|
-
var
|
|
23440
|
+
var y8 = xyz[1] / 100;
|
|
23441
23441
|
var z = xyz[2] / 100;
|
|
23442
23442
|
var r3;
|
|
23443
23443
|
var g;
|
|
23444
23444
|
var b;
|
|
23445
|
-
r3 = x2 * 3.2406 +
|
|
23446
|
-
g = x2 * -0.9689 +
|
|
23447
|
-
b = x2 * 0.0557 +
|
|
23445
|
+
r3 = x2 * 3.2406 + y8 * -1.5372 + z * -0.4986;
|
|
23446
|
+
g = x2 * -0.9689 + y8 * 1.8758 + z * 0.0415;
|
|
23447
|
+
b = x2 * 0.0557 + y8 * -0.204 + z * 1.057;
|
|
23448
23448
|
r3 = r3 > 31308e-7 ? 1.055 * Math.pow(r3, 1 / 2.4) - 0.055 : r3 * 12.92;
|
|
23449
23449
|
g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
|
|
23450
23450
|
b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
|
|
@@ -23455,20 +23455,20 @@ var require_conversions = __commonJS({
|
|
|
23455
23455
|
};
|
|
23456
23456
|
convert.xyz.lab = function(xyz) {
|
|
23457
23457
|
var x2 = xyz[0];
|
|
23458
|
-
var
|
|
23458
|
+
var y8 = xyz[1];
|
|
23459
23459
|
var z = xyz[2];
|
|
23460
23460
|
var l6;
|
|
23461
23461
|
var a4;
|
|
23462
23462
|
var b;
|
|
23463
23463
|
x2 /= 95.047;
|
|
23464
|
-
|
|
23464
|
+
y8 /= 100;
|
|
23465
23465
|
z /= 108.883;
|
|
23466
23466
|
x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
|
|
23467
|
-
|
|
23467
|
+
y8 = y8 > 8856e-6 ? Math.pow(y8, 1 / 3) : 7.787 * y8 + 16 / 116;
|
|
23468
23468
|
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
|
|
23469
|
-
l6 = 116 *
|
|
23470
|
-
a4 = 500 * (x2 -
|
|
23471
|
-
b = 200 * (
|
|
23469
|
+
l6 = 116 * y8 - 16;
|
|
23470
|
+
a4 = 500 * (x2 - y8);
|
|
23471
|
+
b = 200 * (y8 - z);
|
|
23472
23472
|
return [l6, a4, b];
|
|
23473
23473
|
};
|
|
23474
23474
|
convert.lab.xyz = function(lab) {
|
|
@@ -23476,21 +23476,21 @@ var require_conversions = __commonJS({
|
|
|
23476
23476
|
var a4 = lab[1];
|
|
23477
23477
|
var b = lab[2];
|
|
23478
23478
|
var x2;
|
|
23479
|
-
var
|
|
23479
|
+
var y8;
|
|
23480
23480
|
var z;
|
|
23481
|
-
|
|
23482
|
-
x2 = a4 / 500 +
|
|
23483
|
-
z =
|
|
23484
|
-
var y22 = Math.pow(
|
|
23481
|
+
y8 = (l6 + 16) / 116;
|
|
23482
|
+
x2 = a4 / 500 + y8;
|
|
23483
|
+
z = y8 - b / 200;
|
|
23484
|
+
var y22 = Math.pow(y8, 3);
|
|
23485
23485
|
var x22 = Math.pow(x2, 3);
|
|
23486
23486
|
var z2 = Math.pow(z, 3);
|
|
23487
|
-
|
|
23487
|
+
y8 = y22 > 8856e-6 ? y22 : (y8 - 16 / 116) / 7.787;
|
|
23488
23488
|
x2 = x22 > 8856e-6 ? x22 : (x2 - 16 / 116) / 7.787;
|
|
23489
23489
|
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
|
23490
23490
|
x2 *= 95.047;
|
|
23491
|
-
|
|
23491
|
+
y8 *= 100;
|
|
23492
23492
|
z *= 108.883;
|
|
23493
|
-
return [x2,
|
|
23493
|
+
return [x2, y8, z];
|
|
23494
23494
|
};
|
|
23495
23495
|
convert.lab.lch = function(lab) {
|
|
23496
23496
|
var l6 = lab[0];
|
|
@@ -23633,26 +23633,26 @@ var require_conversions = __commonJS({
|
|
|
23633
23633
|
var s6 = hsl[1] / 100;
|
|
23634
23634
|
var l6 = hsl[2] / 100;
|
|
23635
23635
|
var c3 = 1;
|
|
23636
|
-
var
|
|
23636
|
+
var f5 = 0;
|
|
23637
23637
|
if (l6 < 0.5) {
|
|
23638
23638
|
c3 = 2 * s6 * l6;
|
|
23639
23639
|
} else {
|
|
23640
23640
|
c3 = 2 * s6 * (1 - l6);
|
|
23641
23641
|
}
|
|
23642
23642
|
if (c3 < 1) {
|
|
23643
|
-
|
|
23643
|
+
f5 = (l6 - 0.5 * c3) / (1 - c3);
|
|
23644
23644
|
}
|
|
23645
|
-
return [hsl[0], c3 * 100,
|
|
23645
|
+
return [hsl[0], c3 * 100, f5 * 100];
|
|
23646
23646
|
};
|
|
23647
23647
|
convert.hsv.hcg = function(hsv) {
|
|
23648
23648
|
var s6 = hsv[1] / 100;
|
|
23649
23649
|
var v = hsv[2] / 100;
|
|
23650
23650
|
var c3 = s6 * v;
|
|
23651
|
-
var
|
|
23651
|
+
var f5 = 0;
|
|
23652
23652
|
if (c3 < 1) {
|
|
23653
|
-
|
|
23653
|
+
f5 = (v - c3) / (1 - c3);
|
|
23654
23654
|
}
|
|
23655
|
-
return [hsv[0], c3 * 100,
|
|
23655
|
+
return [hsv[0], c3 * 100, f5 * 100];
|
|
23656
23656
|
};
|
|
23657
23657
|
convert.hcg.rgb = function(hcg) {
|
|
23658
23658
|
var h = hcg[0] / 360;
|
|
@@ -23708,11 +23708,11 @@ var require_conversions = __commonJS({
|
|
|
23708
23708
|
var c3 = hcg[1] / 100;
|
|
23709
23709
|
var g = hcg[2] / 100;
|
|
23710
23710
|
var v = c3 + g * (1 - c3);
|
|
23711
|
-
var
|
|
23711
|
+
var f5 = 0;
|
|
23712
23712
|
if (v > 0) {
|
|
23713
|
-
|
|
23713
|
+
f5 = c3 / v;
|
|
23714
23714
|
}
|
|
23715
|
-
return [hcg[0],
|
|
23715
|
+
return [hcg[0], f5 * 100, v * 100];
|
|
23716
23716
|
};
|
|
23717
23717
|
convert.hcg.hsl = function(hcg) {
|
|
23718
23718
|
var c3 = hcg[1] / 100;
|
|
@@ -32800,11 +32800,11 @@ var require_conversions2 = __commonJS({
|
|
|
32800
32800
|
const k = Math.min(1 - r3, 1 - g, 1 - b);
|
|
32801
32801
|
const c3 = (1 - r3 - k) / (1 - k) || 0;
|
|
32802
32802
|
const m4 = (1 - g - k) / (1 - k) || 0;
|
|
32803
|
-
const
|
|
32804
|
-
return [c3 * 100, m4 * 100,
|
|
32803
|
+
const y8 = (1 - b - k) / (1 - k) || 0;
|
|
32804
|
+
return [c3 * 100, m4 * 100, y8 * 100, k * 100];
|
|
32805
32805
|
};
|
|
32806
|
-
function comparativeDistance(x2,
|
|
32807
|
-
return (x2[0] -
|
|
32806
|
+
function comparativeDistance(x2, y8) {
|
|
32807
|
+
return (x2[0] - y8[0]) ** 2 + (x2[1] - y8[1]) ** 2 + (x2[2] - y8[2]) ** 2;
|
|
32808
32808
|
}
|
|
32809
32809
|
convert.rgb.keyword = function(rgb) {
|
|
32810
32810
|
const reversed = reverseKeywords[rgb];
|
|
@@ -32834,24 +32834,24 @@ var require_conversions2 = __commonJS({
|
|
|
32834
32834
|
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
32835
32835
|
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
32836
32836
|
const x2 = r3 * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
32837
|
-
const
|
|
32837
|
+
const y8 = r3 * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
32838
32838
|
const z = r3 * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
32839
|
-
return [x2 * 100,
|
|
32839
|
+
return [x2 * 100, y8 * 100, z * 100];
|
|
32840
32840
|
};
|
|
32841
32841
|
convert.rgb.lab = function(rgb) {
|
|
32842
32842
|
const xyz = convert.rgb.xyz(rgb);
|
|
32843
32843
|
let x2 = xyz[0];
|
|
32844
|
-
let
|
|
32844
|
+
let y8 = xyz[1];
|
|
32845
32845
|
let z = xyz[2];
|
|
32846
32846
|
x2 /= 95.047;
|
|
32847
|
-
|
|
32847
|
+
y8 /= 100;
|
|
32848
32848
|
z /= 108.883;
|
|
32849
32849
|
x2 = x2 > 8856e-6 ? x2 ** (1 / 3) : 7.787 * x2 + 16 / 116;
|
|
32850
|
-
|
|
32850
|
+
y8 = y8 > 8856e-6 ? y8 ** (1 / 3) : 7.787 * y8 + 16 / 116;
|
|
32851
32851
|
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
32852
|
-
const l6 = 116 *
|
|
32853
|
-
const a4 = 500 * (x2 -
|
|
32854
|
-
const b = 200 * (
|
|
32852
|
+
const l6 = 116 * y8 - 16;
|
|
32853
|
+
const a4 = 500 * (x2 - y8);
|
|
32854
|
+
const b = 200 * (y8 - z);
|
|
32855
32855
|
return [l6, a4, b];
|
|
32856
32856
|
};
|
|
32857
32857
|
convert.hsl.rgb = function(hsl) {
|
|
@@ -32911,10 +32911,10 @@ var require_conversions2 = __commonJS({
|
|
|
32911
32911
|
const s6 = hsv[1] / 100;
|
|
32912
32912
|
let v = hsv[2] / 100;
|
|
32913
32913
|
const hi = Math.floor(h) % 6;
|
|
32914
|
-
const
|
|
32914
|
+
const f5 = h - Math.floor(h);
|
|
32915
32915
|
const p3 = 255 * v * (1 - s6);
|
|
32916
|
-
const q5 = 255 * v * (1 - s6 *
|
|
32917
|
-
const t4 = 255 * v * (1 - s6 * (1 -
|
|
32916
|
+
const q5 = 255 * v * (1 - s6 * f5);
|
|
32917
|
+
const t4 = 255 * v * (1 - s6 * (1 - f5));
|
|
32918
32918
|
v *= 255;
|
|
32919
32919
|
switch (hi) {
|
|
32920
32920
|
case 0:
|
|
@@ -32951,18 +32951,18 @@ var require_conversions2 = __commonJS({
|
|
|
32951
32951
|
let wh = hwb[1] / 100;
|
|
32952
32952
|
let bl = hwb[2] / 100;
|
|
32953
32953
|
const ratio = wh + bl;
|
|
32954
|
-
let
|
|
32954
|
+
let f5;
|
|
32955
32955
|
if (ratio > 1) {
|
|
32956
32956
|
wh /= ratio;
|
|
32957
32957
|
bl /= ratio;
|
|
32958
32958
|
}
|
|
32959
32959
|
const i7 = Math.floor(6 * h);
|
|
32960
32960
|
const v = 1 - bl;
|
|
32961
|
-
|
|
32961
|
+
f5 = 6 * h - i7;
|
|
32962
32962
|
if ((i7 & 1) !== 0) {
|
|
32963
|
-
|
|
32963
|
+
f5 = 1 - f5;
|
|
32964
32964
|
}
|
|
32965
|
-
const n2 = wh +
|
|
32965
|
+
const n2 = wh + f5 * (v - wh);
|
|
32966
32966
|
let r3;
|
|
32967
32967
|
let g;
|
|
32968
32968
|
let b;
|
|
@@ -33005,23 +33005,23 @@ var require_conversions2 = __commonJS({
|
|
|
33005
33005
|
convert.cmyk.rgb = function(cmyk) {
|
|
33006
33006
|
const c3 = cmyk[0] / 100;
|
|
33007
33007
|
const m4 = cmyk[1] / 100;
|
|
33008
|
-
const
|
|
33008
|
+
const y8 = cmyk[2] / 100;
|
|
33009
33009
|
const k = cmyk[3] / 100;
|
|
33010
33010
|
const r3 = 1 - Math.min(1, c3 * (1 - k) + k);
|
|
33011
33011
|
const g = 1 - Math.min(1, m4 * (1 - k) + k);
|
|
33012
|
-
const b = 1 - Math.min(1,
|
|
33012
|
+
const b = 1 - Math.min(1, y8 * (1 - k) + k);
|
|
33013
33013
|
return [r3 * 255, g * 255, b * 255];
|
|
33014
33014
|
};
|
|
33015
33015
|
convert.xyz.rgb = function(xyz) {
|
|
33016
33016
|
const x2 = xyz[0] / 100;
|
|
33017
|
-
const
|
|
33017
|
+
const y8 = xyz[1] / 100;
|
|
33018
33018
|
const z = xyz[2] / 100;
|
|
33019
33019
|
let r3;
|
|
33020
33020
|
let g;
|
|
33021
33021
|
let b;
|
|
33022
|
-
r3 = x2 * 3.2406 +
|
|
33023
|
-
g = x2 * -0.9689 +
|
|
33024
|
-
b = x2 * 0.0557 +
|
|
33022
|
+
r3 = x2 * 3.2406 + y8 * -1.5372 + z * -0.4986;
|
|
33023
|
+
g = x2 * -0.9689 + y8 * 1.8758 + z * 0.0415;
|
|
33024
|
+
b = x2 * 0.0557 + y8 * -0.204 + z * 1.057;
|
|
33025
33025
|
r3 = r3 > 31308e-7 ? 1.055 * r3 ** (1 / 2.4) - 0.055 : r3 * 12.92;
|
|
33026
33026
|
g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
|
33027
33027
|
b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
|
@@ -33032,17 +33032,17 @@ var require_conversions2 = __commonJS({
|
|
|
33032
33032
|
};
|
|
33033
33033
|
convert.xyz.lab = function(xyz) {
|
|
33034
33034
|
let x2 = xyz[0];
|
|
33035
|
-
let
|
|
33035
|
+
let y8 = xyz[1];
|
|
33036
33036
|
let z = xyz[2];
|
|
33037
33037
|
x2 /= 95.047;
|
|
33038
|
-
|
|
33038
|
+
y8 /= 100;
|
|
33039
33039
|
z /= 108.883;
|
|
33040
33040
|
x2 = x2 > 8856e-6 ? x2 ** (1 / 3) : 7.787 * x2 + 16 / 116;
|
|
33041
|
-
|
|
33041
|
+
y8 = y8 > 8856e-6 ? y8 ** (1 / 3) : 7.787 * y8 + 16 / 116;
|
|
33042
33042
|
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
33043
|
-
const l6 = 116 *
|
|
33044
|
-
const a4 = 500 * (x2 -
|
|
33045
|
-
const b = 200 * (
|
|
33043
|
+
const l6 = 116 * y8 - 16;
|
|
33044
|
+
const a4 = 500 * (x2 - y8);
|
|
33045
|
+
const b = 200 * (y8 - z);
|
|
33046
33046
|
return [l6, a4, b];
|
|
33047
33047
|
};
|
|
33048
33048
|
convert.lab.xyz = function(lab) {
|
|
@@ -33050,21 +33050,21 @@ var require_conversions2 = __commonJS({
|
|
|
33050
33050
|
const a4 = lab[1];
|
|
33051
33051
|
const b = lab[2];
|
|
33052
33052
|
let x2;
|
|
33053
|
-
let
|
|
33053
|
+
let y8;
|
|
33054
33054
|
let z;
|
|
33055
|
-
|
|
33056
|
-
x2 = a4 / 500 +
|
|
33057
|
-
z =
|
|
33058
|
-
const y22 =
|
|
33055
|
+
y8 = (l6 + 16) / 116;
|
|
33056
|
+
x2 = a4 / 500 + y8;
|
|
33057
|
+
z = y8 - b / 200;
|
|
33058
|
+
const y22 = y8 ** 3;
|
|
33059
33059
|
const x22 = x2 ** 3;
|
|
33060
33060
|
const z2 = z ** 3;
|
|
33061
|
-
|
|
33061
|
+
y8 = y22 > 8856e-6 ? y22 : (y8 - 16 / 116) / 7.787;
|
|
33062
33062
|
x2 = x22 > 8856e-6 ? x22 : (x2 - 16 / 116) / 7.787;
|
|
33063
33063
|
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
|
33064
33064
|
x2 *= 95.047;
|
|
33065
|
-
|
|
33065
|
+
y8 *= 100;
|
|
33066
33066
|
z *= 108.883;
|
|
33067
|
-
return [x2,
|
|
33067
|
+
return [x2, y8, z];
|
|
33068
33068
|
};
|
|
33069
33069
|
convert.lab.lch = function(lab) {
|
|
33070
33070
|
const l6 = lab[0];
|
|
@@ -33200,21 +33200,21 @@ var require_conversions2 = __commonJS({
|
|
|
33200
33200
|
const s6 = hsl[1] / 100;
|
|
33201
33201
|
const l6 = hsl[2] / 100;
|
|
33202
33202
|
const c3 = l6 < 0.5 ? 2 * s6 * l6 : 2 * s6 * (1 - l6);
|
|
33203
|
-
let
|
|
33203
|
+
let f5 = 0;
|
|
33204
33204
|
if (c3 < 1) {
|
|
33205
|
-
|
|
33205
|
+
f5 = (l6 - 0.5 * c3) / (1 - c3);
|
|
33206
33206
|
}
|
|
33207
|
-
return [hsl[0], c3 * 100,
|
|
33207
|
+
return [hsl[0], c3 * 100, f5 * 100];
|
|
33208
33208
|
};
|
|
33209
33209
|
convert.hsv.hcg = function(hsv) {
|
|
33210
33210
|
const s6 = hsv[1] / 100;
|
|
33211
33211
|
const v = hsv[2] / 100;
|
|
33212
33212
|
const c3 = s6 * v;
|
|
33213
|
-
let
|
|
33213
|
+
let f5 = 0;
|
|
33214
33214
|
if (c3 < 1) {
|
|
33215
|
-
|
|
33215
|
+
f5 = (v - c3) / (1 - c3);
|
|
33216
33216
|
}
|
|
33217
|
-
return [hsv[0], c3 * 100,
|
|
33217
|
+
return [hsv[0], c3 * 100, f5 * 100];
|
|
33218
33218
|
};
|
|
33219
33219
|
convert.hcg.rgb = function(hcg) {
|
|
33220
33220
|
const h = hcg[0] / 360;
|
|
@@ -33270,11 +33270,11 @@ var require_conversions2 = __commonJS({
|
|
|
33270
33270
|
const c3 = hcg[1] / 100;
|
|
33271
33271
|
const g = hcg[2] / 100;
|
|
33272
33272
|
const v = c3 + g * (1 - c3);
|
|
33273
|
-
let
|
|
33273
|
+
let f5 = 0;
|
|
33274
33274
|
if (v > 0) {
|
|
33275
|
-
|
|
33275
|
+
f5 = c3 / v;
|
|
33276
33276
|
}
|
|
33277
|
-
return [hcg[0],
|
|
33277
|
+
return [hcg[0], f5 * 100, v * 100];
|
|
33278
33278
|
};
|
|
33279
33279
|
convert.hcg.hsl = function(hcg) {
|
|
33280
33280
|
const c3 = hcg[1] / 100;
|
|
@@ -39550,9 +39550,9 @@ var require_picomatch3 = __commonJS({
|
|
|
39550
39550
|
var utils = require_utils3();
|
|
39551
39551
|
var constants4 = require_constants3();
|
|
39552
39552
|
var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2);
|
|
39553
|
-
var
|
|
39553
|
+
var picomatch12 = (glob2, options, returnState = false) => {
|
|
39554
39554
|
if (Array.isArray(glob2)) {
|
|
39555
|
-
const fns = glob2.map((input) =>
|
|
39555
|
+
const fns = glob2.map((input) => picomatch12(input, options, returnState));
|
|
39556
39556
|
const arrayMatcher = (str) => {
|
|
39557
39557
|
for (const isMatch4 of fns) {
|
|
39558
39558
|
const state2 = isMatch4(str);
|
|
@@ -39568,16 +39568,16 @@ var require_picomatch3 = __commonJS({
|
|
|
39568
39568
|
}
|
|
39569
39569
|
const opts = options || {};
|
|
39570
39570
|
const posix3 = utils.isWindows(options);
|
|
39571
|
-
const regex = isState ?
|
|
39571
|
+
const regex = isState ? picomatch12.compileRe(glob2, options) : picomatch12.makeRe(glob2, options, false, true);
|
|
39572
39572
|
const state = regex.state;
|
|
39573
39573
|
delete regex.state;
|
|
39574
39574
|
let isIgnored = () => false;
|
|
39575
39575
|
if (opts.ignore) {
|
|
39576
39576
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
39577
|
-
isIgnored =
|
|
39577
|
+
isIgnored = picomatch12(opts.ignore, ignoreOpts, returnState);
|
|
39578
39578
|
}
|
|
39579
39579
|
const matcher = (input, returnObject = false) => {
|
|
39580
|
-
const { isMatch: isMatch4, match: match2, output } =
|
|
39580
|
+
const { isMatch: isMatch4, match: match2, output } = picomatch12.test(input, regex, options, { glob: glob2, posix: posix3 });
|
|
39581
39581
|
const result = { glob: glob2, state, regex, posix: posix3, input, output, match: match2, isMatch: isMatch4 };
|
|
39582
39582
|
if (typeof opts.onResult === "function") {
|
|
39583
39583
|
opts.onResult(result);
|
|
@@ -39603,7 +39603,7 @@ var require_picomatch3 = __commonJS({
|
|
|
39603
39603
|
}
|
|
39604
39604
|
return matcher;
|
|
39605
39605
|
};
|
|
39606
|
-
|
|
39606
|
+
picomatch12.test = (input, regex, options, { glob: glob2, posix: posix3 } = {}) => {
|
|
39607
39607
|
if (typeof input !== "string") {
|
|
39608
39608
|
throw new TypeError("Expected input to be a string");
|
|
39609
39609
|
}
|
|
@@ -39620,24 +39620,24 @@ var require_picomatch3 = __commonJS({
|
|
|
39620
39620
|
}
|
|
39621
39621
|
if (match2 === false || opts.capture === true) {
|
|
39622
39622
|
if (opts.matchBase === true || opts.basename === true) {
|
|
39623
|
-
match2 =
|
|
39623
|
+
match2 = picomatch12.matchBase(input, regex, options, posix3);
|
|
39624
39624
|
} else {
|
|
39625
39625
|
match2 = regex.exec(output);
|
|
39626
39626
|
}
|
|
39627
39627
|
}
|
|
39628
39628
|
return { isMatch: Boolean(match2), match: match2, output };
|
|
39629
39629
|
};
|
|
39630
|
-
|
|
39631
|
-
const regex = glob2 instanceof RegExp ? glob2 :
|
|
39630
|
+
picomatch12.matchBase = (input, glob2, options, posix3 = utils.isWindows(options)) => {
|
|
39631
|
+
const regex = glob2 instanceof RegExp ? glob2 : picomatch12.makeRe(glob2, options);
|
|
39632
39632
|
return regex.test(path9.basename(input));
|
|
39633
39633
|
};
|
|
39634
|
-
|
|
39635
|
-
|
|
39636
|
-
if (Array.isArray(pattern)) return pattern.map((p3) =>
|
|
39634
|
+
picomatch12.isMatch = (str, patterns, options) => picomatch12(patterns, options)(str);
|
|
39635
|
+
picomatch12.parse = (pattern, options) => {
|
|
39636
|
+
if (Array.isArray(pattern)) return pattern.map((p3) => picomatch12.parse(p3, options));
|
|
39637
39637
|
return parse16(pattern, { ...options, fastpaths: false });
|
|
39638
39638
|
};
|
|
39639
|
-
|
|
39640
|
-
|
|
39639
|
+
picomatch12.scan = (input, options) => scan(input, options);
|
|
39640
|
+
picomatch12.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
39641
39641
|
if (returnOutput === true) {
|
|
39642
39642
|
return state.output;
|
|
39643
39643
|
}
|
|
@@ -39648,13 +39648,13 @@ var require_picomatch3 = __commonJS({
|
|
|
39648
39648
|
if (state && state.negated === true) {
|
|
39649
39649
|
source = `^(?!${source}).*$`;
|
|
39650
39650
|
}
|
|
39651
|
-
const regex =
|
|
39651
|
+
const regex = picomatch12.toRegex(source, options);
|
|
39652
39652
|
if (returnState === true) {
|
|
39653
39653
|
regex.state = state;
|
|
39654
39654
|
}
|
|
39655
39655
|
return regex;
|
|
39656
39656
|
};
|
|
39657
|
-
|
|
39657
|
+
picomatch12.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
39658
39658
|
if (!input || typeof input !== "string") {
|
|
39659
39659
|
throw new TypeError("Expected a non-empty string");
|
|
39660
39660
|
}
|
|
@@ -39665,9 +39665,9 @@ var require_picomatch3 = __commonJS({
|
|
|
39665
39665
|
if (!parsed.output) {
|
|
39666
39666
|
parsed = parse16(input, options);
|
|
39667
39667
|
}
|
|
39668
|
-
return
|
|
39668
|
+
return picomatch12.compileRe(parsed, options, returnOutput, returnState);
|
|
39669
39669
|
};
|
|
39670
|
-
|
|
39670
|
+
picomatch12.toRegex = (source, options) => {
|
|
39671
39671
|
try {
|
|
39672
39672
|
const opts = options || {};
|
|
39673
39673
|
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
@@ -39676,8 +39676,8 @@ var require_picomatch3 = __commonJS({
|
|
|
39676
39676
|
return /$^/;
|
|
39677
39677
|
}
|
|
39678
39678
|
};
|
|
39679
|
-
|
|
39680
|
-
module2.exports =
|
|
39679
|
+
picomatch12.constants = constants4;
|
|
39680
|
+
module2.exports = picomatch12;
|
|
39681
39681
|
}
|
|
39682
39682
|
});
|
|
39683
39683
|
|
|
@@ -39695,7 +39695,7 @@ var require_micromatch = __commonJS({
|
|
|
39695
39695
|
"use strict";
|
|
39696
39696
|
var util5 = __require("util");
|
|
39697
39697
|
var braces = require_braces();
|
|
39698
|
-
var
|
|
39698
|
+
var picomatch12 = require_picomatch4();
|
|
39699
39699
|
var utils = require_utils3();
|
|
39700
39700
|
var isEmptyString = (val2) => val2 === "" || val2 === "./";
|
|
39701
39701
|
var micromatch4 = (list2, patterns, options) => {
|
|
@@ -39712,7 +39712,7 @@ var require_micromatch = __commonJS({
|
|
|
39712
39712
|
}
|
|
39713
39713
|
};
|
|
39714
39714
|
for (let i7 = 0; i7 < patterns.length; i7++) {
|
|
39715
|
-
let isMatch4 =
|
|
39715
|
+
let isMatch4 = picomatch12(String(patterns[i7]), { ...options, onResult }, true);
|
|
39716
39716
|
let negated = isMatch4.state.negated || isMatch4.state.negatedExtglob;
|
|
39717
39717
|
if (negated) negatives++;
|
|
39718
39718
|
for (let item of list2) {
|
|
@@ -39740,8 +39740,8 @@ var require_micromatch = __commonJS({
|
|
|
39740
39740
|
return matches;
|
|
39741
39741
|
};
|
|
39742
39742
|
micromatch4.match = micromatch4;
|
|
39743
|
-
micromatch4.matcher = (pattern, options) =>
|
|
39744
|
-
micromatch4.isMatch = (str, patterns, options) =>
|
|
39743
|
+
micromatch4.matcher = (pattern, options) => picomatch12(pattern, options);
|
|
39744
|
+
micromatch4.isMatch = (str, patterns, options) => picomatch12(patterns, options)(str);
|
|
39745
39745
|
micromatch4.any = micromatch4.isMatch;
|
|
39746
39746
|
micromatch4.not = (list2, patterns, options = {}) => {
|
|
39747
39747
|
patterns = [].concat(patterns).map(String);
|
|
@@ -39788,7 +39788,7 @@ var require_micromatch = __commonJS({
|
|
|
39788
39788
|
micromatch4.some = (list2, patterns, options) => {
|
|
39789
39789
|
let items = [].concat(list2);
|
|
39790
39790
|
for (let pattern of [].concat(patterns)) {
|
|
39791
|
-
let isMatch4 =
|
|
39791
|
+
let isMatch4 = picomatch12(String(pattern), options);
|
|
39792
39792
|
if (items.some((item) => isMatch4(item))) {
|
|
39793
39793
|
return true;
|
|
39794
39794
|
}
|
|
@@ -39798,7 +39798,7 @@ var require_micromatch = __commonJS({
|
|
|
39798
39798
|
micromatch4.every = (list2, patterns, options) => {
|
|
39799
39799
|
let items = [].concat(list2);
|
|
39800
39800
|
for (let pattern of [].concat(patterns)) {
|
|
39801
|
-
let isMatch4 =
|
|
39801
|
+
let isMatch4 = picomatch12(String(pattern), options);
|
|
39802
39802
|
if (!items.every((item) => isMatch4(item))) {
|
|
39803
39803
|
return false;
|
|
39804
39804
|
}
|
|
@@ -39809,23 +39809,23 @@ var require_micromatch = __commonJS({
|
|
|
39809
39809
|
if (typeof str !== "string") {
|
|
39810
39810
|
throw new TypeError(`Expected a string: "${util5.inspect(str)}"`);
|
|
39811
39811
|
}
|
|
39812
|
-
return [].concat(patterns).every((p3) =>
|
|
39812
|
+
return [].concat(patterns).every((p3) => picomatch12(p3, options)(str));
|
|
39813
39813
|
};
|
|
39814
39814
|
micromatch4.capture = (glob2, input, options) => {
|
|
39815
39815
|
let posix3 = utils.isWindows(options);
|
|
39816
|
-
let regex =
|
|
39816
|
+
let regex = picomatch12.makeRe(String(glob2), { ...options, capture: true });
|
|
39817
39817
|
let match2 = regex.exec(posix3 ? utils.toPosixSlashes(input) : input);
|
|
39818
39818
|
if (match2) {
|
|
39819
39819
|
return match2.slice(1).map((v) => v === void 0 ? "" : v);
|
|
39820
39820
|
}
|
|
39821
39821
|
};
|
|
39822
|
-
micromatch4.makeRe = (...args2) =>
|
|
39823
|
-
micromatch4.scan = (...args2) =>
|
|
39822
|
+
micromatch4.makeRe = (...args2) => picomatch12.makeRe(...args2);
|
|
39823
|
+
micromatch4.scan = (...args2) => picomatch12.scan(...args2);
|
|
39824
39824
|
micromatch4.parse = (patterns, options) => {
|
|
39825
39825
|
let res = [];
|
|
39826
39826
|
for (let pattern of [].concat(patterns || [])) {
|
|
39827
39827
|
for (let str of braces(String(pattern), options)) {
|
|
39828
|
-
res.push(
|
|
39828
|
+
res.push(picomatch12.parse(str, options));
|
|
39829
39829
|
}
|
|
39830
39830
|
}
|
|
39831
39831
|
return res;
|
|
@@ -42465,10 +42465,10 @@ var require_rules = __commonJS({
|
|
|
42465
42465
|
t: "fallback",
|
|
42466
42466
|
chunk: null
|
|
42467
42467
|
};
|
|
42468
|
-
function compareChunksByValue(x2,
|
|
42469
|
-
if (typeof x2.chunk === "string" && typeof
|
|
42468
|
+
function compareChunksByValue(x2, y8) {
|
|
42469
|
+
if (typeof x2.chunk === "string" && typeof y8.chunk === "string") {
|
|
42470
42470
|
const xChunk = x2.chunk;
|
|
42471
|
-
const yChunk =
|
|
42471
|
+
const yChunk = y8.chunk;
|
|
42472
42472
|
if (yChunk < xChunk) {
|
|
42473
42473
|
return 1;
|
|
42474
42474
|
} else if (xChunk < yChunk) {
|
|
@@ -42477,10 +42477,10 @@ var require_rules = __commonJS({
|
|
|
42477
42477
|
}
|
|
42478
42478
|
return 0;
|
|
42479
42479
|
}
|
|
42480
|
-
function compareChunksByInclusion(x2,
|
|
42481
|
-
if (typeof x2.chunk === "string" && typeof
|
|
42480
|
+
function compareChunksByInclusion(x2, y8) {
|
|
42481
|
+
if (typeof x2.chunk === "string" && typeof y8.chunk === "string") {
|
|
42482
42482
|
const xChunk = x2.chunk;
|
|
42483
|
-
const yChunk =
|
|
42483
|
+
const yChunk = y8.chunk;
|
|
42484
42484
|
if (yChunk.startsWith(xChunk)) {
|
|
42485
42485
|
return 1;
|
|
42486
42486
|
} else if (xChunk.startsWith(yChunk)) {
|
|
@@ -42509,8 +42509,8 @@ var require_rules = __commonJS({
|
|
|
42509
42509
|
otherRules.push(rule);
|
|
42510
42510
|
}
|
|
42511
42511
|
}
|
|
42512
|
-
chunkRules.sort((x2,
|
|
42513
|
-
chunkRules.sort((x2,
|
|
42512
|
+
chunkRules.sort((x2, y8) => compareChunksByValue(x2, y8));
|
|
42513
|
+
chunkRules.sort((x2, y8) => compareChunksByInclusion(x2, y8));
|
|
42514
42514
|
const res = [...numberRules, ...chunkRules, ...otherRules, ...fallbackRules];
|
|
42515
42515
|
return res;
|
|
42516
42516
|
}
|
|
@@ -43297,11 +43297,11 @@ var require_lib = __commonJS({
|
|
|
43297
43297
|
inotify_dispatch(listeners[e.id], e);
|
|
43298
43298
|
inotify_dispatch(listeners[EVENT_ALL], e);
|
|
43299
43299
|
},
|
|
43300
|
-
__listener(listeners,
|
|
43300
|
+
__listener(listeners, f5, scope) {
|
|
43301
43301
|
let i7 = listeners.length;
|
|
43302
43302
|
while (--i7 >= 0) {
|
|
43303
43303
|
const l6 = listeners[i7];
|
|
43304
|
-
if (l6[0] ===
|
|
43304
|
+
if (l6[0] === f5 && l6[1] === scope) {
|
|
43305
43305
|
break;
|
|
43306
43306
|
}
|
|
43307
43307
|
}
|
|
@@ -43407,23 +43407,23 @@ var require_lib2 = __commonJS({
|
|
|
43407
43407
|
var getKey = (k) => typeof k === "function" ? k : (x2) => x2[k];
|
|
43408
43408
|
function compareByKey(a4, cmp = compare) {
|
|
43409
43409
|
const k = getKey(a4);
|
|
43410
|
-
return (x2,
|
|
43410
|
+
return (x2, y8) => cmp(k(x2), k(y8));
|
|
43411
43411
|
}
|
|
43412
43412
|
function compareByKeys2(a4, b, cmpA = compare, cmpB = compare) {
|
|
43413
43413
|
const ka = getKey(a4);
|
|
43414
43414
|
const kb = getKey(b);
|
|
43415
|
-
return (x2,
|
|
43416
|
-
let res = cmpA(ka(x2), ka(
|
|
43417
|
-
return res === 0 ? cmpB(kb(x2), kb(
|
|
43415
|
+
return (x2, y8) => {
|
|
43416
|
+
let res = cmpA(ka(x2), ka(y8));
|
|
43417
|
+
return res === 0 ? cmpB(kb(x2), kb(y8)) : res;
|
|
43418
43418
|
};
|
|
43419
43419
|
}
|
|
43420
43420
|
function compareByKeys3(a4, b, c3, cmpA = compare, cmpB = compare, cmpC = compare) {
|
|
43421
43421
|
const ka = getKey(a4);
|
|
43422
43422
|
const kb = getKey(b);
|
|
43423
43423
|
const kc = getKey(c3);
|
|
43424
|
-
return (x2,
|
|
43425
|
-
let res = cmpA(ka(x2), ka(
|
|
43426
|
-
return res === 0 ? (res = cmpB(kb(x2), kb(
|
|
43424
|
+
return (x2, y8) => {
|
|
43425
|
+
let res = cmpA(ka(x2), ka(y8));
|
|
43426
|
+
return res === 0 ? (res = cmpB(kb(x2), kb(y8))) === 0 ? cmpC(kc(x2), kc(y8)) : res : res;
|
|
43427
43427
|
};
|
|
43428
43428
|
}
|
|
43429
43429
|
function compareByKeys4(a4, b, c3, d4, cmpA = compare, cmpB = compare, cmpC = compare, cmpD = compare) {
|
|
@@ -43431,9 +43431,9 @@ var require_lib2 = __commonJS({
|
|
|
43431
43431
|
const kb = getKey(b);
|
|
43432
43432
|
const kc = getKey(c3);
|
|
43433
43433
|
const kd = getKey(d4);
|
|
43434
|
-
return (x2,
|
|
43435
|
-
let res = cmpA(ka(x2), ka(
|
|
43436
|
-
return res === 0 ? (res = cmpB(kb(x2), kb(
|
|
43434
|
+
return (x2, y8) => {
|
|
43435
|
+
let res = cmpA(ka(x2), ka(y8));
|
|
43436
|
+
return res === 0 ? (res = cmpB(kb(x2), kb(y8))) === 0 ? (res = cmpC(kc(x2), kc(y8))) === 0 ? cmpD(kd(x2), kd(y8)) : res : res : res;
|
|
43437
43437
|
};
|
|
43438
43438
|
}
|
|
43439
43439
|
var compareNumAsc = (a4, b) => a4 - b;
|
|
@@ -43724,7 +43724,7 @@ var require_lib5 = __commonJS({
|
|
|
43724
43724
|
throw new OutOfBoundsError(index2);
|
|
43725
43725
|
};
|
|
43726
43726
|
var ensureIndex = (index2, min, max) => (index2 < min || index2 >= max) && outOfBounds(index2);
|
|
43727
|
-
var ensureIndex2 = (x2,
|
|
43727
|
+
var ensureIndex2 = (x2, y8, maxX, maxY) => (x2 < 0 || x2 >= maxX || y8 < 0 || y8 >= maxY) && outOfBounds([x2, y8]);
|
|
43728
43728
|
var UnsupportedOperationError = defError(() => "unsupported operation");
|
|
43729
43729
|
var unsupported = (msg) => {
|
|
43730
43730
|
throw new UnsupportedOperationError(msg);
|
|
@@ -44335,7 +44335,7 @@ var require_lib8 = __commonJS({
|
|
|
44335
44335
|
return lb;
|
|
44336
44336
|
}
|
|
44337
44337
|
let x2 = 0;
|
|
44338
|
-
let
|
|
44338
|
+
let y8;
|
|
44339
44339
|
let minDist;
|
|
44340
44340
|
let d0;
|
|
44341
44341
|
let d1;
|
|
@@ -44352,8 +44352,8 @@ var require_lib8 = __commonJS({
|
|
|
44352
44352
|
return d02 < d12 || d23 < d12 ? d02 > d23 ? d23 + 1 : d02 + 1 : equiv2(ay2, bx) ? d12 : d12 + 1;
|
|
44353
44353
|
};
|
|
44354
44354
|
const vector = [];
|
|
44355
|
-
for (
|
|
44356
|
-
vector.push(
|
|
44355
|
+
for (y8 = 0; y8 < la; y8++) {
|
|
44356
|
+
vector.push(y8 + 1, a4[offset + y8]);
|
|
44357
44357
|
}
|
|
44358
44358
|
const len = vector.length - 1;
|
|
44359
44359
|
const lb3 = lb - 3;
|
|
@@ -44364,15 +44364,15 @@ var require_lib8 = __commonJS({
|
|
|
44364
44364
|
bx3 = b[offset + (d32 = x2 + 3)];
|
|
44365
44365
|
dd = x2 += 4;
|
|
44366
44366
|
minDist = Infinity;
|
|
44367
|
-
for (
|
|
44368
|
-
dy = vector[
|
|
44369
|
-
ay = vector[
|
|
44367
|
+
for (y8 = 0; y8 < len; y8 += 2) {
|
|
44368
|
+
dy = vector[y8];
|
|
44369
|
+
ay = vector[y8 + 1];
|
|
44370
44370
|
d0 = _min(dy, d0, d1, bx0, ay);
|
|
44371
44371
|
d1 = _min(d0, d1, d22, bx1, ay);
|
|
44372
44372
|
d22 = _min(d1, d22, d32, bx2, ay);
|
|
44373
44373
|
dd = _min(d22, d32, dd, bx3, ay);
|
|
44374
44374
|
dd < minDist && (minDist = dd);
|
|
44375
|
-
vector[
|
|
44375
|
+
vector[y8] = dd;
|
|
44376
44376
|
d32 = d22;
|
|
44377
44377
|
d22 = d1;
|
|
44378
44378
|
d1 = d0;
|
|
@@ -44385,9 +44385,9 @@ var require_lib8 = __commonJS({
|
|
|
44385
44385
|
bx0 = b[offset + (d0 = x2)];
|
|
44386
44386
|
dd = ++x2;
|
|
44387
44387
|
minDist = Infinity;
|
|
44388
|
-
for (
|
|
44389
|
-
dy = vector[
|
|
44390
|
-
vector[
|
|
44388
|
+
for (y8 = 0; y8 < len; y8 += 2) {
|
|
44389
|
+
dy = vector[y8];
|
|
44390
|
+
vector[y8] = dd = _min(dy, d0, dd, bx0, vector[y8 + 1]);
|
|
44391
44391
|
dd < minDist && (minDist = dd);
|
|
44392
44392
|
d0 = dy;
|
|
44393
44393
|
}
|
|
@@ -44402,10 +44402,10 @@ var require_lib8 = __commonJS({
|
|
|
44402
44402
|
};
|
|
44403
44403
|
var first2 = (buf) => buf[0];
|
|
44404
44404
|
var peek = (buf) => buf[buf.length - 1];
|
|
44405
|
-
var swap = (arr, x2,
|
|
44405
|
+
var swap = (arr, x2, y8) => {
|
|
44406
44406
|
const t4 = arr[x2];
|
|
44407
|
-
arr[x2] = arr[
|
|
44408
|
-
arr[
|
|
44407
|
+
arr[x2] = arr[y8];
|
|
44408
|
+
arr[y8] = t4;
|
|
44409
44409
|
};
|
|
44410
44410
|
var multiSwap = (...xs) => {
|
|
44411
44411
|
const [b, c3, d4] = xs;
|
|
@@ -44414,28 +44414,28 @@ var require_lib8 = __commonJS({
|
|
|
44414
44414
|
case 0:
|
|
44415
44415
|
return swap;
|
|
44416
44416
|
case 1:
|
|
44417
|
-
return (a4, x2,
|
|
44418
|
-
swap(a4, x2,
|
|
44419
|
-
swap(b, x2,
|
|
44417
|
+
return (a4, x2, y8) => {
|
|
44418
|
+
swap(a4, x2, y8);
|
|
44419
|
+
swap(b, x2, y8);
|
|
44420
44420
|
};
|
|
44421
44421
|
case 2:
|
|
44422
|
-
return (a4, x2,
|
|
44423
|
-
swap(a4, x2,
|
|
44424
|
-
swap(b, x2,
|
|
44425
|
-
swap(c3, x2,
|
|
44422
|
+
return (a4, x2, y8) => {
|
|
44423
|
+
swap(a4, x2, y8);
|
|
44424
|
+
swap(b, x2, y8);
|
|
44425
|
+
swap(c3, x2, y8);
|
|
44426
44426
|
};
|
|
44427
44427
|
case 3:
|
|
44428
|
-
return (a4, x2,
|
|
44429
|
-
swap(a4, x2,
|
|
44430
|
-
swap(b, x2,
|
|
44431
|
-
swap(c3, x2,
|
|
44432
|
-
swap(d4, x2,
|
|
44428
|
+
return (a4, x2, y8) => {
|
|
44429
|
+
swap(a4, x2, y8);
|
|
44430
|
+
swap(b, x2, y8);
|
|
44431
|
+
swap(c3, x2, y8);
|
|
44432
|
+
swap(d4, x2, y8);
|
|
44433
44433
|
};
|
|
44434
44434
|
default:
|
|
44435
|
-
return (a4, x2,
|
|
44436
|
-
swap(a4, x2,
|
|
44435
|
+
return (a4, x2, y8) => {
|
|
44436
|
+
swap(a4, x2, y8);
|
|
44437
44437
|
for (let i7 = n2; --i7 >= 0; )
|
|
44438
|
-
swap(xs[i7], x2,
|
|
44438
|
+
swap(xs[i7], x2, y8);
|
|
44439
44439
|
};
|
|
44440
44440
|
}
|
|
44441
44441
|
};
|
|
@@ -44492,7 +44492,7 @@ var require_lib8 = __commonJS({
|
|
|
44492
44492
|
return j < 0;
|
|
44493
44493
|
};
|
|
44494
44494
|
var swizzle = (order) => {
|
|
44495
|
-
const [a4, b, c3, d4, e,
|
|
44495
|
+
const [a4, b, c3, d4, e, f5, g, h] = order;
|
|
44496
44496
|
switch (order.length) {
|
|
44497
44497
|
case 0:
|
|
44498
44498
|
return () => [];
|
|
@@ -44507,11 +44507,11 @@ var require_lib8 = __commonJS({
|
|
|
44507
44507
|
case 5:
|
|
44508
44508
|
return (x2) => [x2[a4], x2[b], x2[c3], x2[d4], x2[e]];
|
|
44509
44509
|
case 6:
|
|
44510
|
-
return (x2) => [x2[a4], x2[b], x2[c3], x2[d4], x2[e], x2[
|
|
44510
|
+
return (x2) => [x2[a4], x2[b], x2[c3], x2[d4], x2[e], x2[f5]];
|
|
44511
44511
|
case 7:
|
|
44512
|
-
return (x2) => [x2[a4], x2[b], x2[c3], x2[d4], x2[e], x2[
|
|
44512
|
+
return (x2) => [x2[a4], x2[b], x2[c3], x2[d4], x2[e], x2[f5], x2[g]];
|
|
44513
44513
|
case 8:
|
|
44514
|
-
return (x2) => [x2[a4], x2[b], x2[c3], x2[d4], x2[e], x2[
|
|
44514
|
+
return (x2) => [x2[a4], x2[b], x2[c3], x2[d4], x2[e], x2[f5], x2[g], x2[h]];
|
|
44515
44515
|
default:
|
|
44516
44516
|
return (x2) => {
|
|
44517
44517
|
const res = [];
|
|
@@ -48219,9 +48219,9 @@ var require_tokenizer = __commonJS({
|
|
|
48219
48219
|
function isNonAscii(cp5) {
|
|
48220
48220
|
return 128 <= cp5 && cp5 <= 55295 || 57344 <= cp5 && cp5 <= 1114111;
|
|
48221
48221
|
}
|
|
48222
|
-
function isValidDate(
|
|
48223
|
-
if (
|
|
48224
|
-
const maxDayOfMonth = m4 === 2 ?
|
|
48222
|
+
function isValidDate(y8, m4, d4) {
|
|
48223
|
+
if (y8 >= 0 && m4 <= 12 && m4 >= 1 && d4 >= 1) {
|
|
48224
|
+
const maxDayOfMonth = m4 === 2 ? y8 & 3 || !(y8 % 25) && y8 & 15 ? 28 : 29 : 30 + (m4 + (m4 >> 3) & 1);
|
|
48225
48225
|
return d4 <= maxDayOfMonth;
|
|
48226
48226
|
}
|
|
48227
48227
|
return false;
|
|
@@ -51188,11 +51188,11 @@ var require_brace_expansion = __commonJS({
|
|
|
51188
51188
|
function isPadded(el) {
|
|
51189
51189
|
return /^-?0\d/.test(el);
|
|
51190
51190
|
}
|
|
51191
|
-
function lte(i7,
|
|
51192
|
-
return i7 <=
|
|
51191
|
+
function lte(i7, y8) {
|
|
51192
|
+
return i7 <= y8;
|
|
51193
51193
|
}
|
|
51194
|
-
function gte2(i7,
|
|
51195
|
-
return i7 >=
|
|
51194
|
+
function gte2(i7, y8) {
|
|
51195
|
+
return i7 >= y8;
|
|
51196
51196
|
}
|
|
51197
51197
|
function expand2(str, isTop) {
|
|
51198
51198
|
var expansions = [];
|
|
@@ -51234,18 +51234,18 @@ var require_brace_expansion = __commonJS({
|
|
|
51234
51234
|
var N;
|
|
51235
51235
|
if (isSequence) {
|
|
51236
51236
|
var x2 = numeric(n2[0]);
|
|
51237
|
-
var
|
|
51237
|
+
var y8 = numeric(n2[1]);
|
|
51238
51238
|
var width = Math.max(n2[0].length, n2[1].length);
|
|
51239
51239
|
var incr = n2.length == 3 ? Math.abs(numeric(n2[2])) : 1;
|
|
51240
51240
|
var test2 = lte;
|
|
51241
|
-
var reverse =
|
|
51241
|
+
var reverse = y8 < x2;
|
|
51242
51242
|
if (reverse) {
|
|
51243
51243
|
incr *= -1;
|
|
51244
51244
|
test2 = gte2;
|
|
51245
51245
|
}
|
|
51246
51246
|
var pad = n2.some(isPadded);
|
|
51247
51247
|
N = [];
|
|
51248
|
-
for (var i7 = x2; test2(i7,
|
|
51248
|
+
for (var i7 = x2; test2(i7, y8); i7 += incr) {
|
|
51249
51249
|
var c3;
|
|
51250
51250
|
if (isAlphaSequence) {
|
|
51251
51251
|
c3 = String.fromCharCode(i7);
|
|
@@ -54286,8 +54286,8 @@ var require_includesWith = __commonJS({
|
|
|
54286
54286
|
// ../../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/internal/_functionName.js
|
|
54287
54287
|
var require_functionName = __commonJS({
|
|
54288
54288
|
"../../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/internal/_functionName.js"(exports2, module2) {
|
|
54289
|
-
function _functionName(
|
|
54290
|
-
var match2 = String(
|
|
54289
|
+
function _functionName(f5) {
|
|
54290
|
+
var match2 = String(f5).match(/^function (\w*)/);
|
|
54291
54291
|
return match2 == null ? "" : match2[1];
|
|
54292
54292
|
}
|
|
54293
54293
|
module2.exports = _functionName;
|
|
@@ -61619,7 +61619,7 @@ var require_agent = __commonJS({
|
|
|
61619
61619
|
reqTimeoutListenerCount
|
|
61620
61620
|
);
|
|
61621
61621
|
if (debug.enabled) {
|
|
61622
|
-
debug("timeout listeners: %s", socket.listeners("timeout").map((
|
|
61622
|
+
debug("timeout listeners: %s", socket.listeners("timeout").map((f5) => f5.name).join(", "));
|
|
61623
61623
|
}
|
|
61624
61624
|
agent.timeoutSocketCount++;
|
|
61625
61625
|
const name2 = agent.getName(options);
|
|
@@ -61762,7 +61762,7 @@ var require_lru_cache = __commonJS({
|
|
|
61762
61762
|
this.aborted = true;
|
|
61763
61763
|
const e = { type, target: this };
|
|
61764
61764
|
this.onabort(e);
|
|
61765
|
-
this._listeners.forEach((
|
|
61765
|
+
this._listeners.forEach((f5) => f5(e), this);
|
|
61766
61766
|
}
|
|
61767
61767
|
}
|
|
61768
61768
|
onabort() {
|
|
@@ -61774,7 +61774,7 @@ var require_lru_cache = __commonJS({
|
|
|
61774
61774
|
}
|
|
61775
61775
|
removeEventListener(ev, fn2) {
|
|
61776
61776
|
if (ev === "abort") {
|
|
61777
|
-
this._listeners = this._listeners.filter((
|
|
61777
|
+
this._listeners = this._listeners.filter((f5) => f5 !== fn2);
|
|
61778
61778
|
}
|
|
61779
61779
|
}
|
|
61780
61780
|
};
|
|
@@ -68037,9 +68037,9 @@ var require_xmap = __commonJS({
|
|
|
68037
68037
|
var _curry2 = require_curry2();
|
|
68038
68038
|
var _xfBase = require_xfBase();
|
|
68039
68039
|
var XMap = /* @__PURE__ */ function() {
|
|
68040
|
-
function XMap2(
|
|
68040
|
+
function XMap2(f5, xf) {
|
|
68041
68041
|
this.xf = xf;
|
|
68042
|
-
this.f =
|
|
68042
|
+
this.f = f5;
|
|
68043
68043
|
}
|
|
68044
68044
|
XMap2.prototype["@@transducer/init"] = _xfBase.init;
|
|
68045
68045
|
XMap2.prototype["@@transducer/result"] = _xfBase.result;
|
|
@@ -68048,8 +68048,8 @@ var require_xmap = __commonJS({
|
|
|
68048
68048
|
};
|
|
68049
68049
|
return XMap2;
|
|
68050
68050
|
}();
|
|
68051
|
-
var _xmap = /* @__PURE__ */ _curry2(function _xmap2(
|
|
68052
|
-
return new XMap(
|
|
68051
|
+
var _xmap = /* @__PURE__ */ _curry2(function _xmap2(f5, xf) {
|
|
68052
|
+
return new XMap(f5, xf);
|
|
68053
68053
|
});
|
|
68054
68054
|
module2.exports = _xmap;
|
|
68055
68055
|
}
|
|
@@ -70375,7 +70375,7 @@ var require_lockfile = __commonJS({
|
|
|
70375
70375
|
function(module3, exports3, __webpack_require__) {
|
|
70376
70376
|
"use strict";
|
|
70377
70377
|
var NODE_ENV = process.env.NODE_ENV;
|
|
70378
|
-
var invariant = function(condition, format6, a4, b, c3, d4, e,
|
|
70378
|
+
var invariant = function(condition, format6, a4, b, c3, d4, e, f5) {
|
|
70379
70379
|
if (NODE_ENV !== "production") {
|
|
70380
70380
|
if (format6 === void 0) {
|
|
70381
70381
|
throw new Error("invariant requires an error message argument");
|
|
@@ -70388,7 +70388,7 @@ var require_lockfile = __commonJS({
|
|
|
70388
70388
|
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
70389
70389
|
);
|
|
70390
70390
|
} else {
|
|
70391
|
-
var args2 = [a4, b, c3, d4, e,
|
|
70391
|
+
var args2 = [a4, b, c3, d4, e, f5];
|
|
70392
70392
|
var argIndex = 0;
|
|
70393
70393
|
error = new Error(
|
|
70394
70394
|
format6.replace(/%s/g, function() {
|
|
@@ -71967,8 +71967,8 @@ var require_lockfile = __commonJS({
|
|
|
71967
71967
|
minimatch2.match = function(list2, pattern, options) {
|
|
71968
71968
|
options = options || {};
|
|
71969
71969
|
var mm = new Minimatch2(pattern, options);
|
|
71970
|
-
list2 = list2.filter(function(
|
|
71971
|
-
return mm.match(
|
|
71970
|
+
list2 = list2.filter(function(f5) {
|
|
71971
|
+
return mm.match(f5);
|
|
71972
71972
|
});
|
|
71973
71973
|
if (mm.options.nonull && !list2.length) {
|
|
71974
71974
|
list2.push(pattern);
|
|
@@ -71976,28 +71976,28 @@ var require_lockfile = __commonJS({
|
|
|
71976
71976
|
return list2;
|
|
71977
71977
|
};
|
|
71978
71978
|
Minimatch2.prototype.match = match2;
|
|
71979
|
-
function match2(
|
|
71980
|
-
this.debug("match",
|
|
71979
|
+
function match2(f5, partial) {
|
|
71980
|
+
this.debug("match", f5, this.pattern);
|
|
71981
71981
|
if (this.comment) return false;
|
|
71982
|
-
if (this.empty) return
|
|
71983
|
-
if (
|
|
71982
|
+
if (this.empty) return f5 === "";
|
|
71983
|
+
if (f5 === "/" && partial) return true;
|
|
71984
71984
|
var options = this.options;
|
|
71985
71985
|
if (path9.sep !== "/") {
|
|
71986
|
-
|
|
71986
|
+
f5 = f5.split(path9.sep).join("/");
|
|
71987
71987
|
}
|
|
71988
|
-
|
|
71989
|
-
this.debug(this.pattern, "split",
|
|
71988
|
+
f5 = f5.split(slashSplit);
|
|
71989
|
+
this.debug(this.pattern, "split", f5);
|
|
71990
71990
|
var set = this.set;
|
|
71991
71991
|
this.debug(this.pattern, "set", set);
|
|
71992
71992
|
var filename;
|
|
71993
71993
|
var i7;
|
|
71994
|
-
for (i7 =
|
|
71995
|
-
filename =
|
|
71994
|
+
for (i7 = f5.length - 1; i7 >= 0; i7--) {
|
|
71995
|
+
filename = f5[i7];
|
|
71996
71996
|
if (filename) break;
|
|
71997
71997
|
}
|
|
71998
71998
|
for (i7 = 0; i7 < set.length; i7++) {
|
|
71999
71999
|
var pattern = set[i7];
|
|
72000
|
-
var file =
|
|
72000
|
+
var file = f5;
|
|
72001
72001
|
if (options.matchBase && pattern.length === 1) {
|
|
72002
72002
|
file = [filename];
|
|
72003
72003
|
}
|
|
@@ -72020,11 +72020,11 @@ var require_lockfile = __commonJS({
|
|
|
72020
72020
|
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
72021
72021
|
this.debug("matchOne loop");
|
|
72022
72022
|
var p3 = pattern[pi];
|
|
72023
|
-
var
|
|
72024
|
-
this.debug(pattern, p3,
|
|
72023
|
+
var f5 = file[fi];
|
|
72024
|
+
this.debug(pattern, p3, f5);
|
|
72025
72025
|
if (p3 === false) return false;
|
|
72026
72026
|
if (p3 === GLOBSTAR2) {
|
|
72027
|
-
this.debug("GLOBSTAR", [pattern, p3,
|
|
72027
|
+
this.debug("GLOBSTAR", [pattern, p3, f5]);
|
|
72028
72028
|
var fr = fi;
|
|
72029
72029
|
var pr = pi + 1;
|
|
72030
72030
|
if (pr === pl) {
|
|
@@ -72058,14 +72058,14 @@ var require_lockfile = __commonJS({
|
|
|
72058
72058
|
var hit;
|
|
72059
72059
|
if (typeof p3 === "string") {
|
|
72060
72060
|
if (options.nocase) {
|
|
72061
|
-
hit =
|
|
72061
|
+
hit = f5.toLowerCase() === p3.toLowerCase();
|
|
72062
72062
|
} else {
|
|
72063
|
-
hit =
|
|
72063
|
+
hit = f5 === p3;
|
|
72064
72064
|
}
|
|
72065
|
-
this.debug("string match", p3,
|
|
72065
|
+
this.debug("string match", p3, f5, hit);
|
|
72066
72066
|
} else {
|
|
72067
|
-
hit =
|
|
72068
|
-
this.debug("pattern match", p3,
|
|
72067
|
+
hit = f5.match(p3);
|
|
72068
|
+
this.debug("pattern match", p3, f5, hit);
|
|
72069
72069
|
}
|
|
72070
72070
|
if (!hit) return false;
|
|
72071
72071
|
}
|
|
@@ -72107,25 +72107,25 @@ var require_lockfile = __commonJS({
|
|
|
72107
72107
|
});
|
|
72108
72108
|
});
|
|
72109
72109
|
function once9(fn2) {
|
|
72110
|
-
var
|
|
72111
|
-
if (
|
|
72112
|
-
|
|
72113
|
-
return
|
|
72110
|
+
var f5 = function() {
|
|
72111
|
+
if (f5.called) return f5.value;
|
|
72112
|
+
f5.called = true;
|
|
72113
|
+
return f5.value = fn2.apply(this, arguments);
|
|
72114
72114
|
};
|
|
72115
|
-
|
|
72116
|
-
return
|
|
72115
|
+
f5.called = false;
|
|
72116
|
+
return f5;
|
|
72117
72117
|
}
|
|
72118
72118
|
function onceStrict(fn2) {
|
|
72119
|
-
var
|
|
72120
|
-
if (
|
|
72121
|
-
throw new Error(
|
|
72122
|
-
|
|
72123
|
-
return
|
|
72119
|
+
var f5 = function() {
|
|
72120
|
+
if (f5.called)
|
|
72121
|
+
throw new Error(f5.onceError);
|
|
72122
|
+
f5.called = true;
|
|
72123
|
+
return f5.value = fn2.apply(this, arguments);
|
|
72124
72124
|
};
|
|
72125
72125
|
var name2 = fn2.name || "Function wrapped with `once`";
|
|
72126
|
-
|
|
72127
|
-
|
|
72128
|
-
return
|
|
72126
|
+
f5.onceError = name2 + " shouldn't be called more than once";
|
|
72127
|
+
f5.called = false;
|
|
72128
|
+
return f5;
|
|
72129
72129
|
}
|
|
72130
72130
|
},
|
|
72131
72131
|
,
|
|
@@ -72384,8 +72384,8 @@ var require_lockfile = __commonJS({
|
|
|
72384
72384
|
Glob2.prototype._mark = function(p3) {
|
|
72385
72385
|
return common.mark(this, p3);
|
|
72386
72386
|
};
|
|
72387
|
-
Glob2.prototype._makeAbs = function(
|
|
72388
|
-
return common.makeAbs(this,
|
|
72387
|
+
Glob2.prototype._makeAbs = function(f5) {
|
|
72388
|
+
return common.makeAbs(this, f5);
|
|
72389
72389
|
};
|
|
72390
72390
|
Glob2.prototype.abort = function() {
|
|
72391
72391
|
this.aborted = true;
|
|
@@ -72619,14 +72619,14 @@ var require_lockfile = __commonJS({
|
|
|
72619
72619
|
this.cache[abs] = entries;
|
|
72620
72620
|
return cb(null, entries);
|
|
72621
72621
|
};
|
|
72622
|
-
Glob2.prototype._readdirError = function(
|
|
72622
|
+
Glob2.prototype._readdirError = function(f5, er, cb) {
|
|
72623
72623
|
if (this.aborted)
|
|
72624
72624
|
return;
|
|
72625
72625
|
switch (er.code) {
|
|
72626
72626
|
case "ENOTSUP":
|
|
72627
72627
|
// https://github.com/isaacs/node-glob/issues/205
|
|
72628
72628
|
case "ENOTDIR":
|
|
72629
|
-
var abs = this._makeAbs(
|
|
72629
|
+
var abs = this._makeAbs(f5);
|
|
72630
72630
|
this.cache[abs] = "FILE";
|
|
72631
72631
|
if (abs === this.cwdAbs) {
|
|
72632
72632
|
var error = new Error(er.code + " invalid cwd " + this.cwd);
|
|
@@ -72641,10 +72641,10 @@ var require_lockfile = __commonJS({
|
|
|
72641
72641
|
case "ELOOP":
|
|
72642
72642
|
case "ENAMETOOLONG":
|
|
72643
72643
|
case "UNKNOWN":
|
|
72644
|
-
this.cache[this._makeAbs(
|
|
72644
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
72645
72645
|
break;
|
|
72646
72646
|
default:
|
|
72647
|
-
this.cache[this._makeAbs(
|
|
72647
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
72648
72648
|
if (this.strict) {
|
|
72649
72649
|
this.emit("error", er);
|
|
72650
72650
|
this.abort();
|
|
@@ -72709,10 +72709,10 @@ var require_lockfile = __commonJS({
|
|
|
72709
72709
|
this._emitMatch(index2, prefix);
|
|
72710
72710
|
cb();
|
|
72711
72711
|
};
|
|
72712
|
-
Glob2.prototype._stat = function(
|
|
72713
|
-
var abs = this._makeAbs(
|
|
72714
|
-
var needDir =
|
|
72715
|
-
if (
|
|
72712
|
+
Glob2.prototype._stat = function(f5, cb) {
|
|
72713
|
+
var abs = this._makeAbs(f5);
|
|
72714
|
+
var needDir = f5.slice(-1) === "/";
|
|
72715
|
+
if (f5.length > this.maxLength)
|
|
72716
72716
|
return cb();
|
|
72717
72717
|
if (!this.stat && ownProp(this.cache, abs)) {
|
|
72718
72718
|
var c3 = this.cache[abs];
|
|
@@ -72744,21 +72744,21 @@ var require_lockfile = __commonJS({
|
|
|
72744
72744
|
if (lstat3 && lstat3.isSymbolicLink()) {
|
|
72745
72745
|
return fs11.stat(abs, function(er2, stat6) {
|
|
72746
72746
|
if (er2)
|
|
72747
|
-
self2._stat2(
|
|
72747
|
+
self2._stat2(f5, abs, null, lstat3, cb);
|
|
72748
72748
|
else
|
|
72749
|
-
self2._stat2(
|
|
72749
|
+
self2._stat2(f5, abs, er2, stat6, cb);
|
|
72750
72750
|
});
|
|
72751
72751
|
} else {
|
|
72752
|
-
self2._stat2(
|
|
72752
|
+
self2._stat2(f5, abs, er, lstat3, cb);
|
|
72753
72753
|
}
|
|
72754
72754
|
}
|
|
72755
72755
|
};
|
|
72756
|
-
Glob2.prototype._stat2 = function(
|
|
72756
|
+
Glob2.prototype._stat2 = function(f5, abs, er, stat5, cb) {
|
|
72757
72757
|
if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
|
|
72758
72758
|
this.statCache[abs] = false;
|
|
72759
72759
|
return cb();
|
|
72760
72760
|
}
|
|
72761
|
-
var needDir =
|
|
72761
|
+
var needDir = f5.slice(-1) === "/";
|
|
72762
72762
|
this.statCache[abs] = stat5;
|
|
72763
72763
|
if (abs.slice(-1) === "/" && stat5 && !stat5.isDirectory())
|
|
72764
72764
|
return cb(null, false, stat5);
|
|
@@ -73907,16 +73907,16 @@ var require_lockfile = __commonJS({
|
|
|
73907
73907
|
}
|
|
73908
73908
|
return m4;
|
|
73909
73909
|
}
|
|
73910
|
-
function makeAbs(self2,
|
|
73911
|
-
var abs =
|
|
73912
|
-
if (
|
|
73913
|
-
abs = path9.join(self2.root,
|
|
73914
|
-
} else if (isAbsolute2(
|
|
73915
|
-
abs =
|
|
73910
|
+
function makeAbs(self2, f5) {
|
|
73911
|
+
var abs = f5;
|
|
73912
|
+
if (f5.charAt(0) === "/") {
|
|
73913
|
+
abs = path9.join(self2.root, f5);
|
|
73914
|
+
} else if (isAbsolute2(f5) || f5 === "") {
|
|
73915
|
+
abs = f5;
|
|
73916
73916
|
} else if (self2.changedCwd) {
|
|
73917
|
-
abs = path9.resolve(self2.cwd,
|
|
73917
|
+
abs = path9.resolve(self2.cwd, f5);
|
|
73918
73918
|
} else {
|
|
73919
|
-
abs = path9.resolve(
|
|
73919
|
+
abs = path9.resolve(f5);
|
|
73920
73920
|
}
|
|
73921
73921
|
if (process.platform === "win32")
|
|
73922
73922
|
abs = abs.replace(/\\/g, "/");
|
|
@@ -73944,9 +73944,9 @@ var require_lockfile = __commonJS({
|
|
|
73944
73944
|
var fs11 = __webpack_require__(3);
|
|
73945
73945
|
var _0777 = parseInt("0777", 8);
|
|
73946
73946
|
module3.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
|
|
73947
|
-
function mkdirP(p3, opts,
|
|
73947
|
+
function mkdirP(p3, opts, f5, made) {
|
|
73948
73948
|
if (typeof opts === "function") {
|
|
73949
|
-
|
|
73949
|
+
f5 = opts;
|
|
73950
73950
|
opts = {};
|
|
73951
73951
|
} else if (!opts || typeof opts !== "object") {
|
|
73952
73952
|
opts = { mode: opts };
|
|
@@ -73957,7 +73957,7 @@ var require_lockfile = __commonJS({
|
|
|
73957
73957
|
mode = _0777 & ~process.umask();
|
|
73958
73958
|
}
|
|
73959
73959
|
if (!made) made = null;
|
|
73960
|
-
var cb =
|
|
73960
|
+
var cb = f5 || function() {
|
|
73961
73961
|
};
|
|
73962
73962
|
p3 = path9.resolve(p3);
|
|
73963
73963
|
xfs.mkdir(p3, mode, function(er) {
|
|
@@ -74558,11 +74558,11 @@ ${indent3}`);
|
|
|
74558
74558
|
function isPadded(el) {
|
|
74559
74559
|
return /^-?0\d/.test(el);
|
|
74560
74560
|
}
|
|
74561
|
-
function lte(i7,
|
|
74562
|
-
return i7 <=
|
|
74561
|
+
function lte(i7, y8) {
|
|
74562
|
+
return i7 <= y8;
|
|
74563
74563
|
}
|
|
74564
|
-
function gte2(i7,
|
|
74565
|
-
return i7 >=
|
|
74564
|
+
function gte2(i7, y8) {
|
|
74565
|
+
return i7 >= y8;
|
|
74566
74566
|
}
|
|
74567
74567
|
function expand2(str, isTop) {
|
|
74568
74568
|
var expansions = [];
|
|
@@ -74599,18 +74599,18 @@ ${indent3}`);
|
|
|
74599
74599
|
var N;
|
|
74600
74600
|
if (isSequence) {
|
|
74601
74601
|
var x2 = numeric(n2[0]);
|
|
74602
|
-
var
|
|
74602
|
+
var y8 = numeric(n2[1]);
|
|
74603
74603
|
var width = Math.max(n2[0].length, n2[1].length);
|
|
74604
74604
|
var incr = n2.length == 3 ? Math.abs(numeric(n2[2])) : 1;
|
|
74605
74605
|
var test2 = lte;
|
|
74606
|
-
var reverse =
|
|
74606
|
+
var reverse = y8 < x2;
|
|
74607
74607
|
if (reverse) {
|
|
74608
74608
|
incr *= -1;
|
|
74609
74609
|
test2 = gte2;
|
|
74610
74610
|
}
|
|
74611
74611
|
var pad = n2.some(isPadded);
|
|
74612
74612
|
N = [];
|
|
74613
|
-
for (var i7 = x2; test2(i7,
|
|
74613
|
+
for (var i7 = x2; test2(i7, y8); i7 += incr) {
|
|
74614
74614
|
var c3;
|
|
74615
74615
|
if (isAlphaSequence) {
|
|
74616
74616
|
c3 = String.fromCharCode(i7);
|
|
@@ -74779,16 +74779,16 @@ ${indent3}`);
|
|
|
74779
74779
|
var iterFn = ITERATOR ? function() {
|
|
74780
74780
|
return iterable;
|
|
74781
74781
|
} : getIterFn(iterable);
|
|
74782
|
-
var
|
|
74782
|
+
var f5 = ctx(fn2, that, entries ? 2 : 1);
|
|
74783
74783
|
var index2 = 0;
|
|
74784
74784
|
var length, step, iterator2, result;
|
|
74785
74785
|
if (typeof iterFn != "function") throw TypeError(iterable + " is not iterable!");
|
|
74786
74786
|
if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index2; index2++) {
|
|
74787
|
-
result = entries ?
|
|
74787
|
+
result = entries ? f5(anObject(step = iterable[index2])[0], step[1]) : f5(iterable[index2]);
|
|
74788
74788
|
if (result === BREAK || result === RETURN) return result;
|
|
74789
74789
|
}
|
|
74790
74790
|
else for (iterator2 = iterFn.call(iterable); !(step = iterator2.next()).done; ) {
|
|
74791
|
-
result = call(iterator2,
|
|
74791
|
+
result = call(iterator2, f5, step.value, entries);
|
|
74792
74792
|
if (result === BREAK || result === RETURN) return result;
|
|
74793
74793
|
}
|
|
74794
74794
|
};
|
|
@@ -76288,12 +76288,12 @@ ${indent3}`);
|
|
|
76288
76288
|
this.cache[abs] = entries;
|
|
76289
76289
|
return entries;
|
|
76290
76290
|
};
|
|
76291
|
-
GlobSync.prototype._readdirError = function(
|
|
76291
|
+
GlobSync.prototype._readdirError = function(f5, er) {
|
|
76292
76292
|
switch (er.code) {
|
|
76293
76293
|
case "ENOTSUP":
|
|
76294
76294
|
// https://github.com/isaacs/node-glob/issues/205
|
|
76295
76295
|
case "ENOTDIR":
|
|
76296
|
-
var abs = this._makeAbs(
|
|
76296
|
+
var abs = this._makeAbs(f5);
|
|
76297
76297
|
this.cache[abs] = "FILE";
|
|
76298
76298
|
if (abs === this.cwdAbs) {
|
|
76299
76299
|
var error = new Error(er.code + " invalid cwd " + this.cwd);
|
|
@@ -76307,10 +76307,10 @@ ${indent3}`);
|
|
|
76307
76307
|
case "ELOOP":
|
|
76308
76308
|
case "ENAMETOOLONG":
|
|
76309
76309
|
case "UNKNOWN":
|
|
76310
|
-
this.cache[this._makeAbs(
|
|
76310
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
76311
76311
|
break;
|
|
76312
76312
|
default:
|
|
76313
|
-
this.cache[this._makeAbs(
|
|
76313
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
76314
76314
|
if (this.strict)
|
|
76315
76315
|
throw er;
|
|
76316
76316
|
if (!this.silent)
|
|
@@ -76360,10 +76360,10 @@ ${indent3}`);
|
|
|
76360
76360
|
prefix = prefix.replace(/\\/g, "/");
|
|
76361
76361
|
this._emitMatch(index2, prefix);
|
|
76362
76362
|
};
|
|
76363
|
-
GlobSync.prototype._stat = function(
|
|
76364
|
-
var abs = this._makeAbs(
|
|
76365
|
-
var needDir =
|
|
76366
|
-
if (
|
|
76363
|
+
GlobSync.prototype._stat = function(f5) {
|
|
76364
|
+
var abs = this._makeAbs(f5);
|
|
76365
|
+
var needDir = f5.slice(-1) === "/";
|
|
76366
|
+
if (f5.length > this.maxLength)
|
|
76367
76367
|
return false;
|
|
76368
76368
|
if (!this.stat && ownProp(this.cache, abs)) {
|
|
76369
76369
|
var c3 = this.cache[abs];
|
|
@@ -76408,8 +76408,8 @@ ${indent3}`);
|
|
|
76408
76408
|
GlobSync.prototype._mark = function(p3) {
|
|
76409
76409
|
return common.mark(this, p3);
|
|
76410
76410
|
};
|
|
76411
|
-
GlobSync.prototype._makeAbs = function(
|
|
76412
|
-
return common.makeAbs(this,
|
|
76411
|
+
GlobSync.prototype._makeAbs = function(f5) {
|
|
76412
|
+
return common.makeAbs(this, f5);
|
|
76413
76413
|
};
|
|
76414
76414
|
},
|
|
76415
76415
|
,
|
|
@@ -76512,7 +76512,7 @@ ${indent3}`);
|
|
|
76512
76512
|
var m4 = s6 * 60;
|
|
76513
76513
|
var h = m4 * 60;
|
|
76514
76514
|
var d4 = h * 24;
|
|
76515
|
-
var
|
|
76515
|
+
var y8 = d4 * 365.25;
|
|
76516
76516
|
module3.exports = function(val2, options) {
|
|
76517
76517
|
options = options || {};
|
|
76518
76518
|
var type = typeof val2;
|
|
@@ -76544,7 +76544,7 @@ ${indent3}`);
|
|
|
76544
76544
|
case "yrs":
|
|
76545
76545
|
case "yr":
|
|
76546
76546
|
case "y":
|
|
76547
|
-
return n2 *
|
|
76547
|
+
return n2 * y8;
|
|
76548
76548
|
case "days":
|
|
76549
76549
|
case "day":
|
|
76550
76550
|
case "d":
|
|
@@ -76797,8 +76797,8 @@ ${indent3}`);
|
|
|
76797
76797
|
if (n2 === 0)
|
|
76798
76798
|
return options.rmdir(p3, cb);
|
|
76799
76799
|
var errState;
|
|
76800
|
-
files.forEach(function(
|
|
76801
|
-
rimraf(path9.join(p3,
|
|
76800
|
+
files.forEach(function(f5) {
|
|
76801
|
+
rimraf(path9.join(p3, f5), options, function(er2) {
|
|
76802
76802
|
if (errState)
|
|
76803
76803
|
return;
|
|
76804
76804
|
if (er2)
|
|
@@ -76874,8 +76874,8 @@ ${indent3}`);
|
|
|
76874
76874
|
function rmkidsSync(p3, options) {
|
|
76875
76875
|
assert17(p3);
|
|
76876
76876
|
assert17(options);
|
|
76877
|
-
options.readdirSync(p3).forEach(function(
|
|
76878
|
-
rimrafSync(path9.join(p3,
|
|
76877
|
+
options.readdirSync(p3).forEach(function(f5) {
|
|
76878
|
+
rimrafSync(path9.join(p3, f5), options);
|
|
76879
76879
|
});
|
|
76880
76880
|
var retries = isWindows4 ? 100 : 1;
|
|
76881
76881
|
var i7 = 0;
|
|
@@ -88790,9 +88790,9 @@ var require_float4 = __commonJS({
|
|
|
88790
88790
|
const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
|
|
88791
88791
|
const dot = str.indexOf(".");
|
|
88792
88792
|
if (dot !== -1) {
|
|
88793
|
-
const
|
|
88794
|
-
if (
|
|
88795
|
-
node.minFractionDigits =
|
|
88793
|
+
const f5 = str.substring(dot + 1).replace(/_/g, "");
|
|
88794
|
+
if (f5[f5.length - 1] === "0")
|
|
88795
|
+
node.minFractionDigits = f5.length;
|
|
88796
88796
|
}
|
|
88797
88797
|
return node;
|
|
88798
88798
|
},
|
|
@@ -119202,11 +119202,11 @@ var require_brace_expansion2 = __commonJS({
|
|
|
119202
119202
|
function isPadded(el) {
|
|
119203
119203
|
return /^-?0\d/.test(el);
|
|
119204
119204
|
}
|
|
119205
|
-
function lte(i7,
|
|
119206
|
-
return i7 <=
|
|
119205
|
+
function lte(i7, y8) {
|
|
119206
|
+
return i7 <= y8;
|
|
119207
119207
|
}
|
|
119208
|
-
function gte2(i7,
|
|
119209
|
-
return i7 >=
|
|
119208
|
+
function gte2(i7, y8) {
|
|
119209
|
+
return i7 >= y8;
|
|
119210
119210
|
}
|
|
119211
119211
|
function expand2(str, isTop) {
|
|
119212
119212
|
var expansions = [];
|
|
@@ -119243,18 +119243,18 @@ var require_brace_expansion2 = __commonJS({
|
|
|
119243
119243
|
var N;
|
|
119244
119244
|
if (isSequence) {
|
|
119245
119245
|
var x2 = numeric(n2[0]);
|
|
119246
|
-
var
|
|
119246
|
+
var y8 = numeric(n2[1]);
|
|
119247
119247
|
var width = Math.max(n2[0].length, n2[1].length);
|
|
119248
119248
|
var incr = n2.length == 3 ? Math.abs(numeric(n2[2])) : 1;
|
|
119249
119249
|
var test2 = lte;
|
|
119250
|
-
var reverse =
|
|
119250
|
+
var reverse = y8 < x2;
|
|
119251
119251
|
if (reverse) {
|
|
119252
119252
|
incr *= -1;
|
|
119253
119253
|
test2 = gte2;
|
|
119254
119254
|
}
|
|
119255
119255
|
var pad = n2.some(isPadded);
|
|
119256
119256
|
N = [];
|
|
119257
|
-
for (var i7 = x2; test2(i7,
|
|
119257
|
+
for (var i7 = x2; test2(i7, y8); i7 += incr) {
|
|
119258
119258
|
var c3;
|
|
119259
119259
|
if (isAlphaSequence) {
|
|
119260
119260
|
c3 = String.fromCharCode(i7);
|
|
@@ -119749,37 +119749,37 @@ var require_minimatch = __commonJS({
|
|
|
119749
119749
|
minimatch2.match = function(list2, pattern, options) {
|
|
119750
119750
|
options = options || {};
|
|
119751
119751
|
var mm = new Minimatch2(pattern, options);
|
|
119752
|
-
list2 = list2.filter(function(
|
|
119753
|
-
return mm.match(
|
|
119752
|
+
list2 = list2.filter(function(f5) {
|
|
119753
|
+
return mm.match(f5);
|
|
119754
119754
|
});
|
|
119755
119755
|
if (mm.options.nonull && !list2.length) {
|
|
119756
119756
|
list2.push(pattern);
|
|
119757
119757
|
}
|
|
119758
119758
|
return list2;
|
|
119759
119759
|
};
|
|
119760
|
-
Minimatch2.prototype.match = function match2(
|
|
119760
|
+
Minimatch2.prototype.match = function match2(f5, partial) {
|
|
119761
119761
|
if (typeof partial === "undefined") partial = this.partial;
|
|
119762
|
-
this.debug("match",
|
|
119762
|
+
this.debug("match", f5, this.pattern);
|
|
119763
119763
|
if (this.comment) return false;
|
|
119764
|
-
if (this.empty) return
|
|
119765
|
-
if (
|
|
119764
|
+
if (this.empty) return f5 === "";
|
|
119765
|
+
if (f5 === "/" && partial) return true;
|
|
119766
119766
|
var options = this.options;
|
|
119767
119767
|
if (path9.sep !== "/") {
|
|
119768
|
-
|
|
119768
|
+
f5 = f5.split(path9.sep).join("/");
|
|
119769
119769
|
}
|
|
119770
|
-
|
|
119771
|
-
this.debug(this.pattern, "split",
|
|
119770
|
+
f5 = f5.split(slashSplit);
|
|
119771
|
+
this.debug(this.pattern, "split", f5);
|
|
119772
119772
|
var set = this.set;
|
|
119773
119773
|
this.debug(this.pattern, "set", set);
|
|
119774
119774
|
var filename;
|
|
119775
119775
|
var i7;
|
|
119776
|
-
for (i7 =
|
|
119777
|
-
filename =
|
|
119776
|
+
for (i7 = f5.length - 1; i7 >= 0; i7--) {
|
|
119777
|
+
filename = f5[i7];
|
|
119778
119778
|
if (filename) break;
|
|
119779
119779
|
}
|
|
119780
119780
|
for (i7 = 0; i7 < set.length; i7++) {
|
|
119781
119781
|
var pattern = set[i7];
|
|
119782
|
-
var file =
|
|
119782
|
+
var file = f5;
|
|
119783
119783
|
if (options.matchBase && pattern.length === 1) {
|
|
119784
119784
|
file = [filename];
|
|
119785
119785
|
}
|
|
@@ -119802,11 +119802,11 @@ var require_minimatch = __commonJS({
|
|
|
119802
119802
|
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
119803
119803
|
this.debug("matchOne loop");
|
|
119804
119804
|
var p3 = pattern[pi];
|
|
119805
|
-
var
|
|
119806
|
-
this.debug(pattern, p3,
|
|
119805
|
+
var f5 = file[fi];
|
|
119806
|
+
this.debug(pattern, p3, f5);
|
|
119807
119807
|
if (p3 === false) return false;
|
|
119808
119808
|
if (p3 === GLOBSTAR2) {
|
|
119809
|
-
this.debug("GLOBSTAR", [pattern, p3,
|
|
119809
|
+
this.debug("GLOBSTAR", [pattern, p3, f5]);
|
|
119810
119810
|
var fr = fi;
|
|
119811
119811
|
var pr = pi + 1;
|
|
119812
119812
|
if (pr === pl) {
|
|
@@ -119839,11 +119839,11 @@ var require_minimatch = __commonJS({
|
|
|
119839
119839
|
}
|
|
119840
119840
|
var hit;
|
|
119841
119841
|
if (typeof p3 === "string") {
|
|
119842
|
-
hit =
|
|
119843
|
-
this.debug("string match", p3,
|
|
119842
|
+
hit = f5 === p3;
|
|
119843
|
+
this.debug("string match", p3, f5, hit);
|
|
119844
119844
|
} else {
|
|
119845
|
-
hit =
|
|
119846
|
-
this.debug("pattern match", p3,
|
|
119845
|
+
hit = f5.match(p3);
|
|
119846
|
+
this.debug("pattern match", p3, f5, hit);
|
|
119847
119847
|
}
|
|
119848
119848
|
if (!hit) return false;
|
|
119849
119849
|
}
|
|
@@ -120047,16 +120047,16 @@ var require_common6 = __commonJS({
|
|
|
120047
120047
|
}
|
|
120048
120048
|
return m4;
|
|
120049
120049
|
}
|
|
120050
|
-
function makeAbs(self2,
|
|
120051
|
-
var abs =
|
|
120052
|
-
if (
|
|
120053
|
-
abs = path9.join(self2.root,
|
|
120054
|
-
} else if (isAbsolute2(
|
|
120055
|
-
abs =
|
|
120050
|
+
function makeAbs(self2, f5) {
|
|
120051
|
+
var abs = f5;
|
|
120052
|
+
if (f5.charAt(0) === "/") {
|
|
120053
|
+
abs = path9.join(self2.root, f5);
|
|
120054
|
+
} else if (isAbsolute2(f5) || f5 === "") {
|
|
120055
|
+
abs = f5;
|
|
120056
120056
|
} else if (self2.changedCwd) {
|
|
120057
|
-
abs = path9.resolve(self2.cwd,
|
|
120057
|
+
abs = path9.resolve(self2.cwd, f5);
|
|
120058
120058
|
} else {
|
|
120059
|
-
abs = path9.resolve(
|
|
120059
|
+
abs = path9.resolve(f5);
|
|
120060
120060
|
}
|
|
120061
120061
|
if (process.platform === "win32")
|
|
120062
120062
|
abs = abs.replace(/\\/g, "/");
|
|
@@ -120308,12 +120308,12 @@ var require_sync = __commonJS({
|
|
|
120308
120308
|
this.cache[abs] = entries;
|
|
120309
120309
|
return entries;
|
|
120310
120310
|
};
|
|
120311
|
-
GlobSync.prototype._readdirError = function(
|
|
120311
|
+
GlobSync.prototype._readdirError = function(f5, er) {
|
|
120312
120312
|
switch (er.code) {
|
|
120313
120313
|
case "ENOTSUP":
|
|
120314
120314
|
// https://github.com/isaacs/node-glob/issues/205
|
|
120315
120315
|
case "ENOTDIR":
|
|
120316
|
-
var abs = this._makeAbs(
|
|
120316
|
+
var abs = this._makeAbs(f5);
|
|
120317
120317
|
this.cache[abs] = "FILE";
|
|
120318
120318
|
if (abs === this.cwdAbs) {
|
|
120319
120319
|
var error = new Error(er.code + " invalid cwd " + this.cwd);
|
|
@@ -120327,10 +120327,10 @@ var require_sync = __commonJS({
|
|
|
120327
120327
|
case "ELOOP":
|
|
120328
120328
|
case "ENAMETOOLONG":
|
|
120329
120329
|
case "UNKNOWN":
|
|
120330
|
-
this.cache[this._makeAbs(
|
|
120330
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
120331
120331
|
break;
|
|
120332
120332
|
default:
|
|
120333
|
-
this.cache[this._makeAbs(
|
|
120333
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
120334
120334
|
if (this.strict)
|
|
120335
120335
|
throw er;
|
|
120336
120336
|
if (!this.silent)
|
|
@@ -120380,10 +120380,10 @@ var require_sync = __commonJS({
|
|
|
120380
120380
|
prefix = prefix.replace(/\\/g, "/");
|
|
120381
120381
|
this._emitMatch(index2, prefix);
|
|
120382
120382
|
};
|
|
120383
|
-
GlobSync.prototype._stat = function(
|
|
120384
|
-
var abs = this._makeAbs(
|
|
120385
|
-
var needDir =
|
|
120386
|
-
if (
|
|
120383
|
+
GlobSync.prototype._stat = function(f5) {
|
|
120384
|
+
var abs = this._makeAbs(f5);
|
|
120385
|
+
var needDir = f5.slice(-1) === "/";
|
|
120386
|
+
if (f5.length > this.maxLength)
|
|
120387
120387
|
return false;
|
|
120388
120388
|
if (!this.stat && ownProp(this.cache, abs)) {
|
|
120389
120389
|
var c3 = this.cache[abs];
|
|
@@ -120428,8 +120428,8 @@ var require_sync = __commonJS({
|
|
|
120428
120428
|
GlobSync.prototype._mark = function(p3) {
|
|
120429
120429
|
return common.mark(this, p3);
|
|
120430
120430
|
};
|
|
120431
|
-
GlobSync.prototype._makeAbs = function(
|
|
120432
|
-
return common.makeAbs(this,
|
|
120431
|
+
GlobSync.prototype._makeAbs = function(f5) {
|
|
120432
|
+
return common.makeAbs(this, f5);
|
|
120433
120433
|
};
|
|
120434
120434
|
}
|
|
120435
120435
|
});
|
|
@@ -120485,25 +120485,25 @@ var require_once2 = __commonJS({
|
|
|
120485
120485
|
});
|
|
120486
120486
|
});
|
|
120487
120487
|
function once9(fn2) {
|
|
120488
|
-
var
|
|
120489
|
-
if (
|
|
120490
|
-
|
|
120491
|
-
return
|
|
120488
|
+
var f5 = function() {
|
|
120489
|
+
if (f5.called) return f5.value;
|
|
120490
|
+
f5.called = true;
|
|
120491
|
+
return f5.value = fn2.apply(this, arguments);
|
|
120492
120492
|
};
|
|
120493
|
-
|
|
120494
|
-
return
|
|
120493
|
+
f5.called = false;
|
|
120494
|
+
return f5;
|
|
120495
120495
|
}
|
|
120496
120496
|
function onceStrict(fn2) {
|
|
120497
|
-
var
|
|
120498
|
-
if (
|
|
120499
|
-
throw new Error(
|
|
120500
|
-
|
|
120501
|
-
return
|
|
120497
|
+
var f5 = function() {
|
|
120498
|
+
if (f5.called)
|
|
120499
|
+
throw new Error(f5.onceError);
|
|
120500
|
+
f5.called = true;
|
|
120501
|
+
return f5.value = fn2.apply(this, arguments);
|
|
120502
120502
|
};
|
|
120503
120503
|
var name2 = fn2.name || "Function wrapped with `once`";
|
|
120504
|
-
|
|
120505
|
-
|
|
120506
|
-
return
|
|
120504
|
+
f5.onceError = name2 + " shouldn't be called more than once";
|
|
120505
|
+
f5.called = false;
|
|
120506
|
+
return f5;
|
|
120507
120507
|
}
|
|
120508
120508
|
}
|
|
120509
120509
|
});
|
|
@@ -120719,8 +120719,8 @@ var require_glob = __commonJS({
|
|
|
120719
120719
|
Glob2.prototype._mark = function(p3) {
|
|
120720
120720
|
return common.mark(this, p3);
|
|
120721
120721
|
};
|
|
120722
|
-
Glob2.prototype._makeAbs = function(
|
|
120723
|
-
return common.makeAbs(this,
|
|
120722
|
+
Glob2.prototype._makeAbs = function(f5) {
|
|
120723
|
+
return common.makeAbs(this, f5);
|
|
120724
120724
|
};
|
|
120725
120725
|
Glob2.prototype.abort = function() {
|
|
120726
120726
|
this.aborted = true;
|
|
@@ -120956,14 +120956,14 @@ var require_glob = __commonJS({
|
|
|
120956
120956
|
this.cache[abs] = entries;
|
|
120957
120957
|
return cb(null, entries);
|
|
120958
120958
|
};
|
|
120959
|
-
Glob2.prototype._readdirError = function(
|
|
120959
|
+
Glob2.prototype._readdirError = function(f5, er, cb) {
|
|
120960
120960
|
if (this.aborted)
|
|
120961
120961
|
return;
|
|
120962
120962
|
switch (er.code) {
|
|
120963
120963
|
case "ENOTSUP":
|
|
120964
120964
|
// https://github.com/isaacs/node-glob/issues/205
|
|
120965
120965
|
case "ENOTDIR":
|
|
120966
|
-
var abs = this._makeAbs(
|
|
120966
|
+
var abs = this._makeAbs(f5);
|
|
120967
120967
|
this.cache[abs] = "FILE";
|
|
120968
120968
|
if (abs === this.cwdAbs) {
|
|
120969
120969
|
var error = new Error(er.code + " invalid cwd " + this.cwd);
|
|
@@ -120978,10 +120978,10 @@ var require_glob = __commonJS({
|
|
|
120978
120978
|
case "ELOOP":
|
|
120979
120979
|
case "ENAMETOOLONG":
|
|
120980
120980
|
case "UNKNOWN":
|
|
120981
|
-
this.cache[this._makeAbs(
|
|
120981
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
120982
120982
|
break;
|
|
120983
120983
|
default:
|
|
120984
|
-
this.cache[this._makeAbs(
|
|
120984
|
+
this.cache[this._makeAbs(f5)] = false;
|
|
120985
120985
|
if (this.strict) {
|
|
120986
120986
|
this.emit("error", er);
|
|
120987
120987
|
this.abort();
|
|
@@ -121046,10 +121046,10 @@ var require_glob = __commonJS({
|
|
|
121046
121046
|
this._emitMatch(index2, prefix);
|
|
121047
121047
|
cb();
|
|
121048
121048
|
};
|
|
121049
|
-
Glob2.prototype._stat = function(
|
|
121050
|
-
var abs = this._makeAbs(
|
|
121051
|
-
var needDir =
|
|
121052
|
-
if (
|
|
121049
|
+
Glob2.prototype._stat = function(f5, cb) {
|
|
121050
|
+
var abs = this._makeAbs(f5);
|
|
121051
|
+
var needDir = f5.slice(-1) === "/";
|
|
121052
|
+
if (f5.length > this.maxLength)
|
|
121053
121053
|
return cb();
|
|
121054
121054
|
if (!this.stat && ownProp(this.cache, abs)) {
|
|
121055
121055
|
var c3 = this.cache[abs];
|
|
@@ -121081,21 +121081,21 @@ var require_glob = __commonJS({
|
|
|
121081
121081
|
if (lstat3 && lstat3.isSymbolicLink()) {
|
|
121082
121082
|
return self2.fs.stat(abs, function(er2, stat6) {
|
|
121083
121083
|
if (er2)
|
|
121084
|
-
self2._stat2(
|
|
121084
|
+
self2._stat2(f5, abs, null, lstat3, cb);
|
|
121085
121085
|
else
|
|
121086
|
-
self2._stat2(
|
|
121086
|
+
self2._stat2(f5, abs, er2, stat6, cb);
|
|
121087
121087
|
});
|
|
121088
121088
|
} else {
|
|
121089
|
-
self2._stat2(
|
|
121089
|
+
self2._stat2(f5, abs, er, lstat3, cb);
|
|
121090
121090
|
}
|
|
121091
121091
|
}
|
|
121092
121092
|
};
|
|
121093
|
-
Glob2.prototype._stat2 = function(
|
|
121093
|
+
Glob2.prototype._stat2 = function(f5, abs, er, stat5, cb) {
|
|
121094
121094
|
if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
|
|
121095
121095
|
this.statCache[abs] = false;
|
|
121096
121096
|
return cb();
|
|
121097
121097
|
}
|
|
121098
|
-
var needDir =
|
|
121098
|
+
var needDir = f5.slice(-1) === "/";
|
|
121099
121099
|
this.statCache[abs] = stat5;
|
|
121100
121100
|
if (abs.slice(-1) === "/" && stat5 && !stat5.isDirectory())
|
|
121101
121101
|
return cb(null, false, stat5);
|
|
@@ -121294,8 +121294,8 @@ var require_rimraf2 = __commonJS({
|
|
|
121294
121294
|
if (n2 === 0)
|
|
121295
121295
|
return options.rmdir(p3, cb);
|
|
121296
121296
|
let errState;
|
|
121297
|
-
files.forEach((
|
|
121298
|
-
rimraf(path9.join(p3,
|
|
121297
|
+
files.forEach((f5) => {
|
|
121298
|
+
rimraf(path9.join(p3, f5), options, (er2) => {
|
|
121299
121299
|
if (errState)
|
|
121300
121300
|
return;
|
|
121301
121301
|
if (er2)
|
|
@@ -121370,7 +121370,7 @@ var require_rimraf2 = __commonJS({
|
|
|
121370
121370
|
var rmkidsSync = (p3, options) => {
|
|
121371
121371
|
assert17(p3);
|
|
121372
121372
|
assert17(options);
|
|
121373
|
-
options.readdirSync(p3).forEach((
|
|
121373
|
+
options.readdirSync(p3).forEach((f5) => rimrafSync(path9.join(p3, f5), options));
|
|
121374
121374
|
const retries = isWindows4 ? 100 : 1;
|
|
121375
121375
|
let i7 = 0;
|
|
121376
121376
|
do {
|
|
@@ -147531,7 +147531,7 @@ var require_micromatch2 = __commonJS({
|
|
|
147531
147531
|
"use strict";
|
|
147532
147532
|
var util5 = __require("util");
|
|
147533
147533
|
var braces = require_braces2();
|
|
147534
|
-
var
|
|
147534
|
+
var picomatch12 = require_picomatch4();
|
|
147535
147535
|
var utils = require_utils3();
|
|
147536
147536
|
var isEmptyString = (v) => v === "" || v === "./";
|
|
147537
147537
|
var hasBraces = (v) => {
|
|
@@ -147552,7 +147552,7 @@ var require_micromatch2 = __commonJS({
|
|
|
147552
147552
|
}
|
|
147553
147553
|
};
|
|
147554
147554
|
for (let i7 = 0; i7 < patterns.length; i7++) {
|
|
147555
|
-
let isMatch4 =
|
|
147555
|
+
let isMatch4 = picomatch12(String(patterns[i7]), { ...options, onResult }, true);
|
|
147556
147556
|
let negated = isMatch4.state.negated || isMatch4.state.negatedExtglob;
|
|
147557
147557
|
if (negated) negatives++;
|
|
147558
147558
|
for (let item of list2) {
|
|
@@ -147580,8 +147580,8 @@ var require_micromatch2 = __commonJS({
|
|
|
147580
147580
|
return matches;
|
|
147581
147581
|
};
|
|
147582
147582
|
micromatch4.match = micromatch4;
|
|
147583
|
-
micromatch4.matcher = (pattern, options) =>
|
|
147584
|
-
micromatch4.isMatch = (str, patterns, options) =>
|
|
147583
|
+
micromatch4.matcher = (pattern, options) => picomatch12(pattern, options);
|
|
147584
|
+
micromatch4.isMatch = (str, patterns, options) => picomatch12(patterns, options)(str);
|
|
147585
147585
|
micromatch4.any = micromatch4.isMatch;
|
|
147586
147586
|
micromatch4.not = (list2, patterns, options = {}) => {
|
|
147587
147587
|
patterns = [].concat(patterns).map(String);
|
|
@@ -147628,7 +147628,7 @@ var require_micromatch2 = __commonJS({
|
|
|
147628
147628
|
micromatch4.some = (list2, patterns, options) => {
|
|
147629
147629
|
let items = [].concat(list2);
|
|
147630
147630
|
for (let pattern of [].concat(patterns)) {
|
|
147631
|
-
let isMatch4 =
|
|
147631
|
+
let isMatch4 = picomatch12(String(pattern), options);
|
|
147632
147632
|
if (items.some((item) => isMatch4(item))) {
|
|
147633
147633
|
return true;
|
|
147634
147634
|
}
|
|
@@ -147638,7 +147638,7 @@ var require_micromatch2 = __commonJS({
|
|
|
147638
147638
|
micromatch4.every = (list2, patterns, options) => {
|
|
147639
147639
|
let items = [].concat(list2);
|
|
147640
147640
|
for (let pattern of [].concat(patterns)) {
|
|
147641
|
-
let isMatch4 =
|
|
147641
|
+
let isMatch4 = picomatch12(String(pattern), options);
|
|
147642
147642
|
if (!items.every((item) => isMatch4(item))) {
|
|
147643
147643
|
return false;
|
|
147644
147644
|
}
|
|
@@ -147649,23 +147649,23 @@ var require_micromatch2 = __commonJS({
|
|
|
147649
147649
|
if (typeof str !== "string") {
|
|
147650
147650
|
throw new TypeError(`Expected a string: "${util5.inspect(str)}"`);
|
|
147651
147651
|
}
|
|
147652
|
-
return [].concat(patterns).every((p3) =>
|
|
147652
|
+
return [].concat(patterns).every((p3) => picomatch12(p3, options)(str));
|
|
147653
147653
|
};
|
|
147654
147654
|
micromatch4.capture = (glob2, input, options) => {
|
|
147655
147655
|
let posix3 = utils.isWindows(options);
|
|
147656
|
-
let regex =
|
|
147656
|
+
let regex = picomatch12.makeRe(String(glob2), { ...options, capture: true });
|
|
147657
147657
|
let match2 = regex.exec(posix3 ? utils.toPosixSlashes(input) : input);
|
|
147658
147658
|
if (match2) {
|
|
147659
147659
|
return match2.slice(1).map((v) => v === void 0 ? "" : v);
|
|
147660
147660
|
}
|
|
147661
147661
|
};
|
|
147662
|
-
micromatch4.makeRe = (...args2) =>
|
|
147663
|
-
micromatch4.scan = (...args2) =>
|
|
147662
|
+
micromatch4.makeRe = (...args2) => picomatch12.makeRe(...args2);
|
|
147663
|
+
micromatch4.scan = (...args2) => picomatch12.scan(...args2);
|
|
147664
147664
|
micromatch4.parse = (patterns, options) => {
|
|
147665
147665
|
let res = [];
|
|
147666
147666
|
for (let pattern of [].concat(patterns || [])) {
|
|
147667
147667
|
for (let str of braces(String(pattern), options)) {
|
|
147668
|
-
res.push(
|
|
147668
|
+
res.push(picomatch12.parse(str, options));
|
|
147669
147669
|
}
|
|
147670
147670
|
}
|
|
147671
147671
|
return res;
|
|
@@ -150352,9 +150352,9 @@ var require_float6 = __commonJS({
|
|
|
150352
150352
|
const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
|
|
150353
150353
|
const dot = str.indexOf(".");
|
|
150354
150354
|
if (dot !== -1) {
|
|
150355
|
-
const
|
|
150356
|
-
if (
|
|
150357
|
-
node.minFractionDigits =
|
|
150355
|
+
const f5 = str.substring(dot + 1).replace(/_/g, "");
|
|
150356
|
+
if (f5[f5.length - 1] === "0")
|
|
150357
|
+
node.minFractionDigits = f5.length;
|
|
150358
150358
|
}
|
|
150359
150359
|
return node;
|
|
150360
150360
|
},
|
|
@@ -172340,10 +172340,10 @@ var require_lib29 = __commonJS({
|
|
|
172340
172340
|
function sign(x2) {
|
|
172341
172341
|
return x2 < 0 ? -1 : 1;
|
|
172342
172342
|
}
|
|
172343
|
-
function modulo(x2,
|
|
172344
|
-
const signMightNotMatch = x2 %
|
|
172345
|
-
if (sign(
|
|
172346
|
-
return signMightNotMatch +
|
|
172343
|
+
function modulo(x2, y8) {
|
|
172344
|
+
const signMightNotMatch = x2 % y8;
|
|
172345
|
+
if (sign(y8) !== sign(signMightNotMatch)) {
|
|
172346
|
+
return signMightNotMatch + y8;
|
|
172347
172347
|
}
|
|
172348
172348
|
return signMightNotMatch;
|
|
172349
172349
|
}
|
|
@@ -172467,11 +172467,11 @@ var require_lib29 = __commonJS({
|
|
|
172467
172467
|
if (Object.is(x2, -0)) {
|
|
172468
172468
|
return x2;
|
|
172469
172469
|
}
|
|
172470
|
-
const
|
|
172471
|
-
if (!Number.isFinite(
|
|
172470
|
+
const y8 = Math.fround(x2);
|
|
172471
|
+
if (!Number.isFinite(y8)) {
|
|
172472
172472
|
throw makeException(TypeError, "is outside the range of a single-precision floating-point value", options);
|
|
172473
172473
|
}
|
|
172474
|
-
return
|
|
172474
|
+
return y8;
|
|
172475
172475
|
};
|
|
172476
172476
|
exports2["unrestricted float"] = (value2, options = {}) => {
|
|
172477
172477
|
const x2 = toNumber(value2, options);
|
|
@@ -199062,8 +199062,8 @@ var require_WebClient = __commonJS({
|
|
|
199062
199062
|
function reject(value2) {
|
|
199063
199063
|
resume("throw", value2);
|
|
199064
199064
|
}
|
|
199065
|
-
function settle2(
|
|
199066
|
-
if (
|
|
199065
|
+
function settle2(f5, v) {
|
|
199066
|
+
if (f5(v), q5.shift(), q5.length) resume(q5[0][0], q5[0][1]);
|
|
199067
199067
|
}
|
|
199068
199068
|
};
|
|
199069
199069
|
var __asyncValues = exports2 && exports2.__asyncValues || function(o7) {
|
|
@@ -199731,8 +199731,8 @@ function x(t4, ...o7) {
|
|
|
199731
199731
|
}
|
|
199732
199732
|
let a4 = [];
|
|
199733
199733
|
for (let i7 of n2) if (A(i7, a4, r3)) break;
|
|
199734
|
-
let { isSingle:
|
|
199735
|
-
n2 =
|
|
199734
|
+
let { isSingle: y8 } = r3.at(-1);
|
|
199735
|
+
n2 = y8 ? a4[0] : a4, p3 += r3.length;
|
|
199736
199736
|
}
|
|
199737
199737
|
return n2;
|
|
199738
199738
|
}
|
|
@@ -199740,8 +199740,8 @@ function A(t4, o7, n2) {
|
|
|
199740
199740
|
if (n2.length === 0) return o7.push(t4), false;
|
|
199741
199741
|
let u8 = t4, p3 = s, e = false;
|
|
199742
199742
|
for (let [r3, a4] of n2.entries()) {
|
|
199743
|
-
let { index:
|
|
199744
|
-
if (i7.push(u8), p3 = a4(u8,
|
|
199743
|
+
let { index: y8, items: i7 } = a4;
|
|
199744
|
+
if (i7.push(u8), p3 = a4(u8, y8, i7), a4.index += 1, p3.hasNext) {
|
|
199745
199745
|
if (p3.hasMany ?? false) {
|
|
199746
199746
|
for (let l6 of p3.next) if (A(l6, o7, n2.slice(r3 + 1))) return true;
|
|
199747
199747
|
return e;
|
|
@@ -199817,9 +199817,9 @@ function m(r3, n2) {
|
|
|
199817
199817
|
}
|
|
199818
199818
|
function u3(r3, n2, ...e) {
|
|
199819
199819
|
let o7 = typeof r3 == "function" ? r3 : r3[0], a4 = typeof r3 == "function" ? "asc" : r3[1], { [a4]: t4 } = T, i7 = n2 === void 0 ? void 0 : u3(n2, ...e);
|
|
199820
|
-
return (
|
|
199821
|
-
let l6 = o7(
|
|
199822
|
-
return t4(l6, p3) ? 1 : t4(p3, l6) ? -1 : i7?.(
|
|
199820
|
+
return (y8, c3) => {
|
|
199821
|
+
let l6 = o7(y8), p3 = o7(c3);
|
|
199822
|
+
return t4(l6, p3) ? 1 : t4(p3, l6) ? -1 : i7?.(y8, c3) ?? 0;
|
|
199823
199823
|
};
|
|
199824
199824
|
}
|
|
199825
199825
|
function s2(r3) {
|
|
@@ -199840,29 +199840,14 @@ function c(n2, r3) {
|
|
|
199840
199840
|
return o7;
|
|
199841
199841
|
}
|
|
199842
199842
|
|
|
199843
|
-
// ../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-RLZQTLGN.js
|
|
199844
|
-
function y(...t4) {
|
|
199845
|
-
return u2(f3, t4);
|
|
199846
|
-
}
|
|
199847
|
-
function f3(t4, e) {
|
|
199848
|
-
if (!i2(e, 1)) return { ...t4 };
|
|
199849
|
-
if (!i2(e, 2)) {
|
|
199850
|
-
let { [e[0]]: r3, ...m4 } = t4;
|
|
199851
|
-
return m4;
|
|
199852
|
-
}
|
|
199853
|
-
let o7 = { ...t4 };
|
|
199854
|
-
for (let r3 of e) delete o7[r3];
|
|
199855
|
-
return o7;
|
|
199856
|
-
}
|
|
199857
|
-
|
|
199858
199843
|
// ../../node_modules/.pnpm/remeda@2.14.0/node_modules/remeda/dist/chunk-5KH5J3AC.js
|
|
199859
199844
|
function l(...n2) {
|
|
199860
199845
|
return m(u4, n2);
|
|
199861
199846
|
}
|
|
199862
|
-
function u4(n2,
|
|
199847
|
+
function u4(n2, y8) {
|
|
199863
199848
|
if (!i2(n2, 2)) return n2[0];
|
|
199864
199849
|
let [e] = n2, [, ...i7] = n2;
|
|
199865
|
-
for (let r3 of i7)
|
|
199850
|
+
for (let r3 of i7) y8(r3, e) < 0 && (e = r3);
|
|
199866
199851
|
return e;
|
|
199867
199852
|
}
|
|
199868
199853
|
|
|
@@ -203578,7 +203563,7 @@ var o2 = (t4) => ({ hasNext: true, next: t4, done: false });
|
|
|
203578
203563
|
|
|
203579
203564
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3GOCSNFN.js
|
|
203580
203565
|
function C(t4, ...o7) {
|
|
203581
|
-
let n2 = t4, u8 = o7.map((e) => "lazy" in e ?
|
|
203566
|
+
let n2 = t4, u8 = o7.map((e) => "lazy" in e ? y(e) : void 0), p3 = 0;
|
|
203582
203567
|
for (; p3 < o7.length; ) {
|
|
203583
203568
|
if (u8[p3] === void 0 || !B2(n2)) {
|
|
203584
203569
|
let i7 = o7[p3];
|
|
@@ -203591,20 +203576,20 @@ function C(t4, ...o7) {
|
|
|
203591
203576
|
if (l6 === void 0 || (r3.push(l6), l6.isSingle)) break;
|
|
203592
203577
|
}
|
|
203593
203578
|
let a4 = [];
|
|
203594
|
-
for (let i7 of n2) if (
|
|
203579
|
+
for (let i7 of n2) if (f3(i7, a4, r3)) break;
|
|
203595
203580
|
let { isSingle: s6 } = r3.at(-1);
|
|
203596
203581
|
n2 = s6 ? a4[0] : a4, p3 += r3.length;
|
|
203597
203582
|
}
|
|
203598
203583
|
return n2;
|
|
203599
203584
|
}
|
|
203600
|
-
function
|
|
203585
|
+
function f3(t4, o7, n2) {
|
|
203601
203586
|
if (n2.length === 0) return o7.push(t4), false;
|
|
203602
203587
|
let u8 = t4, p3 = s3, e = false;
|
|
203603
203588
|
for (let [r3, a4] of n2.entries()) {
|
|
203604
203589
|
let { index: s6, items: i7 } = a4;
|
|
203605
203590
|
if (i7.push(u8), p3 = a4(u8, s6, i7), a4.index += 1, p3.hasNext) {
|
|
203606
203591
|
if (p3.hasMany ?? false) {
|
|
203607
|
-
for (let l6 of p3.next) if (
|
|
203592
|
+
for (let l6 of p3.next) if (f3(l6, o7, n2.slice(r3 + 1))) return true;
|
|
203608
203593
|
return e;
|
|
203609
203594
|
}
|
|
203610
203595
|
u8 = p3.next;
|
|
@@ -203614,7 +203599,7 @@ function f4(t4, o7, n2) {
|
|
|
203614
203599
|
}
|
|
203615
203600
|
return p3.hasNext && o7.push(u8), e;
|
|
203616
203601
|
}
|
|
203617
|
-
function
|
|
203602
|
+
function y(t4) {
|
|
203618
203603
|
let { lazy: o7, lazyArgs: n2 } = t4, u8 = o7(...n2);
|
|
203619
203604
|
return Object.assign(u8, { isSingle: o7.single ?? false, index: 0, items: [] });
|
|
203620
203605
|
}
|
|
@@ -203623,7 +203608,7 @@ function B2(t4) {
|
|
|
203623
203608
|
}
|
|
203624
203609
|
|
|
203625
203610
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-LFJW7BOT.js
|
|
203626
|
-
function
|
|
203611
|
+
function y2(t4, i7) {
|
|
203627
203612
|
let a4 = i7.length - t4.length;
|
|
203628
203613
|
if (a4 === 1) {
|
|
203629
203614
|
let [n2, ...r3] = i7;
|
|
@@ -203638,9 +203623,9 @@ function y3(t4, i7) {
|
|
|
203638
203623
|
|
|
203639
203624
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-7ZI6JRPB.js
|
|
203640
203625
|
function T2(...e) {
|
|
203641
|
-
return y3
|
|
203626
|
+
return y2(y3, e);
|
|
203642
203627
|
}
|
|
203643
|
-
function
|
|
203628
|
+
function y3(e) {
|
|
203644
203629
|
let u8 = e, n2 = /* @__PURE__ */ new Set();
|
|
203645
203630
|
return (t4, i7, d4) => {
|
|
203646
203631
|
let r3 = u8(t4, i7, d4);
|
|
@@ -203650,7 +203635,7 @@ function y4(e) {
|
|
|
203650
203635
|
|
|
203651
203636
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OXJMERKM.js
|
|
203652
203637
|
function m2(...e) {
|
|
203653
|
-
return
|
|
203638
|
+
return y2(s4, e);
|
|
203654
203639
|
}
|
|
203655
203640
|
var s4 = (e) => (t4, n2, o7) => o7.findIndex((u8, i7) => n2 === i7 || e(t4, u8)) === n2 ? { done: false, hasNext: true, next: t4 } : s3;
|
|
203656
203641
|
|
|
@@ -203675,7 +203660,7 @@ function r2(...t4) {
|
|
|
203675
203660
|
|
|
203676
203661
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QJLMYOTX.js
|
|
203677
203662
|
function i3(...e) {
|
|
203678
|
-
return
|
|
203663
|
+
return y2(a2, e);
|
|
203679
203664
|
}
|
|
203680
203665
|
function a2() {
|
|
203681
203666
|
let e = /* @__PURE__ */ new Set();
|
|
@@ -203731,10 +203716,10 @@ function i6(...e) {
|
|
|
203731
203716
|
var p2 = (e, a4) => {
|
|
203732
203717
|
let n2 = /* @__PURE__ */ new Map();
|
|
203733
203718
|
for (let [d4, t4] of e.entries()) {
|
|
203734
|
-
let
|
|
203735
|
-
if (
|
|
203736
|
-
let r3 = n2.get(
|
|
203737
|
-
r3 === void 0 && (r3 = [], n2.set(
|
|
203719
|
+
let y8 = a4(t4, d4, e);
|
|
203720
|
+
if (y8 !== void 0) {
|
|
203721
|
+
let r3 = n2.get(y8);
|
|
203722
|
+
r3 === void 0 && (r3 = [], n2.set(y8, r3)), r3.push(t4);
|
|
203738
203723
|
}
|
|
203739
203724
|
}
|
|
203740
203725
|
return Object.fromEntries(n2);
|
|
@@ -203742,9 +203727,9 @@ var p2 = (e, a4) => {
|
|
|
203742
203727
|
|
|
203743
203728
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-B6PG574O.js
|
|
203744
203729
|
function c2(...e) {
|
|
203745
|
-
return u6(
|
|
203730
|
+
return u6(y4, e);
|
|
203746
203731
|
}
|
|
203747
|
-
function
|
|
203732
|
+
function y4(e, o7) {
|
|
203748
203733
|
let r3 = {};
|
|
203749
203734
|
for (let [a4, n2] of e.entries()) {
|
|
203750
203735
|
let d4 = o7(n2, a4, e);
|
|
@@ -203754,7 +203739,7 @@ function y5(e, o7) {
|
|
|
203754
203739
|
}
|
|
203755
203740
|
|
|
203756
203741
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XPCYQPKH.js
|
|
203757
|
-
function
|
|
203742
|
+
function y5(e, t4) {
|
|
203758
203743
|
return typeof e == "object" ? a3(e, t4) : u5(a3, e === void 0 ? [] : [e], o5);
|
|
203759
203744
|
}
|
|
203760
203745
|
var a3 = (e, t4) => t4 === void 0 ? e.flat() : e.flat(t4);
|
|
@@ -203766,8 +203751,8 @@ function u7(...a4) {
|
|
|
203766
203751
|
return u6(o6, a4, l4);
|
|
203767
203752
|
}
|
|
203768
203753
|
var o6 = (a4, r3) => a4.flatMap(r3);
|
|
203769
|
-
var l4 = (a4) => (r3, t4,
|
|
203770
|
-
let n2 = a4(r3, t4,
|
|
203754
|
+
var l4 = (a4) => (r3, t4, y8) => {
|
|
203755
|
+
let n2 = a4(r3, t4, y8);
|
|
203771
203756
|
return Array.isArray(n2) ? { done: false, hasNext: true, hasMany: true, next: n2 } : { done: false, hasNext: true, next: n2 };
|
|
203772
203757
|
};
|
|
203773
203758
|
|
|
@@ -203783,13 +203768,13 @@ function t3(...r3) {
|
|
|
203783
203768
|
|
|
203784
203769
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P6LAFGAN.js
|
|
203785
203770
|
function T3(...a4) {
|
|
203786
|
-
return u6(l5, a4,
|
|
203771
|
+
return u6(l5, a4, y6);
|
|
203787
203772
|
}
|
|
203788
203773
|
var l5 = (a4, r3) => a4.filter(r3);
|
|
203789
|
-
var
|
|
203774
|
+
var y6 = (a4) => (r3, t4, o7) => a4(r3, t4, o7) ? { done: false, hasNext: true, next: r3 } : s3;
|
|
203790
203775
|
|
|
203791
203776
|
// ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WFMWIRTS.js
|
|
203792
|
-
function
|
|
203777
|
+
function f4(...e) {
|
|
203793
203778
|
return u6(s5, e);
|
|
203794
203779
|
}
|
|
203795
203780
|
function s5(e, n2) {
|
|
@@ -203805,6 +203790,41 @@ function s5(e, n2) {
|
|
|
203805
203790
|
return u8;
|
|
203806
203791
|
}
|
|
203807
203792
|
|
|
203793
|
+
// ../shared-types/src/vulnerabilities.ts
|
|
203794
|
+
var PURL_Type = /* @__PURE__ */ ((PURL_Type2) => {
|
|
203795
|
+
PURL_Type2["ALPM"] = "alpm";
|
|
203796
|
+
PURL_Type2["APK"] = "apk";
|
|
203797
|
+
PURL_Type2["BITBUCKET"] = "bitbucket";
|
|
203798
|
+
PURL_Type2["COCOAPODS"] = "cocoapods";
|
|
203799
|
+
PURL_Type2["CARGO"] = "cargo";
|
|
203800
|
+
PURL_Type2["COMPOSER"] = "composer";
|
|
203801
|
+
PURL_Type2["CONAN"] = "conan";
|
|
203802
|
+
PURL_Type2["CONDA"] = "conda";
|
|
203803
|
+
PURL_Type2["CRAN"] = "cran";
|
|
203804
|
+
PURL_Type2["DEB"] = "deb";
|
|
203805
|
+
PURL_Type2["DOCKER"] = "docker";
|
|
203806
|
+
PURL_Type2["GEM"] = "gem";
|
|
203807
|
+
PURL_Type2["GENERIC"] = "generic";
|
|
203808
|
+
PURL_Type2["GITHUB"] = "github";
|
|
203809
|
+
PURL_Type2["GOLANG"] = "golang";
|
|
203810
|
+
PURL_Type2["HACKAGE"] = "hackage";
|
|
203811
|
+
PURL_Type2["HEX"] = "hex";
|
|
203812
|
+
PURL_Type2["HUGGINGFACE"] = "huggingface";
|
|
203813
|
+
PURL_Type2["MAVEN"] = "maven";
|
|
203814
|
+
PURL_Type2["MLFLOW"] = "mlflow";
|
|
203815
|
+
PURL_Type2["NPM"] = "npm";
|
|
203816
|
+
PURL_Type2["NUGET"] = "nuget";
|
|
203817
|
+
PURL_Type2["QPKG"] = "qpkg";
|
|
203818
|
+
PURL_Type2["OCI"] = "oci";
|
|
203819
|
+
PURL_Type2["PUB"] = "pub";
|
|
203820
|
+
PURL_Type2["PYPI"] = "pypi";
|
|
203821
|
+
PURL_Type2["RPM"] = "rpm";
|
|
203822
|
+
PURL_Type2["SWID"] = "swid";
|
|
203823
|
+
PURL_Type2["SWIFT"] = "swift";
|
|
203824
|
+
PURL_Type2["UNKNOWN"] = "unknown";
|
|
203825
|
+
return PURL_Type2;
|
|
203826
|
+
})(PURL_Type || {});
|
|
203827
|
+
|
|
203808
203828
|
// ../web-compat-utils/src/purl-utils.ts
|
|
203809
203829
|
function getPurlType(ecosystem) {
|
|
203810
203830
|
switch (ecosystem) {
|
|
@@ -204397,22 +204417,29 @@ async function getLatestBucketsSocket(subprojectPath, workspacePath) {
|
|
|
204397
204417
|
return void 0;
|
|
204398
204418
|
}
|
|
204399
204419
|
}
|
|
204400
|
-
async function
|
|
204420
|
+
async function fetchFixesFromAPI(params) {
|
|
204421
|
+
const urlParams = new URLSearchParams();
|
|
204422
|
+
urlParams.set("tar_hash", params.tarHash);
|
|
204423
|
+
const vulnIds = params.vulnerabilityIds.includes("all") ? "*" : params.vulnerabilityIds.join(",");
|
|
204424
|
+
urlParams.set("vulnerability_ids", vulnIds);
|
|
204425
|
+
if (params.allowMajorUpdates !== void 0) {
|
|
204426
|
+
urlParams.set("allow_major_updates", String(params.allowMajorUpdates));
|
|
204427
|
+
}
|
|
204428
|
+
if (params.minimumReleaseAge) {
|
|
204429
|
+
urlParams.set("minimum_release_age", params.minimumReleaseAge);
|
|
204430
|
+
}
|
|
204431
|
+
if (params.includeAllDetectedGhsas) {
|
|
204432
|
+
urlParams.set("include_all_detected_ghsas", "true");
|
|
204433
|
+
}
|
|
204434
|
+
if (params.autofixRunId) {
|
|
204435
|
+
urlParams.set("autofix_run_id", params.autofixRunId);
|
|
204436
|
+
}
|
|
204401
204437
|
try {
|
|
204402
|
-
const url2 = getSocketApiUrl(
|
|
204403
|
-
|
|
204404
|
-
autofixRunId,
|
|
204405
|
-
artifacts,
|
|
204406
|
-
vulnerableArtifactIndexes: vulnerableArtifactIdsForGhsas,
|
|
204407
|
-
config: config3
|
|
204408
|
-
};
|
|
204409
|
-
return (await axios2.post(url2, data2, { headers: getAuthHeaders() })).data;
|
|
204438
|
+
const url2 = getSocketApiUrl(`orgs/${process.env.SOCKET_ORG_SLUG}/fixes?${urlParams.toString()}`);
|
|
204439
|
+
return (await axios2.get(url2, { headers: getAuthHeaders() })).data;
|
|
204410
204440
|
} catch (error) {
|
|
204411
|
-
handleError(error, "Request to compute fixes failed",
|
|
204412
|
-
|
|
204413
|
-
type: "error",
|
|
204414
|
-
message: "Error during computation"
|
|
204415
|
-
};
|
|
204441
|
+
handleError(error, "Request to compute fixes failed", true);
|
|
204442
|
+
throw new Error("we should never reach this point");
|
|
204416
204443
|
}
|
|
204417
204444
|
}
|
|
204418
204445
|
async function augmentArtifactsWithVulnerabilities(components) {
|
|
@@ -204498,7 +204525,11 @@ async function fetchArtifactsFromManifestsTarHash(manifestsTarHash, includePreco
|
|
|
204498
204525
|
try {
|
|
204499
204526
|
const params = new URLSearchParams({
|
|
204500
204527
|
tarHash: manifestsTarHash,
|
|
204501
|
-
includePrecomputedReachabilityResults: String(includePrecomputedReachabilityResults ?? false)
|
|
204528
|
+
includePrecomputedReachabilityResults: String(includePrecomputedReachabilityResults ?? false),
|
|
204529
|
+
// Opt in to depscan PR #19451: returns artifacts with `missingMetadata: true` for packages
|
|
204530
|
+
// whose precrawl metadata is unavailable (private registry, workspace, git deps). This CLI
|
|
204531
|
+
// version strips them after reachability analysis (see filterMissingMetadataArtifacts).
|
|
204532
|
+
includeMissingMetadata: "true"
|
|
204502
204533
|
});
|
|
204503
204534
|
const url2 = getSocketApiUrl(`orgs/${process.env.SOCKET_ORG_SLUG}/compute-artifacts?${params.toString()}`);
|
|
204504
204535
|
responseData = (await axios2.post(url2, {}, { headers: getAuthHeaders() })).data;
|
|
@@ -207862,17 +207893,17 @@ var twos = (buf) => {
|
|
|
207862
207893
|
var flipped = false;
|
|
207863
207894
|
for (var i7 = len - 1; i7 > -1; i7--) {
|
|
207864
207895
|
var byte = Number(buf[i7]);
|
|
207865
|
-
var
|
|
207896
|
+
var f5;
|
|
207866
207897
|
if (flipped) {
|
|
207867
|
-
|
|
207898
|
+
f5 = onesComp(byte);
|
|
207868
207899
|
} else if (byte === 0) {
|
|
207869
|
-
|
|
207900
|
+
f5 = byte;
|
|
207870
207901
|
} else {
|
|
207871
207902
|
flipped = true;
|
|
207872
|
-
|
|
207903
|
+
f5 = twosComp(byte);
|
|
207873
207904
|
}
|
|
207874
|
-
if (
|
|
207875
|
-
sum -=
|
|
207905
|
+
if (f5 !== 0) {
|
|
207906
|
+
sum -= f5 * Math.pow(256, len - i7 - 1);
|
|
207876
207907
|
}
|
|
207877
207908
|
}
|
|
207878
207909
|
return sum;
|
|
@@ -208891,7 +208922,7 @@ var onReadEntryFunction = (opt) => {
|
|
|
208891
208922
|
} : (e) => e.resume();
|
|
208892
208923
|
};
|
|
208893
208924
|
var filesFilter = (opt, files) => {
|
|
208894
|
-
const map2 = new Map(files.map((
|
|
208925
|
+
const map2 = new Map(files.map((f5) => [stripTrailingSlashes(f5), true]));
|
|
208895
208926
|
const filter6 = opt.filter;
|
|
208896
208927
|
const mapHas = (file, r3 = "") => {
|
|
208897
208928
|
const root3 = r3 || parse2(file).root || ".";
|
|
@@ -210710,8 +210741,8 @@ var PathReservations = class {
|
|
|
210710
210741
|
if (typeof q0 === "function") {
|
|
210711
210742
|
next2.add(q0);
|
|
210712
210743
|
} else {
|
|
210713
|
-
for (const
|
|
210714
|
-
next2.add(
|
|
210744
|
+
for (const f5 of q0) {
|
|
210745
|
+
next2.add(f5);
|
|
210715
210746
|
}
|
|
210716
210747
|
}
|
|
210717
210748
|
}
|
|
@@ -217128,7 +217159,7 @@ var MavenFixingManager = class {
|
|
|
217128
217159
|
if (pmInfo.packageManager !== "MAVEN") {
|
|
217129
217160
|
throw Error(`fixing data for package manager 'MAVEN' required, got ${pmInfo.packageManager}`);
|
|
217130
217161
|
}
|
|
217131
|
-
const validateFile = (
|
|
217162
|
+
const validateFile = (f5) => f5;
|
|
217132
217163
|
const dependencyTrees = fixingInfo.dependencyTrees;
|
|
217133
217164
|
const workspacePaths = Object.keys(fixes);
|
|
217134
217165
|
const directPatchResults = [];
|
|
@@ -217550,8 +217581,8 @@ var PomUpgradeHandler = class {
|
|
|
217550
217581
|
this.rootDir = rootDir;
|
|
217551
217582
|
this.validFiles = validFiles;
|
|
217552
217583
|
}
|
|
217553
|
-
validateFile = (
|
|
217554
|
-
return this.validFiles.has(
|
|
217584
|
+
validateFile = (f5) => {
|
|
217585
|
+
return this.validFiles.has(f5) ? f5 : void 0;
|
|
217555
217586
|
};
|
|
217556
217587
|
async handle(ctxt) {
|
|
217557
217588
|
const patches = [];
|
|
@@ -217560,7 +217591,7 @@ var PomUpgradeHandler = class {
|
|
|
217560
217591
|
const artifact = ctxt.artifacts[idx];
|
|
217561
217592
|
await asyncForEach(
|
|
217562
217593
|
i3(
|
|
217563
|
-
artifact.manifestFiles?.map((ref) => ref.file).filter((
|
|
217594
|
+
artifact.manifestFiles?.map((ref) => ref.file).filter((f5) => !ctxt.wsFilter || ctxt.wsFilter(dirname9(f5) || ".")).map((f5) => resolve12(this.rootDir, f5)).filter(this.validateFile) ?? []
|
|
217564
217595
|
),
|
|
217565
217596
|
async (validatedManifestFile) => {
|
|
217566
217597
|
const res = await this.getDirectDependencyPatches(validatedManifestFile, idx, upgradeVersion, ctxt);
|
|
@@ -217579,7 +217610,7 @@ var PomUpgradeHandler = class {
|
|
|
217579
217610
|
i3(
|
|
217580
217611
|
artifact.toplevelAncestors?.flatMap(
|
|
217581
217612
|
(ancestorId) => ctxt.artifacts.find((a4) => a4.id === ancestorId)?.manifestFiles?.map((m4) => m4.file) ?? []
|
|
217582
|
-
)?.map((
|
|
217613
|
+
)?.map((f5) => resolve12(this.rootDir, f5)).filter(this.validateFile) ?? []
|
|
217583
217614
|
),
|
|
217584
217615
|
async (validatedManifestFile) => {
|
|
217585
217616
|
const res = await this.getTransitiveDependencyPatches(validatedManifestFile, idx, upgradeVersion, ctxt);
|
|
@@ -217623,7 +217654,7 @@ var PomUpgradeHandler = class {
|
|
|
217623
217654
|
"Computing remaining upgrades",
|
|
217624
217655
|
async () => await computeSocketFactArtifacts(
|
|
217625
217656
|
this.rootDir,
|
|
217626
|
-
Array.from(this.validFiles).map((
|
|
217657
|
+
Array.from(this.validFiles).map((f5) => relative4(this.rootDir, f5))
|
|
217627
217658
|
)
|
|
217628
217659
|
) : ctxt.artifacts;
|
|
217629
217660
|
if (!recomputedArtifacts) {
|
|
@@ -217645,7 +217676,7 @@ var PomUpgradeHandler = class {
|
|
|
217645
217676
|
newArtifact.toplevelAncestors?.flatMap(
|
|
217646
217677
|
(ancestorId) => recomputedArtifacts.find((a4) => a4.id === ancestorId)?.manifestFiles?.map((m4) => m4.file) ?? []
|
|
217647
217678
|
) ?? []
|
|
217648
|
-
).map((
|
|
217679
|
+
).map((f5) => resolve12(this.rootDir, f5)).filter(this.validateFile)
|
|
217649
217680
|
);
|
|
217650
217681
|
await asyncForEach(validatedManifestFiles, async (validatedManifestFile) => {
|
|
217651
217682
|
const dependency = await this.getFallbackDependency(
|
|
@@ -218062,8 +218093,8 @@ var GradleLockfileUpgradeHandler = class {
|
|
|
218062
218093
|
this.rootDir = rootDir;
|
|
218063
218094
|
this.validFiles = validFiles;
|
|
218064
218095
|
}
|
|
218065
|
-
validateFile = (
|
|
218066
|
-
return this.validFiles.has(
|
|
218096
|
+
validateFile = (f5) => {
|
|
218097
|
+
return this.validFiles.has(f5) ? f5 : void 0;
|
|
218067
218098
|
};
|
|
218068
218099
|
async handle(ctxt) {
|
|
218069
218100
|
const patches = await asyncFlatMap(
|
|
@@ -218077,7 +218108,7 @@ var GradleLockfileUpgradeHandler = class {
|
|
|
218077
218108
|
const artifact = ctxt.artifacts[idx];
|
|
218078
218109
|
const toplevelAncestors = artifact.toplevelAncestors?.map((ancestorId) => ctxt.artifacts.find((a4) => a4.id === ancestorId)).filter((ancestor) => ancestor !== void 0);
|
|
218079
218110
|
const validatedManifestFiles = i3(
|
|
218080
|
-
(artifact.manifestFiles?.map((ref) => ref.file) ?? []).concat(toplevelAncestors?.flatMap(({ manifestFiles }) => manifestFiles?.map((m4) => m4.file) ?? []) ?? []).filter((
|
|
218111
|
+
(artifact.manifestFiles?.map((ref) => ref.file) ?? []).concat(toplevelAncestors?.flatMap(({ manifestFiles }) => manifestFiles?.map((m4) => m4.file) ?? []) ?? []).filter((f5) => !ctxt.wsFilter || ctxt.wsFilter(dirname10(f5) || ".")).map((f5) => resolve14(this.rootDir, f5)).filter(this.validateFile)
|
|
218081
218112
|
);
|
|
218082
218113
|
await asyncForEach(validatedManifestFiles, async (validatedManifestFile) => {
|
|
218083
218114
|
let lockFile;
|
|
@@ -218335,8 +218366,8 @@ var SbtUpgradeHandler = class {
|
|
|
218335
218366
|
this.rootDir = rootDir;
|
|
218336
218367
|
this.validFiles = validFiles;
|
|
218337
218368
|
}
|
|
218338
|
-
validateFile = (
|
|
218339
|
-
return this.validFiles.has(
|
|
218369
|
+
validateFile = (f5) => {
|
|
218370
|
+
return this.validFiles.has(f5) ? f5 : void 0;
|
|
218340
218371
|
};
|
|
218341
218372
|
async handle(ctxt) {
|
|
218342
218373
|
const patches = [];
|
|
@@ -218348,7 +218379,7 @@ var SbtUpgradeHandler = class {
|
|
|
218348
218379
|
artifact.toplevelAncestors?.flatMap(
|
|
218349
218380
|
(ancestorId) => ctxt.artifacts.find((a4) => a4.id === ancestorId)?.manifestFiles?.map((m4) => m4.file) ?? []
|
|
218350
218381
|
) ?? []
|
|
218351
|
-
).map((
|
|
218382
|
+
).map((f5) => resolve15(this.rootDir, f5)).filter(this.validateFile)
|
|
218352
218383
|
);
|
|
218353
218384
|
await asyncForEach(validatedManifestFiles, async (validatedManifestFile) => {
|
|
218354
218385
|
const workspacePath = findSbtWorkspace(validatedManifestFile);
|
|
@@ -219507,54 +219538,54 @@ var minimatch = (p3, pattern, options = {}) => {
|
|
|
219507
219538
|
return new Minimatch(pattern, options).match(p3);
|
|
219508
219539
|
};
|
|
219509
219540
|
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
219510
|
-
var starDotExtTest = (ext2) => (
|
|
219511
|
-
var starDotExtTestDot = (ext2) => (
|
|
219541
|
+
var starDotExtTest = (ext2) => (f5) => !f5.startsWith(".") && f5.endsWith(ext2);
|
|
219542
|
+
var starDotExtTestDot = (ext2) => (f5) => f5.endsWith(ext2);
|
|
219512
219543
|
var starDotExtTestNocase = (ext2) => {
|
|
219513
219544
|
ext2 = ext2.toLowerCase();
|
|
219514
|
-
return (
|
|
219545
|
+
return (f5) => !f5.startsWith(".") && f5.toLowerCase().endsWith(ext2);
|
|
219515
219546
|
};
|
|
219516
219547
|
var starDotExtTestNocaseDot = (ext2) => {
|
|
219517
219548
|
ext2 = ext2.toLowerCase();
|
|
219518
|
-
return (
|
|
219549
|
+
return (f5) => f5.toLowerCase().endsWith(ext2);
|
|
219519
219550
|
};
|
|
219520
219551
|
var starDotStarRE = /^\*+\.\*+$/;
|
|
219521
|
-
var starDotStarTest = (
|
|
219522
|
-
var starDotStarTestDot = (
|
|
219552
|
+
var starDotStarTest = (f5) => !f5.startsWith(".") && f5.includes(".");
|
|
219553
|
+
var starDotStarTestDot = (f5) => f5 !== "." && f5 !== ".." && f5.includes(".");
|
|
219523
219554
|
var dotStarRE = /^\.\*+$/;
|
|
219524
|
-
var dotStarTest = (
|
|
219555
|
+
var dotStarTest = (f5) => f5 !== "." && f5 !== ".." && f5.startsWith(".");
|
|
219525
219556
|
var starRE = /^\*+$/;
|
|
219526
|
-
var starTest = (
|
|
219527
|
-
var starTestDot = (
|
|
219557
|
+
var starTest = (f5) => f5.length !== 0 && !f5.startsWith(".");
|
|
219558
|
+
var starTestDot = (f5) => f5.length !== 0 && f5 !== "." && f5 !== "..";
|
|
219528
219559
|
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
219529
219560
|
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
219530
219561
|
const noext = qmarksTestNoExt([$0]);
|
|
219531
219562
|
if (!ext2)
|
|
219532
219563
|
return noext;
|
|
219533
219564
|
ext2 = ext2.toLowerCase();
|
|
219534
|
-
return (
|
|
219565
|
+
return (f5) => noext(f5) && f5.toLowerCase().endsWith(ext2);
|
|
219535
219566
|
};
|
|
219536
219567
|
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
219537
219568
|
const noext = qmarksTestNoExtDot([$0]);
|
|
219538
219569
|
if (!ext2)
|
|
219539
219570
|
return noext;
|
|
219540
219571
|
ext2 = ext2.toLowerCase();
|
|
219541
|
-
return (
|
|
219572
|
+
return (f5) => noext(f5) && f5.toLowerCase().endsWith(ext2);
|
|
219542
219573
|
};
|
|
219543
219574
|
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
219544
219575
|
const noext = qmarksTestNoExtDot([$0]);
|
|
219545
|
-
return !ext2 ? noext : (
|
|
219576
|
+
return !ext2 ? noext : (f5) => noext(f5) && f5.endsWith(ext2);
|
|
219546
219577
|
};
|
|
219547
219578
|
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
219548
219579
|
const noext = qmarksTestNoExt([$0]);
|
|
219549
|
-
return !ext2 ? noext : (
|
|
219580
|
+
return !ext2 ? noext : (f5) => noext(f5) && f5.endsWith(ext2);
|
|
219550
219581
|
};
|
|
219551
219582
|
var qmarksTestNoExt = ([$0]) => {
|
|
219552
219583
|
const len = $0.length;
|
|
219553
|
-
return (
|
|
219584
|
+
return (f5) => f5.length === len && !f5.startsWith(".");
|
|
219554
219585
|
};
|
|
219555
219586
|
var qmarksTestNoExtDot = ([$0]) => {
|
|
219556
219587
|
const len = $0.length;
|
|
219557
|
-
return (
|
|
219588
|
+
return (f5) => f5.length === len && f5 !== "." && f5 !== "..";
|
|
219558
219589
|
};
|
|
219559
219590
|
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
219560
219591
|
var path8 = {
|
|
@@ -219621,7 +219652,7 @@ var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe()
|
|
|
219621
219652
|
minimatch.makeRe = makeRe;
|
|
219622
219653
|
var match = (list2, pattern, options = {}) => {
|
|
219623
219654
|
const mm = new Minimatch(pattern, options);
|
|
219624
|
-
list2 = list2.filter((
|
|
219655
|
+
list2 = list2.filter((f5) => mm.match(f5));
|
|
219625
219656
|
if (mm.options.nonull && !list2.length) {
|
|
219626
219657
|
list2.push(pattern);
|
|
219627
219658
|
}
|
|
@@ -220013,13 +220044,13 @@ var Minimatch = class {
|
|
|
220013
220044
|
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
220014
220045
|
this.debug("matchOne loop");
|
|
220015
220046
|
var p3 = pattern[pi];
|
|
220016
|
-
var
|
|
220017
|
-
this.debug(pattern, p3,
|
|
220047
|
+
var f5 = file[fi];
|
|
220048
|
+
this.debug(pattern, p3, f5);
|
|
220018
220049
|
if (p3 === false) {
|
|
220019
220050
|
return false;
|
|
220020
220051
|
}
|
|
220021
220052
|
if (p3 === GLOBSTAR) {
|
|
220022
|
-
this.debug("GLOBSTAR", [pattern, p3,
|
|
220053
|
+
this.debug("GLOBSTAR", [pattern, p3, f5]);
|
|
220023
220054
|
var fr = fi;
|
|
220024
220055
|
var pr = pi + 1;
|
|
220025
220056
|
if (pr === pl) {
|
|
@@ -220055,11 +220086,11 @@ var Minimatch = class {
|
|
|
220055
220086
|
}
|
|
220056
220087
|
let hit;
|
|
220057
220088
|
if (typeof p3 === "string") {
|
|
220058
|
-
hit =
|
|
220059
|
-
this.debug("string match", p3,
|
|
220089
|
+
hit = f5 === p3;
|
|
220090
|
+
this.debug("string match", p3, f5, hit);
|
|
220060
220091
|
} else {
|
|
220061
|
-
hit = p3.test(
|
|
220062
|
-
this.debug("pattern match", p3,
|
|
220092
|
+
hit = p3.test(f5);
|
|
220093
|
+
this.debug("pattern match", p3, f5, hit);
|
|
220063
220094
|
}
|
|
220064
220095
|
if (!hit)
|
|
220065
220096
|
return false;
|
|
@@ -220117,8 +220148,8 @@ var Minimatch = class {
|
|
|
220117
220148
|
let re = set.map((pattern) => {
|
|
220118
220149
|
const pp = pattern.map((p3) => {
|
|
220119
220150
|
if (p3 instanceof RegExp) {
|
|
220120
|
-
for (const
|
|
220121
|
-
flags.add(
|
|
220151
|
+
for (const f5 of p3.flags.split(""))
|
|
220152
|
+
flags.add(f5);
|
|
220122
220153
|
}
|
|
220123
220154
|
return typeof p3 === "string" ? regExpEscape2(p3) : p3 === GLOBSTAR ? GLOBSTAR : p3._src;
|
|
220124
220155
|
});
|
|
@@ -220163,22 +220194,22 @@ var Minimatch = class {
|
|
|
220163
220194
|
return p3.split(/\/+/);
|
|
220164
220195
|
}
|
|
220165
220196
|
}
|
|
220166
|
-
match(
|
|
220167
|
-
this.debug("match",
|
|
220197
|
+
match(f5, partial = this.partial) {
|
|
220198
|
+
this.debug("match", f5, this.pattern);
|
|
220168
220199
|
if (this.comment) {
|
|
220169
220200
|
return false;
|
|
220170
220201
|
}
|
|
220171
220202
|
if (this.empty) {
|
|
220172
|
-
return
|
|
220203
|
+
return f5 === "";
|
|
220173
220204
|
}
|
|
220174
|
-
if (
|
|
220205
|
+
if (f5 === "/" && partial) {
|
|
220175
220206
|
return true;
|
|
220176
220207
|
}
|
|
220177
220208
|
const options = this.options;
|
|
220178
220209
|
if (this.isWindows) {
|
|
220179
|
-
|
|
220210
|
+
f5 = f5.split("\\").join("/");
|
|
220180
220211
|
}
|
|
220181
|
-
const ff = this.slashSplit(
|
|
220212
|
+
const ff = this.slashSplit(f5);
|
|
220182
220213
|
this.debug(this.pattern, "split", ff);
|
|
220183
220214
|
const set = this.set;
|
|
220184
220215
|
this.debug(this.pattern, "set", set);
|
|
@@ -225240,13 +225271,13 @@ var NpmEcosystemFixingManager = class {
|
|
|
225240
225271
|
await this.applySecurityFixesSpecificPackageManager(fixes);
|
|
225241
225272
|
if (directDependenciesToBump.length === 0) return;
|
|
225242
225273
|
await applySeries(["prod", "dev"], async (type) => {
|
|
225243
|
-
const packagesOfType = directDependenciesToBump.filter((
|
|
225274
|
+
const packagesOfType = directDependenciesToBump.filter((f5) => directDependencyToPackageType[f5.dependencyName] === type).map((f5) => `${f5.dependencyName}@${f5.fixedVersion}`);
|
|
225244
225275
|
if (packagesOfType.length === 0) return;
|
|
225245
225276
|
await that.installSpecificPackages(workspacePath, type === "dev", packagesOfType);
|
|
225246
225277
|
});
|
|
225247
225278
|
}
|
|
225248
225279
|
async getDirectDependenciesToBump(_workspacePath, dependencyTree, fix) {
|
|
225249
|
-
return fix.filter((
|
|
225280
|
+
return fix.filter((f5) => dependencyTree.dependencies?.includes(f5.dependencyIdentifier));
|
|
225250
225281
|
}
|
|
225251
225282
|
};
|
|
225252
225283
|
|
|
@@ -225372,7 +225403,7 @@ var PnpmFixingManager = class extends NpmEcosystemFixingManager {
|
|
|
225372
225403
|
return lockFile;
|
|
225373
225404
|
}
|
|
225374
225405
|
async getDirectDependenciesToBump(workspacePath, dependencyTree, fix) {
|
|
225375
|
-
const directDepFixes = fix.filter((
|
|
225406
|
+
const directDepFixes = fix.filter((f5) => dependencyTree.dependencies?.includes(f5.dependencyIdentifier));
|
|
225376
225407
|
const lockFileYaml = await this.getLockFileYaml();
|
|
225377
225408
|
const wsImporters = lockFileYaml.importers[workspacePath];
|
|
225378
225409
|
const directDepsToBump = directDepFixes.filter((fix2) => {
|
|
@@ -225988,8 +226019,8 @@ var NpmSocketUpgradeManager = class {
|
|
|
225988
226019
|
const subprojectToUpgrade = /* @__PURE__ */ new Map();
|
|
225989
226020
|
const workspaceToSubproject = /* @__PURE__ */ new Map();
|
|
225990
226021
|
const lockFiles = manifestFiles.filter(
|
|
225991
|
-
(
|
|
225992
|
-
(lockFile) => basename7(
|
|
226022
|
+
(f5) => ["package-lock.json", "pnpm-lock.yml", "pnpm-lock.yaml", "yarn.lock"].some(
|
|
226023
|
+
(lockFile) => basename7(f5) === lockFile
|
|
225993
226024
|
)
|
|
225994
226025
|
) ?? [];
|
|
225995
226026
|
for (const lockFile of lockFiles) {
|
|
@@ -226242,14 +226273,14 @@ var Cache = class _Cache {
|
|
|
226242
226273
|
}
|
|
226243
226274
|
// Converts key to lowercase before performing the set if absent
|
|
226244
226275
|
// Returns the associated value
|
|
226245
|
-
computeIfAbsent(key,
|
|
226276
|
+
computeIfAbsent(key, f5) {
|
|
226246
226277
|
const lowerKey = key.toLowerCase();
|
|
226247
|
-
this.cache[lowerKey] ??=
|
|
226278
|
+
this.cache[lowerKey] ??= f5();
|
|
226248
226279
|
return this.cache[lowerKey];
|
|
226249
226280
|
}
|
|
226250
|
-
compute(key,
|
|
226281
|
+
compute(key, f5) {
|
|
226251
226282
|
const lowerKey = key.toLowerCase();
|
|
226252
|
-
this.cache[lowerKey] ??=
|
|
226283
|
+
this.cache[lowerKey] ??= f5(this.cache[lowerKey]);
|
|
226253
226284
|
return this.cache[lowerKey];
|
|
226254
226285
|
}
|
|
226255
226286
|
putIfAbsent(key, value2) {
|
|
@@ -228394,7 +228425,7 @@ async function handleCompileItem(project, child) {
|
|
|
228394
228425
|
absolute: true
|
|
228395
228426
|
});
|
|
228396
228427
|
const removeSet = new Set(filesToRemove);
|
|
228397
|
-
project.sourceFiles = project.sourceFiles.filter((
|
|
228428
|
+
project.sourceFiles = project.sourceFiles.filter((f5) => !removeSet.has(f5));
|
|
228398
228429
|
} catch (err) {
|
|
228399
228430
|
logger.debug(
|
|
228400
228431
|
`Failed to glob Compile Remove pattern ${evaluatedRemove} in ${relative11(project.rootDir, project.validatedProjectPath)}: ${err}`
|
|
@@ -228586,8 +228617,8 @@ var NuGetSocketUpgradeManager = class {
|
|
|
228586
228617
|
const fullPath = resolve26(this.rootDir, file);
|
|
228587
228618
|
caseInsensitiveManifestFileMap.set(fullPath, fullPath);
|
|
228588
228619
|
}
|
|
228589
|
-
const validateFile = (
|
|
228590
|
-
return caseInsensitiveManifestFileMap.get(
|
|
228620
|
+
const validateFile = (f5) => {
|
|
228621
|
+
return caseInsensitiveManifestFileMap.get(f5);
|
|
228591
228622
|
};
|
|
228592
228623
|
const updatePatches = await this.collectUpdatePatches(ctxt, validateFile) ?? [];
|
|
228593
228624
|
await applyPatches("NUGET", this.rootDir, updatePatches, ctxt);
|
|
@@ -228616,7 +228647,7 @@ var NuGetSocketUpgradeManager = class {
|
|
|
228616
228647
|
newArtifact.toplevelAncestors?.flatMap(
|
|
228617
228648
|
(ancestorId) => recomputedArtifacts.find((a4) => a4.id === ancestorId)?.manifestFiles?.map((m4) => m4.file) ?? []
|
|
228618
228649
|
) ?? []
|
|
228619
|
-
).filter((
|
|
228650
|
+
).filter((f5) => !ctxt.wsFilter || ctxt.wsFilter(dirname16(f5) || "."))
|
|
228620
228651
|
// Don't update excluded workspaces
|
|
228621
228652
|
);
|
|
228622
228653
|
await asyncForEach(manifestFiles, async (manifestFile) => {
|
|
@@ -228644,7 +228675,7 @@ var NuGetSocketUpgradeManager = class {
|
|
|
228644
228675
|
artifact.toplevelAncestors?.flatMap(
|
|
228645
228676
|
(ancestorId) => ctxt.artifacts.find((a4) => a4.id === ancestorId)?.manifestFiles?.map((m4) => m4.file) ?? []
|
|
228646
228677
|
) ?? []
|
|
228647
|
-
).filter((
|
|
228678
|
+
).filter((f5) => !ctxt.wsFilter || ctxt.wsFilter(dirname16(f5) || "."))
|
|
228648
228679
|
// Don't update pom in excluded workspaces,
|
|
228649
228680
|
);
|
|
228650
228681
|
for (const manifestFile of manifestFilesForArtifact) {
|
|
@@ -229770,7 +229801,7 @@ var PipSocketUpgradeManager = class {
|
|
|
229770
229801
|
uvLockMatcher = (0, import_picomatch8.default)("uv.lock", { basename: true });
|
|
229771
229802
|
poetryLockMatcher = (0, import_picomatch8.default)("poetry.lock", { basename: true });
|
|
229772
229803
|
async applySocketArtifactUpgrades(ctxt) {
|
|
229773
|
-
const pyprojectTomlFiles = ctxt.manifestFiles.filter((
|
|
229804
|
+
const pyprojectTomlFiles = ctxt.manifestFiles.filter((f5) => this.pyprojectTomlMatcher(f5));
|
|
229774
229805
|
const patches = [];
|
|
229775
229806
|
const uvLockFilesToValidate = /* @__PURE__ */ new Set();
|
|
229776
229807
|
const lockFileToDepTree = /* @__PURE__ */ new Map();
|
|
@@ -229827,7 +229858,7 @@ var PipSocketUpgradeManager = class {
|
|
|
229827
229858
|
const isDirectDep = matchingNodes.some((node) => projectInfo.direct.has(node.nodeKey));
|
|
229828
229859
|
if (isDirectDep) {
|
|
229829
229860
|
const tomlFile = [rootTomlFile, ...memberTomlFiles ?? []].find(
|
|
229830
|
-
(
|
|
229861
|
+
(f5) => (dirname20(f5) || ".") === projectDir
|
|
229831
229862
|
);
|
|
229832
229863
|
if (tomlFile) {
|
|
229833
229864
|
patches.push(
|
|
@@ -233253,7 +233284,7 @@ ${vulnerabilityFixes.map((fix) => ` ${fix.dependencyName} (${fix.dependencyIdent
|
|
|
233253
233284
|
}
|
|
233254
233285
|
function computeInfoAboutOutdatedObjects(outdatedFixIds) {
|
|
233255
233286
|
return outdatedFixIds.map(([fix, fixes]) => `The original solution associated with fixId ${prettyStringFixDto(fix)} is outdated. Coana has found the updated solution:
|
|
233256
|
-
${fixes.fix.vulnerabilityFixes.map((
|
|
233287
|
+
${fixes.fix.vulnerabilityFixes.map((f5) => ` - ${f5.dependencyName} from v${f5.currentVersion} to v${f5.fixedVersion}`).join("\n")}`).join("\n\n");
|
|
233257
233288
|
}
|
|
233258
233289
|
async function verifyFixes(fixes, otherModulesCommunicator, rootPath) {
|
|
233259
233290
|
const pathsForEachFixIdData = fixes.map(({ vulnerabilityInstance: v }) => `${v.subprojectPath}/${v.workspacePath}-${v.ecosystem}`);
|
|
@@ -233705,7 +233736,7 @@ function generateUrlToRepoSourceLocation(sourceLocation, repoUrl, commit, subpro
|
|
|
233705
233736
|
|
|
233706
233737
|
// ../web-compat-utils/src/vulnerability-augment-with-details.ts
|
|
233707
233738
|
async function augmentVulnerabilitiesWithDetails(vulnerabilities, getVulnerabilityMetadata2) {
|
|
233708
|
-
const vulnerabilityChunks =
|
|
233739
|
+
const vulnerabilityChunks = f4(vulnerabilities, 100);
|
|
233709
233740
|
const chunksWithDetails = await Promise.all(
|
|
233710
233741
|
vulnerabilityChunks.map(async (chunk) => {
|
|
233711
233742
|
const packages = chunk.map((vi) => ({
|
|
@@ -233728,7 +233759,7 @@ async function augmentVulnerabilitiesWithDetails(vulnerabilities, getVulnerabili
|
|
|
233728
233759
|
}
|
|
233729
233760
|
})
|
|
233730
233761
|
);
|
|
233731
|
-
return
|
|
233762
|
+
return y5(chunksWithDetails);
|
|
233732
233763
|
}
|
|
233733
233764
|
|
|
233734
233765
|
// dist/internal/github-pr-tools.js
|
|
@@ -234357,6 +234388,14 @@ function shouldIgnoreDueToExcludeDirsOrChangedFiles({ mainProjectDir, excludeDir
|
|
|
234357
234388
|
const relativeToProjectDir = relative19(mainProjectDir, fullPath) || ".";
|
|
234358
234389
|
return !!(isMatch3(relativeToProjectDir, excludeDirs) || changedFiles && !changedFiles.some((changedFile) => changedFile.startsWith(relativeToProjectDir)));
|
|
234359
234390
|
}
|
|
234391
|
+
function shouldIncludeWorkspaceForAnalysis(config3, workspaceFullPath) {
|
|
234392
|
+
if (shouldIgnoreDueToExcludeDirsOrChangedFiles(config3, workspaceFullPath)) return false;
|
|
234393
|
+
if (config3.includeDirs.length > 0) {
|
|
234394
|
+
const relPath = relative19(config3.mainProjectDir, workspaceFullPath);
|
|
234395
|
+
if (!isMatch3(relPath, config3.includeDirs)) return false;
|
|
234396
|
+
}
|
|
234397
|
+
return true;
|
|
234398
|
+
}
|
|
234360
234399
|
|
|
234361
234400
|
// ../project-management/src/project-management/project-manager.ts
|
|
234362
234401
|
var ProjectManager = class _ProjectManager {
|
|
@@ -234508,8 +234547,8 @@ function assertDefined(value2) {
|
|
|
234508
234547
|
import { basename as basename10 } from "path";
|
|
234509
234548
|
function getEcosystemsFromManifestFileNames(fileNames) {
|
|
234510
234549
|
const ecosystems = /* @__PURE__ */ new Set();
|
|
234511
|
-
for (const
|
|
234512
|
-
const base = basename10(
|
|
234550
|
+
for (const f5 of fileNames) {
|
|
234551
|
+
const base = basename10(f5);
|
|
234513
234552
|
if (/^package(-lock)?\.json$|pnpm-lock\.yaml|yarn\.lock|rush\.json/.test(base))
|
|
234514
234553
|
ecosystems.add("NPM");
|
|
234515
234554
|
if (/^pom\.xml$|^gradlew$|^build\.sbt$/.test(base))
|
|
@@ -234584,13 +234623,13 @@ function getNpmChecks(command, manifestFileNames) {
|
|
|
234584
234623
|
}
|
|
234585
234624
|
} else {
|
|
234586
234625
|
const files = manifestFileNames ?? [];
|
|
234587
|
-
if (files.some((
|
|
234626
|
+
if (files.some((f5) => f5.endsWith("package-lock.json")) && !nexe) {
|
|
234588
234627
|
checks.push(checkTool("npm", "NPM", "Required for NPM dependency management. Install from https://nodejs.org"));
|
|
234589
234628
|
}
|
|
234590
|
-
if (files.some((
|
|
234629
|
+
if (files.some((f5) => f5.endsWith("pnpm-lock.yaml"))) {
|
|
234591
234630
|
checks.push(checkTool("pnpm", "NPM", "Required for pnpm dependency management. Install from https://pnpm.io"));
|
|
234592
234631
|
}
|
|
234593
|
-
if (files.some((
|
|
234632
|
+
if (files.some((f5) => f5.endsWith("yarn.lock"))) {
|
|
234594
234633
|
checks.push(checkTool("yarn", "NPM", "Required for Yarn dependency management. Install from https://yarnpkg.com"));
|
|
234595
234634
|
}
|
|
234596
234635
|
}
|
|
@@ -234606,7 +234645,7 @@ function getPipChecks(command, manifestFileNames) {
|
|
|
234606
234645
|
}
|
|
234607
234646
|
} else {
|
|
234608
234647
|
const files = manifestFileNames ?? [];
|
|
234609
|
-
if (files.some((
|
|
234648
|
+
if (files.some((f5) => f5.endsWith("uv.lock")) && !nexe) {
|
|
234610
234649
|
checks.push(checkTool("uv", "Python (PIP)", "Required for Python dependency management. Install from https://docs.astral.sh/uv/"));
|
|
234611
234650
|
}
|
|
234612
234651
|
}
|
|
@@ -234850,112 +234889,101 @@ ${vulnerabilityFixes.map((fix) => ` ${fix.dependencyName} from ${fix.currentVers
|
|
|
234850
234889
|
};
|
|
234851
234890
|
|
|
234852
234891
|
// dist/cli-compute-fixes-and-upgrade-purls.js
|
|
234892
|
+
var PURL_TYPE_VALUES = new Set(Object.values(PURL_Type));
|
|
234893
|
+
function toPurlType(s6) {
|
|
234894
|
+
return s6 != null && PURL_TYPE_VALUES.has(s6) ? s6 : void 0;
|
|
234895
|
+
}
|
|
234853
234896
|
async function computeFixesAndUpgradePurls(path9, options, logFile) {
|
|
234854
|
-
|
|
234855
|
-
|
|
234856
|
-
|
|
234857
|
-
logger.info("Found no vulnerabilities in the project");
|
|
234858
|
-
return { type: "no-vulnerabilities-found" };
|
|
234859
|
-
}
|
|
234897
|
+
if (!options.manifestsTarHash)
|
|
234898
|
+
throw new Error("Manifests tar hash is required for computing fixes");
|
|
234899
|
+
const autofixRunId = await getSocketAPI().registerAutofixOrUpgradePurlRun(options.manifestsTarHash, options, "autofix");
|
|
234860
234900
|
if (options.applyFixesTo.length === 0) {
|
|
234861
|
-
|
|
234862
|
-
|
|
234863
|
-
|
|
234864
|
-
|
|
234865
|
-
|
|
234866
|
-
const ghsaToVulnerableArtifactIdsToApply = {};
|
|
234867
|
-
for (const [ghsa, artifactIds] of Object.entries(ghsaToVulnerableArtifactIdsToApplyBeforePurlTypeFilter)) {
|
|
234868
|
-
const filteredIds = artifactIds.filter((id) => {
|
|
234869
|
-
const artifact = socketFactArtifacts[id];
|
|
234870
|
-
if (!options.purlTypes || options.purlTypes.includes(artifact.type)) {
|
|
234871
|
-
return true;
|
|
234901
|
+
const { artifacts: artifacts2 } = await fetchArtifactsFromManifestsTarHash(options.manifestsTarHash);
|
|
234902
|
+
const ghsas = /* @__PURE__ */ new Set();
|
|
234903
|
+
for (const artifact of artifacts2) {
|
|
234904
|
+
for (const vuln of artifact.vulnerabilities ?? []) {
|
|
234905
|
+
ghsas.add(vuln.ghsaId);
|
|
234872
234906
|
}
|
|
234873
|
-
logger.warn(`Skipping upgrade for ${purlToString(artifact)} (${ghsa}) - type '${artifact.type}' not in specified types: ${options.purlTypes.join(", ")}`);
|
|
234874
|
-
return false;
|
|
234875
|
-
});
|
|
234876
|
-
if (filteredIds.length > 0) {
|
|
234877
|
-
ghsaToVulnerableArtifactIdsToApply[ghsa] = filteredIds;
|
|
234878
234907
|
}
|
|
234908
|
+
if (ghsas.size === 0) {
|
|
234909
|
+
logger.info("Found no vulnerabilities in the project");
|
|
234910
|
+
return { type: "no-vulnerabilities-found" };
|
|
234911
|
+
}
|
|
234912
|
+
logger.info("Vulnerabilities found:", [...ghsas].join(", "));
|
|
234913
|
+
logger.info("Consider running the tool again, requesting a fix for one of the detected vulnerabilities");
|
|
234914
|
+
return { type: "no-ghsas-fix-requested", ghsas: [...ghsas] };
|
|
234915
|
+
}
|
|
234916
|
+
let apiResponse;
|
|
234917
|
+
const needsAllDetectedGhsas = !options.applyFixesTo.includes("all");
|
|
234918
|
+
try {
|
|
234919
|
+
apiResponse = await fetchFixesFromAPI({
|
|
234920
|
+
tarHash: options.manifestsTarHash,
|
|
234921
|
+
vulnerabilityIds: options.applyFixesTo,
|
|
234922
|
+
allowMajorUpdates: !options.disableMajorUpdates,
|
|
234923
|
+
minimumReleaseAge: options.minimumReleaseAge,
|
|
234924
|
+
includeAllDetectedGhsas: needsAllDetectedGhsas || void 0,
|
|
234925
|
+
autofixRunId
|
|
234926
|
+
});
|
|
234927
|
+
} catch (error) {
|
|
234928
|
+
logger.debug(`Error stack: ${error.stack}`);
|
|
234929
|
+
throw new Error(`Unable to compute fixes for the requested vulnerabilities: ${prettyApplyFixesTo(options.applyFixesTo)}`, { cause: error });
|
|
234879
234930
|
}
|
|
234880
|
-
if (Object.keys(
|
|
234931
|
+
if (Object.keys(apiResponse.fixDetails).length === 0) {
|
|
234932
|
+
if (options.applyFixesTo.includes("all")) {
|
|
234933
|
+
logger.info("Found no vulnerabilities in the project");
|
|
234934
|
+
return { type: "no-vulnerabilities-found" };
|
|
234935
|
+
}
|
|
234881
234936
|
logger.info("There is no overlap between the requested fixes and the detected vulnerabilities");
|
|
234882
234937
|
logger.info("Consider running the tool again, requesting a fix for one of the detected vulnerabilities");
|
|
234883
|
-
|
|
234938
|
+
if (apiResponse.allDetectedGhsas?.length) {
|
|
234939
|
+
logger.info("Detected vulnerabilities:", apiResponse.allDetectedGhsas.join(", "));
|
|
234940
|
+
}
|
|
234884
234941
|
return { type: "selected-vulnerabilities-do-not-affect-the-current-project" };
|
|
234885
234942
|
}
|
|
234886
|
-
const
|
|
234887
|
-
|
|
234888
|
-
|
|
234889
|
-
|
|
234890
|
-
|
|
234891
|
-
|
|
234892
|
-
|
|
234893
|
-
|
|
234894
|
-
|
|
234895
|
-
if (!result.failedArtifacts?.length)
|
|
234896
|
-
return false;
|
|
234897
|
-
if (!hasLoggedFailureHeader) {
|
|
234898
|
-
logger.info("Unable to compute fixes for some vulnerabilities:");
|
|
234899
|
-
hasLoggedFailureHeader = true;
|
|
234900
|
-
}
|
|
234901
|
-
logger.info(`- ${ghsa}:`);
|
|
234902
|
-
for (const id of result.failedArtifacts) {
|
|
234903
|
-
for (const { chain: chain2, reason } of result.failedArtifactDetails?.[id] ?? [{}]) {
|
|
234904
|
-
const chainWithoutLast = chain2?.slice(0, -1);
|
|
234905
|
-
const via = chainWithoutLast?.length ? ` (via ${chainWithoutLast.map((i7) => purlToString(artifacts[i7])).join(" -> ")})` : "";
|
|
234906
|
-
logger.info(` \u2022 ${purlToString(artifacts[id])}${via}`);
|
|
234907
|
-
logger.info(` \u26A0 ${reason ?? "Unknown error"}`);
|
|
234908
|
-
}
|
|
234943
|
+
const filteredFixDetails = filterFixDetailsByPurlTypes(apiResponse.fixDetails, options.purlTypes);
|
|
234944
|
+
const hadFixesBeforeFilter = Object.values(apiResponse.fixDetails).some(hasFixData);
|
|
234945
|
+
const hasFixesAfterFilter = Object.values(filteredFixDetails).some(hasFixData);
|
|
234946
|
+
if (options.purlTypes && hadFixesBeforeFilter && !hasFixesAfterFilter) {
|
|
234947
|
+
logger.info("There is no overlap between the requested fixes and the detected vulnerabilities");
|
|
234948
|
+
logger.info("Consider running the tool again, requesting a fix for one of the detected vulnerabilities");
|
|
234949
|
+
const detectedList = apiResponse.allDetectedGhsas ?? Object.keys(apiResponse.fixDetails);
|
|
234950
|
+
if (detectedList.length) {
|
|
234951
|
+
logger.info("Detected vulnerabilities:", detectedList.join(", "));
|
|
234909
234952
|
}
|
|
234910
|
-
return
|
|
234911
|
-
}
|
|
234912
|
-
|
|
234953
|
+
return { type: "selected-vulnerabilities-do-not-affect-the-current-project" };
|
|
234954
|
+
}
|
|
234955
|
+
logUnfixableEntries(filteredFixDetails);
|
|
234956
|
+
const ghsasWithFailures = Object.entries(filteredFixDetails).filter(([, detail]) => hasFailures(detail)).map(([ghsa]) => ghsa);
|
|
234913
234957
|
if (options.showAffectedDirectDependencies) {
|
|
234914
|
-
return computeDirectDependencyUpgrades(
|
|
234958
|
+
return computeDirectDependencyUpgrades(filteredFixDetails);
|
|
234915
234959
|
}
|
|
234916
|
-
const
|
|
234917
|
-
|
|
234918
|
-
|
|
234919
|
-
if (
|
|
234920
|
-
|
|
234921
|
-
|
|
234922
|
-
simplePurlToIndices.get(simplePurlStr).push(idx);
|
|
234923
|
-
});
|
|
234924
|
-
const upgrades = /* @__PURE__ */ new Map();
|
|
234925
|
-
for (const [, result] of fixesFound) {
|
|
234926
|
-
for (const fix of result.fixes) {
|
|
234927
|
-
const purl = import_packageurl_js.PackageURL.fromString(fix.purl);
|
|
234928
|
-
const simplePurlStr = simplePurl(purl.type, purl.namespace ?? null, purl.name, purl.version ?? null);
|
|
234929
|
-
const indices = simplePurlToIndices.get(simplePurlStr);
|
|
234930
|
-
if (!indices)
|
|
234931
|
-
throw Error("Could not find artifacts for purl");
|
|
234932
|
-
for (const idx of indices) {
|
|
234933
|
-
const existingFixedVersion = upgrades.get(idx);
|
|
234934
|
-
const ecosystem = getAdvisoryEcosystemFromPurlType(artifacts[idx].type);
|
|
234935
|
-
if (!ecosystem) {
|
|
234936
|
-
logger.warn(`Skipping upgrade for unsupported ecosystem: ${artifacts[idx].type}`);
|
|
234937
|
-
continue;
|
|
234938
|
-
}
|
|
234939
|
-
if (!existingFixedVersion || versionSatisfiesRelation(ecosystem, existingFixedVersion, "<", fix.fixedVersion)) {
|
|
234940
|
-
upgrades.set(idx, fix.fixedVersion);
|
|
234941
|
-
}
|
|
234942
|
-
}
|
|
234960
|
+
const fixesToApply = [];
|
|
234961
|
+
const ghsasWithFixes = [];
|
|
234962
|
+
for (const [ghsa, detail] of Object.entries(filteredFixDetails)) {
|
|
234963
|
+
if (hasFixData(detail)) {
|
|
234964
|
+
fixesToApply.push(...detail.value.fixDetails.fixes);
|
|
234965
|
+
ghsasWithFixes.push(ghsa);
|
|
234943
234966
|
}
|
|
234944
234967
|
}
|
|
234945
234968
|
if (options.dryRun) {
|
|
234946
234969
|
logger.info("Computed fixes:");
|
|
234947
|
-
|
|
234948
|
-
|
|
234949
|
-
|
|
234950
|
-
logger.info(`
|
|
234970
|
+
const fixes = {};
|
|
234971
|
+
for (const [ghsa, detail] of Object.entries(filteredFixDetails)) {
|
|
234972
|
+
if (hasFixData(detail)) {
|
|
234973
|
+
logger.info(` - ${ghsa}:`);
|
|
234974
|
+
fixes[ghsa] = detail.value.fixDetails.fixes.map((fix) => {
|
|
234975
|
+
logger.info(` - ${fix.purl} -> ${fix.fixedVersion}`);
|
|
234976
|
+
return { purl: fix.purl, fixedVersion: fix.fixedVersion };
|
|
234977
|
+
});
|
|
234951
234978
|
}
|
|
234952
234979
|
}
|
|
234953
234980
|
return {
|
|
234954
234981
|
type: "dry-run-result",
|
|
234955
|
-
fixes
|
|
234956
|
-
...
|
|
234982
|
+
fixes,
|
|
234983
|
+
...ghsasWithFailures.length > 0 && { failedToFix: ghsasWithFailures }
|
|
234957
234984
|
};
|
|
234958
234985
|
}
|
|
234986
|
+
const { artifacts, upgrades } = buildArtifactsAndUpgrades(fixesToApply);
|
|
234959
234987
|
if (upgrades.size === 0) {
|
|
234960
234988
|
if (autofixRunId) {
|
|
234961
234989
|
await getSocketAPI().finalizeAutofixRun(autofixRunId, "fixed-none", void 0, await logger.getLogContent(logFile));
|
|
@@ -234963,7 +234991,7 @@ async function computeFixesAndUpgradePurls(path9, options, logFile) {
|
|
|
234963
234991
|
throw new Error(`Unable to compute fixes for any of the requested vulnerabilities: ${prettyApplyFixesTo(options.applyFixesTo)}`);
|
|
234964
234992
|
}
|
|
234965
234993
|
try {
|
|
234966
|
-
const applyFixesStatus = await upgradePurl(path9, upgrades,
|
|
234994
|
+
const applyFixesStatus = await upgradePurl(path9, upgrades, artifacts, {
|
|
234967
234995
|
debug: options.debug,
|
|
234968
234996
|
silent: options.silent,
|
|
234969
234997
|
runWithoutDocker: options.runWithoutDocker,
|
|
@@ -234975,13 +235003,16 @@ async function computeFixesAndUpgradePurls(path9, options, logFile) {
|
|
|
234975
235003
|
disableExternalToolChecks: options.disableExternalToolChecks
|
|
234976
235004
|
}, autofixRunId) ?? "fixed-all";
|
|
234977
235005
|
if (autofixRunId) {
|
|
234978
|
-
const allGhsasFailed =
|
|
234979
|
-
await getSocketAPI().finalizeAutofixRun(autofixRunId,
|
|
235006
|
+
const allGhsasFailed = ghsasWithFixes.length === 0;
|
|
235007
|
+
await getSocketAPI().finalizeAutofixRun(autofixRunId, ghsasWithFailures.length === 0 && applyFixesStatus === "fixed-all" ? "fixed-all" : allGhsasFailed || applyFixesStatus === "fixed-none" ? "fixed-none" : "fixed-some", void 0, await logger.getLogContent(logFile));
|
|
234980
235008
|
}
|
|
234981
|
-
|
|
234982
|
-
|
|
234983
|
-
|
|
234984
|
-
|
|
235009
|
+
const fixes = {};
|
|
235010
|
+
for (const [ghsa, detail] of Object.entries(filteredFixDetails)) {
|
|
235011
|
+
if (hasFixData(detail)) {
|
|
235012
|
+
fixes[ghsa] = detail.value.fixDetails.fixes.map((f5) => ({ purl: f5.purl, fixedVersion: f5.fixedVersion }));
|
|
235013
|
+
}
|
|
235014
|
+
}
|
|
235015
|
+
return { type: "applied-fixes", fixes };
|
|
234985
235016
|
} catch (error) {
|
|
234986
235017
|
logger.debug(`Error stack: ${error.stack}`);
|
|
234987
235018
|
if (autofixRunId) {
|
|
@@ -234990,51 +235021,137 @@ async function computeFixesAndUpgradePurls(path9, options, logFile) {
|
|
|
234990
235021
|
throw error;
|
|
234991
235022
|
}
|
|
234992
235023
|
}
|
|
234993
|
-
|
|
234994
|
-
|
|
234995
|
-
|
|
234996
|
-
|
|
234997
|
-
|
|
234998
|
-
|
|
234999
|
-
|
|
235024
|
+
function hasFixData(detail) {
|
|
235025
|
+
return (detail.type === "fixFound" || detail.type === "partialFixFound") && (detail.value.fixDetails?.fixes.length ?? 0) > 0;
|
|
235026
|
+
}
|
|
235027
|
+
function filterFixDetailsByPurlTypes(fixDetails, purlTypes) {
|
|
235028
|
+
if (!purlTypes)
|
|
235029
|
+
return fixDetails;
|
|
235030
|
+
const allowed = new Set(purlTypes);
|
|
235031
|
+
const matchesType = (fixPurl) => {
|
|
235032
|
+
const parsed = import_packageurl_js.PackageURL.fromString(fixPurl);
|
|
235033
|
+
const purlType = toPurlType(parsed.type);
|
|
235034
|
+
return purlType !== void 0 && allowed.has(purlType);
|
|
235035
|
+
};
|
|
235036
|
+
const filtered = {};
|
|
235037
|
+
for (const [ghsa, detail] of Object.entries(fixDetails)) {
|
|
235038
|
+
if (detail.type === "fixFound" || detail.type === "partialFixFound") {
|
|
235039
|
+
const filteredFixes = (detail.value.fixDetails?.fixes ?? []).filter((fix) => {
|
|
235040
|
+
if (matchesType(fix.purl))
|
|
235041
|
+
return true;
|
|
235042
|
+
const parsed = import_packageurl_js.PackageURL.fromString(fix.purl);
|
|
235043
|
+
logger.warn(`Skipping upgrade for ${fix.purl} (${ghsa}) - type '${parsed.type}' not in specified types: ${purlTypes.join(", ")}`);
|
|
235044
|
+
return false;
|
|
235045
|
+
});
|
|
235046
|
+
const filteredUnfixable = detail.type === "partialFixFound" ? (detail.value.fixDetails?.unfixablePurls ?? []).filter((u8) => matchesType(u8.purl)) : void 0;
|
|
235047
|
+
filtered[ghsa] = {
|
|
235048
|
+
...detail,
|
|
235049
|
+
value: {
|
|
235050
|
+
...detail.value,
|
|
235051
|
+
fixDetails: {
|
|
235052
|
+
...detail.value.fixDetails,
|
|
235053
|
+
fixes: filteredFixes,
|
|
235054
|
+
...filteredUnfixable !== void 0 && { unfixablePurls: filteredUnfixable }
|
|
235055
|
+
}
|
|
235056
|
+
}
|
|
235057
|
+
};
|
|
235058
|
+
} else if (detail.type === "fixNotApplicable" || detail.type === "noFixAvailable") {
|
|
235059
|
+
const filteredVuln = (detail.value.vulnerableArtifacts ?? []).filter((v) => matchesType(v.purl));
|
|
235060
|
+
filtered[ghsa] = {
|
|
235061
|
+
...detail,
|
|
235062
|
+
value: { ...detail.value, vulnerableArtifacts: filteredVuln }
|
|
235063
|
+
};
|
|
235064
|
+
} else {
|
|
235065
|
+
filtered[ghsa] = detail;
|
|
235066
|
+
}
|
|
235067
|
+
}
|
|
235068
|
+
return filtered;
|
|
235069
|
+
}
|
|
235070
|
+
function hasFailures(detail) {
|
|
235071
|
+
switch (detail.type) {
|
|
235072
|
+
case "fixFound":
|
|
235073
|
+
return false;
|
|
235074
|
+
case "partialFixFound":
|
|
235075
|
+
return (detail.value.fixDetails?.unfixablePurls?.length ?? 0) > 0;
|
|
235076
|
+
case "fixNotApplicable":
|
|
235077
|
+
case "noFixAvailable":
|
|
235078
|
+
return (detail.value.vulnerableArtifacts?.length ?? 0) > 0;
|
|
235079
|
+
case "errorComputingFix":
|
|
235080
|
+
return true;
|
|
235081
|
+
}
|
|
235082
|
+
}
|
|
235083
|
+
function logUnfixableEntries(fixDetails) {
|
|
235084
|
+
let hasLoggedHeader = false;
|
|
235085
|
+
const logHeader = () => {
|
|
235086
|
+
if (hasLoggedHeader)
|
|
235087
|
+
return;
|
|
235088
|
+
logger.info("Unable to compute fixes for some vulnerabilities:");
|
|
235089
|
+
hasLoggedHeader = true;
|
|
235090
|
+
};
|
|
235091
|
+
for (const [ghsa, detail] of Object.entries(fixDetails)) {
|
|
235092
|
+
const entries = unfixableEntriesForDetail(detail, ghsa);
|
|
235093
|
+
if (entries.length === 0)
|
|
235000
235094
|
continue;
|
|
235001
|
-
|
|
235002
|
-
|
|
235003
|
-
|
|
235004
|
-
}
|
|
235095
|
+
logHeader();
|
|
235096
|
+
logger.info(`- ${ghsa}:`);
|
|
235097
|
+
for (const { purl, chain: chain2, reason } of entries) {
|
|
235098
|
+
const via = chain2 && chain2.length > 0 ? ` (via ${chain2.join(" -> ")})` : "";
|
|
235099
|
+
logger.info(` \u2022 ${purl}${via}`);
|
|
235100
|
+
logger.info(` \u26A0 ${reason}`);
|
|
235005
235101
|
}
|
|
235006
235102
|
}
|
|
235007
|
-
const sbomTaskArtifacts = artifacts.map((artifact) => ({
|
|
235008
|
-
type: artifact.type,
|
|
235009
|
-
name: artifact.name ?? "",
|
|
235010
|
-
version: artifact.version ?? "",
|
|
235011
|
-
namespace: artifact.namespace ?? void 0,
|
|
235012
|
-
adj: artifact.dependencies?.map((dep) => artifacts.findIndex((a4) => a4.id === dep)) ?? [],
|
|
235013
|
-
direct: artifact.direct,
|
|
235014
|
-
topLevelAncestors: artifact.toplevelAncestors?.map((ancestor) => artifacts.findIndex((a4) => a4.id === ancestor)) ?? []
|
|
235015
|
-
}));
|
|
235016
|
-
return { artifacts: sbomTaskArtifacts, ghsaToVulnerableArtifactIds, socketFactArtifacts: artifacts };
|
|
235017
235103
|
}
|
|
235018
|
-
|
|
235019
|
-
|
|
235104
|
+
function unfixableEntriesForDetail(detail, ghsa) {
|
|
235105
|
+
switch (detail.type) {
|
|
235106
|
+
case "fixFound":
|
|
235107
|
+
return [];
|
|
235108
|
+
case "partialFixFound": {
|
|
235109
|
+
const unfixable = detail.value.fixDetails?.unfixablePurls ?? [];
|
|
235110
|
+
return unfixable.flatMap((u8) => {
|
|
235111
|
+
const reasons = u8.reasons?.length ? u8.reasons : u8.reason ? [u8.reason] : ["Unknown error"];
|
|
235112
|
+
const chain2 = u8.dependencyChain?.slice(0, -1);
|
|
235113
|
+
return reasons.map((reason) => ({ purl: u8.purl, chain: chain2, reason }));
|
|
235114
|
+
});
|
|
235115
|
+
}
|
|
235116
|
+
case "fixNotApplicable":
|
|
235117
|
+
return (detail.value.vulnerableArtifacts ?? []).map((a4) => ({
|
|
235118
|
+
purl: a4.purl,
|
|
235119
|
+
reason: "Unknown error"
|
|
235120
|
+
}));
|
|
235121
|
+
case "noFixAvailable":
|
|
235122
|
+
return (detail.value.vulnerableArtifacts ?? []).map((a4) => ({
|
|
235123
|
+
purl: a4.purl,
|
|
235124
|
+
reason: "Unknown error"
|
|
235125
|
+
}));
|
|
235126
|
+
case "errorComputingFix":
|
|
235127
|
+
return [
|
|
235128
|
+
{
|
|
235129
|
+
purl: ghsa,
|
|
235130
|
+
reason: detail.value.message ?? "Unknown error"
|
|
235131
|
+
}
|
|
235132
|
+
];
|
|
235133
|
+
}
|
|
235134
|
+
}
|
|
235135
|
+
function computeDirectDependencyUpgrades(fixDetails) {
|
|
235020
235136
|
const packageFixes = {};
|
|
235021
|
-
for (const [ghsa,
|
|
235137
|
+
for (const [ghsa, detail] of Object.entries(fixDetails)) {
|
|
235138
|
+
if (!hasFixData(detail))
|
|
235139
|
+
continue;
|
|
235140
|
+
const fixes = detail.value.fixDetails.fixes;
|
|
235022
235141
|
const directUpdates = {};
|
|
235023
|
-
for (const directFix of
|
|
235142
|
+
for (const directFix of fixes.filter((f5) => f5.direct)) {
|
|
235024
235143
|
directUpdates[directFix.purl] = { fixedVersion: directFix.fixedVersion };
|
|
235025
235144
|
}
|
|
235026
235145
|
const directUpdatePurls = Object.keys(directUpdates);
|
|
235027
|
-
for (const indirectFix of
|
|
235028
|
-
const
|
|
235029
|
-
|
|
235030
|
-
const artifact = artifacts[directDependency];
|
|
235031
|
-
const purl = simplePurl(artifact.type, artifact.namespace ?? null, artifact.name ?? "", artifact.version ?? null);
|
|
235032
|
-
if (directUpdatePurls.includes(purl))
|
|
235146
|
+
for (const indirectFix of fixes.filter((f5) => !f5.direct)) {
|
|
235147
|
+
for (const ancestor of indirectFix.toplevelAncestors) {
|
|
235148
|
+
if (directUpdatePurls.includes(ancestor.purl))
|
|
235033
235149
|
continue;
|
|
235034
|
-
|
|
235035
|
-
|
|
235150
|
+
const transitiveFix = { purl: indirectFix.purl, fixedVersion: indirectFix.fixedVersion };
|
|
235151
|
+
if (directUpdates[ancestor.purl]) {
|
|
235152
|
+
(directUpdates[ancestor.purl].transitiveFixes ??= []).push(transitiveFix);
|
|
235036
235153
|
} else {
|
|
235037
|
-
directUpdates[purl] = { transitiveFixes: [
|
|
235154
|
+
directUpdates[ancestor.purl] = { transitiveFixes: [transitiveFix] };
|
|
235038
235155
|
}
|
|
235039
235156
|
}
|
|
235040
235157
|
}
|
|
@@ -235049,6 +235166,95 @@ async function computeDirectDependencyUpgrades(artifacts, fixesFound) {
|
|
|
235049
235166
|
logger.info("Affected direct dependencies and suggested upgrades (the --show-affected-direct-dependencies option implicitly disables applying the upgrades):", JSON.stringify(result, null, 2));
|
|
235050
235167
|
return result;
|
|
235051
235168
|
}
|
|
235169
|
+
function buildArtifactsAndUpgrades(fixes) {
|
|
235170
|
+
const artifacts = [];
|
|
235171
|
+
const idToIndex = /* @__PURE__ */ new Map();
|
|
235172
|
+
const upgrades = /* @__PURE__ */ new Map();
|
|
235173
|
+
const warnedEmptyAncestors = /* @__PURE__ */ new Set();
|
|
235174
|
+
function tryParse(purl) {
|
|
235175
|
+
try {
|
|
235176
|
+
return import_packageurl_js.PackageURL.fromString(purl);
|
|
235177
|
+
} catch (err) {
|
|
235178
|
+
logger.warn(`Skipping purl that failed to parse: ${purl} (${err?.message ?? "unknown error"})`);
|
|
235179
|
+
return void 0;
|
|
235180
|
+
}
|
|
235181
|
+
}
|
|
235182
|
+
function upsertArtifact(next2, replaceKnownGood) {
|
|
235183
|
+
const existing = idToIndex.get(next2.id);
|
|
235184
|
+
if (existing === void 0) {
|
|
235185
|
+
artifacts.push(next2);
|
|
235186
|
+
idToIndex.set(next2.id, artifacts.length - 1);
|
|
235187
|
+
return artifacts.length - 1;
|
|
235188
|
+
}
|
|
235189
|
+
if (replaceKnownGood) {
|
|
235190
|
+
artifacts[existing] = { ...artifacts[existing], ...next2 };
|
|
235191
|
+
}
|
|
235192
|
+
return existing;
|
|
235193
|
+
}
|
|
235194
|
+
for (const fix of fixes) {
|
|
235195
|
+
const parsed = tryParse(fix.purl);
|
|
235196
|
+
if (!parsed?.name) {
|
|
235197
|
+
logger.warn(`Skipping fix with invalid purl (missing name): ${fix.purl}`);
|
|
235198
|
+
continue;
|
|
235199
|
+
}
|
|
235200
|
+
const purlType = toPurlType(parsed.type);
|
|
235201
|
+
if (!purlType) {
|
|
235202
|
+
logger.warn(`Skipping upgrade for unsupported ecosystem: ${parsed.type}`);
|
|
235203
|
+
continue;
|
|
235204
|
+
}
|
|
235205
|
+
const ecosystem = getAdvisoryEcosystemFromPurlType(purlType);
|
|
235206
|
+
if (!ecosystem) {
|
|
235207
|
+
logger.warn(`Skipping upgrade for unsupported ecosystem: ${parsed.type}`);
|
|
235208
|
+
continue;
|
|
235209
|
+
}
|
|
235210
|
+
const idx = upsertArtifact({
|
|
235211
|
+
id: fix.purl,
|
|
235212
|
+
type: purlType,
|
|
235213
|
+
namespace: parsed.namespace ?? void 0,
|
|
235214
|
+
name: parsed.name,
|
|
235215
|
+
version: parsed.version ?? void 0,
|
|
235216
|
+
direct: fix.direct,
|
|
235217
|
+
dev: fix.dev,
|
|
235218
|
+
dead: false,
|
|
235219
|
+
manifestFiles: fix.manifestFilesWithOffsets,
|
|
235220
|
+
toplevelAncestors: fix.toplevelAncestors.map((a4) => a4.purl)
|
|
235221
|
+
}, true);
|
|
235222
|
+
for (const ancestor of fix.toplevelAncestors) {
|
|
235223
|
+
const parsedAncestor = tryParse(ancestor.purl);
|
|
235224
|
+
if (!parsedAncestor)
|
|
235225
|
+
continue;
|
|
235226
|
+
const ancestorPurlType = toPurlType(parsedAncestor.type);
|
|
235227
|
+
if (!ancestorPurlType) {
|
|
235228
|
+
logger.warn(`Skipping ancestor for unsupported ecosystem: ${parsedAncestor.type}`);
|
|
235229
|
+
continue;
|
|
235230
|
+
}
|
|
235231
|
+
if (!fix.direct && ancestor.manifestFiles.length === 0) {
|
|
235232
|
+
if (!warnedEmptyAncestors.has(ancestor.purl)) {
|
|
235233
|
+
warnedEmptyAncestors.add(ancestor.purl);
|
|
235234
|
+
logger.warn(`No manifest file available for ancestor ${ancestor.purl} (needed to patch transitive fixes); skipping ancestor.`);
|
|
235235
|
+
}
|
|
235236
|
+
continue;
|
|
235237
|
+
}
|
|
235238
|
+
upsertArtifact({
|
|
235239
|
+
id: ancestor.purl,
|
|
235240
|
+
type: ancestorPurlType,
|
|
235241
|
+
namespace: parsedAncestor.namespace ?? void 0,
|
|
235242
|
+
name: parsedAncestor.name ?? "",
|
|
235243
|
+
version: parsedAncestor.version ?? void 0,
|
|
235244
|
+
direct: true,
|
|
235245
|
+
dev: false,
|
|
235246
|
+
dead: false,
|
|
235247
|
+
manifestFiles: ancestor.manifestFiles,
|
|
235248
|
+
toplevelAncestors: []
|
|
235249
|
+
}, false);
|
|
235250
|
+
}
|
|
235251
|
+
const existing = upgrades.get(idx);
|
|
235252
|
+
if (!existing || versionSatisfiesRelation(ecosystem, existing, "<", fix.fixedVersion)) {
|
|
235253
|
+
upgrades.set(idx, fix.fixedVersion);
|
|
235254
|
+
}
|
|
235255
|
+
}
|
|
235256
|
+
return { artifacts, upgrades };
|
|
235257
|
+
}
|
|
235052
235258
|
function prettyApplyFixesTo(applyFixesToOption) {
|
|
235053
235259
|
if (applyFixesToOption.includes("all")) {
|
|
235054
235260
|
return "all vulnerabilities";
|
|
@@ -235062,7 +235268,6 @@ import { existsSync as existsSync30, writeFileSync as writeFileSync3 } from "fs"
|
|
|
235062
235268
|
import { mkdir as mkdir6, rm as rm3, writeFile as writeFile15 } from "fs/promises";
|
|
235063
235269
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
235064
235270
|
import os2 from "os";
|
|
235065
|
-
var import_picomatch12 = __toESM(require_picomatch2(), 1);
|
|
235066
235271
|
import { join as join34, relative as relative22, resolve as resolve42 } from "path";
|
|
235067
235272
|
|
|
235068
235273
|
// ../utils/src/dashboard-api/shared-api.ts
|
|
@@ -235079,12 +235284,16 @@ var DashboardAPI = class {
|
|
|
235079
235284
|
}
|
|
235080
235285
|
async createReport(repoUrl, projectName, cliVersion2, commitSha, branchName, cliOptions, apiKey, cliRunEnv, systemInformation) {
|
|
235081
235286
|
if (this.disableAnalyticsSharing) {
|
|
235082
|
-
return;
|
|
235287
|
+
return { reportId: void 0, legacyMode: false };
|
|
235083
235288
|
}
|
|
235084
235289
|
if (this.socketMode) {
|
|
235085
|
-
|
|
235290
|
+
const response = await this.socketAPI.createSocketTier1Scan(cliOptions, cliVersion2, systemInformation);
|
|
235291
|
+
return {
|
|
235292
|
+
reportId: response.tier1_reachability_scan_id,
|
|
235293
|
+
legacyMode: response.legacy_mode ?? false
|
|
235294
|
+
};
|
|
235086
235295
|
} else {
|
|
235087
|
-
|
|
235296
|
+
const reportId = await this.coanaAPI.createCoanaReport(
|
|
235088
235297
|
repoUrl,
|
|
235089
235298
|
projectName,
|
|
235090
235299
|
cliVersion2,
|
|
@@ -235094,6 +235303,7 @@ var DashboardAPI = class {
|
|
|
235094
235303
|
apiKey,
|
|
235095
235304
|
cliRunEnv
|
|
235096
235305
|
);
|
|
235306
|
+
return { reportId, legacyMode: false };
|
|
235097
235307
|
}
|
|
235098
235308
|
}
|
|
235099
235309
|
async sendErrorReport(apiKey, stackTrace, shouldLogSharing, errorType, reportId, repoUrl, projectName, logContent) {
|
|
@@ -237051,6 +237261,60 @@ function displayWorkspaceDiagnosticsSummaryInternal(diagnosticsEntries, vulns) {
|
|
|
237051
237261
|
}
|
|
237052
237262
|
|
|
237053
237263
|
// dist/internal/socket-report-socket-dependency-tree.js
|
|
237264
|
+
function filterMissingMetadataArtifacts(artifacts) {
|
|
237265
|
+
const missingIds = new Set(artifacts.filter((a4) => a4.missingMetadata).map((a4) => a4.id));
|
|
237266
|
+
if (missingIds.size === 0)
|
|
237267
|
+
return artifacts;
|
|
237268
|
+
const byId = new Map(artifacts.map((a4) => [a4.id, a4]));
|
|
237269
|
+
const resolveCache = /* @__PURE__ */ new Map();
|
|
237270
|
+
function resolveDependencies(id, visiting) {
|
|
237271
|
+
const cached = resolveCache.get(id);
|
|
237272
|
+
if (cached)
|
|
237273
|
+
return cached;
|
|
237274
|
+
if (visiting.has(id))
|
|
237275
|
+
return [];
|
|
237276
|
+
visiting.add(id);
|
|
237277
|
+
const node = byId.get(id);
|
|
237278
|
+
const out = /* @__PURE__ */ new Set();
|
|
237279
|
+
if (node) {
|
|
237280
|
+
for (const ref of node.dependencies ?? []) {
|
|
237281
|
+
if (missingIds.has(ref)) {
|
|
237282
|
+
for (const r3 of resolveDependencies(ref, visiting))
|
|
237283
|
+
out.add(r3);
|
|
237284
|
+
} else if (byId.has(ref)) {
|
|
237285
|
+
out.add(ref);
|
|
237286
|
+
}
|
|
237287
|
+
}
|
|
237288
|
+
}
|
|
237289
|
+
visiting.delete(id);
|
|
237290
|
+
const res = [...out];
|
|
237291
|
+
resolveCache.set(id, res);
|
|
237292
|
+
return res;
|
|
237293
|
+
}
|
|
237294
|
+
logger.debug(`Filtered out ${missingIds.size} missing-metadata component(s) after reachability analysis`);
|
|
237295
|
+
return artifacts.filter((a4) => !missingIds.has(a4.id)).map((a4) => {
|
|
237296
|
+
let dependencies = a4.dependencies;
|
|
237297
|
+
if (dependencies?.some((r3) => missingIds.has(r3))) {
|
|
237298
|
+
const out = /* @__PURE__ */ new Set();
|
|
237299
|
+
for (const r3 of dependencies) {
|
|
237300
|
+
if (missingIds.has(r3)) {
|
|
237301
|
+
for (const sub of resolveDependencies(r3, /* @__PURE__ */ new Set())) {
|
|
237302
|
+
if (sub !== a4.id)
|
|
237303
|
+
out.add(sub);
|
|
237304
|
+
}
|
|
237305
|
+
} else {
|
|
237306
|
+
out.add(r3);
|
|
237307
|
+
}
|
|
237308
|
+
}
|
|
237309
|
+
dependencies = [...out];
|
|
237310
|
+
}
|
|
237311
|
+
let toplevelAncestors = a4.toplevelAncestors;
|
|
237312
|
+
if (toplevelAncestors?.some((r3) => missingIds.has(r3))) {
|
|
237313
|
+
toplevelAncestors = toplevelAncestors.filter((r3) => !missingIds.has(r3));
|
|
237314
|
+
}
|
|
237315
|
+
return { ...a4, dependencies, toplevelAncestors };
|
|
237316
|
+
});
|
|
237317
|
+
}
|
|
237054
237318
|
function filterOrphanedArtifacts(artifacts) {
|
|
237055
237319
|
const reachable = /* @__PURE__ */ new Set();
|
|
237056
237320
|
const queue = [];
|
|
@@ -237116,6 +237380,7 @@ function toSocketFactsSocketDependencyTree(artifacts, vulnerabilities, tier1Reac
|
|
|
237116
237380
|
});
|
|
237117
237381
|
}
|
|
237118
237382
|
}
|
|
237383
|
+
artifacts = filterMissingMetadataArtifacts(artifacts);
|
|
237119
237384
|
const componentsWithoutPatterns = artifacts.map((artifact) => {
|
|
237120
237385
|
if (!artifact.vulnerabilities) {
|
|
237121
237386
|
return { ...artifact };
|
|
@@ -251436,7 +251701,7 @@ var FixesTask = class {
|
|
|
251436
251701
|
);
|
|
251437
251702
|
return {
|
|
251438
251703
|
potentialVersionsForFix,
|
|
251439
|
-
vulnerabilityFixes: vulnerabilityFixes.filter((
|
|
251704
|
+
vulnerabilityFixes: vulnerabilityFixes.filter((f5) => f5.currentVersion !== f5.fixedVersion)
|
|
251440
251705
|
};
|
|
251441
251706
|
}
|
|
251442
251707
|
async chooseFixesFromPotentialVersionsForFix(vulnChainDetails, potentialVersionsForFix) {
|
|
@@ -252023,7 +252288,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
252023
252288
|
}
|
|
252024
252289
|
|
|
252025
252290
|
// dist/version.js
|
|
252026
|
-
var version3 = "15.
|
|
252291
|
+
var version3 = "15.1.1";
|
|
252027
252292
|
|
|
252028
252293
|
// dist/cli-core.js
|
|
252029
252294
|
var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
|
|
@@ -252169,6 +252434,35 @@ var CliCore = class {
|
|
|
252169
252434
|
const allowedEcosystems = new Set(this.options.purlTypes.map((pt) => getAdvisoryEcosystemFromPurlType(pt)).filter((e) => e !== void 0));
|
|
252170
252435
|
return ecosystems.filter((e) => allowedEcosystems.has(e));
|
|
252171
252436
|
}
|
|
252437
|
+
/**
|
|
252438
|
+
* Opt out of the v15 reachability halts by enabling every
|
|
252439
|
+
* `--reach-continue-on-*` flag that wasn't already set explicitly by the
|
|
252440
|
+
* user (via CLI flag or env override). Invoked when the depscan `PUT
|
|
252441
|
+
* /tier1-reachability-scan` response reports `legacy_mode: true` — i.e. the
|
|
252442
|
+
* org ran the pre-v15 CLI before the admin-configured cutoff and has not
|
|
252443
|
+
* been promoted out of legacy mode.
|
|
252444
|
+
*/
|
|
252445
|
+
applyLegacyModeOptOut() {
|
|
252446
|
+
logger.warn([
|
|
252447
|
+
"",
|
|
252448
|
+
"\u26A0\uFE0F Legacy mode is enabled for this organization.",
|
|
252449
|
+
"",
|
|
252450
|
+
"Reachability analysis will continue through install failures, analysis errors,",
|
|
252451
|
+
"workspaces with no source files, and Gradle/SBT projects missing their lock files",
|
|
252452
|
+
"instead of halting. This preserves the pre-v15 behavior for organizations that",
|
|
252453
|
+
"were already running Coana before the v15 rollout.",
|
|
252454
|
+
"",
|
|
252455
|
+
"Legacy mode hides real problems: failed installs and analysis errors silently",
|
|
252456
|
+
"downgrade to precomputed (Tier 2) results, so reachability coverage may be lower",
|
|
252457
|
+
"than expected. To opt into the new, stricter behavior, reach out to the Socket",
|
|
252458
|
+
"team and ask to have your organization promoted out of legacy mode.",
|
|
252459
|
+
""
|
|
252460
|
+
].join("\n"));
|
|
252461
|
+
this.options.reachContinueOnInstallErrors ??= true;
|
|
252462
|
+
this.options.reachContinueOnAnalysisErrors ??= true;
|
|
252463
|
+
this.options.reachContinueOnNoSourceFiles ??= true;
|
|
252464
|
+
this.options.reachContinueOnMissingLockFiles ??= true;
|
|
252465
|
+
}
|
|
252172
252466
|
async main() {
|
|
252173
252467
|
const tmpDir = await createTmpDirectory("coana-cli-");
|
|
252174
252468
|
this.coanaLogPath = join34(tmpDir, "coana-log.txt");
|
|
@@ -252191,7 +252485,11 @@ var CliCore = class {
|
|
|
252191
252485
|
try {
|
|
252192
252486
|
if (this.shareWithDashboard && this.apiKey.type === "present" || this.options.socketMode) {
|
|
252193
252487
|
const gitData = await getGitDataToMetadataIfAvailable(this.rootWorkingDirectory);
|
|
252194
|
-
|
|
252488
|
+
const createReportResult = await this.dashboardAPI.createReport(this.options.repoUrl, this.options.projectName, version3, gitData?.sha, gitData?.branchName, omit(this.options, "apiKey", "print-report", "repoUrl", "projectName", "writeReportToFile"), this.apiKey, this.options.runEnv, getSystemInformation());
|
|
252489
|
+
this.reportId = createReportResult.reportId;
|
|
252490
|
+
if (createReportResult.legacyMode) {
|
|
252491
|
+
this.applyLegacyModeOptOut();
|
|
252492
|
+
}
|
|
252195
252493
|
if (this.options.socketMode && this.reportId) {
|
|
252196
252494
|
const batchedLogStreamer = new BatchedHttpLogStreamer({
|
|
252197
252495
|
reportId: this.reportId,
|
|
@@ -252306,23 +252604,17 @@ var CliCore = class {
|
|
|
252306
252604
|
if (this.options.purlTypes && !this.options.purlTypes.some((purlType) => getAdvisoryEcosystemFromPurlType(purlType) === ecosystem)) {
|
|
252307
252605
|
continue;
|
|
252308
252606
|
}
|
|
252309
|
-
const
|
|
252607
|
+
const filterConfig = {
|
|
252608
|
+
mainProjectDir: this.rootWorkingDirectory,
|
|
252609
|
+
excludeDirs: this.options.excludeDirs ?? [],
|
|
252610
|
+
changedFiles: this.options.changedFiles,
|
|
252611
|
+
includeDirs: this.options.includeDirs ?? []
|
|
252612
|
+
};
|
|
252310
252613
|
const filteredWorkspaces = {};
|
|
252311
252614
|
for (const [workspace, analysisData] of Object.entries(workspaceToAnalysisData)) {
|
|
252312
252615
|
const resolvedWorkspace = resolve42(this.rootWorkingDirectory, workspace);
|
|
252313
|
-
|
|
252314
|
-
mainProjectDir: this.rootWorkingDirectory,
|
|
252315
|
-
excludeDirs: this.options.excludeDirs ?? [],
|
|
252316
|
-
changedFiles: this.options.changedFiles,
|
|
252317
|
-
includeDirs
|
|
252318
|
-
}, resolvedWorkspace);
|
|
252319
|
-
if (shouldExclude)
|
|
252616
|
+
if (!shouldIncludeWorkspaceForAnalysis(filterConfig, resolvedWorkspace))
|
|
252320
252617
|
continue;
|
|
252321
|
-
if (includeDirs.length > 0) {
|
|
252322
|
-
const relPath = relative22(this.rootWorkingDirectory, resolvedWorkspace);
|
|
252323
|
-
if (!import_picomatch12.default.isMatch(relPath, includeDirs))
|
|
252324
|
-
continue;
|
|
252325
|
-
}
|
|
252326
252618
|
filteredWorkspaces[workspace] = analysisData;
|
|
252327
252619
|
}
|
|
252328
252620
|
if (Object.keys(filteredWorkspaces).length > 0) {
|
|
@@ -252927,33 +253219,33 @@ Subproject: ${subproject}`);
|
|
|
252927
253219
|
}, Number(this.options.concurrency));
|
|
252928
253220
|
if (allFailures.length > 0) {
|
|
252929
253221
|
this.logAggregatedInstallErrors(allFailures);
|
|
252930
|
-
const allFailed = allFailures.flatMap((
|
|
253222
|
+
const allFailed = allFailures.flatMap((f5) => f5.failedPackages);
|
|
252931
253223
|
throw new InstallError2(allFailed);
|
|
252932
253224
|
}
|
|
252933
253225
|
}
|
|
252934
253226
|
logAggregatedInstallErrors(failures) {
|
|
252935
253227
|
const displayLines = [""];
|
|
252936
|
-
const goFailures = failures.filter((
|
|
252937
|
-
const installFailures = failures.filter((
|
|
253228
|
+
const goFailures = failures.filter((f5) => f5.ecosystem === "GO");
|
|
253229
|
+
const installFailures = failures.filter((f5) => f5.ecosystem !== "GO");
|
|
252938
253230
|
if (installFailures.length > 0) {
|
|
252939
253231
|
displayLines.push(kleur_default.red().bold("Installation Errors"));
|
|
252940
253232
|
displayLines.push("The following packages failed to install during dependency pre-installation:");
|
|
252941
253233
|
displayLines.push("");
|
|
252942
253234
|
const byEcosystem = /* @__PURE__ */ new Map();
|
|
252943
|
-
for (const
|
|
252944
|
-
if (!byEcosystem.has(
|
|
252945
|
-
byEcosystem.set(
|
|
252946
|
-
byEcosystem.get(
|
|
253235
|
+
for (const f5 of installFailures) {
|
|
253236
|
+
if (!byEcosystem.has(f5.ecosystem))
|
|
253237
|
+
byEcosystem.set(f5.ecosystem, []);
|
|
253238
|
+
byEcosystem.get(f5.ecosystem).push(f5);
|
|
252947
253239
|
}
|
|
252948
253240
|
for (const [ecosystem, ecosystemFailures] of byEcosystem) {
|
|
252949
253241
|
displayLines.push(kleur_default.bold(` ${ecosystem}:`));
|
|
252950
|
-
for (const
|
|
252951
|
-
const pkgList =
|
|
253242
|
+
for (const f5 of ecosystemFailures) {
|
|
253243
|
+
const pkgList = f5.failedPackages.sort();
|
|
252952
253244
|
const pkgLines = pkgList.slice(0, 10).map((pkg) => ` - ${pkg}`);
|
|
252953
253245
|
if (pkgList.length > 10) {
|
|
252954
253246
|
pkgLines.push(` ... and ${pkgList.length - 10} more`);
|
|
252955
253247
|
}
|
|
252956
|
-
displayLines.push(` ${
|
|
253248
|
+
displayLines.push(` ${f5.workspace}:`);
|
|
252957
253249
|
displayLines.push(...pkgLines);
|
|
252958
253250
|
}
|
|
252959
253251
|
displayLines.push("");
|
|
@@ -252964,8 +253256,8 @@ Subproject: ${subproject}`);
|
|
|
252964
253256
|
displayLines.push(kleur_default.red().bold("Build Errors"));
|
|
252965
253257
|
displayLines.push("The following Go projects failed to build:");
|
|
252966
253258
|
displayLines.push("");
|
|
252967
|
-
for (const
|
|
252968
|
-
displayLines.push(` ${
|
|
253259
|
+
for (const f5 of goFailures) {
|
|
253260
|
+
displayLines.push(` ${f5.workspace}`);
|
|
252969
253261
|
}
|
|
252970
253262
|
displayLines.push("");
|
|
252971
253263
|
}
|
|
@@ -253049,7 +253341,7 @@ Subproject: ${subproject}`);
|
|
|
253049
253341
|
logger.error(displayLines.join("\n"));
|
|
253050
253342
|
}
|
|
253051
253343
|
shouldExcludeAnalyzingWorkspace(subprojectPath, workspacePath, workspacePrefix = "") {
|
|
253052
|
-
const shouldExcludeWorkspaceForAnalysis =
|
|
253344
|
+
const shouldExcludeWorkspaceForAnalysis = !shouldIncludeWorkspaceForAnalysis({
|
|
253053
253345
|
mainProjectDir: this.rootWorkingDirectory,
|
|
253054
253346
|
excludeDirs: this.options.excludeDirs ?? [],
|
|
253055
253347
|
changedFiles: this.options.changedFiles,
|
|
@@ -253087,7 +253379,8 @@ Subproject: ${subproject}`);
|
|
|
253087
253379
|
disableBucketing: !!this.options.disableAnalysisSplitting,
|
|
253088
253380
|
lightweightReachability: this.options.lightweightReachability,
|
|
253089
253381
|
skipCacheUsage: this.options.skipCacheUsage,
|
|
253090
|
-
haltOnInstallErrors: !!this.options.socketMode && !this.options.reachContinueOnInstallErrors
|
|
253382
|
+
haltOnInstallErrors: !!this.options.socketMode && !this.options.reachContinueOnInstallErrors,
|
|
253383
|
+
jsAnalysisEngine: this.options.legacyJsAnalysisEngine ? "jelly" : "sparjs"
|
|
253091
253384
|
}, rootWorkingDirOverride, displaySubprojectPath, preinstallDir);
|
|
253092
253385
|
result.push(...analysisResult.vulnerabilities);
|
|
253093
253386
|
this.sendProgress("REACHABILITY_ANALYSIS", false, subprojectPath, workspacePath);
|
|
@@ -253380,8 +253673,11 @@ async function writeAnalysisDebugInfo(outputFilePath, ecosystemToWorkspaceToVuln
|
|
|
253380
253673
|
handleNexeBinaryMode();
|
|
253381
253674
|
var program2 = new Command();
|
|
253382
253675
|
var run2 = new Command();
|
|
253383
|
-
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("--silent-spinner", "Silence spinner", "CI" in process.env || !process.stdin.isTTY).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. NPM reachability analysis does not support concurrent execution, so the concurrency level is ignored for NPM.", "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.").addOption(new Option("--purl-types <purlTypes...>", "List of PURL types to analyze (space-separated). Currently npm, pypi, maven, nuget, golang and cargo are supported. Default is all supported purl types.").hideHelp()).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("--disable-analytics-sharing", "Disable analytics sharing.", 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).option("--reach-continue-on-install-errors", "Continue analysis when package installation fails, falling back to precomputed (Tier 2) reachability results. By default, the CLI halts on installation errors in socket mode.", process.env.COANA_CONTINUE_ON_INSTALL_ERRORS === "true").option("--reach-continue-on-analysis-errors", "Continue analysis when errors occur (timeouts, OOM, parse errors, etc.), falling back to precomputed (Tier 2) reachability results. By default, the CLI halts on analysis errors in socket mode.",
|
|
253676
|
+
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("--silent-spinner", "Silence spinner", "CI" in process.env || !process.stdin.isTTY).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. NPM reachability analysis does not support concurrent execution, so the concurrency level is ignored for NPM.", "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.").addOption(new Option("--purl-types <purlTypes...>", "List of PURL types to analyze (space-separated). Currently npm, pypi, maven, nuget, golang and cargo are supported. Default is all supported purl types.").hideHelp()).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("--disable-analytics-sharing", "Disable analytics sharing.", 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).option("--reach-continue-on-install-errors", "Continue analysis when package installation fails, falling back to precomputed (Tier 2) reachability results. By default, the CLI halts on installation errors in socket mode.", process.env.COANA_REACH_CONTINUE_ON_INSTALL_ERRORS === "true" || process.env.COANA_CONTINUE_ON_INSTALL_ERRORS === "true" || void 0).option("--reach-continue-on-analysis-errors", "Continue analysis when errors occur (timeouts, OOM, parse errors, etc.), falling back to precomputed (Tier 2) reachability results. By default, the CLI halts on analysis errors in socket mode.", process.env.COANA_REACH_CONTINUE_ON_ANALYSIS_ERRORS === "true" || void 0).option("--reach-continue-on-no-source-files", "Continue analysis when a workspace contains no source files for its ecosystem. By default, the CLI halts in socket mode.", process.env.COANA_REACH_CONTINUE_ON_NO_SOURCE_FILES === "true" || void 0).option("--reach-continue-on-missing-lock-files", "Continue analysis when a Gradle or SBT project is missing its lock file (or Gradle version catalog / pre-generated SBOM). By default, the CLI halts in socket mode.", process.env.COANA_REACH_CONTINUE_ON_MISSING_LOCK_FILES === "true" || void 0).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()).option("--skip-cache-usage", "Do not attempt to use cached analysis configuration from previous runs", false).addOption(new Option("--lazy-mode", "Enable lazy analysis mode for JavaScript/TypeScript. This can significantly speed up analysis by only analyzing code that is actually relevant for the vulnerabilities being analyzed.").default(false).implies({ legacyJsAnalysisEngine: true }).hideHelp()).addOption(new Option("--legacy-js-analysis-engine", "Use the legacy Jelly engine for JavaScript/TypeScript reachability analysis instead of SPAR-JS.").default(false).hideHelp()).addOption(new Option("--min-severity <severity>", "Set the minimum severity of vulnerabilities to analyze. Supported severities are info, low, moderate, high and critical.").choices(["info", "INFO", "low", "LOW", "moderate", "MODERATE", "high", "HIGH", "critical", "CRITICAL"])).option("--use-unreachable-from-precomputation", "Skip the reachability analysis for vulnerabilities that are already known to be unreachable from the precomputed reachability analysis (Tier 2).", false).addOption(new Option("--use-only-pregenerated-sboms", "Only include artifacts that have CDX or SPDX files in their manifest files.").default(false).hideHelp()).option("--disable-external-tool-checks", "Disable validation of external tools (npm, python, go, etc.) before running analysis.", false).version(version3).configureHelp({ sortOptions: true }).action(async (path9, options) => {
|
|
253384
253677
|
process.env.DOCKER_IMAGE_TAG ??= version3;
|
|
253678
|
+
if (process.env.COANA_CONTINUE_ON_INSTALL_ERRORS === "true" && process.env.COANA_REACH_CONTINUE_ON_INSTALL_ERRORS !== "true") {
|
|
253679
|
+
logger.warn("COANA_CONTINUE_ON_INSTALL_ERRORS is deprecated; use COANA_REACH_CONTINUE_ON_INSTALL_ERRORS instead.");
|
|
253680
|
+
}
|
|
253385
253681
|
options.ecosystems = options.ecosystems?.map((e) => e.toUpperCase());
|
|
253386
253682
|
options.minSeverity = options.minSeverity?.toUpperCase();
|
|
253387
253683
|
options.purlTypes = options.purlTypes?.map((e) => e.toLowerCase());
|
|
@@ -253411,6 +253707,9 @@ computeFixesAndUpgradePurlsCmd.name("compute-fixes-and-upgrade-purls").argument(
|
|
|
253411
253707
|
const logFile = join35(tmpDir, "compute-fixes-and-upgrade-purls.log");
|
|
253412
253708
|
logger.initWinstonLogger(options.debug, logFile);
|
|
253413
253709
|
try {
|
|
253710
|
+
if (options.minimumReleaseAge) {
|
|
253711
|
+
validateMinimumReleaseAge(options.minimumReleaseAge);
|
|
253712
|
+
}
|
|
253414
253713
|
await initializeComputeFixesAndUpgradePurls(path9, options);
|
|
253415
253714
|
if (!options.exclude) {
|
|
253416
253715
|
const ignorePaths = await inferExcludeDirsFromConfigurationFiles(path9);
|
|
@@ -253424,11 +253723,7 @@ computeFixesAndUpgradePurlsCmd.name("compute-fixes-and-upgrade-purls").argument(
|
|
|
253424
253723
|
});
|
|
253425
253724
|
}
|
|
253426
253725
|
}
|
|
253427
|
-
const
|
|
253428
|
-
...y(options, ["minimumReleaseAge"]),
|
|
253429
|
-
minimumReleaseAgeInMinutes: options.minimumReleaseAge ? parseMinimumReleaseAgeToMinutes(options.minimumReleaseAge) : void 0
|
|
253430
|
-
};
|
|
253431
|
-
const output = await computeFixesAndUpgradePurls(path9, optionsToUse, logFile);
|
|
253726
|
+
const output = await computeFixesAndUpgradePurls(path9, options, logFile);
|
|
253432
253727
|
if (options.outputFile) {
|
|
253433
253728
|
const outputFile = resolve44(options.outputFile);
|
|
253434
253729
|
await mkdir7(dirname27(outputFile), { recursive: true });
|
|
@@ -253530,21 +253825,9 @@ ${succeeded}/${total} workspaces were upgraded successfully.`));
|
|
|
253530
253825
|
More details available in log file: ${logFile}`);
|
|
253531
253826
|
process.exit(1);
|
|
253532
253827
|
}
|
|
253533
|
-
function
|
|
253534
|
-
|
|
253535
|
-
if (!match2)
|
|
253828
|
+
function validateMinimumReleaseAge(minimumReleaseAge) {
|
|
253829
|
+
if (!/^\d+[mhdw]$/.test(minimumReleaseAge)) {
|
|
253536
253830
|
throw new Error("Invalid minimum release age. Format is 2m, 5h, 3d or 1w");
|
|
253537
|
-
const value2 = parseInt(match2[1]);
|
|
253538
|
-
const unit = match2[2];
|
|
253539
|
-
switch (unit) {
|
|
253540
|
-
case "m":
|
|
253541
|
-
return value2;
|
|
253542
|
-
case "h":
|
|
253543
|
-
return value2 * 60;
|
|
253544
|
-
case "d":
|
|
253545
|
-
return value2 * 60 * 24;
|
|
253546
|
-
case "w":
|
|
253547
|
-
return value2 * 60 * 24 * 7;
|
|
253548
253831
|
}
|
|
253549
253832
|
}
|
|
253550
253833
|
export {
|