@saptools/service-flow 0.1.60 → 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 +10 -0
- package/dist/cli.js +17 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/src/output/mermaid-output.ts +9 -4
- package/src/parsers/symbol-parser.ts +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
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
|
+
|
|
8
|
+
## 0.1.61
|
|
9
|
+
|
|
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.
|
|
11
|
+
- Kept instance properties, private/protected static properties, and members of non-exported classes fail-closed as unexported, with no schema, linker-edge, trace, CLI, or output-shape change.
|
|
12
|
+
|
|
3
13
|
## 0.1.60
|
|
4
14
|
|
|
5
15
|
- Fixed RC-A by resolving remote `send({ query: ... })` entities from the original query initializer AST and its real lexical scope, removing the isolated text reparse that fabricated parameter, mutable-local, runtime-const, runtime-destructured, and shadowed entity names while preserving genuine static entities and top-level query aliases.
|
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.
|
|
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: {
|
|
@@ -714,7 +714,13 @@ async function parseExecutableSymbols(repoPath, filePath, context) {
|
|
|
714
714
|
if (localName) addSymbol("method", localName, node, parentClass);
|
|
715
715
|
} else if (ts.isPropertyDeclaration(node) && parentClass && node.initializer && (ts.isArrowFunction(node.initializer) || ts.isFunctionExpression(node.initializer))) {
|
|
716
716
|
const localName = nameOf(node.name);
|
|
717
|
-
if (localName)
|
|
717
|
+
if (localName) {
|
|
718
|
+
const flags = ts.getCombinedModifierFlags(node);
|
|
719
|
+
const staticPublicExported = exportedClasses.has(parentClass) && (flags & ts.ModifierFlags.Static) !== 0 && (flags & ts.ModifierFlags.Private) === 0 && (flags & ts.ModifierFlags.Protected) === 0;
|
|
720
|
+
const isArrow = ts.isArrowFunction(node.initializer);
|
|
721
|
+
const memberKind = isArrow ? staticPublicExported ? "static_arrow_function" : "arrow_function_property" : staticPublicExported ? "static_function_expression" : "function_expression_property";
|
|
722
|
+
addSymbol("method", localName, node.initializer, parentClass, staticPublicExported ? `${parentClass}.${localName}` : void 0, staticPublicExported ? { source: "exported_class_member", exportedClass: parentClass, memberKind } : { source: "class_property_function", memberKind });
|
|
723
|
+
}
|
|
718
724
|
} else if (ts.isFunctionDeclaration(node) && node.name) addSymbol("function", node.name.text, node, void 0, exported(node) ? node.name.text : void 0);
|
|
719
725
|
else if (ts.isVariableStatement(node)) {
|
|
720
726
|
for (const d of node.declarationList.declarations) {
|
|
@@ -2048,18 +2054,23 @@ function truncate(value, width) {
|
|
|
2048
2054
|
}
|
|
2049
2055
|
|
|
2050
2056
|
// src/output/mermaid-output.ts
|
|
2051
|
-
function safe(value) {
|
|
2052
|
-
return value.replace(/[^\w-]/g, "_").slice(0, 60);
|
|
2053
|
-
}
|
|
2054
2057
|
function label(trace2, idOrLabel) {
|
|
2055
2058
|
const node = trace2.nodes.find((item) => item.id === idOrLabel || item.label === idOrLabel);
|
|
2056
2059
|
return String(node?.label ?? idOrLabel);
|
|
2057
2060
|
}
|
|
2058
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
|
+
};
|
|
2059
2070
|
const lines = ["flowchart TD"];
|
|
2060
2071
|
for (const e of trace2.edges)
|
|
2061
2072
|
lines.push(
|
|
2062
|
-
` ${
|
|
2073
|
+
` ${nodeId(e.from)}["${label(trace2, e.from)}"] -->|${e.type}| ${nodeId(e.to)}["${label(trace2, e.to)}"]`
|
|
2063
2074
|
);
|
|
2064
2075
|
return `${lines.join("\n")}
|
|
2065
2076
|
`;
|