@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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.63
4
+
5
+ - Stopped recording CAP runtime lifecycle activity on the `cds` facade (`bootstrap`, `loaded`, `connect`, `serving`, `served`, `listening`, and `shutdown`) and supported-receiver `on('error')` hooks as asynchronous domain-event facts or derived event edges, while preserving custom facade events, lifecycle-named service events, domain messaging events, error emissions, and synthetic event-registration symbols.
6
+ - Made object-form `send({ method, ... })` calls with a dynamic method default to `POST` with bounded `dynamicMethodDefaulted` parser evidence instead of storing a property name or expression as the HTTP verb, without a schema, linker, trace-engine, or output-shape change.
7
+
8
+ ## 0.1.62
9
+
10
+ - 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.
11
+ - Preserved full node labels, edge order and types, table/JSON output, trace behavior, and the SQLite schema.
12
+
3
13
  ## 0.1.61
4
14
 
5
15
  - 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.
@@ -3691,13 +3691,15 @@ function literalText(expr) {
3691
3691
  if (isStringLike(expr)) return expr.text;
3692
3692
  return void 0;
3693
3693
  }
3694
- function objectPropertyText(object, key) {
3695
- const prop = object.properties.find(
3696
- (property) => ts10.isPropertyAssignment(property) && nameOfProperty(property.name) === key || ts10.isShorthandPropertyAssignment(property) && property.name.text === key
3697
- );
3698
- if (!prop) return void 0;
3699
- return ts10.isShorthandPropertyAssignment(prop) ? prop.name.text : prop.initializer.getText();
3700
- }
3694
+ var CDS_LIFECYCLE_EVENTS = /* @__PURE__ */ new Set([
3695
+ "bootstrap",
3696
+ "loaded",
3697
+ "connect",
3698
+ "serving",
3699
+ "served",
3700
+ "listening",
3701
+ "shutdown"
3702
+ ]);
3701
3703
  function objectPropertyIsShorthand(object, key) {
3702
3704
  return object.properties.some((property) => ts10.isShorthandPropertyAssignment(property) && property.name.text === key);
3703
3705
  }
@@ -3980,7 +3982,10 @@ function classifyOutboundCallsInSource(source, filePath) {
3980
3982
  if (objectArg && ts10.isObjectLiteralExpression(objectArg)) {
3981
3983
  const receiver = receiverName(expr.expression);
3982
3984
  const queryExpression = propertyInitializer(objectArg, "query");
3983
- const method = stripQuotes(resolveExpression(propertyInitializer(objectArg, "method"), node, "literal").value ?? objectPropertyText(objectArg, "method") ?? "POST");
3985
+ const methodExpression = propertyInitializer(objectArg, "method");
3986
+ const methodResolution = resolveExpression(methodExpression, node, "literal");
3987
+ const method = stripQuotes(methodResolution.value ?? "POST");
3988
+ const dynamicMethodDefaulted = Boolean(methodExpression && methodResolution.value === void 0);
3984
3989
  const pathExpr = propertyInitializer(objectArg, "path") ?? propertyInitializer(objectArg, "event");
3985
3990
  const pathAnalysis = analyzeOperationPath(pathExpr, node, method);
3986
3991
  const op = pathExpr ? operationPathExpression(pathAnalysis) ?? pathExpr.getText(source) : void 0;
@@ -3992,7 +3997,7 @@ function classifyOutboundCallsInSource(source, filePath) {
3992
3997
  const isODataQueryRead = method.toUpperCase() === "GET" && ["entity_query", "entity_key_read", "entity_navigation_query"].includes(intent.kind);
3993
3998
  const queryEntity = queryExpression ? queryEntityFromAst(queryExpression, initializers) : isODataQueryRead ? intent.entitySegment : void 0;
3994
3999
  const unresolvedReason = queryExpression ? queryEntity ? void 0 : queryWarning(queryExpression.getText(source)) : pathExpr ? pathUnresolvedReason(pathAnalysis) : void 0;
3995
- add(node, { callType: queryExpression ? "remote_query" : entityCallType ?? (isODataQueryRead ? "remote_query" : "remote_action"), serviceVariableName: receiver, method, operationPathExpr, queryEntity, payloadSummary: summarizeExpression(objectArg.getText(source)), confidence: op || queryExpression ? 0.8 : 0.4, unresolvedReason }, { receiver, classifier: "service_client_send_object", operationPathExpression: shorthandPath ? op : void 0, rawPathExpression: pathAnalysis.rawExpression, literalPathSource: literalPathSource(pathAnalysis), odataPathIntent: operationPathExpr ? intent : void 0, pathAnalysis, staticPathCandidates: legacyPathCandidates(pathAnalysis), parserWarning: unresolvedReason });
4000
+ add(node, { callType: queryExpression ? "remote_query" : entityCallType ?? (isODataQueryRead ? "remote_query" : "remote_action"), serviceVariableName: receiver, method, operationPathExpr, queryEntity, payloadSummary: summarizeExpression(objectArg.getText(source)), confidence: op || queryExpression ? 0.8 : 0.4, unresolvedReason }, { receiver, classifier: "service_client_send_object", operationPathExpression: shorthandPath ? op : void 0, rawPathExpression: pathAnalysis.rawExpression, literalPathSource: literalPathSource(pathAnalysis), odataPathIntent: operationPathExpr ? intent : void 0, pathAnalysis, staticPathCandidates: legacyPathCandidates(pathAnalysis), parserWarning: unresolvedReason, ...dynamicMethodDefaulted ? { dynamicMethodDefaulted: true } : {} });
3996
4001
  } else {
3997
4002
  const receiver = receiverName(expr.expression);
3998
4003
  const rootReceiver = rootReceiverName(expr.expression);
@@ -4034,7 +4039,10 @@ function classifyOutboundCallsInSource(source, filePath) {
4034
4039
  const rootReceiver = rootReceiverName(expr.expression);
4035
4040
  if (isSupportedEventReceiver(receiver, rootReceiver, serviceVariables)) {
4036
4041
  const eventName = literalText(node.arguments[0]);
4037
- if (eventName) add(node, { callType: expr.name.text === "on" ? "async_subscribe" : "async_emit", serviceVariableName: rootReceiver ?? receiver, eventNameExpr: eventName }, { receiver, rootReceiver, classifier: expr.name.text === "on" ? "cap_service_event_subscription" : "cap_service_event_emit", receiverClassification: "cap_evidence" });
4042
+ const effectiveReceiver = rootReceiver ?? receiver;
4043
+ const lifecycleHook = effectiveReceiver === "cds" && CDS_LIFECYCLE_EVENTS.has(eventName ?? "");
4044
+ const errorHook = expr.name.text === "on" && eventName === "error";
4045
+ if (eventName && !lifecycleHook && !errorHook) add(node, { callType: expr.name.text === "on" ? "async_subscribe" : "async_emit", serviceVariableName: effectiveReceiver, eventNameExpr: eventName }, { receiver, rootReceiver, classifier: expr.name.text === "on" ? "cap_service_event_subscription" : "cap_service_event_emit", receiverClassification: "cap_evidence" });
4038
4046
  }
4039
4047
  } else {
4040
4048
  const external = externalHttpEvidence(node, source);
@@ -8959,4 +8967,4 @@ export {
8959
8967
  selectorRepoAmbiguousDiagnostic,
8960
8968
  trace
8961
8969
  };
8962
- //# sourceMappingURL=chunk-BGD7UYJN.js.map
8970
+ //# sourceMappingURL=chunk-EGBTHN7J.js.map