@saptools/service-flow 0.1.61 → 0.1.62

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.62
4
+
5
+ - Assigned every distinct Mermaid trace/graph node its own stable per-render identifier instead of truncating normalized endpoint strings to 60 characters, preventing nodes with long shared prefixes from collapsing into one.
6
+ - Preserved full node labels, edge order and types, table/JSON output, trace behavior, and the SQLite schema.
7
+
3
8
  ## 0.1.61
4
9
 
5
10
  - Recorded public static arrow-function and function-expression properties on exported classes as exported qualified symbols, matching static method declarations and enabling unique cross-package and relative `Class.member` resolution with `local_symbol_call` trace descent.
package/dist/cli.js CHANGED
@@ -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.61",
240
+ version: "0.1.62",
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
- ` ${safe(e.from)}["${label(trace2, e.from)}"] -->|${e.type}| ${safe(e.to)}["${label(trace2, e.to)}"]`
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
  `;