@saptools/service-flow 0.1.53 → 0.1.54

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/dist/cli.js CHANGED
@@ -29,14 +29,13 @@ import {
29
29
  parsePackageJson,
30
30
  parseServiceBindings,
31
31
  parseVars,
32
- projectBounded,
32
+ projectBoundedInOrder,
33
33
  reposByName,
34
34
  selectorRepoAmbiguousDiagnostic,
35
- stableProjectionValue,
36
35
  trace,
37
36
  upsertRepository,
38
37
  upsertWorkspace
39
- } from "./chunk-LFH7C46B.js";
38
+ } from "./chunk-ERIZHM5C.js";
40
39
 
41
40
  // src/cli.ts
42
41
  import { Command } from "commander";
@@ -238,7 +237,7 @@ function migrate(db) {
238
237
  // package.json
239
238
  var package_default = {
240
239
  name: "@saptools/service-flow",
241
- version: "0.1.53",
240
+ version: "0.1.54",
242
241
  description: "Trace SAP CAP service-to-service flows across multi-repository workspaces with runtime-aware graph resolution",
243
242
  type: "module",
244
243
  publishConfig: {
@@ -1178,7 +1177,7 @@ function boundDoctorValue(value) {
1178
1177
  output[key] = boundDoctorValue(child);
1179
1178
  continue;
1180
1179
  }
1181
- const projection = projectBounded(child.map(boundDoctorValue), compareDiagnostic);
1180
+ const projection = projectBoundedInOrder(child.map(boundDoctorValue));
1182
1181
  output[key] = projection.items;
1183
1182
  addProjectionMetadata(output, input, key, projection);
1184
1183
  }
@@ -1240,9 +1239,6 @@ function projectionStem(key) {
1240
1239
  };
1241
1240
  return stems[key] ?? "repository";
1242
1241
  }
1243
- function compareDiagnostic(left, right) {
1244
- return stableProjectionValue(left).localeCompare(stableProjectionValue(right));
1245
- }
1246
1242
  function numericValue(value) {
1247
1243
  return typeof value === "number" && Number.isFinite(value) ? value : 0;
1248
1244
  }
@@ -1851,13 +1847,20 @@ function asRecords(value) {
1851
1847
 
1852
1848
  // src/output/table-output.ts
1853
1849
  function location(evidence) {
1850
+ const selected = isRecord(evidence.selectedHandler) ? evidence.selectedHandler : void 0;
1851
+ const selectedFile = selected?.sourceFile;
1852
+ const selectedLine = selected?.sourceLine;
1853
+ if (selectedFile || selectedLine)
1854
+ return `${String(selectedFile ?? "")}:${String(selectedLine ?? "")}`;
1854
1855
  const file = evidence.file ?? evidence.sourceFile ?? evidence.handlerSourceFile ?? evidence.operationSourceFile ?? evidence.registrationSourceFile;
1855
1856
  const line = evidence.line ?? evidence.sourceLine ?? evidence.handlerSourceLine ?? evidence.operationSourceLine ?? evidence.registrationSourceLine;
1856
1857
  if (file || line) return `${String(file ?? "")}:${String(line ?? "")}`;
1857
1858
  const candidates = evidence.candidates;
1859
+ if (Array.isArray(candidates) && candidates.some((candidate) => isRecord(candidate) && candidate.methodId !== void 0)) return ":";
1858
1860
  if (Array.isArray(candidates) && candidates.length > 0) {
1859
- const first = candidates[0];
1860
- return `${String(first.sourceFile ?? "")}:${String(first.sourceLine ?? "")}`;
1861
+ const first = candidates.find(isRecord);
1862
+ if (first)
1863
+ return `${String(first.sourceFile ?? "")}:${String(first.sourceLine ?? "")}`;
1861
1864
  }
1862
1865
  return ":";
1863
1866
  }