@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/CHANGELOG.md +6 -0
- package/README.md +2 -0
- package/TECHNICAL-NOTE.md +7 -0
- package/dist/{chunk-LFH7C46B.js → chunk-ERIZHM5C.js} +535 -126
- package/dist/chunk-ERIZHM5C.js.map +1 -0
- package/dist/cli.js +13 -10
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/cli/001-doctor-projection.ts +3 -7
- package/src/linker/000-implementation-candidates.ts +35 -2
- package/src/linker/001-implementation-evidence-projection.ts +78 -6
- package/src/output/table-output.ts +11 -2
- package/src/trace/008-contextual-runtime-state.ts +294 -0
- package/src/trace/009-selected-handler-provenance.ts +186 -0
- package/src/trace/evidence.ts +103 -31
- package/src/trace/trace-engine.ts +67 -82
- package/src/utils/000-bounded-projection.ts +20 -15
- package/dist/chunk-LFH7C46B.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -29,14 +29,13 @@ import {
|
|
|
29
29
|
parsePackageJson,
|
|
30
30
|
parseServiceBindings,
|
|
31
31
|
parseVars,
|
|
32
|
-
|
|
32
|
+
projectBoundedInOrder,
|
|
33
33
|
reposByName,
|
|
34
34
|
selectorRepoAmbiguousDiagnostic,
|
|
35
|
-
stableProjectionValue,
|
|
36
35
|
trace,
|
|
37
36
|
upsertRepository,
|
|
38
37
|
upsertWorkspace
|
|
39
|
-
} from "./chunk-
|
|
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.
|
|
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 =
|
|
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
|
|
1860
|
-
|
|
1861
|
+
const first = candidates.find(isRecord);
|
|
1862
|
+
if (first)
|
|
1863
|
+
return `${String(first.sourceFile ?? "")}:${String(first.sourceLine ?? "")}`;
|
|
1861
1864
|
}
|
|
1862
1865
|
return ":";
|
|
1863
1866
|
}
|