@coana-tech/cli 14.12.69 → 14.12.71

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 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 q4 = 255 * v * (1 - s6 * f6);
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 [q4, v, p3];
20475
+ return [q5, v, p3];
20476
20476
  case 2:
20477
20477
  return [p3, v, t4];
20478
20478
  case 3:
20479
- return [p3, q4, v];
20479
+ return [p3, q5, v];
20480
20480
  case 4:
20481
20481
  return [t4, p3, v];
20482
20482
  case 5:
20483
- return [v, p3, q4];
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 q4 = 255 * v * (1 - s6 * f6);
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 [q4, v, p3];
33641
+ return [q5, v, p3];
33642
33642
  case 2:
33643
33643
  return [p3, v, t4];
33644
33644
  case 3:
33645
- return [p3, q4, v];
33645
+ return [p3, q5, v];
33646
33646
  case 4:
33647
33647
  return [t4, p3, v];
33648
33648
  case 5:
33649
- return [v, p3, q4];
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 q4 = query[i7];
41851
+ const q5 = query[i7];
41852
41852
  while (j < nd) {
41853
- if (equiv$1(domain[j++], q4)) {
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, q4, context2) {
44402
- const matcher = (0, query_1.buildRoot)(q4);
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 q4 = parent2.queue;
102359
+ let q5 = parent2.queue;
102360
102360
  while (p3.type !== "brace" && p3.type !== "root" && p3.parent) {
102361
102361
  p3 = p3.parent;
102362
- q4 = p3.queue;
102362
+ q5 = p3.queue;
102363
102363
  }
102364
102364
  if (node.invalid || node.dollar) {
102365
- q4.push(append4(q4.pop(), stringify3(node, options)));
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
- q4.push(append4(q4.pop(), ["{}"]));
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
- q4.push(append4(q4.pop(), range2));
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
- q4.push(append4(q4.pop(), queue, enclose));
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, lang5) {
123045
- const attrs = Object.assign({}, lang5 && { lang: lang5 });
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 q4 = parent2.queue;
152021
+ let q5 = parent2.queue;
151770
152022
  while (p3.type !== "brace" && p3.type !== "root" && p3.parent) {
151771
152023
  p3 = p3.parent;
151772
- q4 = p3.queue;
152024
+ q5 = p3.queue;
151773
152025
  }
151774
152026
  if (node.invalid || node.dollar) {
151775
- q4.push(append4(q4.pop(), stringify3(node, options)));
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
- q4.push(append4(q4.pop(), ["{}"]));
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
- q4.push(append4(q4.pop(), range2));
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
- q4.push(append4(q4.pop(), queue, enclose));
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, q4 = [];
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
- q4.push([n2, v, a4, b]) > 1 || resume(n2, v);
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(q4[0][3], e);
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(q4[0][2], r3);
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), q4.shift(), q4.length) resume(q4[0][0], q4[0][1]);
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 import_good_enough_parser3 = __toESM(require_cjs(), 1);
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
- var booleanQuery = import_good_enough_parser3.query.alt(
225790
- import_good_enough_parser3.query.sym(/^true|false$/, (ctx, { value: value2, offset }) => {
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 numberQuery = import_good_enough_parser3.query.num((ctx, { value: value2, offset }) => {
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 stringQuery = import_good_enough_parser3.query.str((ctx, { value: value2, offset }) => {
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 variableQuery = import_good_enough_parser3.query.sym((ctx, { value: value2, offset }) => {
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 interpolatedStringQuery = import_good_enough_parser3.query.tree({
225957
+ var interpolatedStringQuery2 = import_good_enough_parser4.query.tree({
225812
225958
  type: "string-tree",
225813
- search: import_good_enough_parser3.query.alt(stringQuery, variableQuery),
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 simpleExpressionQuery = import_good_enough_parser3.query.alt(
225822
- booleanQuery,
225823
- numberQuery,
225824
- stringQuery,
225825
- variableQuery,
225826
- interpolatedStringQuery
225967
+ var simpleExpressionQuery2 = import_good_enough_parser4.query.alt(
225968
+ booleanQuery2,
225969
+ numberQuery2,
225970
+ stringQuery2,
225971
+ variableQuery2,
225972
+ interpolatedStringQuery2
225827
225973
  );
225828
- var concatExpressionQuery = simpleExpressionQuery.many(import_good_enough_parser3.query.op("+").join(simpleExpressionQuery));
225829
- var expressionQuery = import_good_enough_parser3.query.alt(simpleExpressionQuery, concatExpressionQuery);
225830
- var variableAssignmentQuery = import_good_enough_parser3.query.sym((ctx, { value: value2 }) => {
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(expressionQuery).handler((ctx) => {
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 optionQuery = import_good_enough_parser3.query.opt(import_good_enough_parser3.query.op(":")).sym((ctx, { value: value2 }) => {
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(import_good_enough_parser3.query.op(":"), import_good_enough_parser3.query.op("=>")).join(expressionQuery).handler((ctx) => {
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 = import_good_enough_parser3.query.alt(
226002
+ var gemArgumentQuery = import_good_enough_parser4.query.alt(
225857
226003
  // Options (key: value syntax): gem 'name', github: 'rails/rails', git: '...', etc.
225858
- optionQuery,
226004
+ optionQuery2,
225859
226005
  // Version constraint (positional): gem 'name', '~> 1.0' or MY_VERSION or "~> " + VERSION
225860
- expressionQuery.handler((ctx) => {
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 = import_good_enough_parser3.query.sym("gem").join(expressionQuery).handler((ctx) => {
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
- import_good_enough_parser3.query.many(
225880
- import_good_enough_parser3.query.op(",", (ctx, { offset }) => {
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 = import_good_enough_parser3.query.sym("eval_gemfile").join(expressionQuery).handler((ctx) => {
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 = import_good_enough_parser3.lang.createLang(lang3);
226050
+ const parser2 = import_good_enough_parser4.lang.createLang(lang3);
225905
226051
  const cursor = parser2.parse(sourceText);
225906
- const otherCtx = parser2.query(cursor, treeQuery3, {
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 treeQuery3 = import_good_enough_parser3.query.tree({
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: import_good_enough_parser3.query.alt(variableAssignmentQuery, gemQuery, evalGemfileQuery)
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 = import_good_enough_parser3.lang.createLang(lang3);
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, treeQuery3, ctx);
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
- if (!gemfileLock.gems.has(artifact.name)) {
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(resolve33(this.rootDir, gemfileName), resolve33(this.rootDir, mf.file));
226263
- if (gemfileLock.directDependencies.has(artifact.name)) {
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(resolve33(this.rootDir, file));
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
  */
@@ -229593,6 +229944,7 @@ async function fetchArtifactsFromSocket(rootWorkingDirectory, manifestsTarHash,
229593
229944
  for (const vuln of artifact.vulnerabilities) {
229594
229945
  const vulnerability = {
229595
229946
  url: vuln.ghsaId,
229947
+ severity: vuln.severity,
229596
229948
  purlType: artifact.type,
229597
229949
  range: vuln.range,
229598
229950
  name: artifact.name ?? "",
@@ -230538,6 +230890,9 @@ function toSocketReachabilitySchema(vulnerability) {
230538
230890
  if (codeAwareScanResult.type === "noAnalysisCheck") {
230539
230891
  return { type: "undeterminable_reachability" };
230540
230892
  }
230893
+ if (codeAwareScanResult.type === "unknown") {
230894
+ return { type: "unknown", reason: codeAwareScanResult.message ?? "Unknown reason" };
230895
+ }
230541
230896
  if (codeAwareScanResult.type === "analysisError") {
230542
230897
  return { type: "error", error: codeAwareScanResult.message };
230543
230898
  }
@@ -244128,7 +244483,7 @@ var { root: root2 } = static_exports;
244128
244483
 
244129
244484
  // ../utils/src/maven-utils.ts
244130
244485
  var import_lodash14 = __toESM(require_lodash(), 1);
244131
- import { existsSync as existsSync22, readdirSync as readdirSync4, statSync as statSync3 } from "fs";
244486
+ import { existsSync as existsSync22, readdirSync as readdirSync5, statSync as statSync3 } from "fs";
244132
244487
  import { join as join25 } from "path";
244133
244488
 
244134
244489
  // ../utils/src/download-utils.ts
@@ -245500,10 +245855,20 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
245500
245855
  }
245501
245856
 
245502
245857
  // dist/version.js
245503
- var version2 = "14.12.69";
245858
+ var version2 = "14.12.71";
245504
245859
 
245505
245860
  // dist/cli-core.js
245506
245861
  var { mapValues, omit, partition, pick } = import_lodash15.default;
245862
+ var SEVERITY_ORDER = {
245863
+ INFO: 0,
245864
+ LOW: 1,
245865
+ MODERATE: 2,
245866
+ HIGH: 3,
245867
+ CRITICAL: 4
245868
+ };
245869
+ function shouldAnalyzeBasedOnSeverity(vulnSeverity, minSeverity) {
245870
+ return SEVERITY_ORDER[vulnSeverity] >= SEVERITY_ORDER[minSeverity];
245871
+ }
245507
245872
  var CliCore = class {
245508
245873
  options;
245509
245874
  spinner;
@@ -245957,13 +246322,28 @@ Subproject: ${subproject}`);
245957
246322
  const vulnerabilities = workspaceToVulnerabilities[workspacePath] ?? [];
245958
246323
  try {
245959
246324
  const dataForAnalysis = workspacePathToDataForAnalysis[workspacePath];
245960
- const augmentedVulnerabilities = reachabilitySupported && !this.shouldExcludeAnalyzingWorkspace(subprojectPath, workspacePath) ? await this.runReachabilityAnalysis(otherModulesCommunicator, subprojectPath, workspacePath, dataForAnalysis, ecosystem, vulnerabilities) : vulnerabilities.map((v) => ({
246325
+ const [vulnerabilitiesToAnalyze, vulnerabilitiesBelowThreshold] = this.options.minSeverity ? partition(vulnerabilities, (v) => !v.severity || shouldAnalyzeBasedOnSeverity(v.severity, this.options.minSeverity)) : [vulnerabilities, []];
246326
+ const vulnerabilitiesBelowThresholdWithResults = vulnerabilitiesBelowThreshold.map((v) => ({
246327
+ ...v,
246328
+ results: {
246329
+ type: "unknown",
246330
+ message: `Reachability analysis not run since the severity of the vulnerability (${v.severity}) is lower than the min severity threshold: ${this.options.minSeverity}`
246331
+ }
246332
+ }));
246333
+ if (vulnerabilitiesBelowThreshold.length > 0) {
246334
+ logger.info(`Reachability analysis not run for ${vulnerabilitiesBelowThreshold.length} vulnerabilities with severity level ${this.options.minSeverity} in workspace ${workspacePath}`);
246335
+ }
246336
+ const augmentedVulnerabilitiesToAnalyze = reachabilitySupported && !this.shouldExcludeAnalyzingWorkspace(subprojectPath, workspacePath) ? await this.runReachabilityAnalysis(otherModulesCommunicator, subprojectPath, workspacePath, dataForAnalysis, ecosystem, vulnerabilitiesToAnalyze) : vulnerabilitiesToAnalyze.map((v) => ({
245961
246337
  ...v,
245962
246338
  results: {
245963
246339
  type: "otherError",
245964
246340
  message: `Reachability analysis for languages using ${ecosystem} not supported yet`
245965
246341
  }
245966
246342
  }));
246343
+ const augmentedVulnerabilities = [
246344
+ ...augmentedVulnerabilitiesToAnalyze,
246345
+ ...vulnerabilitiesBelowThresholdWithResults
246346
+ ];
245967
246347
  return [workspacePath, augmentedVulnerabilities];
245968
246348
  } catch (e) {
245969
246349
  logger.error(`Reachability analysis failed for workspace ${workspacePath} in subproject ${subprojectPath}: ${e.message}`);
@@ -246214,9 +246594,10 @@ async function getGitDataToMetadataIfAvailable(rootWorkingDirectory) {
246214
246594
  // dist/index.js
246215
246595
  var program2 = new Command();
246216
246596
  var run2 = new Command();
246217
- run2.name("run").argument("<path>", "File system path to folder containing the project").option("-o, --output-dir <path>", "Write json report to <path>/coana-report.json").option("-d, --debug", "Enable debug logging", false).option("-s, --silent", "Silence all debug/warning output", false).option("--silent-spinner", "Silence spinner", "CI" in process.env || !process.stdin.isTTY).option("-p, --print-report", "Print the report to the console", false).option("--offline-database <path>", "Path to a coana-offline-db.json file for running the CLI without internet connectivity", void 0).option("-t, --timeout <timeout>", "Set API <timeout> in milliseconds to Coana backend.", "300000").option("-a, --analysis-timeout <timeout>", "Set <timeout> in seconds for each reachability analysis run").option("--memory-limit <memoryInMB>", "Set memory limit for analysis to <memoryInMB> megabytes of memory.", "8192").option("-c, --concurrency <concurrency>", "Set the maximum number of concurrent reachability analysis runs. It's recommended to choose a concurrency level that ensures that each analysis run has at least the --memory-limit amount of memory available.", "1").option("--api-key <key>", "Set the Coana dashboard API key. By setting you also enable the dashboard integration.").addOption(new Option("--write-report-to-file", "Write the report dashboard-compatible report to dashboard-report.json. This report may help the Coana team debug issues with the report insertion mechanism.").default(false).hideHelp()).option("--project-name <repoName>", "Set the name of the repository. Used for dashboard integration.").option("--repo-url <repoUrl>", "Set the URL of the repository. Used for dashboard integration.").option("--include-dirs <relativeDirs...>", "globs for directories to include from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, projects that are not included may still be scanned if they are referenced from included projects.").option("--exclude-dirs <relativeDirs...>", "globs for directories to exclude from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, excluded projects may still be scanned if they are referenced from non-excluded projects.").option("--disable-analysis-splitting", "Limits Coana to at most 1 reachability analysis run per workspace").option("--print-analysis-log-file", "Store log output from the JavaScript/TypeScript reachability analysis in the file js-analysis.log file in the root of each workspace", false).option("--entry-points <entryPoints...>", "List of files to analyze for root workspace. The reachability analysis automatically analyzes all files used by the entry points. If not provided, all JavaScript and TypeScript files are considered entry points. For non-root workspaces, all JavaScript and TypeScript files are analyzed as well.").option("--include-projects-with-no-reachability-support", "Also runs Coana on projects where we support traditional SCA, but does not yet support reachability analysis.", false).option("--ecosystems <ecosystems...>", "List of ecosystems to analyze (space-separated). Currently NPM, PIP, MAVEN, NUGET and GO are supported. Default is all supported ecosystems.").addOption(new Option("--purl-types <purlTypes...>", "List of PURL types to analyze (space-separated). Currently npm, pypi, maven, nuget, golang and cargo are supported. Default is all supported purl types.").hideHelp()).option("--changed-files <files...>", "List of files that have changed. If provided, Coana only analyzes workspaces and modules that contain changed files.").option("--disable-report-submission", "Disable the submission of the report to the Coana dashboard. Used by the pipeline blocking feature.", false).option("--disable-analytics-sharing", "Disable analytics sharing.", false).option("--provider-project <path>", "File system path to folder containing the provider project (Only supported for Maven, Gradle, and SBT)").option("--provider-workspaces <dirs...>", "List of workspaces that build the provided runtime environment (Only supported for Maven, Gradle, and SBT)", (paths) => paths.split(" ")).option("--lightweight-reachability", "Runs Coana in lightweight mode. This increases analysis speed but also raises the risk of Coana misclassifying the reachability of certain complex vulnerabilities. Recommended only for use with Coana Guardrail mode.", false).addOption(new Option("--run-without-docker", "Run package managers and reachability analyzers without using docker").default(process.env.RUN_WITHOUT_DOCKER === "true").hideHelp()).addOption(new Option("--run-env <env>", "Specifies the environment in which the CLI is run. So far only MANAGED_SCAN and UNKNOWN are supported.").default("UNKNOWN").choices(["UNKNOWN", "MANAGED_SCAN"]).hideHelp()).addOption(new Option("--guardrail-mode", "Run Coana in guardrail mode. This mode is used to prevent new reachable vulnerabilities from being introduced into the codebase. Usually run as a CI check when pushing new commits to a pull request.")).option("--ignore-failing-workspaces", "Continue processing when a workspace fails instead of exiting. Failed workspaces will be logged at termination.", false).addOption(new Option("--socket-mode <output-file>", "Run Coana in socket mode and write report to <output-file>").hideHelp()).addOption(new Option("--manifests-tar-hash <hash>", "Hash of the tarball containing all manifest files already uploaded to Socket. If provided, Socket will be used for computing dependency trees.").hideHelp()).option("--skip-cache-usage", "Do not attempt to use cached analysis configuration from previous runs", false).version(version2).configureHelp({ sortOptions: true }).action(async (path2, options) => {
246597
+ run2.name("run").argument("<path>", "File system path to folder containing the project").option("-o, --output-dir <path>", "Write json report to <path>/coana-report.json").option("-d, --debug", "Enable debug logging", false).option("-s, --silent", "Silence all debug/warning output", false).option("--silent-spinner", "Silence spinner", "CI" in process.env || !process.stdin.isTTY).option("-p, --print-report", "Print the report to the console", false).option("--offline-database <path>", "Path to a coana-offline-db.json file for running the CLI without internet connectivity", void 0).option("-t, --timeout <timeout>", "Set API <timeout> in milliseconds to Coana backend.", "300000").option("-a, --analysis-timeout <timeout>", "Set <timeout> in seconds for each reachability analysis run").option("--memory-limit <memoryInMB>", "Set memory limit for analysis to <memoryInMB> megabytes of memory.", "8192").option("-c, --concurrency <concurrency>", "Set the maximum number of concurrent reachability analysis runs. It's recommended to choose a concurrency level that ensures that each analysis run has at least the --memory-limit amount of memory available.", "1").option("--api-key <key>", "Set the Coana dashboard API key. By setting you also enable the dashboard integration.").addOption(new Option("--write-report-to-file", "Write the report dashboard-compatible report to dashboard-report.json. This report may help the Coana team debug issues with the report insertion mechanism.").default(false).hideHelp()).option("--project-name <repoName>", "Set the name of the repository. Used for dashboard integration.").option("--repo-url <repoUrl>", "Set the URL of the repository. Used for dashboard integration.").option("--include-dirs <relativeDirs...>", "globs for directories to include from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, projects that are not included may still be scanned if they are referenced from included projects.").option("--exclude-dirs <relativeDirs...>", "globs for directories to exclude from the detection of subprojects (space-separated)(use relative paths from the project root). Notice, excluded projects may still be scanned if they are referenced from non-excluded projects.").option("--disable-analysis-splitting", "Limits Coana to at most 1 reachability analysis run per workspace").option("--print-analysis-log-file", "Store log output from the JavaScript/TypeScript reachability analysis in the file js-analysis.log file in the root of each workspace", false).option("--entry-points <entryPoints...>", "List of files to analyze for root workspace. The reachability analysis automatically analyzes all files used by the entry points. If not provided, all JavaScript and TypeScript files are considered entry points. For non-root workspaces, all JavaScript and TypeScript files are analyzed as well.").option("--include-projects-with-no-reachability-support", "Also runs Coana on projects where we support traditional SCA, but does not yet support reachability analysis.", false).option("--ecosystems <ecosystems...>", "List of ecosystems to analyze (space-separated). Currently NPM, PIP, MAVEN, NUGET and GO are supported. Default is all supported ecosystems.").addOption(new Option("--purl-types <purlTypes...>", "List of PURL types to analyze (space-separated). Currently npm, pypi, maven, nuget, golang and cargo are supported. Default is all supported purl types.").hideHelp()).option("--changed-files <files...>", "List of files that have changed. If provided, Coana only analyzes workspaces and modules that contain changed files.").option("--disable-report-submission", "Disable the submission of the report to the Coana dashboard. Used by the pipeline blocking feature.", false).option("--disable-analytics-sharing", "Disable analytics sharing.", false).option("--provider-project <path>", "File system path to folder containing the provider project (Only supported for Maven, Gradle, and SBT)").option("--provider-workspaces <dirs...>", "List of workspaces that build the provided runtime environment (Only supported for Maven, Gradle, and SBT)", (paths) => paths.split(" ")).option("--lightweight-reachability", "Runs Coana in lightweight mode. This increases analysis speed but also raises the risk of Coana misclassifying the reachability of certain complex vulnerabilities. Recommended only for use with Coana Guardrail mode.", false).addOption(new Option("--run-without-docker", "Run package managers and reachability analyzers without using docker").default(process.env.RUN_WITHOUT_DOCKER === "true").hideHelp()).addOption(new Option("--run-env <env>", "Specifies the environment in which the CLI is run. So far only MANAGED_SCAN and UNKNOWN are supported.").default("UNKNOWN").choices(["UNKNOWN", "MANAGED_SCAN"]).hideHelp()).addOption(new Option("--guardrail-mode", "Run Coana in guardrail mode. This mode is used to prevent new reachable vulnerabilities from being introduced into the codebase. Usually run as a CI check when pushing new commits to a pull request.")).option("--ignore-failing-workspaces", "Continue processing when a workspace fails instead of exiting. Failed workspaces will be logged at termination.", false).addOption(new Option("--socket-mode <output-file>", "Run Coana in socket mode and write report to <output-file>").hideHelp()).addOption(new Option("--manifests-tar-hash <hash>", "Hash of the tarball containing all manifest files already uploaded to Socket. If provided, Socket will be used for computing dependency trees.").hideHelp()).option("--skip-cache-usage", "Do not attempt to use cached analysis configuration from previous runs", false).addOption(new Option("--min-severity <severity>", "Set the minimum severity of vulnerabilities to analyze. Supported severities are info, low, moderate, high and critical.").choices(["info", "INFO", "low", "LOW", "moderate", "MODERATE", "high", "HIGH", "critical", "CRITICAL"])).version(version2).configureHelp({ sortOptions: true }).action(async (path2, options) => {
246218
246598
  process.env.DOCKER_IMAGE_TAG ??= version2;
246219
246599
  options.ecosystems = options.ecosystems?.map((e) => e.toUpperCase());
246600
+ options.minSeverity = options.minSeverity?.toUpperCase();
246220
246601
  options.purlTypes = options.purlTypes?.map((e) => e.toLowerCase());
246221
246602
  await new CliCore(path2, options).main();
246222
246603
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coana-tech/cli",
3
- "version": "14.12.69",
3
+ "version": "14.12.71",
4
4
  "description": "Coana CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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 ?? "**", { cwd: sourceDir, ignore: this.exclude, nodir: true }) : [sourceDir];
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 ?? "**", { cwd: sourceDir, ignore: this.exclude, nodir: true }) : [sourceDir];
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(), srcExcludeDirs),
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(), srcExcludeDirs),
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(), srcExcludeDirs),
26261
+ srcResolutionManager: new SourceResolutionManager(resolverCb, new RustResolutionContextProvider(), "**", "{**/,}bin/**"),
26265
26262
  apps: options.apps,
26266
26263
  deps: options.deps,
26267
26264
  timeoutInSeconds: options.timeoutInSeconds