@coana-tech/cli 14.11.0 → 14.11.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 +206 -148
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -46531,8 +46531,8 @@ var require_follow_redirects = __commonJS({
|
|
|
46531
46531
|
}
|
|
46532
46532
|
return parsed;
|
|
46533
46533
|
}
|
|
46534
|
-
function resolveUrl(
|
|
46535
|
-
return useNativeURL ? new URL3(
|
|
46534
|
+
function resolveUrl(relative15, base) {
|
|
46535
|
+
return useNativeURL ? new URL3(relative15, base) : parseUrl(url2.resolve(base, relative15));
|
|
46536
46536
|
}
|
|
46537
46537
|
function validateUrl(input) {
|
|
46538
46538
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -68625,10 +68625,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
68625
68625
|
let offset = bm.offset;
|
|
68626
68626
|
let commentEnd = null;
|
|
68627
68627
|
for (const collItem of bm.items) {
|
|
68628
|
-
const { start, key, sep:
|
|
68628
|
+
const { start, key, sep: sep6, value } = collItem;
|
|
68629
68629
|
const keyProps = resolveProps.resolveProps(start, {
|
|
68630
68630
|
indicator: "explicit-key-ind",
|
|
68631
|
-
next: key ??
|
|
68631
|
+
next: key ?? sep6?.[0],
|
|
68632
68632
|
offset,
|
|
68633
68633
|
onError,
|
|
68634
68634
|
parentIndent: bm.indent,
|
|
@@ -68642,7 +68642,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
68642
68642
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
68643
68643
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
68644
68644
|
}
|
|
68645
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
68645
|
+
if (!keyProps.anchor && !keyProps.tag && !sep6) {
|
|
68646
68646
|
commentEnd = keyProps.end;
|
|
68647
68647
|
if (keyProps.comment) {
|
|
68648
68648
|
if (map2.comment)
|
|
@@ -68664,7 +68664,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
68664
68664
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);
|
|
68665
68665
|
if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode))
|
|
68666
68666
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
68667
|
-
const valueProps = resolveProps.resolveProps(
|
|
68667
|
+
const valueProps = resolveProps.resolveProps(sep6 ?? [], {
|
|
68668
68668
|
indicator: "map-value-ind",
|
|
68669
68669
|
next: value,
|
|
68670
68670
|
offset: keyNode.range[2],
|
|
@@ -68680,7 +68680,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
68680
68680
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
68681
68681
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
68682
68682
|
}
|
|
68683
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
68683
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep6, null, valueProps, onError);
|
|
68684
68684
|
if (ctx.schema.compat)
|
|
68685
68685
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
68686
68686
|
offset = valueNode.range[2];
|
|
@@ -68769,7 +68769,7 @@ var require_resolve_end = __commonJS({
|
|
|
68769
68769
|
let comment = "";
|
|
68770
68770
|
if (end2) {
|
|
68771
68771
|
let hasSpace = false;
|
|
68772
|
-
let
|
|
68772
|
+
let sep6 = "";
|
|
68773
68773
|
for (const token of end2) {
|
|
68774
68774
|
const { source, type } = token;
|
|
68775
68775
|
switch (type) {
|
|
@@ -68783,13 +68783,13 @@ var require_resolve_end = __commonJS({
|
|
|
68783
68783
|
if (!comment)
|
|
68784
68784
|
comment = cb;
|
|
68785
68785
|
else
|
|
68786
|
-
comment +=
|
|
68787
|
-
|
|
68786
|
+
comment += sep6 + cb;
|
|
68787
|
+
sep6 = "";
|
|
68788
68788
|
break;
|
|
68789
68789
|
}
|
|
68790
68790
|
case "newline":
|
|
68791
68791
|
if (comment)
|
|
68792
|
-
|
|
68792
|
+
sep6 += source;
|
|
68793
68793
|
hasSpace = true;
|
|
68794
68794
|
break;
|
|
68795
68795
|
default:
|
|
@@ -68830,18 +68830,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
68830
68830
|
let offset = fc.offset + fc.start.source.length;
|
|
68831
68831
|
for (let i6 = 0; i6 < fc.items.length; ++i6) {
|
|
68832
68832
|
const collItem = fc.items[i6];
|
|
68833
|
-
const { start, key, sep:
|
|
68833
|
+
const { start, key, sep: sep6, value } = collItem;
|
|
68834
68834
|
const props = resolveProps.resolveProps(start, {
|
|
68835
68835
|
flow: fcName,
|
|
68836
68836
|
indicator: "explicit-key-ind",
|
|
68837
|
-
next: key ??
|
|
68837
|
+
next: key ?? sep6?.[0],
|
|
68838
68838
|
offset,
|
|
68839
68839
|
onError,
|
|
68840
68840
|
parentIndent: fc.indent,
|
|
68841
68841
|
startOnNewline: false
|
|
68842
68842
|
});
|
|
68843
68843
|
if (!props.found) {
|
|
68844
|
-
if (!props.anchor && !props.tag && !
|
|
68844
|
+
if (!props.anchor && !props.tag && !sep6 && !value) {
|
|
68845
68845
|
if (i6 === 0 && props.comma)
|
|
68846
68846
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
68847
68847
|
else if (i6 < fc.items.length - 1)
|
|
@@ -68895,8 +68895,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
68895
68895
|
}
|
|
68896
68896
|
}
|
|
68897
68897
|
}
|
|
68898
|
-
if (!isMap && !
|
|
68899
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
68898
|
+
if (!isMap && !sep6 && !props.found) {
|
|
68899
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep6, null, props, onError);
|
|
68900
68900
|
coll.items.push(valueNode);
|
|
68901
68901
|
offset = valueNode.range[2];
|
|
68902
68902
|
if (isBlock(value))
|
|
@@ -68906,7 +68906,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
68906
68906
|
const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);
|
|
68907
68907
|
if (isBlock(key))
|
|
68908
68908
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
68909
|
-
const valueProps = resolveProps.resolveProps(
|
|
68909
|
+
const valueProps = resolveProps.resolveProps(sep6 ?? [], {
|
|
68910
68910
|
flow: fcName,
|
|
68911
68911
|
indicator: "map-value-ind",
|
|
68912
68912
|
next: value,
|
|
@@ -68917,8 +68917,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
68917
68917
|
});
|
|
68918
68918
|
if (valueProps.found) {
|
|
68919
68919
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
68920
|
-
if (
|
|
68921
|
-
for (const st of
|
|
68920
|
+
if (sep6)
|
|
68921
|
+
for (const st of sep6) {
|
|
68922
68922
|
if (st === valueProps.found)
|
|
68923
68923
|
break;
|
|
68924
68924
|
if (st.type === "newline") {
|
|
@@ -68935,7 +68935,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
68935
68935
|
else
|
|
68936
68936
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
68937
68937
|
}
|
|
68938
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
68938
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep6, null, valueProps, onError) : null;
|
|
68939
68939
|
if (valueNode) {
|
|
68940
68940
|
if (isBlock(value))
|
|
68941
68941
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -69115,7 +69115,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
69115
69115
|
chompStart = i6 + 1;
|
|
69116
69116
|
}
|
|
69117
69117
|
let value = "";
|
|
69118
|
-
let
|
|
69118
|
+
let sep6 = "";
|
|
69119
69119
|
let prevMoreIndented = false;
|
|
69120
69120
|
for (let i6 = 0; i6 < contentStart; ++i6)
|
|
69121
69121
|
value += lines[i6][0].slice(trimIndent) + "\n";
|
|
@@ -69132,24 +69132,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
69132
69132
|
indent2 = "";
|
|
69133
69133
|
}
|
|
69134
69134
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
69135
|
-
value +=
|
|
69136
|
-
|
|
69135
|
+
value += sep6 + indent2.slice(trimIndent) + content;
|
|
69136
|
+
sep6 = "\n";
|
|
69137
69137
|
} else if (indent2.length > trimIndent || content[0] === " ") {
|
|
69138
|
-
if (
|
|
69139
|
-
|
|
69140
|
-
else if (!prevMoreIndented &&
|
|
69141
|
-
|
|
69142
|
-
value +=
|
|
69143
|
-
|
|
69138
|
+
if (sep6 === " ")
|
|
69139
|
+
sep6 = "\n";
|
|
69140
|
+
else if (!prevMoreIndented && sep6 === "\n")
|
|
69141
|
+
sep6 = "\n\n";
|
|
69142
|
+
value += sep6 + indent2.slice(trimIndent) + content;
|
|
69143
|
+
sep6 = "\n";
|
|
69144
69144
|
prevMoreIndented = true;
|
|
69145
69145
|
} else if (content === "") {
|
|
69146
|
-
if (
|
|
69146
|
+
if (sep6 === "\n")
|
|
69147
69147
|
value += "\n";
|
|
69148
69148
|
else
|
|
69149
|
-
|
|
69149
|
+
sep6 = "\n";
|
|
69150
69150
|
} else {
|
|
69151
|
-
value +=
|
|
69152
|
-
|
|
69151
|
+
value += sep6 + content;
|
|
69152
|
+
sep6 = " ";
|
|
69153
69153
|
prevMoreIndented = false;
|
|
69154
69154
|
}
|
|
69155
69155
|
}
|
|
@@ -69331,25 +69331,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
69331
69331
|
if (!match2)
|
|
69332
69332
|
return source;
|
|
69333
69333
|
let res = match2[1];
|
|
69334
|
-
let
|
|
69334
|
+
let sep6 = " ";
|
|
69335
69335
|
let pos = first2.lastIndex;
|
|
69336
69336
|
line.lastIndex = pos;
|
|
69337
69337
|
while (match2 = line.exec(source)) {
|
|
69338
69338
|
if (match2[1] === "") {
|
|
69339
|
-
if (
|
|
69340
|
-
res +=
|
|
69339
|
+
if (sep6 === "\n")
|
|
69340
|
+
res += sep6;
|
|
69341
69341
|
else
|
|
69342
|
-
|
|
69342
|
+
sep6 = "\n";
|
|
69343
69343
|
} else {
|
|
69344
|
-
res +=
|
|
69345
|
-
|
|
69344
|
+
res += sep6 + match2[1];
|
|
69345
|
+
sep6 = " ";
|
|
69346
69346
|
}
|
|
69347
69347
|
pos = line.lastIndex;
|
|
69348
69348
|
}
|
|
69349
69349
|
const last2 = /[ \t]*(.*)/sy;
|
|
69350
69350
|
last2.lastIndex = pos;
|
|
69351
69351
|
match2 = last2.exec(source);
|
|
69352
|
-
return res +
|
|
69352
|
+
return res + sep6 + (match2?.[1] ?? "");
|
|
69353
69353
|
}
|
|
69354
69354
|
function doubleQuotedValue(source, onError) {
|
|
69355
69355
|
let res = "";
|
|
@@ -70136,14 +70136,14 @@ var require_cst_stringify = __commonJS({
|
|
|
70136
70136
|
}
|
|
70137
70137
|
}
|
|
70138
70138
|
}
|
|
70139
|
-
function stringifyItem({ start, key, sep:
|
|
70139
|
+
function stringifyItem({ start, key, sep: sep6, value }) {
|
|
70140
70140
|
let res = "";
|
|
70141
70141
|
for (const st of start)
|
|
70142
70142
|
res += st.source;
|
|
70143
70143
|
if (key)
|
|
70144
70144
|
res += stringifyToken(key);
|
|
70145
|
-
if (
|
|
70146
|
-
for (const st of
|
|
70145
|
+
if (sep6)
|
|
70146
|
+
for (const st of sep6)
|
|
70147
70147
|
res += st.source;
|
|
70148
70148
|
if (value)
|
|
70149
70149
|
res += stringifyToken(value);
|
|
@@ -71292,18 +71292,18 @@ var require_parser3 = __commonJS({
|
|
|
71292
71292
|
if (this.type === "map-value-ind") {
|
|
71293
71293
|
const prev2 = getPrevProps(this.peek(2));
|
|
71294
71294
|
const start = getFirstKeyStartProps(prev2);
|
|
71295
|
-
let
|
|
71295
|
+
let sep6;
|
|
71296
71296
|
if (scalar.end) {
|
|
71297
|
-
|
|
71298
|
-
|
|
71297
|
+
sep6 = scalar.end;
|
|
71298
|
+
sep6.push(this.sourceToken);
|
|
71299
71299
|
delete scalar.end;
|
|
71300
71300
|
} else
|
|
71301
|
-
|
|
71301
|
+
sep6 = [this.sourceToken];
|
|
71302
71302
|
const map2 = {
|
|
71303
71303
|
type: "block-map",
|
|
71304
71304
|
offset: scalar.offset,
|
|
71305
71305
|
indent: scalar.indent,
|
|
71306
|
-
items: [{ start, key: scalar, sep:
|
|
71306
|
+
items: [{ start, key: scalar, sep: sep6 }]
|
|
71307
71307
|
};
|
|
71308
71308
|
this.onKeyLine = true;
|
|
71309
71309
|
this.stack[this.stack.length - 1] = map2;
|
|
@@ -71456,15 +71456,15 @@ var require_parser3 = __commonJS({
|
|
|
71456
71456
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
71457
71457
|
const start2 = getFirstKeyStartProps(it.start);
|
|
71458
71458
|
const key = it.key;
|
|
71459
|
-
const
|
|
71460
|
-
|
|
71459
|
+
const sep6 = it.sep;
|
|
71460
|
+
sep6.push(this.sourceToken);
|
|
71461
71461
|
delete it.key;
|
|
71462
71462
|
delete it.sep;
|
|
71463
71463
|
this.stack.push({
|
|
71464
71464
|
type: "block-map",
|
|
71465
71465
|
offset: this.offset,
|
|
71466
71466
|
indent: this.indent,
|
|
71467
|
-
items: [{ start: start2, key, sep:
|
|
71467
|
+
items: [{ start: start2, key, sep: sep6 }]
|
|
71468
71468
|
});
|
|
71469
71469
|
} else if (start.length > 0) {
|
|
71470
71470
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -71648,13 +71648,13 @@ var require_parser3 = __commonJS({
|
|
|
71648
71648
|
const prev2 = getPrevProps(parent2);
|
|
71649
71649
|
const start = getFirstKeyStartProps(prev2);
|
|
71650
71650
|
fixFlowSeqItems(fc);
|
|
71651
|
-
const
|
|
71652
|
-
|
|
71651
|
+
const sep6 = fc.end.splice(1, fc.end.length);
|
|
71652
|
+
sep6.push(this.sourceToken);
|
|
71653
71653
|
const map2 = {
|
|
71654
71654
|
type: "block-map",
|
|
71655
71655
|
offset: fc.offset,
|
|
71656
71656
|
indent: fc.indent,
|
|
71657
|
-
items: [{ start, key: fc, sep:
|
|
71657
|
+
items: [{ start, key: fc, sep: sep6 }]
|
|
71658
71658
|
};
|
|
71659
71659
|
this.onKeyLine = true;
|
|
71660
71660
|
this.stack[this.stack.length - 1] = map2;
|
|
@@ -81794,16 +81794,16 @@ var require_lockfile = __commonJS({
|
|
|
81794
81794
|
if (process.platform === "win32") {
|
|
81795
81795
|
yield fsSymlink(src, dest, "junction");
|
|
81796
81796
|
} else {
|
|
81797
|
-
let
|
|
81797
|
+
let relative15;
|
|
81798
81798
|
try {
|
|
81799
|
-
|
|
81799
|
+
relative15 = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src));
|
|
81800
81800
|
} catch (err) {
|
|
81801
81801
|
if (err.code !== "ENOENT") {
|
|
81802
81802
|
throw err;
|
|
81803
81803
|
}
|
|
81804
|
-
|
|
81804
|
+
relative15 = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src);
|
|
81805
81805
|
}
|
|
81806
|
-
yield fsSymlink(
|
|
81806
|
+
yield fsSymlink(relative15 || ".", dest);
|
|
81807
81807
|
}
|
|
81808
81808
|
});
|
|
81809
81809
|
return function symlink2(_x24, _x25) {
|
|
@@ -81830,17 +81830,17 @@ var require_lockfile = __commonJS({
|
|
|
81830
81830
|
_ref28 = _i14.value;
|
|
81831
81831
|
}
|
|
81832
81832
|
const name = _ref28;
|
|
81833
|
-
const
|
|
81833
|
+
const relative15 = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name;
|
|
81834
81834
|
const loc = (_path || _load_path()).default.join(dir, name);
|
|
81835
81835
|
const stat6 = yield lstat2(loc);
|
|
81836
81836
|
files.push({
|
|
81837
|
-
relative:
|
|
81837
|
+
relative: relative15,
|
|
81838
81838
|
basename: name,
|
|
81839
81839
|
absolute: loc,
|
|
81840
81840
|
mtime: +stat6.mtime
|
|
81841
81841
|
});
|
|
81842
81842
|
if (stat6.isDirectory()) {
|
|
81843
|
-
files = files.concat(yield walk(loc,
|
|
81843
|
+
files = files.concat(yield walk(loc, relative15, ignoreBasenames));
|
|
81844
81844
|
}
|
|
81845
81845
|
}
|
|
81846
81846
|
return files;
|
|
@@ -83060,15 +83060,15 @@ var require_lockfile = __commonJS({
|
|
|
83060
83060
|
}
|
|
83061
83061
|
toString(opts) {
|
|
83062
83062
|
opts = opts || {};
|
|
83063
|
-
let
|
|
83063
|
+
let sep6 = opts.sep || " ";
|
|
83064
83064
|
if (opts.strict) {
|
|
83065
|
-
|
|
83065
|
+
sep6 = sep6.replace(/\S+/g, " ");
|
|
83066
83066
|
}
|
|
83067
83067
|
return Object.keys(this).map((k) => {
|
|
83068
83068
|
return this[k].map((hash) => {
|
|
83069
83069
|
return Hash.prototype.toString.call(hash, opts);
|
|
83070
|
-
}).filter((x2) => x2.length).join(
|
|
83071
|
-
}).filter((x2) => x2.length).join(
|
|
83070
|
+
}).filter((x2) => x2.length).join(sep6);
|
|
83071
|
+
}).filter((x2) => x2.length).join(sep6);
|
|
83072
83072
|
}
|
|
83073
83073
|
concat(integrity, opts) {
|
|
83074
83074
|
const other = typeof integrity === "string" ? integrity : stringify3(integrity, opts);
|
|
@@ -142546,10 +142546,10 @@ var require_resolve_block_map2 = __commonJS({
|
|
|
142546
142546
|
let offset = bm.offset;
|
|
142547
142547
|
let commentEnd = null;
|
|
142548
142548
|
for (const collItem of bm.items) {
|
|
142549
|
-
const { start, key, sep:
|
|
142549
|
+
const { start, key, sep: sep6, value } = collItem;
|
|
142550
142550
|
const keyProps = resolveProps.resolveProps(start, {
|
|
142551
142551
|
indicator: "explicit-key-ind",
|
|
142552
|
-
next: key ??
|
|
142552
|
+
next: key ?? sep6?.[0],
|
|
142553
142553
|
offset,
|
|
142554
142554
|
onError,
|
|
142555
142555
|
startOnNewline: true
|
|
@@ -142562,7 +142562,7 @@ var require_resolve_block_map2 = __commonJS({
|
|
|
142562
142562
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
142563
142563
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
142564
142564
|
}
|
|
142565
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
142565
|
+
if (!keyProps.anchor && !keyProps.tag && !sep6) {
|
|
142566
142566
|
commentEnd = keyProps.end;
|
|
142567
142567
|
if (keyProps.comment) {
|
|
142568
142568
|
if (map2.comment)
|
|
@@ -142584,7 +142584,7 @@ var require_resolve_block_map2 = __commonJS({
|
|
|
142584
142584
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);
|
|
142585
142585
|
if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode))
|
|
142586
142586
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
142587
|
-
const valueProps = resolveProps.resolveProps(
|
|
142587
|
+
const valueProps = resolveProps.resolveProps(sep6 ?? [], {
|
|
142588
142588
|
indicator: "map-value-ind",
|
|
142589
142589
|
next: value,
|
|
142590
142590
|
offset: keyNode.range[2],
|
|
@@ -142599,7 +142599,7 @@ var require_resolve_block_map2 = __commonJS({
|
|
|
142599
142599
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
142600
142600
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
142601
142601
|
}
|
|
142602
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
142602
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep6, null, valueProps, onError);
|
|
142603
142603
|
if (ctx.schema.compat)
|
|
142604
142604
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
142605
142605
|
offset = valueNode.range[2];
|
|
@@ -142686,7 +142686,7 @@ var require_resolve_end2 = __commonJS({
|
|
|
142686
142686
|
let comment = "";
|
|
142687
142687
|
if (end2) {
|
|
142688
142688
|
let hasSpace = false;
|
|
142689
|
-
let
|
|
142689
|
+
let sep6 = "";
|
|
142690
142690
|
for (const token of end2) {
|
|
142691
142691
|
const { source, type } = token;
|
|
142692
142692
|
switch (type) {
|
|
@@ -142700,13 +142700,13 @@ var require_resolve_end2 = __commonJS({
|
|
|
142700
142700
|
if (!comment)
|
|
142701
142701
|
comment = cb;
|
|
142702
142702
|
else
|
|
142703
|
-
comment +=
|
|
142704
|
-
|
|
142703
|
+
comment += sep6 + cb;
|
|
142704
|
+
sep6 = "";
|
|
142705
142705
|
break;
|
|
142706
142706
|
}
|
|
142707
142707
|
case "newline":
|
|
142708
142708
|
if (comment)
|
|
142709
|
-
|
|
142709
|
+
sep6 += source;
|
|
142710
142710
|
hasSpace = true;
|
|
142711
142711
|
break;
|
|
142712
142712
|
default:
|
|
@@ -142746,17 +142746,17 @@ var require_resolve_flow_collection2 = __commonJS({
|
|
|
142746
142746
|
let offset = fc.offset + fc.start.source.length;
|
|
142747
142747
|
for (let i6 = 0; i6 < fc.items.length; ++i6) {
|
|
142748
142748
|
const collItem = fc.items[i6];
|
|
142749
|
-
const { start, key, sep:
|
|
142749
|
+
const { start, key, sep: sep6, value } = collItem;
|
|
142750
142750
|
const props = resolveProps.resolveProps(start, {
|
|
142751
142751
|
flow: fcName,
|
|
142752
142752
|
indicator: "explicit-key-ind",
|
|
142753
|
-
next: key ??
|
|
142753
|
+
next: key ?? sep6?.[0],
|
|
142754
142754
|
offset,
|
|
142755
142755
|
onError,
|
|
142756
142756
|
startOnNewline: false
|
|
142757
142757
|
});
|
|
142758
142758
|
if (!props.found) {
|
|
142759
|
-
if (!props.anchor && !props.tag && !
|
|
142759
|
+
if (!props.anchor && !props.tag && !sep6 && !value) {
|
|
142760
142760
|
if (i6 === 0 && props.comma)
|
|
142761
142761
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
142762
142762
|
else if (i6 < fc.items.length - 1)
|
|
@@ -142810,8 +142810,8 @@ var require_resolve_flow_collection2 = __commonJS({
|
|
|
142810
142810
|
}
|
|
142811
142811
|
}
|
|
142812
142812
|
}
|
|
142813
|
-
if (!isMap && !
|
|
142814
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
142813
|
+
if (!isMap && !sep6 && !props.found) {
|
|
142814
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep6, null, props, onError);
|
|
142815
142815
|
coll.items.push(valueNode);
|
|
142816
142816
|
offset = valueNode.range[2];
|
|
142817
142817
|
if (isBlock(value))
|
|
@@ -142821,7 +142821,7 @@ var require_resolve_flow_collection2 = __commonJS({
|
|
|
142821
142821
|
const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);
|
|
142822
142822
|
if (isBlock(key))
|
|
142823
142823
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
142824
|
-
const valueProps = resolveProps.resolveProps(
|
|
142824
|
+
const valueProps = resolveProps.resolveProps(sep6 ?? [], {
|
|
142825
142825
|
flow: fcName,
|
|
142826
142826
|
indicator: "map-value-ind",
|
|
142827
142827
|
next: value,
|
|
@@ -142831,8 +142831,8 @@ var require_resolve_flow_collection2 = __commonJS({
|
|
|
142831
142831
|
});
|
|
142832
142832
|
if (valueProps.found) {
|
|
142833
142833
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
142834
|
-
if (
|
|
142835
|
-
for (const st of
|
|
142834
|
+
if (sep6)
|
|
142835
|
+
for (const st of sep6) {
|
|
142836
142836
|
if (st === valueProps.found)
|
|
142837
142837
|
break;
|
|
142838
142838
|
if (st.type === "newline") {
|
|
@@ -142849,7 +142849,7 @@ var require_resolve_flow_collection2 = __commonJS({
|
|
|
142849
142849
|
else
|
|
142850
142850
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
142851
142851
|
}
|
|
142852
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
142852
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep6, null, valueProps, onError) : null;
|
|
142853
142853
|
if (valueNode) {
|
|
142854
142854
|
if (isBlock(value))
|
|
142855
142855
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -143018,7 +143018,7 @@ var require_resolve_block_scalar2 = __commonJS({
|
|
|
143018
143018
|
chompStart = i6 + 1;
|
|
143019
143019
|
}
|
|
143020
143020
|
let value = "";
|
|
143021
|
-
let
|
|
143021
|
+
let sep6 = "";
|
|
143022
143022
|
let prevMoreIndented = false;
|
|
143023
143023
|
for (let i6 = 0; i6 < contentStart; ++i6)
|
|
143024
143024
|
value += lines[i6][0].slice(trimIndent) + "\n";
|
|
@@ -143035,24 +143035,24 @@ var require_resolve_block_scalar2 = __commonJS({
|
|
|
143035
143035
|
indent2 = "";
|
|
143036
143036
|
}
|
|
143037
143037
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
143038
|
-
value +=
|
|
143039
|
-
|
|
143038
|
+
value += sep6 + indent2.slice(trimIndent) + content;
|
|
143039
|
+
sep6 = "\n";
|
|
143040
143040
|
} else if (indent2.length > trimIndent || content[0] === " ") {
|
|
143041
|
-
if (
|
|
143042
|
-
|
|
143043
|
-
else if (!prevMoreIndented &&
|
|
143044
|
-
|
|
143045
|
-
value +=
|
|
143046
|
-
|
|
143041
|
+
if (sep6 === " ")
|
|
143042
|
+
sep6 = "\n";
|
|
143043
|
+
else if (!prevMoreIndented && sep6 === "\n")
|
|
143044
|
+
sep6 = "\n\n";
|
|
143045
|
+
value += sep6 + indent2.slice(trimIndent) + content;
|
|
143046
|
+
sep6 = "\n";
|
|
143047
143047
|
prevMoreIndented = true;
|
|
143048
143048
|
} else if (content === "") {
|
|
143049
|
-
if (
|
|
143049
|
+
if (sep6 === "\n")
|
|
143050
143050
|
value += "\n";
|
|
143051
143051
|
else
|
|
143052
|
-
|
|
143052
|
+
sep6 = "\n";
|
|
143053
143053
|
} else {
|
|
143054
|
-
value +=
|
|
143055
|
-
|
|
143054
|
+
value += sep6 + content;
|
|
143055
|
+
sep6 = " ";
|
|
143056
143056
|
prevMoreIndented = false;
|
|
143057
143057
|
}
|
|
143058
143058
|
}
|
|
@@ -143234,25 +143234,25 @@ var require_resolve_flow_scalar2 = __commonJS({
|
|
|
143234
143234
|
if (!match2)
|
|
143235
143235
|
return source;
|
|
143236
143236
|
let res = match2[1];
|
|
143237
|
-
let
|
|
143237
|
+
let sep6 = " ";
|
|
143238
143238
|
let pos = first2.lastIndex;
|
|
143239
143239
|
line.lastIndex = pos;
|
|
143240
143240
|
while (match2 = line.exec(source)) {
|
|
143241
143241
|
if (match2[1] === "") {
|
|
143242
|
-
if (
|
|
143243
|
-
res +=
|
|
143242
|
+
if (sep6 === "\n")
|
|
143243
|
+
res += sep6;
|
|
143244
143244
|
else
|
|
143245
|
-
|
|
143245
|
+
sep6 = "\n";
|
|
143246
143246
|
} else {
|
|
143247
|
-
res +=
|
|
143248
|
-
|
|
143247
|
+
res += sep6 + match2[1];
|
|
143248
|
+
sep6 = " ";
|
|
143249
143249
|
}
|
|
143250
143250
|
pos = line.lastIndex;
|
|
143251
143251
|
}
|
|
143252
143252
|
const last2 = /[ \t]*(.*)/sy;
|
|
143253
143253
|
last2.lastIndex = pos;
|
|
143254
143254
|
match2 = last2.exec(source);
|
|
143255
|
-
return res +
|
|
143255
|
+
return res + sep6 + (match2?.[1] ?? "");
|
|
143256
143256
|
}
|
|
143257
143257
|
function doubleQuotedValue(source, onError) {
|
|
143258
143258
|
let res = "";
|
|
@@ -144025,14 +144025,14 @@ var require_cst_stringify2 = __commonJS({
|
|
|
144025
144025
|
}
|
|
144026
144026
|
}
|
|
144027
144027
|
}
|
|
144028
|
-
function stringifyItem({ start, key, sep:
|
|
144028
|
+
function stringifyItem({ start, key, sep: sep6, value }) {
|
|
144029
144029
|
let res = "";
|
|
144030
144030
|
for (const st of start)
|
|
144031
144031
|
res += st.source;
|
|
144032
144032
|
if (key)
|
|
144033
144033
|
res += stringifyToken(key);
|
|
144034
|
-
if (
|
|
144035
|
-
for (const st of
|
|
144034
|
+
if (sep6)
|
|
144035
|
+
for (const st of sep6)
|
|
144036
144036
|
res += st.source;
|
|
144037
144037
|
if (value)
|
|
144038
144038
|
res += stringifyToken(value);
|
|
@@ -145169,18 +145169,18 @@ var require_parser4 = __commonJS({
|
|
|
145169
145169
|
if (this.type === "map-value-ind") {
|
|
145170
145170
|
const prev2 = getPrevProps(this.peek(2));
|
|
145171
145171
|
const start = getFirstKeyStartProps(prev2);
|
|
145172
|
-
let
|
|
145172
|
+
let sep6;
|
|
145173
145173
|
if (scalar.end) {
|
|
145174
|
-
|
|
145175
|
-
|
|
145174
|
+
sep6 = scalar.end;
|
|
145175
|
+
sep6.push(this.sourceToken);
|
|
145176
145176
|
delete scalar.end;
|
|
145177
145177
|
} else
|
|
145178
|
-
|
|
145178
|
+
sep6 = [this.sourceToken];
|
|
145179
145179
|
const map2 = {
|
|
145180
145180
|
type: "block-map",
|
|
145181
145181
|
offset: scalar.offset,
|
|
145182
145182
|
indent: scalar.indent,
|
|
145183
|
-
items: [{ start, key: scalar, sep:
|
|
145183
|
+
items: [{ start, key: scalar, sep: sep6 }]
|
|
145184
145184
|
};
|
|
145185
145185
|
this.onKeyLine = true;
|
|
145186
145186
|
this.stack[this.stack.length - 1] = map2;
|
|
@@ -145331,14 +145331,14 @@ var require_parser4 = __commonJS({
|
|
|
145331
145331
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
145332
145332
|
const start2 = getFirstKeyStartProps(it.start);
|
|
145333
145333
|
const key = it.key;
|
|
145334
|
-
const
|
|
145335
|
-
|
|
145334
|
+
const sep6 = it.sep;
|
|
145335
|
+
sep6.push(this.sourceToken);
|
|
145336
145336
|
delete it.key, delete it.sep;
|
|
145337
145337
|
this.stack.push({
|
|
145338
145338
|
type: "block-map",
|
|
145339
145339
|
offset: this.offset,
|
|
145340
145340
|
indent: this.indent,
|
|
145341
|
-
items: [{ start: start2, key, sep:
|
|
145341
|
+
items: [{ start: start2, key, sep: sep6 }]
|
|
145342
145342
|
});
|
|
145343
145343
|
} else if (start.length > 0) {
|
|
145344
145344
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -145522,13 +145522,13 @@ var require_parser4 = __commonJS({
|
|
|
145522
145522
|
const prev2 = getPrevProps(parent2);
|
|
145523
145523
|
const start = getFirstKeyStartProps(prev2);
|
|
145524
145524
|
fixFlowSeqItems(fc);
|
|
145525
|
-
const
|
|
145526
|
-
|
|
145525
|
+
const sep6 = fc.end.splice(1, fc.end.length);
|
|
145526
|
+
sep6.push(this.sourceToken);
|
|
145527
145527
|
const map2 = {
|
|
145528
145528
|
type: "block-map",
|
|
145529
145529
|
offset: fc.offset,
|
|
145530
145530
|
indent: fc.indent,
|
|
145531
|
-
items: [{ start, key: fc, sep:
|
|
145531
|
+
items: [{ start, key: fc, sep: sep6 }]
|
|
145532
145532
|
};
|
|
145533
145533
|
this.onKeyLine = true;
|
|
145534
145534
|
this.stack[this.stack.length - 1] = map2;
|
|
@@ -192546,10 +192546,10 @@ async function findModuleIds(filePath) {
|
|
|
192546
192546
|
return sbtFileCache[filePath];
|
|
192547
192547
|
}
|
|
192548
192548
|
function getModuleIdString(groupId, artifactId, classifier, version3, configurations, scalaBinaryVersion) {
|
|
192549
|
-
const [
|
|
192549
|
+
const [sep6, artifactIdSanitized] = artifactId.endsWith(`_${scalaBinaryVersion}`) ? ["%%", artifactId.slice(0, -scalaBinaryVersion.length - 1)] : ["%", artifactId];
|
|
192550
192550
|
const classifierStr = classifier ? ` classifier "${classifier}"` : "";
|
|
192551
192551
|
const configurationsStr = configurations ? ` % "${configurations.join(";")}"` : "";
|
|
192552
|
-
return `"${groupId}" ${
|
|
192552
|
+
return `"${groupId}" ${sep6} "${artifactIdSanitized}" % "${version3}"${configurationsStr}${classifierStr}`;
|
|
192553
192553
|
}
|
|
192554
192554
|
|
|
192555
192555
|
// ../fixing-management/src/fixing-management/maven/sbt-fixing-manager.ts
|
|
@@ -200864,7 +200864,7 @@ var PathScurryBase = class {
|
|
|
200864
200864
|
*
|
|
200865
200865
|
* @internal
|
|
200866
200866
|
*/
|
|
200867
|
-
constructor(cwd = process.cwd(), pathImpl,
|
|
200867
|
+
constructor(cwd = process.cwd(), pathImpl, sep6, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}) {
|
|
200868
200868
|
this.#fs = fsFromOption(fs);
|
|
200869
200869
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
200870
200870
|
cwd = fileURLToPath(cwd);
|
|
@@ -200875,7 +200875,7 @@ var PathScurryBase = class {
|
|
|
200875
200875
|
this.#resolveCache = new ResolveCache();
|
|
200876
200876
|
this.#resolvePosixCache = new ResolveCache();
|
|
200877
200877
|
this.#children = new ChildrenCache(childrenCacheSize);
|
|
200878
|
-
const split = cwdPath.substring(this.rootPath.length).split(
|
|
200878
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep6);
|
|
200879
200879
|
if (split.length === 1 && !split[0]) {
|
|
200880
200880
|
split.pop();
|
|
200881
200881
|
}
|
|
@@ -201696,10 +201696,10 @@ var Ignore = class {
|
|
|
201696
201696
|
ignored(p3) {
|
|
201697
201697
|
const fullpath = p3.fullpath();
|
|
201698
201698
|
const fullpaths = `${fullpath}/`;
|
|
201699
|
-
const
|
|
201700
|
-
const relatives = `${
|
|
201699
|
+
const relative15 = p3.relative() || ".";
|
|
201700
|
+
const relatives = `${relative15}/`;
|
|
201701
201701
|
for (const m2 of this.relative) {
|
|
201702
|
-
if (m2.match(
|
|
201702
|
+
if (m2.match(relative15) || m2.match(relatives))
|
|
201703
201703
|
return true;
|
|
201704
201704
|
}
|
|
201705
201705
|
for (const m2 of this.absolute) {
|
|
@@ -201710,9 +201710,9 @@ var Ignore = class {
|
|
|
201710
201710
|
}
|
|
201711
201711
|
childrenIgnored(p3) {
|
|
201712
201712
|
const fullpath = p3.fullpath() + "/";
|
|
201713
|
-
const
|
|
201713
|
+
const relative15 = (p3.relative() || ".") + "/";
|
|
201714
201714
|
for (const m2 of this.relativeChildren) {
|
|
201715
|
-
if (m2.match(
|
|
201715
|
+
if (m2.match(relative15))
|
|
201716
201716
|
return true;
|
|
201717
201717
|
}
|
|
201718
201718
|
for (const m2 of this.absoluteChildren) {
|
|
@@ -207914,7 +207914,7 @@ var kleur_default = $;
|
|
|
207914
207914
|
// dist/cli-core.js
|
|
207915
207915
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
207916
207916
|
import os from "os";
|
|
207917
|
-
import { join as join21, relative as
|
|
207917
|
+
import { join as join21, relative as relative13, resolve as resolve26 } from "path";
|
|
207918
207918
|
|
|
207919
207919
|
// ../utils/src/promise-queue.ts
|
|
207920
207920
|
var PromiseQueue = class {
|
|
@@ -209810,10 +209810,10 @@ function compareDocumentPosition(nodeA, nodeB) {
|
|
|
209810
209810
|
function uniqueSort(nodes) {
|
|
209811
209811
|
nodes = nodes.filter((node, i6, arr) => !arr.includes(node, i6 + 1));
|
|
209812
209812
|
nodes.sort((a4, b) => {
|
|
209813
|
-
const
|
|
209814
|
-
if (
|
|
209813
|
+
const relative15 = compareDocumentPosition(a4, b);
|
|
209814
|
+
if (relative15 & DocumentPosition.PRECEDING) {
|
|
209815
209815
|
return -1;
|
|
209816
|
-
} else if (
|
|
209816
|
+
} else if (relative15 & DocumentPosition.FOLLOWING) {
|
|
209817
209817
|
return 1;
|
|
209818
209818
|
}
|
|
209819
209819
|
return 0;
|
|
@@ -223043,7 +223043,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
223043
223043
|
}
|
|
223044
223044
|
|
|
223045
223045
|
// dist/version.js
|
|
223046
|
-
var version2 = "14.11.
|
|
223046
|
+
var version2 = "14.11.1";
|
|
223047
223047
|
|
|
223048
223048
|
// dist/internal/socket-mode-helpers-coana-dependency-trees.js
|
|
223049
223049
|
var ROOT_IDENTIFIER = "ROOT";
|
|
@@ -223285,12 +223285,33 @@ function toSocketReachabilitySchema(vulnerability) {
|
|
|
223285
223285
|
}
|
|
223286
223286
|
|
|
223287
223287
|
// dist/internal/socket-mode-helpers-socket-dependency-trees.js
|
|
223288
|
-
import { basename as basename6, dirname as dirname8 } from "path";
|
|
223289
|
-
|
|
223288
|
+
import { basename as basename6, dirname as dirname8, relative as relative12, sep as sep5 } from "path";
|
|
223289
|
+
var REQUIREMENTS_FILES_SEARCH_DEPTH2 = 3;
|
|
223290
|
+
function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonProjects) {
|
|
223290
223291
|
switch (ecosystem) {
|
|
223291
223292
|
case "MAVEN": {
|
|
223292
223293
|
return ".";
|
|
223293
223294
|
}
|
|
223295
|
+
case "PIP": {
|
|
223296
|
+
const base = basename6(manifestPath);
|
|
223297
|
+
const dir = dirname8(manifestPath);
|
|
223298
|
+
const workspaceDir = dir === "" ? "." : dir;
|
|
223299
|
+
if (properPythonProjects.includes(workspaceDir)) {
|
|
223300
|
+
return workspaceDir;
|
|
223301
|
+
}
|
|
223302
|
+
if (base === "poetry.lock" || base === "Pipfile.lock" || base === "uv.lock") {
|
|
223303
|
+
return workspaceDir;
|
|
223304
|
+
}
|
|
223305
|
+
if (/^requirements.*\.txt$/.test(base)) {
|
|
223306
|
+
const isWithinProperProject = properPythonProjects.some((properProjectDir) => workspaceDir.startsWith(properProjectDir) && workspaceDir.replace(properProjectDir, "").split(sep5).length <= REQUIREMENTS_FILES_SEARCH_DEPTH2);
|
|
223307
|
+
if (isWithinProperProject) {
|
|
223308
|
+
return void 0;
|
|
223309
|
+
}
|
|
223310
|
+
return workspaceDir;
|
|
223311
|
+
}
|
|
223312
|
+
logger.warn(`No workspace found for manifest file ${manifestPath}`);
|
|
223313
|
+
return void 0;
|
|
223314
|
+
}
|
|
223294
223315
|
default: {
|
|
223295
223316
|
const base = basename6(manifestPath);
|
|
223296
223317
|
const dir = dirname8(manifestPath);
|
|
@@ -223302,6 +223323,43 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash)
|
|
|
223302
223323
|
logger.info("Fetching artifacts from Socket backend using manifests tar hash", manifestsTarHash);
|
|
223303
223324
|
try {
|
|
223304
223325
|
const artifacts = await fetchArtifactsFromManifestsTarHash(manifestsTarHash);
|
|
223326
|
+
const properPythonProjects = [];
|
|
223327
|
+
const venvExcludes = [
|
|
223328
|
+
"venv",
|
|
223329
|
+
".venv",
|
|
223330
|
+
"env",
|
|
223331
|
+
".env",
|
|
223332
|
+
"virtualenv",
|
|
223333
|
+
".virtualenv",
|
|
223334
|
+
"venvs",
|
|
223335
|
+
".venvs",
|
|
223336
|
+
"envs",
|
|
223337
|
+
".envs",
|
|
223338
|
+
"__pycache__",
|
|
223339
|
+
".tox",
|
|
223340
|
+
".nox",
|
|
223341
|
+
".pytest_cache",
|
|
223342
|
+
"site-packages",
|
|
223343
|
+
"dist-packages",
|
|
223344
|
+
"conda-meta",
|
|
223345
|
+
"conda-bld",
|
|
223346
|
+
".mypy_cache",
|
|
223347
|
+
".ruff_cache",
|
|
223348
|
+
".hypothesis"
|
|
223349
|
+
];
|
|
223350
|
+
const allFiles = await getFiles(rootWorkingDirectory, venvExcludes);
|
|
223351
|
+
for (const file of allFiles) {
|
|
223352
|
+
const base = basename6(file);
|
|
223353
|
+
const dir = dirname8(file);
|
|
223354
|
+
const workspaceDirAbs = dir === "" || dir === "." ? "." : dir;
|
|
223355
|
+
const workspaceDir = relative12(rootWorkingDirectory, workspaceDirAbs) || ".";
|
|
223356
|
+
if (base === "pyproject.toml" || base === "setup.py" && await isSetupPySetuptools(file)) {
|
|
223357
|
+
const normalizedDir = workspaceDir === "." ? "." : workspaceDir + sep5;
|
|
223358
|
+
if (!properPythonProjects.includes(normalizedDir)) {
|
|
223359
|
+
properPythonProjects.push(normalizedDir);
|
|
223360
|
+
}
|
|
223361
|
+
}
|
|
223362
|
+
}
|
|
223305
223363
|
const ecosystemToWorkspaceToAnalysisData = {};
|
|
223306
223364
|
const ecosystemToWorkspaceToVulnerabilities = {};
|
|
223307
223365
|
for (const artifact of artifacts) {
|
|
@@ -223314,7 +223372,7 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash)
|
|
|
223314
223372
|
manifestFiles.push(...ancestor?.manifestFiles?.map((ref) => ref.file) ?? []);
|
|
223315
223373
|
});
|
|
223316
223374
|
for (const manifestFile of manifestFiles) {
|
|
223317
|
-
const workspace = inferWorkspaceFromManifestPath(ecosystem, manifestFile);
|
|
223375
|
+
const workspace = inferWorkspaceFromManifestPath(ecosystem, manifestFile, properPythonProjects);
|
|
223318
223376
|
if (!workspace)
|
|
223319
223377
|
continue;
|
|
223320
223378
|
if (!ecosystemToWorkspaceToAnalysisData[ecosystem]) {
|
|
@@ -223330,8 +223388,8 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash)
|
|
|
223330
223388
|
}
|
|
223331
223389
|
};
|
|
223332
223390
|
if (ecosystem === "MAVEN") {
|
|
223333
|
-
const
|
|
223334
|
-
const pomFiles =
|
|
223391
|
+
const allFiles2 = await getFiles(rootWorkingDirectory);
|
|
223392
|
+
const pomFiles = allFiles2.filter((file) => basename6(file) === "pom.xml");
|
|
223335
223393
|
ecosystemToWorkspaceToAnalysisData[ecosystem][workspace].data.manifestFiles.push(...pomFiles);
|
|
223336
223394
|
}
|
|
223337
223395
|
}
|
|
@@ -223676,7 +223734,7 @@ var CliCore = class {
|
|
|
223676
223734
|
const { reachabilitySupport, traditionalScaSupport, noSupport } = manager.getSubprojectsWithWorkspacePaths();
|
|
223677
223735
|
submitSubprojects([...reachabilitySupport, ...traditionalScaSupport, ...noSupport].map((sp) => ({
|
|
223678
223736
|
...sp,
|
|
223679
|
-
subprojectPath:
|
|
223737
|
+
subprojectPath: relative13(this.rootWorkingDirectory, sp.subprojectPath) || "."
|
|
223680
223738
|
})), this.reportId, this.apiKey);
|
|
223681
223739
|
for (const unsupported of noSupport)
|
|
223682
223740
|
logger.warn(unsupported.unsupportedMsg);
|
|
@@ -223705,7 +223763,7 @@ var CliCore = class {
|
|
|
223705
223763
|
await this.spinner.succeed();
|
|
223706
223764
|
} catch (error) {
|
|
223707
223765
|
if (this.options.ignoreFailingWorkspaces) {
|
|
223708
|
-
const relativeSubprojectPath =
|
|
223766
|
+
const relativeSubprojectPath = relative13(this.rootWorkingDirectory, subprojectAndWsPath.subprojectPath) || ".";
|
|
223709
223767
|
this.failedSubprojects.push({
|
|
223710
223768
|
subproject: relativeSubprojectPath,
|
|
223711
223769
|
error: error.message || "Unknown error"
|
|
@@ -223764,7 +223822,7 @@ Subproject: ${subproject}`);
|
|
|
223764
223822
|
}
|
|
223765
223823
|
async updateSpinnerTextOnNewSubproject(subprojectAndWsPath, numberSubprojects, index2) {
|
|
223766
223824
|
this.spinner.start();
|
|
223767
|
-
const relativeSubprojectPath =
|
|
223825
|
+
const relativeSubprojectPath = relative13(this.rootWorkingDirectory, subprojectAndWsPath.subprojectPath) || ".";
|
|
223768
223826
|
await this.spinner.setText(numberSubprojects > 1 ? `Processing subproject ${relativeSubprojectPath} (${index2 + 1}/${numberSubprojects})${+this.options.concurrency > 1 ? `. May process up to ${+this.options.concurrency - 1} other workspaces in parallel` : ""}` : `Processing ${relativeSubprojectPath}`);
|
|
223769
223827
|
}
|
|
223770
223828
|
async initialize() {
|
|
@@ -223842,7 +223900,7 @@ Subproject: ${subproject}`);
|
|
|
223842
223900
|
return workspaceToAugmentedVulnerabilities[workspacePath] !== void 0;
|
|
223843
223901
|
}).map((workspacePath) => {
|
|
223844
223902
|
return {
|
|
223845
|
-
subprojectPath:
|
|
223903
|
+
subprojectPath: relative13(this.rootWorkingDirectory, subprojectPath) || ".",
|
|
223846
223904
|
workspacePath,
|
|
223847
223905
|
directDependencies: projectInfo[workspacePath].dataForAnalysis.directDependenciesMap ?? {},
|
|
223848
223906
|
vulnerabilities: workspaceToAugmentedVulnerabilities[workspacePath],
|
|
@@ -223869,7 +223927,7 @@ Subproject: ${subproject}`);
|
|
|
223869
223927
|
} catch (e) {
|
|
223870
223928
|
logger.error(`Reachability analysis failed for workspace ${workspacePath} in subproject ${subprojectPath}: ${e.message}`);
|
|
223871
223929
|
if (this.options.ignoreFailingWorkspaces) {
|
|
223872
|
-
const relativeSubprojectPath =
|
|
223930
|
+
const relativeSubprojectPath = relative13(this.rootWorkingDirectory, subprojectPath) || ".";
|
|
223873
223931
|
this.failedWorkspaces.push({
|
|
223874
223932
|
subproject: relativeSubprojectPath,
|
|
223875
223933
|
workspace: workspacePath,
|
|
@@ -223957,7 +224015,7 @@ Subproject: ${subproject}`);
|
|
|
223957
224015
|
async sendProgress(type, isStartEvent, subprojectPath, workspacePath) {
|
|
223958
224016
|
await sendCLIProgressToDashboard({
|
|
223959
224017
|
type,
|
|
223960
|
-
...subprojectPath ? { subprojectPath:
|
|
224018
|
+
...subprojectPath ? { subprojectPath: relative13(this.rootWorkingDirectory, subprojectPath) || "." } : {},
|
|
223961
224019
|
...workspacePath ? { workspacePath } : {}
|
|
223962
224020
|
}, isStartEvent, this.reportId, this.apiKey);
|
|
223963
224021
|
}
|
|
@@ -224013,7 +224071,7 @@ Subproject: ${subproject}`);
|
|
|
224013
224071
|
dependencyTree: workspaceToPlainDependencyTree[workspacePath],
|
|
224014
224072
|
ecosystem: workspaceToPlainDependencyTree[workspacePath].ecosystem ?? "NPM",
|
|
224015
224073
|
workspacePath,
|
|
224016
|
-
subprojectPath:
|
|
224074
|
+
subprojectPath: relative13(rootWorkingDirectory, subprojectPath) || "."
|
|
224017
224075
|
}));
|
|
224018
224076
|
if (this.options.socketMode) {
|
|
224019
224077
|
this.reportDependencyTrees = workspacePaths.map((workspacePath) => ({
|
|
@@ -224021,7 +224079,7 @@ Subproject: ${subproject}`);
|
|
|
224021
224079
|
dependencyTree: projectInfo[workspacePath].dataForAnalysis.data.dependencyTree,
|
|
224022
224080
|
ecosystem: projectInfo[workspacePath].dataForAnalysis.data.dependencyTree.ecosystem ?? "NPM",
|
|
224023
224081
|
workspacePath,
|
|
224024
|
-
subprojectPath:
|
|
224082
|
+
subprojectPath: relative13(rootWorkingDirectory, subprojectPath) || "."
|
|
224025
224083
|
}));
|
|
224026
224084
|
}
|
|
224027
224085
|
if (this.shareWithDashboard)
|
|
@@ -224037,7 +224095,7 @@ Subproject: ${subproject}`);
|
|
|
224037
224095
|
} catch (e) {
|
|
224038
224096
|
logger.error(`Scanning for vulnerabilities failed for subproject ${subprojectPath} in workspace ${workspacePath}`);
|
|
224039
224097
|
if (this.options.ignoreFailingWorkspaces) {
|
|
224040
|
-
const relativeSubprojectPath =
|
|
224098
|
+
const relativeSubprojectPath = relative13(this.rootWorkingDirectory, subprojectPath) || ".";
|
|
224041
224099
|
this.failedWorkspaces.push({
|
|
224042
224100
|
subproject: relativeSubprojectPath,
|
|
224043
224101
|
workspace: workspacePath,
|
|
@@ -224056,7 +224114,7 @@ Subproject: ${subproject}`);
|
|
|
224056
224114
|
}
|
|
224057
224115
|
};
|
|
224058
224116
|
function getRelativeSubprojectPath(subprojectPath, projectDir) {
|
|
224059
|
-
return
|
|
224117
|
+
return relative13(projectDir, subprojectPath) || ".";
|
|
224060
224118
|
}
|
|
224061
224119
|
function getDependencyType(vulnChainDetails, codeAwareScanResults, directDependencies, reachability) {
|
|
224062
224120
|
if (reachability === "UNREACHABLE" || reachability === "UNKNOWN") {
|
|
@@ -224101,7 +224159,7 @@ async function getGitDataToMetadataIfAvailable(rootWorkingDirectory) {
|
|
|
224101
224159
|
}
|
|
224102
224160
|
|
|
224103
224161
|
// dist/cli-upgrade-purl.js
|
|
224104
|
-
import { join as join22, relative as
|
|
224162
|
+
import { join as join22, relative as relative14 } from "node:path";
|
|
224105
224163
|
var import_packageurl_js = __toESM(require_packageurl_js(), 1);
|
|
224106
224164
|
async function upgradePurl(path2, upgrades, options) {
|
|
224107
224165
|
logger.initWinstonLogger(options.debug);
|
|
@@ -224193,7 +224251,7 @@ ${workspacePathsMatchingGlob.map((wsPath) => ` ${wsPath}`).join("\n")}`);
|
|
|
224193
224251
|
logger.info(`No dependencies matching upgrade specs found for subproject ${subproject.subprojectPath}`);
|
|
224194
224252
|
return;
|
|
224195
224253
|
}
|
|
224196
|
-
await applySecurityFixes(subproject.packageManagerName, path2,
|
|
224254
|
+
await applySecurityFixes(subproject.packageManagerName, path2, relative14(path2, subproject.subprojectPath) || ".", otherModulesCommunicator, workspaceToFixes, fixingData, signalFixApplied);
|
|
224197
224255
|
});
|
|
224198
224256
|
});
|
|
224199
224257
|
await subprojectPromiseQueue.onIdle();
|