@coana-tech/cli 14.12.137 → 14.12.138

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
@@ -251734,7 +251734,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
251734
251734
  }
251735
251735
 
251736
251736
  // dist/version.js
251737
- var version3 = "14.12.137";
251737
+ var version3 = "14.12.138";
251738
251738
 
251739
251739
  // dist/cli-core.js
251740
251740
  var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coana-tech/cli",
3
- "version": "14.12.137",
3
+ "version": "14.12.138",
4
4
  "description": "Coana CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4938,8 +4938,8 @@ var Module2 = (() => {
4938
4938
  var moduleRtn;
4939
4939
  var Module = moduleArg;
4940
4940
  var readyPromiseResolve, readyPromiseReject;
4941
- var readyPromise = new Promise((resolve15, reject) => {
4942
- readyPromiseResolve = resolve15;
4941
+ var readyPromise = new Promise((resolve17, reject) => {
4942
+ readyPromiseResolve = resolve17;
4943
4943
  readyPromiseReject = reject;
4944
4944
  });
4945
4945
  var ENVIRONMENT_IS_WEB = typeof window == "object";
@@ -5022,13 +5022,13 @@ var Module2 = (() => {
5022
5022
  }
5023
5023
  readAsync = /* @__PURE__ */ __name(async (url2) => {
5024
5024
  if (isFileURI(url2)) {
5025
- return new Promise((resolve15, reject) => {
5025
+ return new Promise((resolve17, reject) => {
5026
5026
  var xhr = new XMLHttpRequest();
5027
5027
  xhr.open("GET", url2, true);
5028
5028
  xhr.responseType = "arraybuffer";
5029
5029
  xhr.onload = () => {
5030
5030
  if (xhr.status == 200 || xhr.status == 0 && xhr.response) {
5031
- resolve15(xhr.response);
5031
+ resolve17(xhr.response);
5032
5032
  return;
5033
5033
  }
5034
5034
  reject(xhr.status);
@@ -5252,10 +5252,10 @@ var Module2 = (() => {
5252
5252
  __name(receiveInstantiationResult, "receiveInstantiationResult");
5253
5253
  var info2 = getWasmImports();
5254
5254
  if (Module["instantiateWasm"]) {
5255
- return new Promise((resolve15, reject) => {
5255
+ return new Promise((resolve17, reject) => {
5256
5256
  Module["instantiateWasm"](info2, (mod, inst) => {
5257
5257
  receiveInstance(mod, inst);
5258
- resolve15(mod.exports);
5258
+ resolve17(mod.exports);
5259
5259
  });
5260
5260
  });
5261
5261
  }
@@ -7185,7 +7185,7 @@ import assert2 from "node:assert";
7185
7185
  import { execFile, spawn } from "node:child_process";
7186
7186
  import { createInterface } from "node:readline";
7187
7187
  async function execNeverFail(cmd, dir, options) {
7188
- return new Promise((resolve15) => {
7188
+ return new Promise((resolve17) => {
7189
7189
  let args2;
7190
7190
  if (typeof cmd !== "string")
7191
7191
  [cmd, ...args2] = cmd;
@@ -7195,7 +7195,7 @@ async function execNeverFail(cmd, dir, options) {
7195
7195
  maxBuffer: 1024 * 1024 * 1024,
7196
7196
  shell: args2 === void 0
7197
7197
  }, (error, stdout, stderr) => {
7198
- resolve15({ error, stdout, stderr });
7198
+ resolve17({ error, stdout, stderr });
7199
7199
  });
7200
7200
  options?.signal?.addEventListener("abort", () => {
7201
7201
  childProcess.kill();
@@ -7685,7 +7685,7 @@ var ClassGraph = class {
7685
7685
  // dist/class-graph/analysis-runner/graph-utils.js
7686
7686
  function findReachableNodes(graph, sources) {
7687
7687
  if (sources.length === 0)
7688
- return /* @__PURE__ */ new Set();
7688
+ return [];
7689
7689
  const edges = graph.getEdges();
7690
7690
  const reachable = /* @__PURE__ */ new Set();
7691
7691
  const visited = /* @__PURE__ */ new Set();
@@ -7706,7 +7706,7 @@ function findReachableNodes(graph, sources) {
7706
7706
  }
7707
7707
  }
7708
7708
  }
7709
- return reachable;
7709
+ return Array.from(reachable);
7710
7710
  }
7711
7711
  var PriorityQueue = class {
7712
7712
  costFn;
@@ -7959,6 +7959,7 @@ function reconstructPath(routingTable, sourceIdx, destinationIdx, sourceNodes) {
7959
7959
  }
7960
7960
 
7961
7961
  // dist/class-graph/analysis-runner/class-graph-runner.js
7962
+ import { resolve as resolve2 } from "node:path";
7962
7963
  var TIMEOUT_ABORT_CONTROLLER = new AbortController();
7963
7964
  var ABORT_CONTROLLER = new AbortController();
7964
7965
  TIMEOUT_ABORT_CONTROLLER.signal.addEventListener("abort", () => ABORT_CONTROLLER.abort(), { once: true });
@@ -7980,6 +7981,7 @@ var ClassGraphRunner = class {
7980
7981
  if (timeoutId !== void 0) {
7981
7982
  clearTimeout(timeoutId);
7982
7983
  }
7984
+ ABORT_CONTROLLER.abort();
7983
7985
  }
7984
7986
  }
7985
7987
  async actuallyRunDirectDependencyAnalysis() {
@@ -8002,11 +8004,7 @@ var ClassGraphRunner = class {
8002
8004
  this.options.internalResolutionManager?.resolveEdges(this.graph, entryPointIndices, entryPointIndices.filter((idx) => !this.options.isExternalNode?.(allNodes[idx])), visited, "DIRECT_DEPENDENCIES"),
8003
8005
  this.options.externalResolutionManager?.resolveEdges(this.graph, entryPointIndices, entryPointIndices.filter((idx) => this.options.isExternalNode?.(allNodes[idx])), visited, "DIRECT_DEPENDENCIES")
8004
8006
  ]);
8005
- const reachablePackageIds = /* @__PURE__ */ new Set();
8006
- for (const idx of findReachableNodes(this.graph, entryPointIndices)) {
8007
- reachablePackageIds.add(allNodes[idx].packageId);
8008
- }
8009
- return Array.from(reachablePackageIds);
8007
+ return n3(findReachableNodes(this.graph, entryPointIndices).map((i4) => allNodes[i4].packageId));
8010
8008
  }
8011
8009
  async runAnalysis(vulnerableClasses) {
8012
8010
  let timeoutId;
@@ -8034,6 +8032,7 @@ var ClassGraphRunner = class {
8034
8032
  }
8035
8033
  }
8036
8034
  async actuallyRunAnalysis(vulnerableClasses) {
8035
+ const analysisStartTime = performance.now();
8037
8036
  const vulnerableClassesSet = new Set(vulnerableClasses);
8038
8037
  await Promise.all([
8039
8038
  this.options.internalResolutionManager?.resolveDeclarations(this.graph),
@@ -8073,6 +8072,8 @@ var ClassGraphRunner = class {
8073
8072
  }
8074
8073
  }
8075
8074
  }
8075
+ const analysisTime = performance.now() - analysisStartTime;
8076
+ const patternMatchingStartTime = performance.now();
8076
8077
  const vulnerableClassToIndices = /* @__PURE__ */ new Map();
8077
8078
  allNodes.forEach((node, idx) => {
8078
8079
  if (node.appOrDep === "app" || !vulnerableClassesSet.has(node.displayName))
@@ -8082,19 +8083,42 @@ var ClassGraphRunner = class {
8082
8083
  }
8083
8084
  vulnerableClassToIndices.get(node.displayName).push(idx);
8084
8085
  });
8086
+ const patternMatchingTime = performance.now() - patternMatchingStartTime;
8087
+ const vulnerablePathDetectionStartTime = performance.now();
8085
8088
  const vulnerablePaths = this.computeVulnerablePaths(this.graph, entryPointIndices, allNodes, vulnerableClassToIndices);
8086
- const reachablePackageIds = /* @__PURE__ */ new Set();
8087
- for (const idx of findReachableNodes(this.graph, entryPointIndices)) {
8088
- reachablePackageIds.add(allNodes[idx].packageId);
8089
- }
8089
+ const vulnerablePathDetectionTime = performance.now() - vulnerablePathDetectionStartTime;
8090
+ const appNodes = allNodes.filter((node) => node.appOrDep === "app");
8091
+ const depNodes = allNodes.filter((node) => node.appOrDep === "dep");
8092
+ const reachableIndices = findReachableNodes(this.graph, entryPointIndices);
8090
8093
  const analysisDiagnostics = {
8091
8094
  timeout: TIMEOUT_ABORT_CONTROLLER.signal.aborted,
8092
- aborted: ABORT_CONTROLLER.signal.aborted
8095
+ aborted: ABORT_CONTROLLER.signal.aborted,
8096
+ timings: {
8097
+ analysisTime,
8098
+ patternMatchingTime,
8099
+ vulnerablePathDetectionTime
8100
+ },
8101
+ stats: {
8102
+ sourceFilesAnalyzed: n3(this.options.internalResolutionManager?.getSourceFilesAnalyzed() ?? []).concat(this.options.externalResolutionManager?.getSourceFilesAnalyzed() ?? []).length,
8103
+ nodes: {
8104
+ total: allNodes.length,
8105
+ application: appNodes.length,
8106
+ dependency: depNodes.length,
8107
+ entryPoints: entryPointIndices.length,
8108
+ reachable: reachableIndices.length,
8109
+ unreachable: allNodes.length - reachableIndices.length
8110
+ },
8111
+ files: {
8112
+ total: n3(allNodes.map((node) => node.dir ? resolve2(node.dir, node.file) : node.file)).length,
8113
+ application: n3(appNodes.map((node) => node.dir ? resolve2(node.dir, node.file) : node.file)).length,
8114
+ dependency: n3(depNodes.map((node) => node.dir ? resolve2(node.dir, node.file) : node.file)).length
8115
+ }
8116
+ }
8093
8117
  };
8094
8118
  const result = {
8095
8119
  success: true,
8096
8120
  vulnerablePaths,
8097
- reachablePackageIds: Array.from(reachablePackageIds),
8121
+ reachablePackageIds: n3(reachableIndices.map((idx) => allNodes[idx].packageId)),
8098
8122
  analysisDiagnostics,
8099
8123
  error: null
8100
8124
  };
@@ -8174,11 +8198,11 @@ var JavapIpcClient = class _JavapIpcClient {
8174
8198
  numThreads.toString(),
8175
8199
  ...javapFlags
8176
8200
  ];
8177
- return new Promise((resolve15) => {
8201
+ return new Promise((resolve17) => {
8178
8202
  let clientInstance = null;
8179
8203
  const resolveWithClosedClient = () => {
8180
8204
  ipcProcess.close();
8181
- resolve15(new _JavapIpcClient(ipcProcess, responseTimeoutMs));
8205
+ resolve17(new _JavapIpcClient(ipcProcess, responseTimeoutMs));
8182
8206
  };
8183
8207
  const ipcProcess = spawnIpc("java", args2, {
8184
8208
  onExit: (code) => {
@@ -8206,7 +8230,7 @@ var JavapIpcClient = class _JavapIpcClient {
8206
8230
  const response = JSON.parse(line);
8207
8231
  if (response.id === "" && response.success) {
8208
8232
  clientInstance = new _JavapIpcClient(ipcProcess, responseTimeoutMs);
8209
- resolve15(clientInstance);
8233
+ resolve17(clientInstance);
8210
8234
  } else {
8211
8235
  resolveWithClosedClient();
8212
8236
  }
@@ -8226,7 +8250,7 @@ var JavapIpcClient = class _JavapIpcClient {
8226
8250
  if (!this.ipcProcess.isRunning()) {
8227
8251
  return _JavapIpcClient.createFailedResponse("Service closed");
8228
8252
  }
8229
- return new Promise((resolve15, reject) => {
8253
+ return new Promise((resolve17, reject) => {
8230
8254
  const id = randomUUID();
8231
8255
  const request = { id, classFilePath };
8232
8256
  const timeout = setTimeout(() => {
@@ -8235,7 +8259,7 @@ var JavapIpcClient = class _JavapIpcClient {
8235
8259
  }, this.responseTimeoutMs);
8236
8260
  this.responseHandlers.set(id, (response) => {
8237
8261
  clearTimeout(timeout);
8238
- resolve15(response);
8262
+ resolve17(response);
8239
8263
  });
8240
8264
  try {
8241
8265
  this.ipcProcess.writeLine(JSON.stringify(request));
@@ -8322,7 +8346,7 @@ function isSubtype(a2, b, subtypeMap) {
8322
8346
  }
8323
8347
 
8324
8348
  // dist/class-graph/jvm/java-source-resolver.js
8325
- import { basename, extname, resolve as resolve2 } from "node:path";
8349
+ import { basename, extname, resolve as resolve3 } from "node:path";
8326
8350
 
8327
8351
  // dist/class-graph/import-utils.js
8328
8352
  function resolveImport(target, importsMap, separator = ".") {
@@ -8380,7 +8404,7 @@ var JavaSourceResolver = class {
8380
8404
  return nodeIndex;
8381
8405
  }
8382
8406
  async resolveDeclarationNodesForFile(packageId, appOrDep, dir, file, _packageInfo, graph) {
8383
- const path3 = dir ? resolve2(dir, file) : file;
8407
+ const path3 = dir ? resolve3(dir, file) : file;
8384
8408
  const tree = this.parser.parse(await readFile(path3, "utf-8"));
8385
8409
  if (!tree)
8386
8410
  return;
@@ -8510,7 +8534,7 @@ var JavaSourceResolver = class {
8510
8534
  continue;
8511
8535
  resolutionContext.visited.add(idx);
8512
8536
  }
8513
- const tree = this.parser.parse(await readFile(dir ? resolve2(dir, file) : file, "utf-8"));
8537
+ const tree = this.parser.parse(await readFile(dir ? resolve3(dir, file) : file, "utf-8"));
8514
8538
  if (!tree)
8515
8539
  return;
8516
8540
  try {
@@ -8919,7 +8943,7 @@ function parseJavaString(input) {
8919
8943
 
8920
8944
  // dist/class-graph/jvm/kotlin-source-resolver.js
8921
8945
  import { readFile as readFile2 } from "node:fs/promises";
8922
- import { basename as basename2, extname as extname2, resolve as resolve3 } from "node:path";
8946
+ import { basename as basename2, extname as extname2, resolve as resolve4 } from "node:path";
8923
8947
  var KotlinSourceResolver = class {
8924
8948
  parser;
8925
8949
  subtypeMap;
@@ -8963,7 +8987,7 @@ var KotlinSourceResolver = class {
8963
8987
  return nodeIndex;
8964
8988
  }
8965
8989
  async resolveDeclarationNodesForFile(packageId, appOrDep, dir, file, _packageInfo, graph) {
8966
- const path3 = dir ? resolve3(dir, file) : file;
8990
+ const path3 = dir ? resolve4(dir, file) : file;
8967
8991
  const tree = this.parser.parse(await readFile2(path3, "utf-8"));
8968
8992
  if (!tree)
8969
8993
  return;
@@ -9042,7 +9066,7 @@ var KotlinSourceResolver = class {
9042
9066
  continue;
9043
9067
  resolutionContext.visited.add(idx);
9044
9068
  }
9045
- const tree = this.parser.parse(await readFile2(dir ? resolve3(dir, file) : file, "utf-8"));
9069
+ const tree = this.parser.parse(await readFile2(dir ? resolve4(dir, file) : file, "utf-8"));
9046
9070
  if (!tree)
9047
9071
  return;
9048
9072
  try {
@@ -9320,11 +9344,11 @@ function parseKotlinString(input) {
9320
9344
 
9321
9345
  // dist/class-graph/jvm/properties-source-resolver.js
9322
9346
  import { readFile as readFile3 } from "node:fs/promises";
9323
- import { resolve as resolve4 } from "node:path";
9347
+ import { resolve as resolve5 } from "node:path";
9324
9348
  var PropertiesSourceResolver = class {
9325
9349
  dirFileToNodeIds = /* @__PURE__ */ new Map();
9326
9350
  async resolveDeclarationNodesForFile(packageId, appOrDep, dir, file, _packageInfo, graph) {
9327
- const path3 = dir ? resolve4(dir, file) : file;
9351
+ const path3 = dir ? resolve5(dir, file) : file;
9328
9352
  const content = await readFile3(path3, "utf-8");
9329
9353
  const lines = content.split("\n");
9330
9354
  let byteOffset = 0;
@@ -9370,7 +9394,7 @@ var PropertiesSourceResolver = class {
9370
9394
  async resolveDefinitionNodesForFile(_packageId, _appOrDep, _dir, _file, _resolutionContext, _packageInfo, _graph) {
9371
9395
  }
9372
9396
  async resolveEdgesForFile(packageId, appOrDep, dir, file, resolutionContext, graph) {
9373
- const path3 = dir ? resolve4(dir, file) : file;
9397
+ const path3 = dir ? resolve5(dir, file) : file;
9374
9398
  const unvisitedIndices = this.dirFileToNodeIds.get(dir)?.get(file)?.map((nodeId) => resolutionContext.nodeIdToIndex.get(nodeId)).filter((idx) => idx !== void 0 && !resolutionContext.visited.has(idx)) ?? [];
9375
9399
  if (unvisitedIndices.length === 0) {
9376
9400
  return;
@@ -9410,7 +9434,7 @@ function getNodeId2(packageId, appOrDep, path3, start2, end, displayName) {
9410
9434
 
9411
9435
  // dist/class-graph/jvm/scala-source-resolver.js
9412
9436
  import { readFile as readFile4 } from "node:fs/promises";
9413
- import { basename as basename3, extname as extname3, resolve as resolve5 } from "node:path";
9437
+ import { basename as basename3, extname as extname3, resolve as resolve6 } from "node:path";
9414
9438
  var ScalaSourceResolver = class {
9415
9439
  parser;
9416
9440
  subtypeMap;
@@ -9454,7 +9478,7 @@ var ScalaSourceResolver = class {
9454
9478
  return nodeIndex;
9455
9479
  }
9456
9480
  async resolveDeclarationNodesForFile(packageId, appOrDep, dir, file, _packageInfo, graph) {
9457
- const path3 = dir ? resolve5(dir, file) : file;
9481
+ const path3 = dir ? resolve6(dir, file) : file;
9458
9482
  const tree = this.parser.parse(await readFile4(path3, "utf-8"));
9459
9483
  if (!tree)
9460
9484
  return;
@@ -9586,7 +9610,7 @@ var ScalaSourceResolver = class {
9586
9610
  continue;
9587
9611
  resolutionContext.visited.add(idx);
9588
9612
  }
9589
- const tree = this.parser.parse(await readFile4(dir ? resolve5(dir, file) : file, "utf-8"));
9613
+ const tree = this.parser.parse(await readFile4(dir ? resolve6(dir, file) : file, "utf-8"));
9590
9614
  if (!tree)
9591
9615
  return;
9592
9616
  try {
@@ -10055,7 +10079,7 @@ function parseScalaString(input) {
10055
10079
  }
10056
10080
 
10057
10081
  // dist/class-graph/jvm/service-source-resolver.js
10058
- import { basename as basename4, resolve as resolve6 } from "node:path";
10082
+ import { basename as basename4, resolve as resolve7 } from "node:path";
10059
10083
  import { readFile as readFile5 } from "node:fs/promises";
10060
10084
  var ServiceSourceResolver = class {
10061
10085
  getNodeId(packageId, appOrDep, dir, file, identifier2) {
@@ -10093,7 +10117,7 @@ var ServiceSourceResolver = class {
10093
10117
  return;
10094
10118
  }
10095
10119
  resolutionContext.visited.add(fromIdx);
10096
- const content = await readFile5(dir ? resolve6(dir, file) : file, "utf-8");
10120
+ const content = await readFile5(dir ? resolve7(dir, file) : file, "utf-8");
10097
10121
  const implementations = content.split("\n").map((line) => line.trim()).filter(Boolean);
10098
10122
  for (const implementation2 of implementations) {
10099
10123
  const toIndices = resolutionContext.source.classMap.get(implementation2) ?? resolutionContext.bytecode.classMap.get(implementation2) ?? [];
@@ -10106,14 +10130,14 @@ var ServiceSourceResolver = class {
10106
10130
  };
10107
10131
 
10108
10132
  // dist/class-graph/jvm/spring-factories-source-resolver.js
10109
- import { resolve as resolve7 } from "node:path";
10133
+ import { resolve as resolve8 } from "node:path";
10110
10134
  import { readFile as readFile6 } from "node:fs/promises";
10111
10135
  var SpringFactoriesSourceResolver = class {
10112
10136
  getNodeId(packageId, appOrDep, dir, file, interfaceName) {
10113
10137
  return [packageId, appOrDep, dir, file, interfaceName].filter((d) => d !== void 0).join("#");
10114
10138
  }
10115
10139
  async resolveDeclarationNodesForFile(packageId, appOrDep, dir, file, _packageInfo, graph) {
10116
- const content = await readFile6(dir ? resolve7(dir, file) : file, "utf-8");
10140
+ const content = await readFile6(dir ? resolve8(dir, file) : file, "utf-8");
10117
10141
  const properties = this.parseSpringFactories(content);
10118
10142
  for (const interfaceName of properties.keys()) {
10119
10143
  const nodeId = this.getNodeId(packageId, appOrDep, dir, file, interfaceName);
@@ -10137,7 +10161,7 @@ var SpringFactoriesSourceResolver = class {
10137
10161
  async resolveDefinitionNodesForFile(_packageId, _appOrDep, _dir, _file, _resolutionContext, _packageInfo, _graph) {
10138
10162
  }
10139
10163
  async resolveEdgesForFile(packageId, appOrDep, dir, file, resolutionContext, graph) {
10140
- const content = await readFile6(dir ? resolve7(dir, file) : file, "utf-8");
10164
+ const content = await readFile6(dir ? resolve8(dir, file) : file, "utf-8");
10141
10165
  const properties = this.parseSpringFactories(content);
10142
10166
  const unvisitedInterfaces = [];
10143
10167
  for (const [interfaceName, implementations] of properties.entries()) {
@@ -10209,7 +10233,7 @@ var SpringFactoriesSourceResolver = class {
10209
10233
  // dist/class-graph/jvm/xml-source-resolver.js
10210
10234
  var import_parse_xml7 = __toESM(require_dist(), 1);
10211
10235
  import { readFile as readFile7 } from "node:fs/promises";
10212
- import { resolve as resolve8 } from "node:path";
10236
+ import { resolve as resolve9 } from "node:path";
10213
10237
 
10214
10238
  // dist/class-graph/jvm/properties-xml-source-resolver.js
10215
10239
  var import_parse_xml = __toESM(require_dist(), 1);
@@ -11093,7 +11117,7 @@ var XmlSourceResolver = class {
11093
11117
  persistenceXmlResolver = new PersistenceXmlSourceResolver();
11094
11118
  dirFileToNodeIds = /* @__PURE__ */ new Map();
11095
11119
  async resolveDeclarationNodesForFile(packageId, appOrDep, dir, file, _packageInfo, graph) {
11096
- const parsedXml = (0, import_parse_xml7.parseXml)(await readFile7(dir ? resolve8(dir, file) : file, "utf-8"), {
11120
+ const parsedXml = (0, import_parse_xml7.parseXml)(await readFile7(dir ? resolve9(dir, file) : file, "utf-8"), {
11097
11121
  includeOffsets: true
11098
11122
  });
11099
11123
  const resolver = this.selectResolver(parsedXml);
@@ -11117,7 +11141,7 @@ var XmlSourceResolver = class {
11117
11141
  async resolveAliasNodesForFile(_packageId, _appOrDep, _dir, _file, _resolutionContext, _packageInfo, _graph) {
11118
11142
  }
11119
11143
  async resolveEdgesForFile(packageId, appOrDep, dir, file, resolutionContext, graph) {
11120
- const path3 = dir ? resolve8(dir, file) : file;
11144
+ const path3 = dir ? resolve9(dir, file) : file;
11121
11145
  const unvisitedIndices = this.dirFileToNodeIds.get(dir)?.get(file)?.map((nodeId) => resolutionContext.nodeIdToIndex.get(nodeId)).filter((idx) => idx !== void 0 && !resolutionContext.visited.has(idx)) ?? [];
11122
11146
  if (unvisitedIndices.length === 0) {
11123
11147
  return;
@@ -11170,13 +11194,18 @@ async function asyncForEach(array, fn, concurrency = 1) {
11170
11194
  }
11171
11195
 
11172
11196
  // dist/class-graph/resolvers/source-resolution-manager.js
11197
+ import { resolve as resolve10 } from "node:path";
11173
11198
  var SourceResolutionManager = class {
11174
11199
  fileTasks;
11175
11200
  resolutionContextProvider;
11201
+ sourceFilesAnalyzed = /* @__PURE__ */ new Set();
11176
11202
  constructor(fileTasks, resolutionContextProvider) {
11177
11203
  this.fileTasks = fileTasks;
11178
11204
  this.resolutionContextProvider = resolutionContextProvider;
11179
11205
  }
11206
+ getSourceFilesAnalyzed() {
11207
+ return Array.from(this.sourceFilesAnalyzed);
11208
+ }
11180
11209
  async resolveDeclarations(graph) {
11181
11210
  await asyncForEach(this.fileTasks, async (task) => {
11182
11211
  if (ABORT_CONTROLLER.signal.aborted)
@@ -11237,6 +11266,7 @@ var SourceResolutionManager = class {
11237
11266
  return;
11238
11267
  try {
11239
11268
  await resolver.resolveEdgesForFile(node.packageId, node.appOrDep, node.dir, node.file, resolutionContext, graph);
11269
+ this.sourceFilesAnalyzed.add(node.dir ? resolve10(node.dir, node.file) : node.file);
11240
11270
  } catch {
11241
11271
  }
11242
11272
  visited.add(idx);
@@ -11263,6 +11293,7 @@ var SourceResolutionManager = class {
11263
11293
  return;
11264
11294
  try {
11265
11295
  await resolver.resolveEdgesForFile(node.packageId, node.appOrDep, node.dir, node.file, resolutionContext, graph);
11296
+ this.sourceFilesAnalyzed.add(node.dir ? resolve10(node.dir, node.file) : node.file);
11266
11297
  } catch {
11267
11298
  }
11268
11299
  visited.add(idx);
@@ -11494,14 +11525,14 @@ var JvmResolutionContextProvider = class {
11494
11525
  };
11495
11526
 
11496
11527
  // dist/source-resolver-utils.js
11497
- import { resolve as resolve9 } from "node:path";
11528
+ import { resolve as resolve11 } from "node:path";
11498
11529
  import { readFile as readFile8 } from "node:fs/promises";
11499
11530
  async function createTreeSitterResolver(dirPath, wasmName, ResolverClass) {
11500
11531
  if (!dirPath)
11501
11532
  return void 0;
11502
- const wasmPath = resolve9(dirPath, wasmName);
11533
+ const wasmPath = resolve11(dirPath, wasmName);
11503
11534
  const parser2 = new Parser().setLanguage(await Language.load(wasmPath));
11504
- const nodeTypesJsonPath = resolve9(dirPath, "node-types.json");
11535
+ const nodeTypesJsonPath = resolve11(dirPath, "node-types.json");
11505
11536
  const nodeTypes = JSON.parse(await readFile8(nodeTypesJsonPath, "utf-8"));
11506
11537
  const subtypeMap = buildSubtypeMap(nodeTypes);
11507
11538
  return new ResolverClass(parser2, subtypeMap);
@@ -15217,10 +15248,10 @@ var Minipass = class extends EventEmitter {
15217
15248
  * Return a void Promise that resolves once the stream ends.
15218
15249
  */
15219
15250
  async promise() {
15220
- return new Promise((resolve15, reject) => {
15251
+ return new Promise((resolve17, reject) => {
15221
15252
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
15222
15253
  this.on("error", (er) => reject(er));
15223
- this.on("end", () => resolve15());
15254
+ this.on("end", () => resolve17());
15224
15255
  });
15225
15256
  }
15226
15257
  /**
@@ -15244,7 +15275,7 @@ var Minipass = class extends EventEmitter {
15244
15275
  return Promise.resolve({ done: false, value: res });
15245
15276
  if (this[EOF])
15246
15277
  return stop2();
15247
- let resolve15;
15278
+ let resolve17;
15248
15279
  let reject;
15249
15280
  const onerr = (er) => {
15250
15281
  this.off("data", ondata);
@@ -15258,19 +15289,19 @@ var Minipass = class extends EventEmitter {
15258
15289
  this.off("end", onend);
15259
15290
  this.off(DESTROYED, ondestroy);
15260
15291
  this.pause();
15261
- resolve15({ value, done: !!this[EOF] });
15292
+ resolve17({ value, done: !!this[EOF] });
15262
15293
  };
15263
15294
  const onend = () => {
15264
15295
  this.off("error", onerr);
15265
15296
  this.off("data", ondata);
15266
15297
  this.off(DESTROYED, ondestroy);
15267
15298
  stop2();
15268
- resolve15({ done: true, value: void 0 });
15299
+ resolve17({ done: true, value: void 0 });
15269
15300
  };
15270
15301
  const ondestroy = () => onerr(new Error("stream destroyed"));
15271
15302
  return new Promise((res2, rej) => {
15272
15303
  reject = rej;
15273
- resolve15 = res2;
15304
+ resolve17 = res2;
15274
15305
  this.once(DESTROYED, ondestroy);
15275
15306
  this.once("error", onerr);
15276
15307
  this.once("end", onend);
@@ -16240,9 +16271,9 @@ var PathBase = class {
16240
16271
  if (this.#asyncReaddirInFlight) {
16241
16272
  await this.#asyncReaddirInFlight;
16242
16273
  } else {
16243
- let resolve15 = () => {
16274
+ let resolve17 = () => {
16244
16275
  };
16245
- this.#asyncReaddirInFlight = new Promise((res) => resolve15 = res);
16276
+ this.#asyncReaddirInFlight = new Promise((res) => resolve17 = res);
16246
16277
  try {
16247
16278
  for (const e2 of await this.#fs.promises.readdir(fullpath, {
16248
16279
  withFileTypes: true
@@ -16255,7 +16286,7 @@ var PathBase = class {
16255
16286
  children.provisional = 0;
16256
16287
  }
16257
16288
  this.#asyncReaddirInFlight = void 0;
16258
- resolve15();
16289
+ resolve17();
16259
16290
  }
16260
16291
  return children.slice(0, children.provisional);
16261
16292
  }
@@ -18293,7 +18324,7 @@ import process4 from "node:process";
18293
18324
 
18294
18325
  // node_modules/.pnpm/meow@13.2.0/node_modules/meow/build/dependencies.js
18295
18326
  import require$$0$1, { format } from "util";
18296
- import { normalize as normalize$1, resolve as resolve10 } from "path";
18327
+ import { normalize as normalize$1, resolve as resolve12 } from "path";
18297
18328
  import { readFileSync } from "fs";
18298
18329
  import path$1 from "node:path";
18299
18330
  import process$2 from "node:process";
@@ -19244,7 +19275,7 @@ var parser = new YargsParser({
19244
19275
  },
19245
19276
  format,
19246
19277
  normalize: normalize$1,
19247
- resolve: resolve10,
19278
+ resolve: resolve12,
19248
19279
  require: (path3) => {
19249
19280
  if (typeof __require !== "undefined") {
19250
19281
  return __require(path3);
@@ -27373,7 +27404,7 @@ import { extname as extname5 } from "node:path";
27373
27404
 
27374
27405
  // dist/class-graph/dotnet/c-sharp-source-resolver.js
27375
27406
  import { readFile as readFile11 } from "node:fs/promises";
27376
- import { resolve as resolve11 } from "node:path";
27407
+ import { resolve as resolve13 } from "node:path";
27377
27408
  var CSharpSourceResolver = class {
27378
27409
  parser;
27379
27410
  subtypeMap;
@@ -27416,7 +27447,7 @@ var CSharpSourceResolver = class {
27416
27447
  return nodeIndex;
27417
27448
  }
27418
27449
  async resolveDeclarationNodesForFile(packageId, appOrDep, dir, file, _packageInfo, graph) {
27419
- const path3 = dir ? resolve11(dir, file) : file;
27450
+ const path3 = dir ? resolve13(dir, file) : file;
27420
27451
  const tree = this.parser.parse(await readFile11(path3, "utf-8"));
27421
27452
  if (!tree)
27422
27453
  return;
@@ -27559,7 +27590,7 @@ var CSharpSourceResolver = class {
27559
27590
  continue;
27560
27591
  resolutionContext.visited.add(idx);
27561
27592
  }
27562
- const tree = this.parser.parse(await readFile11(dir ? resolve11(dir, file) : file, "utf-8"));
27593
+ const tree = this.parser.parse(await readFile11(dir ? resolve13(dir, file) : file, "utf-8"));
27563
27594
  if (!tree)
27564
27595
  return;
27565
27596
  try {
@@ -28082,15 +28113,15 @@ var DotnetResolutionContextProvider = class {
28082
28113
 
28083
28114
  // dist/class-graph/dotnet/cocoa-resolution-manager.js
28084
28115
  import { readFile as readFile12, writeFile as writeFile3 } from "node:fs/promises";
28085
- import { resolve as resolve13 } from "node:path";
28116
+ import { resolve as resolve15 } from "node:path";
28086
28117
 
28087
28118
  // dist/utils/tmp.js
28088
28119
  import { rm, mkdtemp } from "node:fs/promises";
28089
28120
  import { tmpdir } from "node:os";
28090
- import { resolve as resolve12 } from "node:path";
28121
+ import { resolve as resolve14 } from "node:path";
28091
28122
  async function createTmpDirectory(prefix) {
28092
28123
  try {
28093
- const tmpDir = await mkdtemp(resolve12(tmpdir(), prefix));
28124
+ const tmpDir = await mkdtemp(resolve14(tmpdir(), prefix));
28094
28125
  return tmpDir;
28095
28126
  } catch (err2) {
28096
28127
  console.log("Error creating tmp directory", err2);
@@ -28133,6 +28164,9 @@ var CocoaResolutionManager = class {
28133
28164
  this.apps = apps;
28134
28165
  this.deps = deps;
28135
28166
  }
28167
+ getSourceFilesAnalyzed() {
28168
+ return [];
28169
+ }
28136
28170
  async resolveDeclarations(graph) {
28137
28171
  if (ABORT_CONTROLLER.signal.aborted)
28138
28172
  return;
@@ -28141,7 +28175,7 @@ var CocoaResolutionManager = class {
28141
28175
  appIdToBin: Object.fromEntries(Object.entries(this.apps).filter(([_, packageInfo]) => packageInfo.bin?.length).map(([packageId, packageInfo]) => [packageId, packageInfo.bin ?? []])),
28142
28176
  depIdToBin: Object.fromEntries(Object.entries(this.deps).filter(([_, packageInfo]) => packageInfo.bin?.length).map(([packageId, packageInfo]) => [packageId, packageInfo.bin ?? []]))
28143
28177
  };
28144
- const inputFile = resolve13(tmpDir, "input.json");
28178
+ const inputFile = resolve15(tmpDir, "input.json");
28145
28179
  await writeFile3(inputFile, JSON.stringify(inputFileData));
28146
28180
  const cmd = cmdt`dotnet ${this.cocoaPath} resolveNodes --batch-mode --input-file=${inputFile} --output-dir=${tmpDir}`;
28147
28181
  const execResult = await execNeverFail(cmd, ".", { signal: ABORT_CONTROLLER.signal });
@@ -28149,7 +28183,7 @@ var CocoaResolutionManager = class {
28149
28183
  throw Error(`cocoa could not resolve nodes: ${execResult.error.message}${execResult.stderr ? `
28150
28184
  stderr: ${execResult.stderr}` : ""}`);
28151
28185
  }
28152
- const nodes = JSON.parse(await readFile12(resolve13(tmpDir, "nodes.json"), "utf-8"));
28186
+ const nodes = JSON.parse(await readFile12(resolve15(tmpDir, "nodes.json"), "utf-8"));
28153
28187
  graph.addNodes(nodes);
28154
28188
  });
28155
28189
  }
@@ -28168,7 +28202,7 @@ stderr: ${execResult.stderr}` : ""}`);
28168
28202
  visited: Array.from(visited),
28169
28203
  appIndices
28170
28204
  };
28171
- const inputFile = resolve13(tmpDir, "input.json");
28205
+ const inputFile = resolve15(tmpDir, "input.json");
28172
28206
  await writeFile3(inputFile, JSON.stringify(inputFileData));
28173
28207
  const cmd = cmdt`dotnet ${this.cocoaPath} resolveEdges --batch-mode ${mode === "DIRECT_DEPENDENCIES" && "--entry-edges-only"} --input-file=${inputFile} --output-dir=${tmpDir}`;
28174
28208
  const execResult = await execNeverFail(cmd, ".", { signal: ABORT_CONTROLLER.signal });
@@ -28176,10 +28210,10 @@ stderr: ${execResult.stderr}` : ""}`);
28176
28210
  throw Error(`cocoa could not resolve edges: ${execResult.error.message}${execResult.stderr ? `
28177
28211
  stderr: ${execResult.stderr}` : ""}`);
28178
28212
  }
28179
- for (const idx of JSON.parse(await readFile12(resolve13(tmpDir, "visited.json"), "utf-8"))) {
28213
+ for (const idx of JSON.parse(await readFile12(resolve15(tmpDir, "visited.json"), "utf-8"))) {
28180
28214
  visited.add(idx);
28181
28215
  }
28182
- const edgesRecord = JSON.parse(await readFile12(resolve13(tmpDir, "edges.json"), "utf-8"));
28216
+ const edgesRecord = JSON.parse(await readFile12(resolve15(tmpDir, "edges.json"), "utf-8"));
28183
28217
  for (const [fromIdx, childrenRecord] of Object.entries(edgesRecord)) {
28184
28218
  for (const [toIdx, confidence] of Object.entries(childrenRecord)) {
28185
28219
  graph.addEdge(parseInt(fromIdx), parseInt(toIdx), confidence);
@@ -28344,7 +28378,7 @@ import { extname as extname7 } from "node:path";
28344
28378
 
28345
28379
  // dist/class-graph/rust/rust-source-resolver.js
28346
28380
  import { readFile as readFile15 } from "node:fs/promises";
28347
- import { resolve as resolve14 } from "node:path";
28381
+ import { resolve as resolve16 } from "node:path";
28348
28382
 
28349
28383
  // dist/class-graph/rust/module-utils.js
28350
28384
  import { basename as basename6, dirname as dirname2, extname as extname6, sep as sep2 } from "node:path";
@@ -28448,7 +28482,7 @@ var RustSourceResolver = class {
28448
28482
  this.dirFileToPackageInfo.set(dir, /* @__PURE__ */ new Map());
28449
28483
  }
28450
28484
  this.dirFileToPackageInfo.get(dir).set(file, packageInfo);
28451
- const tree = this.parser.parse(await readFile15(dir ? resolve14(dir, file) : file, "utf-8"));
28485
+ const tree = this.parser.parse(await readFile15(dir ? resolve16(dir, file) : file, "utf-8"));
28452
28486
  if (!tree)
28453
28487
  return;
28454
28488
  try {
@@ -28542,7 +28576,7 @@ var RustSourceResolver = class {
28542
28576
  async resolveAliasNodesForFile(packageId, appOrDep, dir, file, resolutionContext, packageInfo, graph) {
28543
28577
  if (!this.filesWithReexports.get(dir)?.has(file))
28544
28578
  return;
28545
- const tree = this.parser.parse(await readFile15(dir ? resolve14(dir, file) : file, "utf-8"));
28579
+ const tree = this.parser.parse(await readFile15(dir ? resolve16(dir, file) : file, "utf-8"));
28546
28580
  if (!tree)
28547
28581
  return;
28548
28582
  try {
@@ -28618,7 +28652,7 @@ var RustSourceResolver = class {
28618
28652
  async resolveDefinitionNodesForFile(packageId, appOrDep, dir, file, resolutionContext, packageInfo, graph) {
28619
28653
  if (!this.filesWithImpl.get(dir)?.has(file))
28620
28654
  return;
28621
- const tree = this.parser.parse(await readFile15(dir ? resolve14(dir, file) : file, "utf-8"));
28655
+ const tree = this.parser.parse(await readFile15(dir ? resolve16(dir, file) : file, "utf-8"));
28622
28656
  if (!tree)
28623
28657
  return;
28624
28658
  try {
@@ -28731,7 +28765,7 @@ var RustSourceResolver = class {
28731
28765
  const packageInfo = this.dirFileToPackageInfo.get(dir)?.get(file);
28732
28766
  if (!packageInfo)
28733
28767
  return;
28734
- const tree = this.parser.parse(await readFile15(dir ? resolve14(dir, file) : file, "utf-8"));
28768
+ const tree = this.parser.parse(await readFile15(dir ? resolve16(dir, file) : file, "utf-8"));
28735
28769
  if (!tree)
28736
28770
  return;
28737
28771
  try {