@coana-tech/cli 14.12.70 → 14.12.72
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 +563 -209
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +22 -23
- package/repos/coana-tech/alucard/alucard.jar +0 -0
- package/repos/coana-tech/class-graph-analysis/dist/bundle/class-graph-analysis-cli.mjs +8 -11
- 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/cli.mjs
CHANGED
|
@@ -20465,22 +20465,22 @@ var require_conversions = __commonJS({
|
|
|
20465
20465
|
var hi = Math.floor(h) % 6;
|
|
20466
20466
|
var f6 = h - Math.floor(h);
|
|
20467
20467
|
var p3 = 255 * v * (1 - s6);
|
|
20468
|
-
var
|
|
20468
|
+
var q5 = 255 * v * (1 - s6 * f6);
|
|
20469
20469
|
var t4 = 255 * v * (1 - s6 * (1 - f6));
|
|
20470
20470
|
v *= 255;
|
|
20471
20471
|
switch (hi) {
|
|
20472
20472
|
case 0:
|
|
20473
20473
|
return [v, t4, p3];
|
|
20474
20474
|
case 1:
|
|
20475
|
-
return [
|
|
20475
|
+
return [q5, v, p3];
|
|
20476
20476
|
case 2:
|
|
20477
20477
|
return [p3, v, t4];
|
|
20478
20478
|
case 3:
|
|
20479
|
-
return [p3,
|
|
20479
|
+
return [p3, q5, v];
|
|
20480
20480
|
case 4:
|
|
20481
20481
|
return [t4, p3, v];
|
|
20482
20482
|
case 5:
|
|
20483
|
-
return [v, p3,
|
|
20483
|
+
return [v, p3, q5];
|
|
20484
20484
|
}
|
|
20485
20485
|
};
|
|
20486
20486
|
convert.hsv.hsl = function(hsv) {
|
|
@@ -33631,22 +33631,22 @@ var require_conversions2 = __commonJS({
|
|
|
33631
33631
|
const hi = Math.floor(h) % 6;
|
|
33632
33632
|
const f6 = h - Math.floor(h);
|
|
33633
33633
|
const p3 = 255 * v * (1 - s6);
|
|
33634
|
-
const
|
|
33634
|
+
const q5 = 255 * v * (1 - s6 * f6);
|
|
33635
33635
|
const t4 = 255 * v * (1 - s6 * (1 - f6));
|
|
33636
33636
|
v *= 255;
|
|
33637
33637
|
switch (hi) {
|
|
33638
33638
|
case 0:
|
|
33639
33639
|
return [v, t4, p3];
|
|
33640
33640
|
case 1:
|
|
33641
|
-
return [
|
|
33641
|
+
return [q5, v, p3];
|
|
33642
33642
|
case 2:
|
|
33643
33643
|
return [p3, v, t4];
|
|
33644
33644
|
case 3:
|
|
33645
|
-
return [p3,
|
|
33645
|
+
return [p3, q5, v];
|
|
33646
33646
|
case 4:
|
|
33647
33647
|
return [t4, p3, v];
|
|
33648
33648
|
case 5:
|
|
33649
|
-
return [v, p3,
|
|
33649
|
+
return [v, p3, q5];
|
|
33650
33650
|
}
|
|
33651
33651
|
};
|
|
33652
33652
|
convert.hsv.hsl = function(hsv) {
|
|
@@ -41848,9 +41848,9 @@ var require_lib8 = __commonJS({
|
|
|
41848
41848
|
return equiv$1(query, domain);
|
|
41849
41849
|
}
|
|
41850
41850
|
next: for (let i7 = 0, j = 0; i7 < nq; i7++) {
|
|
41851
|
-
const
|
|
41851
|
+
const q5 = query[i7];
|
|
41852
41852
|
while (j < nd) {
|
|
41853
|
-
if (equiv$1(domain[j++],
|
|
41853
|
+
if (equiv$1(domain[j++], q5)) {
|
|
41854
41854
|
continue next;
|
|
41855
41855
|
}
|
|
41856
41856
|
}
|
|
@@ -44398,8 +44398,8 @@ var require_lang = __commonJS({
|
|
|
44398
44398
|
const root3 = (0, parser_1.createTree)(this.lexer, this.config.parser);
|
|
44399
44399
|
return (0, parser_1.createCursor)(root3);
|
|
44400
44400
|
}
|
|
44401
|
-
query(input,
|
|
44402
|
-
const matcher = (0, query_1.buildRoot)(
|
|
44401
|
+
query(input, q5, context2) {
|
|
44402
|
+
const matcher = (0, query_1.buildRoot)(q5);
|
|
44403
44403
|
const cursor = typeof input === "string" ? this.parse(input) : input;
|
|
44404
44404
|
const checkpoint = matcher.match({ cursor, context: context2 });
|
|
44405
44405
|
const result = checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.context;
|
|
@@ -102356,17 +102356,17 @@ var require_expand = __commonJS({
|
|
|
102356
102356
|
let walk = (node, parent2 = {}) => {
|
|
102357
102357
|
node.queue = [];
|
|
102358
102358
|
let p3 = parent2;
|
|
102359
|
-
let
|
|
102359
|
+
let q5 = parent2.queue;
|
|
102360
102360
|
while (p3.type !== "brace" && p3.type !== "root" && p3.parent) {
|
|
102361
102361
|
p3 = p3.parent;
|
|
102362
|
-
|
|
102362
|
+
q5 = p3.queue;
|
|
102363
102363
|
}
|
|
102364
102364
|
if (node.invalid || node.dollar) {
|
|
102365
|
-
|
|
102365
|
+
q5.push(append4(q5.pop(), stringify3(node, options)));
|
|
102366
102366
|
return;
|
|
102367
102367
|
}
|
|
102368
102368
|
if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
|
|
102369
|
-
|
|
102369
|
+
q5.push(append4(q5.pop(), ["{}"]));
|
|
102370
102370
|
return;
|
|
102371
102371
|
}
|
|
102372
102372
|
if (node.nodes && node.ranges > 0) {
|
|
@@ -102378,7 +102378,7 @@ var require_expand = __commonJS({
|
|
|
102378
102378
|
if (range2.length === 0) {
|
|
102379
102379
|
range2 = stringify3(node, options);
|
|
102380
102380
|
}
|
|
102381
|
-
|
|
102381
|
+
q5.push(append4(q5.pop(), range2));
|
|
102382
102382
|
node.nodes = [];
|
|
102383
102383
|
return;
|
|
102384
102384
|
}
|
|
@@ -102397,7 +102397,7 @@ var require_expand = __commonJS({
|
|
|
102397
102397
|
continue;
|
|
102398
102398
|
}
|
|
102399
102399
|
if (child.type === "close") {
|
|
102400
|
-
|
|
102400
|
+
q5.push(append4(q5.pop(), queue, enclose));
|
|
102401
102401
|
continue;
|
|
102402
102402
|
}
|
|
102403
102403
|
if (child.value && child.type !== "open") {
|
|
@@ -104486,6 +104486,258 @@ var require_micromatch = __commonJS({
|
|
|
104486
104486
|
}
|
|
104487
104487
|
});
|
|
104488
104488
|
|
|
104489
|
+
// ../fixing-management/src/fixing-management/rubygems/ruby-lang.ts
|
|
104490
|
+
var operators3, octdigit, digit, nonzerodigit, hexdigit, bindigit, octinteger, hexinteger, bininteger, decinteger, integer, digitpart, fraction, exponent, pointfloat, exponentfloat, floatnumber, numbers, templates, lexer, parser, lang3;
|
|
104491
|
+
var init_ruby_lang = __esm({
|
|
104492
|
+
"../fixing-management/src/fixing-management/rubygems/ruby-lang.ts"() {
|
|
104493
|
+
"use strict";
|
|
104494
|
+
operators3 = /* prettier-ignore */
|
|
104495
|
+
[
|
|
104496
|
+
"+",
|
|
104497
|
+
"-",
|
|
104498
|
+
"*",
|
|
104499
|
+
"/",
|
|
104500
|
+
"%",
|
|
104501
|
+
"**",
|
|
104502
|
+
"+=",
|
|
104503
|
+
"-=",
|
|
104504
|
+
"*=",
|
|
104505
|
+
"/=",
|
|
104506
|
+
"%=",
|
|
104507
|
+
"**=",
|
|
104508
|
+
"==",
|
|
104509
|
+
"!=",
|
|
104510
|
+
"<",
|
|
104511
|
+
"<=",
|
|
104512
|
+
">",
|
|
104513
|
+
">=",
|
|
104514
|
+
"<=>",
|
|
104515
|
+
"===",
|
|
104516
|
+
"=~",
|
|
104517
|
+
"!~",
|
|
104518
|
+
"&&",
|
|
104519
|
+
"||",
|
|
104520
|
+
"!",
|
|
104521
|
+
"and",
|
|
104522
|
+
"or",
|
|
104523
|
+
"not",
|
|
104524
|
+
"&",
|
|
104525
|
+
"|",
|
|
104526
|
+
"^",
|
|
104527
|
+
"~",
|
|
104528
|
+
"<<",
|
|
104529
|
+
">>",
|
|
104530
|
+
"?",
|
|
104531
|
+
"?.",
|
|
104532
|
+
"=",
|
|
104533
|
+
":",
|
|
104534
|
+
"::",
|
|
104535
|
+
"=>",
|
|
104536
|
+
"->",
|
|
104537
|
+
",",
|
|
104538
|
+
";",
|
|
104539
|
+
".",
|
|
104540
|
+
"..",
|
|
104541
|
+
"..."
|
|
104542
|
+
];
|
|
104543
|
+
octdigit = "[0-7]";
|
|
104544
|
+
digit = "[0-9]";
|
|
104545
|
+
nonzerodigit = "[1-9]";
|
|
104546
|
+
hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
104547
|
+
bindigit = "[01]";
|
|
104548
|
+
octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
104549
|
+
hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
104550
|
+
bininteger = `(?:0[bB](?:_?${bindigit})+)`;
|
|
104551
|
+
decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0)`;
|
|
104552
|
+
integer = `(?:${decinteger}|${octinteger}|${hexinteger}|${bininteger})`;
|
|
104553
|
+
digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
104554
|
+
fraction = `(?:\\.${digitpart})`;
|
|
104555
|
+
exponent = `(?:[eE][-+]?${digitpart})`;
|
|
104556
|
+
pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
104557
|
+
exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
104558
|
+
floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
104559
|
+
numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
104560
|
+
templates = [
|
|
104561
|
+
{
|
|
104562
|
+
type: "var",
|
|
104563
|
+
startsWith: "#",
|
|
104564
|
+
// Match instance vars (#@var), class vars (#@@var), and global vars (#$var)
|
|
104565
|
+
symbols: /(?:@@?|\\$)[a-zA-Z_][a-zA-Z0-9_]*/
|
|
104566
|
+
},
|
|
104567
|
+
{ type: "expr", startsWith: "#{", endsWith: "}" }
|
|
104568
|
+
];
|
|
104569
|
+
lexer = {
|
|
104570
|
+
joinLines: "\\",
|
|
104571
|
+
comments: [
|
|
104572
|
+
{ type: "line-comment", startsWith: "#" },
|
|
104573
|
+
{ type: "multiline-comment", startsWith: "=begin", endsWith: "=end" }
|
|
104574
|
+
],
|
|
104575
|
+
// Ruby identifiers: letters, digits, underscores. Can start with letter or underscore
|
|
104576
|
+
// Can end with ? or ! for predicate/mutator methods
|
|
104577
|
+
symbols: /[_a-zA-Z][_a-zA-Z0-9]*[?!]?/,
|
|
104578
|
+
numbers,
|
|
104579
|
+
operators: operators3,
|
|
104580
|
+
brackets: [
|
|
104581
|
+
{ startsWith: "{", endsWith: "}" },
|
|
104582
|
+
{ startsWith: "[", endsWith: "]" },
|
|
104583
|
+
{ startsWith: "(", endsWith: ")" }
|
|
104584
|
+
],
|
|
104585
|
+
strings: [
|
|
104586
|
+
// Double-quoted strings support interpolation
|
|
104587
|
+
{ startsWith: '"', templates, endsWith: '"' },
|
|
104588
|
+
// Single-quoted strings do not support interpolation
|
|
104589
|
+
{ startsWith: "'", endsWith: "'" }
|
|
104590
|
+
]
|
|
104591
|
+
};
|
|
104592
|
+
parser = {
|
|
104593
|
+
useIndentBlocks: false
|
|
104594
|
+
};
|
|
104595
|
+
lang3 = { lexer, parser };
|
|
104596
|
+
}
|
|
104597
|
+
});
|
|
104598
|
+
|
|
104599
|
+
// ../fixing-management/src/fixing-management/rubygems/gemspec-utils.ts
|
|
104600
|
+
var gemspec_utils_exports = {};
|
|
104601
|
+
__export(gemspec_utils_exports, {
|
|
104602
|
+
parseGemspec: () => parseGemspec
|
|
104603
|
+
});
|
|
104604
|
+
function parseGemspec(rootDir, file, sourceText) {
|
|
104605
|
+
const gemspec = { rootDir, file, sourceText };
|
|
104606
|
+
const ctx = { gemspec, dependencies: [], devDependencies: [], mem: /* @__PURE__ */ new Map(), depth: 0 };
|
|
104607
|
+
const parser2 = import_good_enough_parser3.lang.createLang(lang3);
|
|
104608
|
+
const cursor = parser2.parse(sourceText);
|
|
104609
|
+
const result = parser2.query(cursor, treeQuery3, ctx);
|
|
104610
|
+
const dependencies = result ? result.dependencies : [];
|
|
104611
|
+
const devDependencies = result ? result.devDependencies : [];
|
|
104612
|
+
return {
|
|
104613
|
+
rootDir,
|
|
104614
|
+
file,
|
|
104615
|
+
sourceText,
|
|
104616
|
+
dependencies,
|
|
104617
|
+
devDependencies
|
|
104618
|
+
};
|
|
104619
|
+
}
|
|
104620
|
+
var import_good_enough_parser3, booleanQuery, numberQuery, stringQuery, variableQuery, interpolatedStringQuery, simpleExpressionQuery, concatExpressionQuery, expressionQuery, variableAssignmentQuery, optionQuery, dependencyArgumentQuery, addDependencyQuery, treeQuery3;
|
|
104621
|
+
var init_gemspec_utils = __esm({
|
|
104622
|
+
"../fixing-management/src/fixing-management/rubygems/gemspec-utils.ts"() {
|
|
104623
|
+
"use strict";
|
|
104624
|
+
import_good_enough_parser3 = __toESM(require_cjs(), 1);
|
|
104625
|
+
init_ruby_lang();
|
|
104626
|
+
booleanQuery = import_good_enough_parser3.query.alt(
|
|
104627
|
+
import_good_enough_parser3.query.sym(/^true|false$/, (ctx, { value: value2, offset }) => {
|
|
104628
|
+
(ctx.v ??= []).push({ text: value2, offset, gemfile: ctx.gemspec });
|
|
104629
|
+
ctx.exprEndOffset = offset + value2.length;
|
|
104630
|
+
return ctx;
|
|
104631
|
+
})
|
|
104632
|
+
);
|
|
104633
|
+
numberQuery = import_good_enough_parser3.query.num((ctx, { value: value2, offset }) => {
|
|
104634
|
+
(ctx.v ??= []).push({ text: value2, offset, gemfile: ctx.gemspec });
|
|
104635
|
+
ctx.exprEndOffset = offset + value2.length;
|
|
104636
|
+
return ctx;
|
|
104637
|
+
});
|
|
104638
|
+
stringQuery = import_good_enough_parser3.query.str((ctx, { value: value2, offset }) => {
|
|
104639
|
+
(ctx.v ??= []).push({ text: value2, offset, gemfile: ctx.gemspec });
|
|
104640
|
+
ctx.exprEndOffset = offset + value2.length + 1;
|
|
104641
|
+
return ctx;
|
|
104642
|
+
});
|
|
104643
|
+
variableQuery = import_good_enough_parser3.query.sym((ctx, { value: value2, offset }) => {
|
|
104644
|
+
ctx.v = (ctx.v ?? []).concat(ctx.mem.get(value2) ?? [void 0]);
|
|
104645
|
+
ctx.exprEndOffset = offset + value2.length;
|
|
104646
|
+
return ctx;
|
|
104647
|
+
});
|
|
104648
|
+
interpolatedStringQuery = import_good_enough_parser3.query.tree({
|
|
104649
|
+
type: "string-tree",
|
|
104650
|
+
search: import_good_enough_parser3.query.alt(stringQuery, variableQuery),
|
|
104651
|
+
postHandler: (ctx, tree) => {
|
|
104652
|
+
if (tree.type === "string-tree") {
|
|
104653
|
+
ctx.exprEndOffset = tree.endsWith.offset + 1;
|
|
104654
|
+
}
|
|
104655
|
+
return ctx;
|
|
104656
|
+
}
|
|
104657
|
+
});
|
|
104658
|
+
simpleExpressionQuery = import_good_enough_parser3.query.alt(
|
|
104659
|
+
booleanQuery,
|
|
104660
|
+
numberQuery,
|
|
104661
|
+
stringQuery,
|
|
104662
|
+
variableQuery,
|
|
104663
|
+
interpolatedStringQuery
|
|
104664
|
+
);
|
|
104665
|
+
concatExpressionQuery = simpleExpressionQuery.many(import_good_enough_parser3.query.op("+").join(simpleExpressionQuery));
|
|
104666
|
+
expressionQuery = import_good_enough_parser3.query.alt(simpleExpressionQuery, concatExpressionQuery);
|
|
104667
|
+
variableAssignmentQuery = import_good_enough_parser3.query.sym((ctx, { value: value2 }) => {
|
|
104668
|
+
ctx.x = value2;
|
|
104669
|
+
return ctx;
|
|
104670
|
+
}).op("=").join(expressionQuery).handler((ctx) => {
|
|
104671
|
+
ctx.mem.set(ctx.x, ctx.v);
|
|
104672
|
+
ctx.x = void 0;
|
|
104673
|
+
ctx.v = void 0;
|
|
104674
|
+
ctx.exprEndOffset = void 0;
|
|
104675
|
+
return ctx;
|
|
104676
|
+
});
|
|
104677
|
+
optionQuery = import_good_enough_parser3.query.opt(import_good_enough_parser3.query.op(":")).sym((ctx, { value: value2 }) => {
|
|
104678
|
+
ctx.x = value2;
|
|
104679
|
+
return ctx;
|
|
104680
|
+
}).alt(import_good_enough_parser3.query.op(":"), import_good_enough_parser3.query.op("=>")).join(expressionQuery).handler((ctx) => {
|
|
104681
|
+
ctx.currentGem?.specs.push({
|
|
104682
|
+
type: "option",
|
|
104683
|
+
key: ctx.x,
|
|
104684
|
+
value: ctx.v,
|
|
104685
|
+
preceedingCommaOffset: ctx.preceedingCommaOffset
|
|
104686
|
+
});
|
|
104687
|
+
ctx.x = void 0;
|
|
104688
|
+
ctx.v = void 0;
|
|
104689
|
+
ctx.exprEndOffset = void 0;
|
|
104690
|
+
ctx.preceedingCommaOffset = void 0;
|
|
104691
|
+
return ctx;
|
|
104692
|
+
});
|
|
104693
|
+
dependencyArgumentQuery = import_good_enough_parser3.query.alt(
|
|
104694
|
+
// Options (key: value syntax)
|
|
104695
|
+
optionQuery,
|
|
104696
|
+
// Version constraint (positional)
|
|
104697
|
+
expressionQuery.handler((ctx) => {
|
|
104698
|
+
ctx.currentGem?.specs.push({
|
|
104699
|
+
type: "version",
|
|
104700
|
+
value: ctx.v,
|
|
104701
|
+
preceedingCommaOffset: ctx.preceedingCommaOffset,
|
|
104702
|
+
endOfSpecOffset: ctx.exprEndOffset
|
|
104703
|
+
});
|
|
104704
|
+
ctx.v = void 0;
|
|
104705
|
+
ctx.exprEndOffset = void 0;
|
|
104706
|
+
ctx.preceedingCommaOffset = void 0;
|
|
104707
|
+
return ctx;
|
|
104708
|
+
})
|
|
104709
|
+
);
|
|
104710
|
+
addDependencyQuery = import_good_enough_parser3.query.opt(import_good_enough_parser3.query.sym("spec").op(".")).sym(/^add_(runtime_|development_)?dependency$/, (ctx, { value: value2 }) => {
|
|
104711
|
+
ctx.isDevelopmentDependency = value2.includes("development");
|
|
104712
|
+
return ctx;
|
|
104713
|
+
}).join(expressionQuery).handler((ctx) => {
|
|
104714
|
+
ctx.currentGem = { gemfile: ctx.gemspec, name: ctx.v, endOfNameOffset: ctx.exprEndOffset, specs: [] };
|
|
104715
|
+
ctx.v = void 0;
|
|
104716
|
+
ctx.exprEndOffset = void 0;
|
|
104717
|
+
return ctx;
|
|
104718
|
+
}).opt(
|
|
104719
|
+
import_good_enough_parser3.query.many(
|
|
104720
|
+
import_good_enough_parser3.query.op(",", (ctx, { offset }) => {
|
|
104721
|
+
ctx.preceedingCommaOffset = offset;
|
|
104722
|
+
return ctx;
|
|
104723
|
+
}).join(dependencyArgumentQuery)
|
|
104724
|
+
)
|
|
104725
|
+
).handler((ctx) => {
|
|
104726
|
+
if (ctx.isDevelopmentDependency) {
|
|
104727
|
+
ctx.devDependencies.push(ctx.currentGem);
|
|
104728
|
+
} else {
|
|
104729
|
+
ctx.dependencies.push(ctx.currentGem);
|
|
104730
|
+
}
|
|
104731
|
+
ctx.isDevelopmentDependency = void 0;
|
|
104732
|
+
return ctx;
|
|
104733
|
+
});
|
|
104734
|
+
treeQuery3 = import_good_enough_parser3.query.tree({
|
|
104735
|
+
type: "root-tree",
|
|
104736
|
+
search: import_good_enough_parser3.query.alt(variableAssignmentQuery, addDependencyQuery)
|
|
104737
|
+
});
|
|
104738
|
+
}
|
|
104739
|
+
});
|
|
104740
|
+
|
|
104489
104741
|
// ../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js
|
|
104490
104742
|
var require_utils6 = __commonJS({
|
|
104491
104743
|
"../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js"(exports2) {
|
|
@@ -123041,8 +123293,8 @@ var require_summary = __commonJS({
|
|
|
123041
123293
|
*
|
|
123042
123294
|
* @returns {Summary} summary instance
|
|
123043
123295
|
*/
|
|
123044
|
-
addCodeBlock(code,
|
|
123045
|
-
const attrs = Object.assign({},
|
|
123296
|
+
addCodeBlock(code, lang6) {
|
|
123297
|
+
const attrs = Object.assign({}, lang6 && { lang: lang6 });
|
|
123046
123298
|
const element = this.wrap("pre", this.wrap("code", code), attrs);
|
|
123047
123299
|
return this.addRaw(element).addEOL();
|
|
123048
123300
|
}
|
|
@@ -151766,17 +152018,17 @@ var require_expand2 = __commonJS({
|
|
|
151766
152018
|
const walk = (node, parent2 = {}) => {
|
|
151767
152019
|
node.queue = [];
|
|
151768
152020
|
let p3 = parent2;
|
|
151769
|
-
let
|
|
152021
|
+
let q5 = parent2.queue;
|
|
151770
152022
|
while (p3.type !== "brace" && p3.type !== "root" && p3.parent) {
|
|
151771
152023
|
p3 = p3.parent;
|
|
151772
|
-
|
|
152024
|
+
q5 = p3.queue;
|
|
151773
152025
|
}
|
|
151774
152026
|
if (node.invalid || node.dollar) {
|
|
151775
|
-
|
|
152027
|
+
q5.push(append4(q5.pop(), stringify3(node, options)));
|
|
151776
152028
|
return;
|
|
151777
152029
|
}
|
|
151778
152030
|
if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
|
|
151779
|
-
|
|
152031
|
+
q5.push(append4(q5.pop(), ["{}"]));
|
|
151780
152032
|
return;
|
|
151781
152033
|
}
|
|
151782
152034
|
if (node.nodes && node.ranges > 0) {
|
|
@@ -151788,7 +152040,7 @@ var require_expand2 = __commonJS({
|
|
|
151788
152040
|
if (range2.length === 0) {
|
|
151789
152041
|
range2 = stringify3(node, options);
|
|
151790
152042
|
}
|
|
151791
|
-
|
|
152043
|
+
q5.push(append4(q5.pop(), range2));
|
|
151792
152044
|
node.nodes = [];
|
|
151793
152045
|
return;
|
|
151794
152046
|
}
|
|
@@ -151807,7 +152059,7 @@ var require_expand2 = __commonJS({
|
|
|
151807
152059
|
continue;
|
|
151808
152060
|
}
|
|
151809
152061
|
if (child.type === "close") {
|
|
151810
|
-
|
|
152062
|
+
q5.push(append4(q5.pop(), queue, enclose));
|
|
151811
152063
|
continue;
|
|
151812
152064
|
}
|
|
151813
152065
|
if (child.value && child.type !== "open") {
|
|
@@ -200441,14 +200693,14 @@ var require_WebClient = __commonJS({
|
|
|
200441
200693
|
};
|
|
200442
200694
|
var __asyncGenerator = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) {
|
|
200443
200695
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
200444
|
-
var g = generator.apply(thisArg, _arguments || []), i7,
|
|
200696
|
+
var g = generator.apply(thisArg, _arguments || []), i7, q5 = [];
|
|
200445
200697
|
return i7 = {}, verb("next"), verb("throw"), verb("return"), i7[Symbol.asyncIterator] = function() {
|
|
200446
200698
|
return this;
|
|
200447
200699
|
}, i7;
|
|
200448
200700
|
function verb(n2) {
|
|
200449
200701
|
if (g[n2]) i7[n2] = function(v) {
|
|
200450
200702
|
return new Promise(function(a4, b) {
|
|
200451
|
-
|
|
200703
|
+
q5.push([n2, v, a4, b]) > 1 || resume(n2, v);
|
|
200452
200704
|
});
|
|
200453
200705
|
};
|
|
200454
200706
|
}
|
|
@@ -200456,11 +200708,11 @@ var require_WebClient = __commonJS({
|
|
|
200456
200708
|
try {
|
|
200457
200709
|
step(g[n2](v));
|
|
200458
200710
|
} catch (e) {
|
|
200459
|
-
settle2(
|
|
200711
|
+
settle2(q5[0][3], e);
|
|
200460
200712
|
}
|
|
200461
200713
|
}
|
|
200462
200714
|
function step(r3) {
|
|
200463
|
-
r3.value instanceof __await ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(
|
|
200715
|
+
r3.value instanceof __await ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(q5[0][2], r3);
|
|
200464
200716
|
}
|
|
200465
200717
|
function fulfill(value2) {
|
|
200466
200718
|
resume("next", value2);
|
|
@@ -200469,7 +200721,7 @@ var require_WebClient = __commonJS({
|
|
|
200469
200721
|
resume("throw", value2);
|
|
200470
200722
|
}
|
|
200471
200723
|
function settle2(f6, v) {
|
|
200472
|
-
if (f6(v),
|
|
200724
|
+
if (f6(v), q5.shift(), q5.length) resume(q5[0][0], q5[0][1]);
|
|
200473
200725
|
}
|
|
200474
200726
|
};
|
|
200475
200727
|
var __asyncValues = exports2 && exports2.__asyncValues || function(o7) {
|
|
@@ -225675,142 +225927,36 @@ var import_picomatch9 = __toESM(require_picomatch2(), 1);
|
|
|
225675
225927
|
import assert12 from "node:assert";
|
|
225676
225928
|
|
|
225677
225929
|
// ../fixing-management/src/fixing-management/rubygems/gemfile-utils.ts
|
|
225678
|
-
var
|
|
225679
|
-
|
|
225680
|
-
// ../fixing-management/src/fixing-management/rubygems/ruby-lang.ts
|
|
225681
|
-
var operators3 = (
|
|
225682
|
-
/* prettier-ignore */
|
|
225683
|
-
[
|
|
225684
|
-
"+",
|
|
225685
|
-
"-",
|
|
225686
|
-
"*",
|
|
225687
|
-
"/",
|
|
225688
|
-
"%",
|
|
225689
|
-
"**",
|
|
225690
|
-
"+=",
|
|
225691
|
-
"-=",
|
|
225692
|
-
"*=",
|
|
225693
|
-
"/=",
|
|
225694
|
-
"%=",
|
|
225695
|
-
"**=",
|
|
225696
|
-
"==",
|
|
225697
|
-
"!=",
|
|
225698
|
-
"<",
|
|
225699
|
-
"<=",
|
|
225700
|
-
">",
|
|
225701
|
-
">=",
|
|
225702
|
-
"<=>",
|
|
225703
|
-
"===",
|
|
225704
|
-
"=~",
|
|
225705
|
-
"!~",
|
|
225706
|
-
"&&",
|
|
225707
|
-
"||",
|
|
225708
|
-
"!",
|
|
225709
|
-
"and",
|
|
225710
|
-
"or",
|
|
225711
|
-
"not",
|
|
225712
|
-
"&",
|
|
225713
|
-
"|",
|
|
225714
|
-
"^",
|
|
225715
|
-
"~",
|
|
225716
|
-
"<<",
|
|
225717
|
-
">>",
|
|
225718
|
-
"?",
|
|
225719
|
-
"?.",
|
|
225720
|
-
"=",
|
|
225721
|
-
":",
|
|
225722
|
-
"::",
|
|
225723
|
-
"=>",
|
|
225724
|
-
"->",
|
|
225725
|
-
",",
|
|
225726
|
-
";",
|
|
225727
|
-
".",
|
|
225728
|
-
"..",
|
|
225729
|
-
"..."
|
|
225730
|
-
]
|
|
225731
|
-
);
|
|
225732
|
-
var octdigit = "[0-7]";
|
|
225733
|
-
var digit = "[0-9]";
|
|
225734
|
-
var nonzerodigit = "[1-9]";
|
|
225735
|
-
var hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
225736
|
-
var bindigit = "[01]";
|
|
225737
|
-
var octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
225738
|
-
var hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
225739
|
-
var bininteger = `(?:0[bB](?:_?${bindigit})+)`;
|
|
225740
|
-
var decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0)`;
|
|
225741
|
-
var integer = `(?:${decinteger}|${octinteger}|${hexinteger}|${bininteger})`;
|
|
225742
|
-
var digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
225743
|
-
var fraction = `(?:\\.${digitpart})`;
|
|
225744
|
-
var exponent = `(?:[eE][-+]?${digitpart})`;
|
|
225745
|
-
var pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
225746
|
-
var exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
225747
|
-
var floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
225748
|
-
var numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
225749
|
-
var templates = [
|
|
225750
|
-
{
|
|
225751
|
-
type: "var",
|
|
225752
|
-
startsWith: "#",
|
|
225753
|
-
// Match instance vars (#@var), class vars (#@@var), and global vars (#$var)
|
|
225754
|
-
symbols: /(?:@@?|\\$)[a-zA-Z_][a-zA-Z0-9_]*/
|
|
225755
|
-
},
|
|
225756
|
-
{ type: "expr", startsWith: "#{", endsWith: "}" }
|
|
225757
|
-
];
|
|
225758
|
-
var lexer = {
|
|
225759
|
-
joinLines: "\\",
|
|
225760
|
-
comments: [
|
|
225761
|
-
{ type: "line-comment", startsWith: "#" },
|
|
225762
|
-
{ type: "multiline-comment", startsWith: "=begin", endsWith: "=end" }
|
|
225763
|
-
],
|
|
225764
|
-
// Ruby identifiers: letters, digits, underscores. Can start with letter or underscore
|
|
225765
|
-
// Can end with ? or ! for predicate/mutator methods
|
|
225766
|
-
symbols: /[_a-zA-Z][_a-zA-Z0-9]*[?!]?/,
|
|
225767
|
-
numbers,
|
|
225768
|
-
operators: operators3,
|
|
225769
|
-
brackets: [
|
|
225770
|
-
{ startsWith: "{", endsWith: "}" },
|
|
225771
|
-
{ startsWith: "[", endsWith: "]" },
|
|
225772
|
-
{ startsWith: "(", endsWith: ")" }
|
|
225773
|
-
],
|
|
225774
|
-
strings: [
|
|
225775
|
-
// Double-quoted strings support interpolation
|
|
225776
|
-
{ startsWith: '"', templates, endsWith: '"' },
|
|
225777
|
-
// Single-quoted strings do not support interpolation
|
|
225778
|
-
{ startsWith: "'", endsWith: "'" }
|
|
225779
|
-
]
|
|
225780
|
-
};
|
|
225781
|
-
var parser = {
|
|
225782
|
-
useIndentBlocks: false
|
|
225783
|
-
};
|
|
225784
|
-
var lang3 = { lexer, parser };
|
|
225785
|
-
|
|
225786
|
-
// ../fixing-management/src/fixing-management/rubygems/gemfile-utils.ts
|
|
225930
|
+
var import_good_enough_parser4 = __toESM(require_cjs(), 1);
|
|
225931
|
+
init_ruby_lang();
|
|
225787
225932
|
import { resolve as resolve32, dirname as dirname17, relative as relative12 } from "node:path";
|
|
225788
|
-
import { existsSync as existsSync14, readFileSync as readFileSync3 } from "node:fs";
|
|
225789
|
-
|
|
225790
|
-
|
|
225933
|
+
import { existsSync as existsSync14, readFileSync as readFileSync3, readdirSync as readdirSync4 } from "node:fs";
|
|
225934
|
+
init_gemspec_utils();
|
|
225935
|
+
var booleanQuery2 = import_good_enough_parser4.query.alt(
|
|
225936
|
+
import_good_enough_parser4.query.sym(/^true|false$/, (ctx, { value: value2, offset }) => {
|
|
225791
225937
|
(ctx.v ??= []).push({ text: value2, offset, gemfile: ctx.gemfile });
|
|
225792
225938
|
ctx.exprEndOffset = offset + value2.length;
|
|
225793
225939
|
return ctx;
|
|
225794
225940
|
})
|
|
225795
225941
|
);
|
|
225796
|
-
var
|
|
225942
|
+
var numberQuery2 = import_good_enough_parser4.query.num((ctx, { value: value2, offset }) => {
|
|
225797
225943
|
(ctx.v ??= []).push({ text: value2, offset, gemfile: ctx.gemfile });
|
|
225798
225944
|
ctx.exprEndOffset = offset + value2.length;
|
|
225799
225945
|
return ctx;
|
|
225800
225946
|
});
|
|
225801
|
-
var
|
|
225947
|
+
var stringQuery2 = import_good_enough_parser4.query.str((ctx, { value: value2, offset }) => {
|
|
225802
225948
|
(ctx.v ??= []).push({ text: value2, offset, gemfile: ctx.gemfile });
|
|
225803
225949
|
ctx.exprEndOffset = offset + value2.length + 1;
|
|
225804
225950
|
return ctx;
|
|
225805
225951
|
});
|
|
225806
|
-
var
|
|
225952
|
+
var variableQuery2 = import_good_enough_parser4.query.sym((ctx, { value: value2, offset }) => {
|
|
225807
225953
|
ctx.v = (ctx.v ?? []).concat(ctx.mem.get(value2) ?? [void 0]);
|
|
225808
225954
|
ctx.exprEndOffset = offset + value2.length;
|
|
225809
225955
|
return ctx;
|
|
225810
225956
|
});
|
|
225811
|
-
var
|
|
225957
|
+
var interpolatedStringQuery2 = import_good_enough_parser4.query.tree({
|
|
225812
225958
|
type: "string-tree",
|
|
225813
|
-
search:
|
|
225959
|
+
search: import_good_enough_parser4.query.alt(stringQuery2, variableQuery2),
|
|
225814
225960
|
postHandler: (ctx, tree) => {
|
|
225815
225961
|
if (tree.type === "string-tree") {
|
|
225816
225962
|
ctx.exprEndOffset = tree.endsWith.offset + 1;
|
|
@@ -225818,29 +225964,29 @@ var interpolatedStringQuery = import_good_enough_parser3.query.tree({
|
|
|
225818
225964
|
return ctx;
|
|
225819
225965
|
}
|
|
225820
225966
|
});
|
|
225821
|
-
var
|
|
225822
|
-
|
|
225823
|
-
|
|
225824
|
-
|
|
225825
|
-
|
|
225826
|
-
|
|
225967
|
+
var simpleExpressionQuery2 = import_good_enough_parser4.query.alt(
|
|
225968
|
+
booleanQuery2,
|
|
225969
|
+
numberQuery2,
|
|
225970
|
+
stringQuery2,
|
|
225971
|
+
variableQuery2,
|
|
225972
|
+
interpolatedStringQuery2
|
|
225827
225973
|
);
|
|
225828
|
-
var
|
|
225829
|
-
var
|
|
225830
|
-
var
|
|
225974
|
+
var concatExpressionQuery2 = simpleExpressionQuery2.many(import_good_enough_parser4.query.op("+").join(simpleExpressionQuery2));
|
|
225975
|
+
var expressionQuery2 = import_good_enough_parser4.query.alt(simpleExpressionQuery2, concatExpressionQuery2);
|
|
225976
|
+
var variableAssignmentQuery2 = import_good_enough_parser4.query.sym((ctx, { value: value2 }) => {
|
|
225831
225977
|
ctx.x = value2;
|
|
225832
225978
|
return ctx;
|
|
225833
|
-
}).op("=").join(
|
|
225979
|
+
}).op("=").join(expressionQuery2).handler((ctx) => {
|
|
225834
225980
|
ctx.mem.set(ctx.x, ctx.v);
|
|
225835
225981
|
ctx.x = void 0;
|
|
225836
225982
|
ctx.v = void 0;
|
|
225837
225983
|
ctx.exprEndOffset = void 0;
|
|
225838
225984
|
return ctx;
|
|
225839
225985
|
});
|
|
225840
|
-
var
|
|
225986
|
+
var optionQuery2 = import_good_enough_parser4.query.opt(import_good_enough_parser4.query.op(":")).sym((ctx, { value: value2 }) => {
|
|
225841
225987
|
ctx.x = value2;
|
|
225842
225988
|
return ctx;
|
|
225843
|
-
}).alt(
|
|
225989
|
+
}).alt(import_good_enough_parser4.query.op(":"), import_good_enough_parser4.query.op("=>")).join(expressionQuery2).handler((ctx) => {
|
|
225844
225990
|
ctx.currentGem?.specs.push({
|
|
225845
225991
|
type: "option",
|
|
225846
225992
|
key: ctx.x,
|
|
@@ -225853,11 +225999,11 @@ var optionQuery = import_good_enough_parser3.query.opt(import_good_enough_parser
|
|
|
225853
225999
|
ctx.preceedingCommaOffset = void 0;
|
|
225854
226000
|
return ctx;
|
|
225855
226001
|
});
|
|
225856
|
-
var gemArgumentQuery =
|
|
226002
|
+
var gemArgumentQuery = import_good_enough_parser4.query.alt(
|
|
225857
226003
|
// Options (key: value syntax): gem 'name', github: 'rails/rails', git: '...', etc.
|
|
225858
|
-
|
|
226004
|
+
optionQuery2,
|
|
225859
226005
|
// Version constraint (positional): gem 'name', '~> 1.0' or MY_VERSION or "~> " + VERSION
|
|
225860
|
-
|
|
226006
|
+
expressionQuery2.handler((ctx) => {
|
|
225861
226007
|
ctx.currentGem?.specs.push({
|
|
225862
226008
|
type: "version",
|
|
225863
226009
|
value: ctx.v,
|
|
@@ -225870,14 +226016,14 @@ var gemArgumentQuery = import_good_enough_parser3.query.alt(
|
|
|
225870
226016
|
return ctx;
|
|
225871
226017
|
})
|
|
225872
226018
|
);
|
|
225873
|
-
var gemQuery =
|
|
226019
|
+
var gemQuery = import_good_enough_parser4.query.sym("gem").join(expressionQuery2).handler((ctx) => {
|
|
225874
226020
|
ctx.currentGem = { gemfile: ctx.gemfile, name: ctx.v, endOfNameOffset: ctx.exprEndOffset, specs: [] };
|
|
225875
226021
|
ctx.v = void 0;
|
|
225876
226022
|
ctx.exprEndOffset = void 0;
|
|
225877
226023
|
return ctx;
|
|
225878
226024
|
}).opt(
|
|
225879
|
-
|
|
225880
|
-
|
|
226025
|
+
import_good_enough_parser4.query.many(
|
|
226026
|
+
import_good_enough_parser4.query.op(",", (ctx, { offset }) => {
|
|
225881
226027
|
ctx.preceedingCommaOffset = offset;
|
|
225882
226028
|
return ctx;
|
|
225883
226029
|
}).join(gemArgumentQuery)
|
|
@@ -225886,7 +226032,7 @@ var gemQuery = import_good_enough_parser3.query.sym("gem").join(expressionQuery)
|
|
|
225886
226032
|
ctx.gems.push(ctx.currentGem);
|
|
225887
226033
|
return ctx;
|
|
225888
226034
|
});
|
|
225889
|
-
var evalGemfileQuery =
|
|
226035
|
+
var evalGemfileQuery = import_good_enough_parser4.query.sym("eval_gemfile").join(expressionQuery2).handler((ctx) => {
|
|
225890
226036
|
const pathEvaluated = evaluate4(ctx.v);
|
|
225891
226037
|
ctx.v = void 0;
|
|
225892
226038
|
ctx.exprEndOffset = void 0;
|
|
@@ -225901,36 +226047,125 @@ var evalGemfileQuery = import_good_enough_parser3.query.sym("eval_gemfile").join
|
|
|
225901
226047
|
const file = relative12(rootDir, resolve32(rootDir, dirname17(ctx.gemfile.file), pathEvaluated));
|
|
225902
226048
|
if (!existsSync14(resolve32(rootDir, file))) return ctx;
|
|
225903
226049
|
const sourceText = readFileSync3(resolve32(rootDir, file), "utf-8");
|
|
225904
|
-
const parser2 =
|
|
226050
|
+
const parser2 = import_good_enough_parser4.lang.createLang(lang3);
|
|
225905
226051
|
const cursor = parser2.parse(sourceText);
|
|
225906
|
-
const otherCtx = parser2.query(cursor,
|
|
226052
|
+
const otherCtx = parser2.query(cursor, treeQuery4, {
|
|
225907
226053
|
gemfile: { rootDir, file, sourceText },
|
|
225908
226054
|
gems: ctx.gems,
|
|
226055
|
+
gemspecs: ctx.gemspecs,
|
|
225909
226056
|
mem: ctx.mem,
|
|
225910
226057
|
depth: ctx.depth + 1
|
|
225911
226058
|
});
|
|
225912
226059
|
if (otherCtx) {
|
|
225913
226060
|
ctx.gems = otherCtx.gems;
|
|
226061
|
+
ctx.gemspecs = otherCtx.gemspecs;
|
|
225914
226062
|
ctx.mem = otherCtx.mem;
|
|
225915
226063
|
}
|
|
225916
226064
|
return ctx;
|
|
225917
226065
|
});
|
|
225918
|
-
var
|
|
226066
|
+
var gemspecOptionQuery = import_good_enough_parser4.query.opt(import_good_enough_parser4.query.op(":")).sym((ctx, { value: value2 }) => {
|
|
226067
|
+
ctx.x = value2;
|
|
226068
|
+
return ctx;
|
|
226069
|
+
}).alt(import_good_enough_parser4.query.op(":"), import_good_enough_parser4.query.op("=>")).join(expressionQuery2).handler((ctx) => {
|
|
226070
|
+
if (!ctx.currentGem) {
|
|
226071
|
+
ctx.currentGem = { gemfile: ctx.gemfile, name: [], endOfNameOffset: 0, specs: [] };
|
|
226072
|
+
}
|
|
226073
|
+
ctx.currentGem.specs.push({
|
|
226074
|
+
type: "option",
|
|
226075
|
+
key: ctx.x,
|
|
226076
|
+
value: ctx.v,
|
|
226077
|
+
preceedingCommaOffset: ctx.preceedingCommaOffset ?? 0
|
|
226078
|
+
});
|
|
226079
|
+
ctx.x = void 0;
|
|
226080
|
+
ctx.v = void 0;
|
|
226081
|
+
ctx.exprEndOffset = void 0;
|
|
226082
|
+
ctx.preceedingCommaOffset = void 0;
|
|
226083
|
+
return ctx;
|
|
226084
|
+
});
|
|
226085
|
+
var gemspecQuery = import_good_enough_parser4.query.sym("gemspec").opt(
|
|
226086
|
+
import_good_enough_parser4.query.alt(
|
|
226087
|
+
// First option (no leading comma)
|
|
226088
|
+
gemspecOptionQuery,
|
|
226089
|
+
// Multiple options (with commas)
|
|
226090
|
+
import_good_enough_parser4.query.many(
|
|
226091
|
+
import_good_enough_parser4.query.op(",", (ctx, { offset }) => {
|
|
226092
|
+
ctx.preceedingCommaOffset = offset;
|
|
226093
|
+
return ctx;
|
|
226094
|
+
}).join(gemspecOptionQuery)
|
|
226095
|
+
)
|
|
226096
|
+
)
|
|
226097
|
+
).handler((ctx) => {
|
|
226098
|
+
if (ctx.depth > 50) {
|
|
226099
|
+
logger.warn(
|
|
226100
|
+
`Recursion limit hit while evaluating gemspec: ${relative12(ctx.gemfile.rootDir, resolve32(ctx.gemfile.rootDir, ctx.gemfile.file))}`
|
|
226101
|
+
);
|
|
226102
|
+
ctx.currentGem = void 0;
|
|
226103
|
+
return ctx;
|
|
226104
|
+
}
|
|
226105
|
+
const rootDir = ctx.gemfile.rootDir;
|
|
226106
|
+
const gemfileDir = dirname17(ctx.gemfile.file);
|
|
226107
|
+
let gemspecPath;
|
|
226108
|
+
let gemspecName;
|
|
226109
|
+
if (ctx.currentGem) {
|
|
226110
|
+
for (const spec of ctx.currentGem.specs) {
|
|
226111
|
+
if (spec.type === "option") {
|
|
226112
|
+
const value2 = evaluate4(spec.value);
|
|
226113
|
+
if (spec.key === "path" && value2 !== void 0) {
|
|
226114
|
+
gemspecPath = value2;
|
|
226115
|
+
} else if (spec.key === "name" && value2 !== void 0) {
|
|
226116
|
+
gemspecName = value2;
|
|
226117
|
+
}
|
|
226118
|
+
}
|
|
226119
|
+
}
|
|
226120
|
+
ctx.currentGem = void 0;
|
|
226121
|
+
}
|
|
226122
|
+
const searchDir = gemspecPath ? resolve32(rootDir, gemfileDir, gemspecPath) : resolve32(rootDir, gemfileDir);
|
|
226123
|
+
if (!existsSync14(searchDir)) return ctx;
|
|
226124
|
+
let gemspecFiles = [];
|
|
226125
|
+
try {
|
|
226126
|
+
const entries = readdirSync4(searchDir);
|
|
226127
|
+
gemspecFiles = entries.filter((entry) => {
|
|
226128
|
+
if (!entry.endsWith(".gemspec")) return false;
|
|
226129
|
+
if (gemspecName && entry !== `${gemspecName}.gemspec`) return false;
|
|
226130
|
+
return true;
|
|
226131
|
+
});
|
|
226132
|
+
} catch (e) {
|
|
226133
|
+
logger.warn(`Failed to read directory ${searchDir}: ${e}`);
|
|
226134
|
+
return ctx;
|
|
226135
|
+
}
|
|
226136
|
+
if (gemspecFiles.length === 0) return ctx;
|
|
226137
|
+
const gemspecFile = gemspecFiles[0];
|
|
226138
|
+
const gemspecFullPath = resolve32(searchDir, gemspecFile);
|
|
226139
|
+
const gemspecRelativePath = relative12(rootDir, gemspecFullPath);
|
|
226140
|
+
try {
|
|
226141
|
+
const sourceText = readFileSync3(gemspecFullPath, "utf-8");
|
|
226142
|
+
const gemspec = parseGemspec(rootDir, gemspecRelativePath, sourceText);
|
|
226143
|
+
ctx.gemspecs.push(gemspec);
|
|
226144
|
+
ctx.gems.push(...gemspec.dependencies);
|
|
226145
|
+
ctx.gems.push(...gemspec.devDependencies);
|
|
226146
|
+
} catch (e) {
|
|
226147
|
+
logger.warn(`Failed to parse gemspec ${gemspecRelativePath}: ${e}`);
|
|
226148
|
+
}
|
|
226149
|
+
return ctx;
|
|
226150
|
+
});
|
|
226151
|
+
var treeQuery4 = import_good_enough_parser4.query.tree({
|
|
225919
226152
|
type: "root-tree",
|
|
225920
|
-
search:
|
|
226153
|
+
search: import_good_enough_parser4.query.alt(variableAssignmentQuery2, gemQuery, evalGemfileQuery, gemspecQuery)
|
|
225921
226154
|
});
|
|
225922
226155
|
function parseGemfile(rootDir, file, sourceText) {
|
|
225923
226156
|
const gemfile = { rootDir, file, sourceText };
|
|
225924
|
-
const ctx = { gemfile, gems: [], mem: /* @__PURE__ */ new Map(), depth: 0 };
|
|
225925
|
-
const parser2 =
|
|
226157
|
+
const ctx = { gemfile, gems: [], gemspecs: [], mem: /* @__PURE__ */ new Map(), depth: 0 };
|
|
226158
|
+
const parser2 = import_good_enough_parser4.lang.createLang(lang3);
|
|
225926
226159
|
const cursor = parser2.parse(sourceText);
|
|
225927
|
-
const result = parser2.query(cursor,
|
|
226160
|
+
const result = parser2.query(cursor, treeQuery4, ctx);
|
|
225928
226161
|
const gems = result ? result.gems : [];
|
|
226162
|
+
const gemspecs = result ? result.gemspecs : [];
|
|
225929
226163
|
return {
|
|
225930
226164
|
rootDir,
|
|
225931
226165
|
file,
|
|
225932
226166
|
sourceText,
|
|
225933
|
-
gems
|
|
226167
|
+
gems,
|
|
226168
|
+
gemspecs
|
|
225934
226169
|
};
|
|
225935
226170
|
}
|
|
225936
226171
|
function evaluate4(v) {
|
|
@@ -225961,10 +226196,12 @@ function parseGemfileLock(content) {
|
|
|
225961
226196
|
const gems = /* @__PURE__ */ new Map();
|
|
225962
226197
|
const plugins = /* @__PURE__ */ new Map();
|
|
225963
226198
|
const directDependencies = /* @__PURE__ */ new Set();
|
|
226199
|
+
const pathDependencies = /* @__PURE__ */ new Map();
|
|
225964
226200
|
const lines = content.split("\n");
|
|
225965
226201
|
let currentSection = null;
|
|
225966
226202
|
let inSpecsSubsection = false;
|
|
225967
226203
|
let gemSpecIndentLevel = null;
|
|
226204
|
+
let currentPathGem = null;
|
|
225968
226205
|
for (let i7 = 0; i7 < lines.length; i7++) {
|
|
225969
226206
|
const line = lines[i7];
|
|
225970
226207
|
if (line.length > 0 && !line.startsWith(" ")) {
|
|
@@ -226020,6 +226257,16 @@ function parseGemfileLock(content) {
|
|
|
226020
226257
|
offset: lineOffset + line.indexOf("(") + 1
|
|
226021
226258
|
});
|
|
226022
226259
|
}
|
|
226260
|
+
if (currentSection === "PATH") {
|
|
226261
|
+
currentPathGem = name;
|
|
226262
|
+
if (!pathDependencies.has(name)) {
|
|
226263
|
+
pathDependencies.set(name, /* @__PURE__ */ new Set());
|
|
226264
|
+
}
|
|
226265
|
+
}
|
|
226266
|
+
} else if (currentIndent > gemSpecIndentLevel) {
|
|
226267
|
+
if (currentSection === "PATH" && currentPathGem) {
|
|
226268
|
+
pathDependencies.get(currentPathGem)?.add(name);
|
|
226269
|
+
}
|
|
226023
226270
|
}
|
|
226024
226271
|
}
|
|
226025
226272
|
} else if (currentSection === "DEPENDENCIES") {
|
|
@@ -226030,7 +226277,7 @@ function parseGemfileLock(content) {
|
|
|
226030
226277
|
}
|
|
226031
226278
|
}
|
|
226032
226279
|
}
|
|
226033
|
-
return { gits, paths, gems, plugins, directDependencies };
|
|
226280
|
+
return { gits, paths, gems, plugins, directDependencies, pathDependencies };
|
|
226034
226281
|
}
|
|
226035
226282
|
|
|
226036
226283
|
// ../fixing-management/src/fixing-management/rubygems/rubygems-socket-upgrade-manager.ts
|
|
@@ -226249,20 +226496,38 @@ var RubygemsSocketUpgradeManager = class {
|
|
|
226249
226496
|
if (ctxt.wsFilter && !ctxt.wsFilter(dirname18(mf.file) || ".")) continue;
|
|
226250
226497
|
const lockfileContent = await readFile27(resolve33(this.rootDir, mf.file), "utf-8");
|
|
226251
226498
|
const gemfileLock = parseGemfileLock(lockfileContent);
|
|
226252
|
-
|
|
226499
|
+
const pathGems = [];
|
|
226500
|
+
for (const [pathGemName, deps] of gemfileLock.pathDependencies) {
|
|
226501
|
+
if (deps.has(artifact.name)) {
|
|
226502
|
+
pathGems.push(pathGemName);
|
|
226503
|
+
}
|
|
226504
|
+
}
|
|
226505
|
+
const isInGemSection = gemfileLock.gems.has(artifact.name);
|
|
226506
|
+
if (!isInGemSection && pathGems.length === 0) {
|
|
226253
226507
|
ctxt.statusUpdater?.({
|
|
226254
226508
|
status: "error",
|
|
226255
226509
|
file: mf.file,
|
|
226256
226510
|
artifacts: [idx],
|
|
226257
|
-
message: "Gem not found in GEM section of lockfile -- other sources are not supported."
|
|
226511
|
+
message: "Gem not found in GEM section or PATH dependencies of lockfile -- other sources are not supported."
|
|
226258
226512
|
});
|
|
226259
226513
|
continue;
|
|
226260
226514
|
}
|
|
226261
226515
|
const gemfileName = relative13(this.rootDir, resolve33(this.rootDir, dirname18(mf.file), "Gemfile"));
|
|
226262
|
-
gemfileToLockfile.set(
|
|
226263
|
-
if (
|
|
226516
|
+
gemfileToLockfile.set(gemfileName, mf.file);
|
|
226517
|
+
if (pathGems.length > 0) {
|
|
226518
|
+
const { gemspecPatches, gemfilePatches } = await this.handleGemspecDependency(
|
|
226519
|
+
gemfileName,
|
|
226520
|
+
pathGems,
|
|
226521
|
+
artifact.name,
|
|
226522
|
+
idx,
|
|
226523
|
+
upgradeVersion,
|
|
226524
|
+
ctxt
|
|
226525
|
+
);
|
|
226526
|
+
directPatches.push(...gemspecPatches);
|
|
226527
|
+
transitivePatches.push(...gemfilePatches);
|
|
226528
|
+
} else if (gemfileLock.directDependencies.has(artifact.name) && isInGemSection) {
|
|
226264
226529
|
directPatches.push(...await this.handleGemfile(gemfileName, idx, upgradeVersion, ctxt));
|
|
226265
|
-
} else {
|
|
226530
|
+
} else if (!gemfileLock.directDependencies.has(artifact.name)) {
|
|
226266
226531
|
transitivePatches.push(await this.createAddGemPatch(gemfileName, idx, upgradeVersion, ctxt));
|
|
226267
226532
|
}
|
|
226268
226533
|
} else {
|
|
@@ -226298,7 +226563,7 @@ var RubygemsSocketUpgradeManager = class {
|
|
|
226298
226563
|
);
|
|
226299
226564
|
const lockfileToArtifacts = {};
|
|
226300
226565
|
for (const { file, artifacts } of appliedTemporaryPatches) {
|
|
226301
|
-
const lockfile2 = gemfileToLockfile.get(
|
|
226566
|
+
const lockfile2 = gemfileToLockfile.get(file);
|
|
226302
226567
|
if (lockfile2 !== void 0) (lockfileToArtifacts[lockfile2] ??= []).push(...artifacts);
|
|
226303
226568
|
}
|
|
226304
226569
|
await asyncForEach(Object.entries(lockfileToArtifacts), async ([file, artifacts]) => {
|
|
@@ -226363,6 +226628,92 @@ var RubygemsSocketUpgradeManager = class {
|
|
|
226363
226628
|
}
|
|
226364
226629
|
});
|
|
226365
226630
|
}
|
|
226631
|
+
/**
|
|
226632
|
+
* Handle gemspec file updates for PATH dependencies
|
|
226633
|
+
* Returns { gemspecPatches, gemfilePatches }
|
|
226634
|
+
* gemspecPatches: patches to gemspec files (should be in directPatches - re-applied after restore)
|
|
226635
|
+
* gemfilePatches: temporary patches to Gemfile (should be in transitivePatches - not re-applied)
|
|
226636
|
+
*/
|
|
226637
|
+
async handleGemspecDependency(gemfilePath, pathGemNames, dependencyName, idx, upgradeVersion, ctxt) {
|
|
226638
|
+
const gemspecPatches = [];
|
|
226639
|
+
const gemfilePatches = [];
|
|
226640
|
+
const artifact = ctxt.artifacts[idx];
|
|
226641
|
+
try {
|
|
226642
|
+
const gemfileContent = await readFile27(resolve33(this.rootDir, gemfilePath), "utf-8");
|
|
226643
|
+
const gemfile = parseGemfile(this.rootDir, gemfilePath, gemfileContent);
|
|
226644
|
+
const gemspecFiles = /* @__PURE__ */ new Set();
|
|
226645
|
+
for (const gem of gemfile.gems) {
|
|
226646
|
+
if (gem.gemfile.file !== gemfilePath && gem.gemfile.file.endsWith(".gemspec")) {
|
|
226647
|
+
gemspecFiles.add(gem.gemfile.file);
|
|
226648
|
+
}
|
|
226649
|
+
}
|
|
226650
|
+
if (gemspecFiles.size === 0) {
|
|
226651
|
+
ctxt.statusUpdater?.({
|
|
226652
|
+
status: "error",
|
|
226653
|
+
file: gemfilePath,
|
|
226654
|
+
artifacts: [idx],
|
|
226655
|
+
message: `Could not find gemspec file for PATH gem(s): ${pathGemNames.join(", ")}. Make sure the Gemfile has a 'gemspec' directive.`
|
|
226656
|
+
});
|
|
226657
|
+
gemfilePatches.push(await this.createAddGemPatch(gemfilePath, idx, upgradeVersion, ctxt));
|
|
226658
|
+
return { gemspecPatches, gemfilePatches };
|
|
226659
|
+
}
|
|
226660
|
+
let foundInGemspec = false;
|
|
226661
|
+
for (const gemspecFile of gemspecFiles) {
|
|
226662
|
+
try {
|
|
226663
|
+
const gemspecContent = await readFile27(resolve33(this.rootDir, gemspecFile), "utf-8");
|
|
226664
|
+
const { parseGemspec: parseGemspec2 } = await Promise.resolve().then(() => (init_gemspec_utils(), gemspec_utils_exports));
|
|
226665
|
+
const gemspec = parseGemspec2(this.rootDir, gemspecFile, gemspecContent);
|
|
226666
|
+
for (const gem of gemspec.dependencies) {
|
|
226667
|
+
if (evaluate4(gem.name) === dependencyName) {
|
|
226668
|
+
foundInGemspec = true;
|
|
226669
|
+
const [version3] = artifact.version.split("-");
|
|
226670
|
+
const versionSpecs = gem.specs.filter((spec) => spec.type === "version");
|
|
226671
|
+
const evaluatedSpecOpts = versionSpecs.map((spec) => evaluate4(spec.value));
|
|
226672
|
+
if (evaluatedSpecOpts.includes(void 0)) {
|
|
226673
|
+
ctxt.statusUpdater?.({
|
|
226674
|
+
status: "error",
|
|
226675
|
+
file: gemspecFile,
|
|
226676
|
+
artifacts: [idx],
|
|
226677
|
+
message: `Failed to evaluate version constraint in gemspec`
|
|
226678
|
+
});
|
|
226679
|
+
continue;
|
|
226680
|
+
}
|
|
226681
|
+
const evaluatedSpecs = evaluatedSpecOpts.filter((spec) => spec !== void 0);
|
|
226682
|
+
if (rubygemsVersionSatisfiesConstraints(version3, evaluatedSpecs)) {
|
|
226683
|
+
gemspecPatches.push(
|
|
226684
|
+
...createRubygemVersionPatches(gem, idx, upgradeVersion, ctxt.rangeStyle, ctxt.statusUpdater)
|
|
226685
|
+
);
|
|
226686
|
+
}
|
|
226687
|
+
}
|
|
226688
|
+
}
|
|
226689
|
+
} catch (error) {
|
|
226690
|
+
ctxt.statusUpdater?.({
|
|
226691
|
+
status: "error",
|
|
226692
|
+
file: gemspecFile,
|
|
226693
|
+
artifacts: [idx],
|
|
226694
|
+
message: `Failed to parse gemspec: ${error instanceof Error ? error.message : String(error)}`
|
|
226695
|
+
});
|
|
226696
|
+
}
|
|
226697
|
+
}
|
|
226698
|
+
if (!foundInGemspec) {
|
|
226699
|
+
ctxt.statusUpdater?.({
|
|
226700
|
+
status: "error",
|
|
226701
|
+
file: gemfilePath,
|
|
226702
|
+
artifacts: [idx],
|
|
226703
|
+
message: `Could not find ${dependencyName} in any gemspec file`
|
|
226704
|
+
});
|
|
226705
|
+
}
|
|
226706
|
+
gemfilePatches.push(await this.createAddGemPatch(gemfilePath, idx, upgradeVersion, ctxt));
|
|
226707
|
+
} catch (error) {
|
|
226708
|
+
ctxt.statusUpdater?.({
|
|
226709
|
+
status: "error",
|
|
226710
|
+
file: gemfilePath,
|
|
226711
|
+
artifacts: [idx],
|
|
226712
|
+
message: `Failed to handle gemspec dependency: ${error instanceof Error ? error.message : String(error)}`
|
|
226713
|
+
});
|
|
226714
|
+
}
|
|
226715
|
+
return { gemspecPatches, gemfilePatches };
|
|
226716
|
+
}
|
|
226366
226717
|
/**
|
|
226367
226718
|
* Handle Gemfile updates for direct dependencies
|
|
226368
226719
|
*/
|
|
@@ -229385,6 +229736,29 @@ ${vulnerabilityFixes.map((fix) => ` ${fix.dependencyName} from ${fix.currentVers
|
|
|
229385
229736
|
// dist/internal/socket-mode-helpers-socket-dependency-trees.js
|
|
229386
229737
|
import { basename as basename7, dirname as dirname21, join as join24, sep as sep5 } from "path";
|
|
229387
229738
|
var REQUIREMENTS_FILES_SEARCH_DEPTH2 = 3;
|
|
229739
|
+
var venvExcludes = [
|
|
229740
|
+
"venv",
|
|
229741
|
+
".venv",
|
|
229742
|
+
"env",
|
|
229743
|
+
".env",
|
|
229744
|
+
"virtualenv",
|
|
229745
|
+
".virtualenv",
|
|
229746
|
+
"venvs",
|
|
229747
|
+
".venvs",
|
|
229748
|
+
"envs",
|
|
229749
|
+
".envs",
|
|
229750
|
+
"__pycache__",
|
|
229751
|
+
".tox",
|
|
229752
|
+
".nox",
|
|
229753
|
+
".pytest_cache",
|
|
229754
|
+
"site-packages",
|
|
229755
|
+
"dist-packages",
|
|
229756
|
+
"conda-meta",
|
|
229757
|
+
"conda-bld",
|
|
229758
|
+
".mypy_cache",
|
|
229759
|
+
".ruff_cache",
|
|
229760
|
+
".hypothesis"
|
|
229761
|
+
];
|
|
229388
229762
|
function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonProjects) {
|
|
229389
229763
|
switch (ecosystem) {
|
|
229390
229764
|
case "NPM": {
|
|
@@ -229396,6 +229770,9 @@ function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonPro
|
|
|
229396
229770
|
return ".";
|
|
229397
229771
|
}
|
|
229398
229772
|
case "PIP": {
|
|
229773
|
+
if (venvExcludes.some((exclude) => manifestPath.startsWith(`${exclude}/`) || manifestPath.includes(`/${exclude}/`))) {
|
|
229774
|
+
return void 0;
|
|
229775
|
+
}
|
|
229399
229776
|
const base = basename7(manifestPath);
|
|
229400
229777
|
const dir = dirname21(manifestPath);
|
|
229401
229778
|
const workspaceDir = dir === "" ? "." : dir;
|
|
@@ -229480,29 +229857,6 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash,
|
|
|
229480
229857
|
pipArtifactToRepresentativeManifest[simplePurl(artifact.type, artifact.namespace ?? "", artifact.name ?? "", artifact.version ?? "")] = artifact;
|
|
229481
229858
|
}
|
|
229482
229859
|
}
|
|
229483
|
-
const venvExcludes = [
|
|
229484
|
-
"venv",
|
|
229485
|
-
".venv",
|
|
229486
|
-
"env",
|
|
229487
|
-
".env",
|
|
229488
|
-
"virtualenv",
|
|
229489
|
-
".virtualenv",
|
|
229490
|
-
"venvs",
|
|
229491
|
-
".venvs",
|
|
229492
|
-
"envs",
|
|
229493
|
-
".envs",
|
|
229494
|
-
"__pycache__",
|
|
229495
|
-
".tox",
|
|
229496
|
-
".nox",
|
|
229497
|
-
".pytest_cache",
|
|
229498
|
-
"site-packages",
|
|
229499
|
-
"dist-packages",
|
|
229500
|
-
"conda-meta",
|
|
229501
|
-
"conda-bld",
|
|
229502
|
-
".mypy_cache",
|
|
229503
|
-
".ruff_cache",
|
|
229504
|
-
".hypothesis"
|
|
229505
|
-
];
|
|
229506
229860
|
const allFiles = await getFilesRelative(rootWorkingDirectory, venvExcludes);
|
|
229507
229861
|
for (const file of allFiles) {
|
|
229508
229862
|
const base = basename7(file);
|
|
@@ -229545,7 +229899,7 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash,
|
|
|
229545
229899
|
break;
|
|
229546
229900
|
}
|
|
229547
229901
|
case "PIP": {
|
|
229548
|
-
const sPurl = simplePurl(artifact.type, artifact.namespace ??
|
|
229902
|
+
const sPurl = simplePurl(artifact.type, artifact.namespace ?? null, artifact.name ?? null, artifact.version ?? null);
|
|
229549
229903
|
if (pipArtifactToRepresentativeManifest[sPurl]) {
|
|
229550
229904
|
manifestFiles.push(...(pipArtifactToRepresentativeManifest[sPurl].manifestFiles ?? []).map((ref) => ref.file));
|
|
229551
229905
|
}
|
|
@@ -229574,7 +229928,7 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash,
|
|
|
229574
229928
|
});
|
|
229575
229929
|
}
|
|
229576
229930
|
if (Object.keys(workspaceToManifestFiles).length === 0 && artifact.vulnerabilities && artifact.vulnerabilities.length > 0) {
|
|
229577
|
-
purlsFailedToFindWorkspace.add(
|
|
229931
|
+
purlsFailedToFindWorkspace.add(simplePurl(artifact.type, artifact.namespace ?? null, artifact.name ?? null, artifact.version ?? null));
|
|
229578
229932
|
}
|
|
229579
229933
|
for (const [workspace, manifestFiles2] of Object.entries(workspaceToManifestFiles)) {
|
|
229580
229934
|
const workspaceData = (ecosystemToWorkspaceToAnalysisData[ecosystem] ??= {})[workspace] ??= {
|
|
@@ -244132,7 +244486,7 @@ var { root: root2 } = static_exports;
|
|
|
244132
244486
|
|
|
244133
244487
|
// ../utils/src/maven-utils.ts
|
|
244134
244488
|
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
244135
|
-
import { existsSync as existsSync22, readdirSync as
|
|
244489
|
+
import { existsSync as existsSync22, readdirSync as readdirSync5, statSync as statSync3 } from "fs";
|
|
244136
244490
|
import { join as join25 } from "path";
|
|
244137
244491
|
|
|
244138
244492
|
// ../utils/src/download-utils.ts
|
|
@@ -245504,7 +245858,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
245504
245858
|
}
|
|
245505
245859
|
|
|
245506
245860
|
// dist/version.js
|
|
245507
|
-
var version2 = "14.12.
|
|
245861
|
+
var version2 = "14.12.72";
|
|
245508
245862
|
|
|
245509
245863
|
// dist/cli-core.js
|
|
245510
245864
|
var { mapValues, omit, partition, pick } = import_lodash15.default;
|
package/package.json
CHANGED
|
@@ -109133,7 +109133,7 @@ async function setupDependenciesForAnalysis(subprojectDir, workspaceDir, directD
|
|
|
109133
109133
|
});
|
|
109134
109134
|
}
|
|
109135
109135
|
function convertToPackageMetadatas(workspaceDir, dependenciesToInstall, directDependencies, artifactIdToArtifact) {
|
|
109136
|
-
const
|
|
109136
|
+
const artifactIdToDependenciesToInstallIdx = Object.fromEntries(dependenciesToInstall.map((dep, idx) => [
|
|
109137
109137
|
Object.entries(artifactIdToArtifact).find(([_, artifact]) => artifact === dep.artifact)[0],
|
|
109138
109138
|
idx + 1
|
|
109139
109139
|
]));
|
|
@@ -109146,16 +109146,16 @@ function convertToPackageMetadatas(workspaceDir, dependenciesToInstall, directDe
|
|
|
109146
109146
|
installedPath: workspaceDir
|
|
109147
109147
|
});
|
|
109148
109148
|
for (const [parentId, parent2] of Object.entries(artifactIdToArtifact)) {
|
|
109149
|
-
if (!(parentId in
|
|
109149
|
+
if (!(parentId in artifactIdToDependenciesToInstallIdx))
|
|
109150
109150
|
continue;
|
|
109151
109151
|
for (const child of parent2.dependencies ?? []) {
|
|
109152
109152
|
const childArtifact = artifactIdToArtifact[child];
|
|
109153
|
-
if (!
|
|
109153
|
+
if (!artifactIdToDependenciesToInstallIdx[child])
|
|
109154
109154
|
continue;
|
|
109155
109155
|
if (!artifactToParents.has(childArtifact)) {
|
|
109156
109156
|
artifactToParents.set(childArtifact, []);
|
|
109157
109157
|
}
|
|
109158
|
-
artifactToParents.get(childArtifact).push(
|
|
109158
|
+
artifactToParents.get(childArtifact).push(artifactIdToDependenciesToInstallIdx[parentId]);
|
|
109159
109159
|
}
|
|
109160
109160
|
}
|
|
109161
109161
|
for (const directDependency of directDependencies) {
|
|
@@ -109262,9 +109262,9 @@ function computePackagePlacements(packageMetadatas, nodeModulesDir) {
|
|
|
109262
109262
|
addPlacementToRelativeInstallDirsForSCC(sccToPlace, /* @__PURE__ */ new Set([nodeModulesDir]), installNames);
|
|
109263
109263
|
return;
|
|
109264
109264
|
}
|
|
109265
|
-
const parentMetadatas = Array.from(curParents
|
|
109265
|
+
const parentMetadatas = Array.from(curParents, (parentIndex) => packageMetadataDag.sccs[parentIndex].packages).flat();
|
|
109266
109266
|
if (curSCC !== sccToPlace) {
|
|
109267
|
-
const anyParentDependsOnDifferentPackageToPlace = parentMetadatas.some((parentPackage) => sccToPlace.packages.some((packageToPlace) => parentPackage.dependencies
|
|
109267
|
+
const anyParentDependsOnDifferentPackageToPlace = parentMetadatas.some((parentPackage) => sccToPlace.packages.some((packageToPlace) => Object.hasOwn(parentPackage.dependencies, packageToPlace.name) && // If the package to place has the parentPackage as a parent, then the version it depends on is actually the one to place, and therefore it should not have a different installation
|
|
109268
109268
|
!packageToPlace.parents.some((p2p) => packageMetadatas[p2p] === parentPackage)));
|
|
109269
109269
|
if (anyParentDependsOnDifferentPackageToPlace) {
|
|
109270
109270
|
addPlacementToRelativeToPackages(sccToPlace, curSCC.packages, installNames);
|
|
@@ -109272,16 +109272,16 @@ function computePackagePlacements(packageMetadatas, nodeModulesDir) {
|
|
|
109272
109272
|
}
|
|
109273
109273
|
}
|
|
109274
109274
|
const installNamesClone = new Map([...installNames.entries()].map(([packageName, installNames2]) => [packageName, new Set(installNames2)]));
|
|
109275
|
-
const newInstallNames = parentMetadatas.flatMap((parentPackage) => sccToPlace.packages.flatMap((packageToPlace) => Object.entries(parentPackage.dependencies).filter(([name2, version3]) => name2 === packageToPlace.name || version3.startsWith("npm:") && version3.includes(`${packageToPlace.name}@`)).map(([name2
|
|
109276
|
-
for (const [
|
|
109277
|
-
|
|
109278
|
-
|
|
109279
|
-
|
|
109280
|
-
|
|
109275
|
+
const newInstallNames = parentMetadatas.flatMap((parentPackage) => sccToPlace.packages.flatMap((packageToPlace) => Object.entries(parentPackage.dependencies).filter(([name2, version3]) => name2 === packageToPlace.name || version3.startsWith("npm:") && version3.includes(`${packageToPlace.name}@`)).map(([name2]) => [packageToPlace, name2])));
|
|
109276
|
+
for (const [packageMetadata, installName] of newInstallNames) {
|
|
109277
|
+
const installNamesSet = installNamesClone.get(packageMetadata);
|
|
109278
|
+
if (!installNamesSet)
|
|
109279
|
+
installNamesClone.set(packageMetadata, /* @__PURE__ */ new Set([installName]));
|
|
109280
|
+
else
|
|
109281
|
+
installNamesSet.add(installName);
|
|
109281
109282
|
}
|
|
109282
|
-
for (const parent2 of curParents)
|
|
109283
|
+
for (const parent2 of curParents)
|
|
109283
109284
|
recHelper2(parent2, installNamesClone);
|
|
109284
|
-
}
|
|
109285
109285
|
};
|
|
109286
109286
|
var recHelper = recHelper2;
|
|
109287
109287
|
addPlacementsDirectIfMultipleVersions(sccToPlace);
|
|
@@ -109304,8 +109304,8 @@ function computePackagePlacements(packageMetadatas, nodeModulesDir) {
|
|
|
109304
109304
|
const parentMetadata = packageMetadatas[parent2];
|
|
109305
109305
|
const parentInstallDirs = computedPlacements.get(parentMetadata);
|
|
109306
109306
|
if (parentInstallDirs) {
|
|
109307
|
-
const dependencyInstallName =
|
|
109308
|
-
addPlacementToRelativeInstallDirs(metadataToPlace, parentInstallDirs, /* @__PURE__ */ new Map([[metadataToPlace
|
|
109307
|
+
const dependencyInstallName = Object.hasOwn(parentMetadata.dependencies, metadataToPlace.name) ? metadataToPlace.name : Object.entries(parentMetadata.dependencies).find(([, version3]) => version3.startsWith("npm:") && version3.includes(`${metadataToPlace.name}@`))?.[0];
|
|
109308
|
+
addPlacementToRelativeInstallDirs(metadataToPlace, parentInstallDirs, /* @__PURE__ */ new Map([[metadataToPlace, /* @__PURE__ */ new Set([dependencyInstallName ?? metadataToPlace.name])]]));
|
|
109309
109309
|
}
|
|
109310
109310
|
}
|
|
109311
109311
|
}
|
|
@@ -109317,24 +109317,23 @@ function computePackagePlacements(packageMetadatas, nodeModulesDir) {
|
|
|
109317
109317
|
}
|
|
109318
109318
|
}
|
|
109319
109319
|
function addPlacementToRelativeInstallDirsForSCC(sccToPlace, installDirs, installNames) {
|
|
109320
|
-
for (const metadataToPlace of sccToPlace.packages)
|
|
109320
|
+
for (const metadataToPlace of sccToPlace.packages)
|
|
109321
109321
|
addPlacementToRelativeInstallDirs(metadataToPlace, installDirs, installNames);
|
|
109322
|
-
}
|
|
109323
109322
|
}
|
|
109324
109323
|
function addPlacementToRelativeInstallDirs(metadataToPlace, installDirs, installNames) {
|
|
109325
109324
|
if (metadataToPlace.name === ROOT_PACKAGE_METADATA_NAME) {
|
|
109326
109325
|
return;
|
|
109327
109326
|
}
|
|
109328
|
-
|
|
109329
|
-
|
|
109330
|
-
|
|
109327
|
+
let computedPlacementsForMetadata = computedPlacements.get(metadataToPlace);
|
|
109328
|
+
if (!computedPlacementsForMetadata)
|
|
109329
|
+
computedPlacements.set(metadataToPlace, computedPlacementsForMetadata = /* @__PURE__ */ new Set());
|
|
109331
109330
|
for (const installDir of [...installDirs]) {
|
|
109332
|
-
for (const installName of installNames.get(metadataToPlace
|
|
109331
|
+
for (const installName of installNames.get(metadataToPlace) ?? /* @__PURE__ */ new Set([metadataToPlace.name])) {
|
|
109333
109332
|
if (installDir.endsWith(`/node_modules/${installName}`))
|
|
109334
109333
|
continue;
|
|
109335
109334
|
const computedInstallDir = installDir.endsWith(nodeModulesDir) ? resolve11(installDir, installName) : resolve11(installDir, "node_modules", installName);
|
|
109336
109335
|
if (!allInstallDirs.has(computedInstallDir)) {
|
|
109337
|
-
|
|
109336
|
+
computedPlacementsForMetadata.add(computedInstallDir);
|
|
109338
109337
|
allInstallDirs.add(computedInstallDir);
|
|
109339
109338
|
}
|
|
109340
109339
|
}
|
|
Binary file
|
|
@@ -14150,7 +14150,7 @@ var SourceResolutionManager = class {
|
|
|
14150
14150
|
for (const sourceDir of src ?? []) {
|
|
14151
14151
|
const isDirectory = (await stat(sourceDir)).isDirectory();
|
|
14152
14152
|
const baseDir = isDirectory ? sourceDir : "";
|
|
14153
|
-
const files = isDirectory ? await glob(this.include
|
|
14153
|
+
const files = isDirectory ? await glob(this.include, { cwd: sourceDir, ignore: this.exclude, nodir: true }) : [sourceDir];
|
|
14154
14154
|
for (const file of files) {
|
|
14155
14155
|
promiseFns.push(async () => {
|
|
14156
14156
|
const resolver = this.resolverCb(file);
|
|
@@ -14174,7 +14174,7 @@ var SourceResolutionManager = class {
|
|
|
14174
14174
|
for (const sourceDir of src ?? []) {
|
|
14175
14175
|
const isDirectory = (await stat(sourceDir)).isDirectory();
|
|
14176
14176
|
const baseDir = isDirectory ? sourceDir : ".";
|
|
14177
|
-
const files = isDirectory ? await glob(this.include
|
|
14177
|
+
const files = isDirectory ? await glob(this.include, { cwd: sourceDir, ignore: this.exclude, nodir: true }) : [sourceDir];
|
|
14178
14178
|
for (const file of files) {
|
|
14179
14179
|
promiseFns.push(async () => {
|
|
14180
14180
|
const resolver = this.resolverCb(file);
|
|
@@ -14537,7 +14537,7 @@ async function createJvmResolverCallback(resources) {
|
|
|
14537
14537
|
async function runJvmDirectDependencyAnalysis(options, resources) {
|
|
14538
14538
|
const resolverCb = await createJvmResolverCallback(resources);
|
|
14539
14539
|
const runner = new ClassGraphRunner({
|
|
14540
|
-
srcResolutionManager: new SourceResolutionManager(resolverCb, new JvmResolutionContextProvider()),
|
|
14540
|
+
srcResolutionManager: new SourceResolutionManager(resolverCb, new JvmResolutionContextProvider(), "**", void 0),
|
|
14541
14541
|
binResolutionManager: resources.alucard ? new AlucardResolutionManager(resources.alucard, options.timeoutInSeconds) : void 0,
|
|
14542
14542
|
...options
|
|
14543
14543
|
});
|
|
@@ -14546,7 +14546,7 @@ async function runJvmDirectDependencyAnalysis(options, resources) {
|
|
|
14546
14546
|
async function runJvmReachabilityAnalysis(options, resources) {
|
|
14547
14547
|
const resolverCb = await createJvmResolverCallback(resources);
|
|
14548
14548
|
const runner = new ClassGraphRunner({
|
|
14549
|
-
srcResolutionManager: new SourceResolutionManager(resolverCb, new JvmResolutionContextProvider()),
|
|
14549
|
+
srcResolutionManager: new SourceResolutionManager(resolverCb, new JvmResolutionContextProvider(), "**", void 0),
|
|
14550
14550
|
binResolutionManager: resources.alucard ? new AlucardResolutionManager(resources.alucard, options.timeoutInSeconds) : void 0,
|
|
14551
14551
|
apps: options.apps,
|
|
14552
14552
|
deps: options.deps,
|
|
@@ -24253,9 +24253,8 @@ async function createDotnetResolverCallback(resources) {
|
|
|
24253
24253
|
}
|
|
24254
24254
|
async function runDotnetDirectDependencyAnalysis(options, resources) {
|
|
24255
24255
|
const resolverCb = await createDotnetResolverCallback(resources);
|
|
24256
|
-
const srcExcludeDirs = ["bin", "obj"];
|
|
24257
24256
|
const runner = new ClassGraphRunner({
|
|
24258
|
-
srcResolutionManager: new SourceResolutionManager(resolverCb, new DotnetResolutionContextProvider(),
|
|
24257
|
+
srcResolutionManager: new SourceResolutionManager(resolverCb, new DotnetResolutionContextProvider(), "**", "{**/,}{bin,obj}/**"),
|
|
24259
24258
|
binResolutionManager: resources.cocoa ? new CocoaResolutionManager(resources.cocoa, options.timeoutInSeconds) : void 0,
|
|
24260
24259
|
...options
|
|
24261
24260
|
});
|
|
@@ -24263,9 +24262,8 @@ async function runDotnetDirectDependencyAnalysis(options, resources) {
|
|
|
24263
24262
|
}
|
|
24264
24263
|
async function runDotnetReachabilityAnalysis(options, resources) {
|
|
24265
24264
|
const resolverCb = await createDotnetResolverCallback(resources);
|
|
24266
|
-
const srcExcludeDirs = ["{**/,}bin/**", "{**/,}obj/**"];
|
|
24267
24265
|
const runner = new ClassGraphRunner({
|
|
24268
|
-
srcResolutionManager: new SourceResolutionManager(resolverCb, new DotnetResolutionContextProvider(),
|
|
24266
|
+
srcResolutionManager: new SourceResolutionManager(resolverCb, new DotnetResolutionContextProvider(), "**", "{**/,}{bin,obj}/**"),
|
|
24269
24267
|
binResolutionManager: resources.cocoa ? new CocoaResolutionManager(resources.cocoa, options.timeoutInSeconds) : void 0,
|
|
24270
24268
|
apps: options.apps,
|
|
24271
24269
|
deps: options.deps,
|
|
@@ -26252,16 +26250,15 @@ async function createRustResolverCallback(resources) {
|
|
|
26252
26250
|
async function runRustDirectDependencyAnalysis(options, resources = {}) {
|
|
26253
26251
|
const resolverCb = await createRustResolverCallback(resources);
|
|
26254
26252
|
const runner = new ClassGraphRunner({
|
|
26255
|
-
srcResolutionManager: new SourceResolutionManager(resolverCb, new RustResolutionContextProvider()),
|
|
26253
|
+
srcResolutionManager: new SourceResolutionManager(resolverCb, new RustResolutionContextProvider(), "**", "{**/,}bin/**"),
|
|
26256
26254
|
...options
|
|
26257
26255
|
});
|
|
26258
26256
|
return await runner.runDirectDependencyAnalysis();
|
|
26259
26257
|
}
|
|
26260
26258
|
async function runRustReachabilityAnalysis(options, resources = {}) {
|
|
26261
26259
|
const resolverCb = await createRustResolverCallback(resources);
|
|
26262
|
-
const srcExcludeDirs = ["bin"];
|
|
26263
26260
|
const runner = new ClassGraphRunner({
|
|
26264
|
-
srcResolutionManager: new SourceResolutionManager(resolverCb, new RustResolutionContextProvider(),
|
|
26261
|
+
srcResolutionManager: new SourceResolutionManager(resolverCb, new RustResolutionContextProvider(), "**", "{**/,}bin/**"),
|
|
26265
26262
|
apps: options.apps,
|
|
26266
26263
|
deps: options.deps,
|
|
26267
26264
|
timeoutInSeconds: options.timeoutInSeconds
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|