@saptools/service-flow 0.1.61 → 0.1.63
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 +10 -0
- package/dist/{chunk-BGD7UYJN.js → chunk-EGBTHN7J.js} +19 -11
- package/dist/chunk-EGBTHN7J.js.map +1 -0
- package/dist/cli.js +11 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/output/mermaid-output.ts +9 -4
- package/src/parsers/outbound-call-parser.ts +13 -10
- package/dist/chunk-BGD7UYJN.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
trace,
|
|
36
36
|
upsertRepository,
|
|
37
37
|
upsertWorkspace
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-EGBTHN7J.js";
|
|
39
39
|
|
|
40
40
|
// src/cli.ts
|
|
41
41
|
import { Command } from "commander";
|
|
@@ -237,7 +237,7 @@ function migrate(db) {
|
|
|
237
237
|
// package.json
|
|
238
238
|
var package_default = {
|
|
239
239
|
name: "@saptools/service-flow",
|
|
240
|
-
version: "0.1.
|
|
240
|
+
version: "0.1.63",
|
|
241
241
|
description: "Trace SAP CAP service-to-service flows across multi-repository workspaces with runtime-aware graph resolution",
|
|
242
242
|
type: "module",
|
|
243
243
|
publishConfig: {
|
|
@@ -2054,18 +2054,23 @@ function truncate(value, width) {
|
|
|
2054
2054
|
}
|
|
2055
2055
|
|
|
2056
2056
|
// src/output/mermaid-output.ts
|
|
2057
|
-
function safe(value) {
|
|
2058
|
-
return value.replace(/[^\w-]/g, "_").slice(0, 60);
|
|
2059
|
-
}
|
|
2060
2057
|
function label(trace2, idOrLabel) {
|
|
2061
2058
|
const node = trace2.nodes.find((item) => item.id === idOrLabel || item.label === idOrLabel);
|
|
2062
2059
|
return String(node?.label ?? idOrLabel);
|
|
2063
2060
|
}
|
|
2064
2061
|
function renderMermaid(trace2) {
|
|
2062
|
+
const ids = /* @__PURE__ */ new Map();
|
|
2063
|
+
const nodeId = (value) => {
|
|
2064
|
+
const existing = ids.get(value);
|
|
2065
|
+
if (existing) return existing;
|
|
2066
|
+
const id = `n${ids.size}`;
|
|
2067
|
+
ids.set(value, id);
|
|
2068
|
+
return id;
|
|
2069
|
+
};
|
|
2065
2070
|
const lines = ["flowchart TD"];
|
|
2066
2071
|
for (const e of trace2.edges)
|
|
2067
2072
|
lines.push(
|
|
2068
|
-
` ${
|
|
2073
|
+
` ${nodeId(e.from)}["${label(trace2, e.from)}"] -->|${e.type}| ${nodeId(e.to)}["${label(trace2, e.to)}"]`
|
|
2069
2074
|
);
|
|
2070
2075
|
return `${lines.join("\n")}
|
|
2071
2076
|
`;
|