@saptools/service-flow 0.1.1 โ 0.1.3
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 +18 -0
- package/README.md +27 -7
- package/TECHNICAL-NOTE.md +7 -0
- package/dist/chunk-SIKIGT42.js +1166 -0
- package/dist/chunk-SIKIGT42.js.map +1 -0
- package/dist/cli.js +106 -20
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-RFBHT6BQ.js +0 -686
- package/dist/chunk-RFBHT6BQ.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
- Propagated imported helper-returned `cds.connect.to(...)` bindings to caller-local service variables with helper-chain evidence.
|
|
6
|
+
- Changed operation resolution to prefer ambiguous/dynamic/unresolved graph edges over confident operation-path-only links.
|
|
7
|
+
- Improved chained CAP query entity extraction and table/JSON source-location evidence.
|
|
8
|
+
- Hardened trace traversal with repo-aware downstream scopes, stable visited keys, edge de-duplication, and cycle markers.
|
|
9
|
+
- Added safer clean behavior that only recursively removes marker-owned state directories.
|
|
10
|
+
- Added `doctor --strict` to separate entity-only service noise from action-oriented default diagnostics.
|
|
11
|
+
|
|
12
|
+
## 0.1.2
|
|
13
|
+
|
|
14
|
+
- Hardened SQLite CLI access with busy timeouts, retries, and larger read buffers for large graph/link runs.
|
|
15
|
+
- Improved CDS service extraction for annotation placement/whitespace variants and materialized inherited operations for `extend service` declarations.
|
|
16
|
+
- Scoped service binding resolution by source file and added helper-returned binding propagation to prevent cross-file variable false positives.
|
|
17
|
+
- Improved outbound call extraction for `SELECT.one.from` and common CAP query builders.
|
|
18
|
+
- Reworked trace traversal to consume linked graph edges recursively and populate JSON nodes.
|
|
19
|
+
- Added doctor health checks for silent index-quality issues.
|
|
20
|
+
|
|
3
21
|
## 0.1.0
|
|
4
22
|
|
|
5
23
|
- Initial `@saptools/service-flow` CLI package for indexing and tracing SAP CAP service flows.
|
package/README.md
CHANGED
|
@@ -107,7 +107,6 @@ service-flow index --workspace /path/to/workspace --repo identity-service --forc
|
|
|
107
107
|
| `--workspace <path>` | Workspace root or a path that can load the saved workspace configuration |
|
|
108
108
|
| `--repo <name>` | Index only one repository by discovered repository name |
|
|
109
109
|
| `--force` | Re-index even when file hashes indicate nothing changed |
|
|
110
|
-
| `--concurrency <n>` | Reserved for future parallel indexing; currently defaults to `1` |
|
|
111
110
|
|
|
112
111
|
### ๐ `service-flow link`
|
|
113
112
|
|
|
@@ -125,12 +124,17 @@ service-flow link --workspace /path/to/workspace --force
|
|
|
125
124
|
|
|
126
125
|
### ๐งต `service-flow trace`
|
|
127
126
|
|
|
128
|
-
Trace one starting point and render table, JSON, or Mermaid output.
|
|
127
|
+
Trace one starting point and render table, JSON, or Mermaid output. Trace now
|
|
128
|
+
walks linked `graph_edges`, so a resolved remote operation is followed into the
|
|
129
|
+
target handler up to `--depth` instead of showing only calls in the first file.
|
|
130
|
+
JSON output includes typed nodes for calls, operations, database entities,
|
|
131
|
+
external destinations, and unresolved/dynamic candidates when edges exist.
|
|
129
132
|
|
|
130
133
|
```bash
|
|
131
134
|
service-flow trace --workspace /path/to/workspace --repo facade-service --operation doWork
|
|
132
135
|
service-flow trace --workspace /path/to/workspace --service /FacadeService --path /doWork --format json
|
|
133
|
-
service-flow trace --workspace /path/to/workspace --handler EntryHandler --
|
|
136
|
+
service-flow trace --workspace /path/to/workspace --handler EntryHandler --depth 1 --format json
|
|
137
|
+
service-flow trace --workspace /path/to/workspace --service /FacadeService --path /doWork --depth 2
|
|
134
138
|
service-flow trace --workspace /path/to/workspace --repo facade-service --operation doWork --var objectCode=xx --var objectType=Thing
|
|
135
139
|
```
|
|
136
140
|
|
|
@@ -175,7 +179,7 @@ Inspect indexed facts as JSON.
|
|
|
175
179
|
service-flow list repos --workspace /path/to/workspace
|
|
176
180
|
service-flow list services --workspace /path/to/workspace --repo facade-service
|
|
177
181
|
service-flow list operations --workspace /path/to/workspace --repo facade-service --service /FacadeService
|
|
178
|
-
service-flow list calls --workspace /path/to/workspace --repo facade-service
|
|
182
|
+
service-flow list calls --workspace /path/to/workspace --repo facade-service --operation doWork
|
|
179
183
|
```
|
|
180
184
|
|
|
181
185
|
| Command | Description |
|
|
@@ -183,7 +187,22 @@ service-flow list calls --workspace /path/to/workspace --repo facade-service
|
|
|
183
187
|
| `list repos` | Print discovered repositories with kind and package name |
|
|
184
188
|
| `list services` | Print indexed CDS services, optionally filtered by repo |
|
|
185
189
|
| `list operations` | Print indexed actions/functions/events, optionally filtered by repo and service |
|
|
186
|
-
| `list calls` | Print indexed outbound calls, optionally filtered by repo |
|
|
190
|
+
| `list calls` | Print indexed outbound calls, optionally filtered by repo and operation/path |
|
|
191
|
+
|
|
192
|
+
### Troubleshooting resolution accuracy
|
|
193
|
+
|
|
194
|
+
- If a remote edge is unresolved, run `service-flow list calls --operation <name>`
|
|
195
|
+
and `service-flow inspect operation <name>` to compare the captured call path
|
|
196
|
+
with indexed CDS operations. Operation-path-only matches are shown as ambiguous/unresolved with candidate counts instead of high-confidence cross-repo links.
|
|
197
|
+
- Service bindings are matched to outbound calls by repository, source file, and
|
|
198
|
+
variable name to avoid false cross-file matches. If a helper-returned client is
|
|
199
|
+
not linked, export the helper from a relative import target and ensure it returns
|
|
200
|
+
`cds.connect.to(...)` directly or through a simple wrapper. Trace evidence includes the caller variable, imported helper, source file, and exported symbol.
|
|
201
|
+
- `SELECT.one.from(Entity)`, `SELECT.from(Entity)`, `INSERT.into(Entity)`,
|
|
202
|
+
`UPDATE(Entity)`, and `DELETE.from(Entity)` are indexed as local database
|
|
203
|
+
query entities when statically knowable.
|
|
204
|
+
- `doctor` reports silent quality problems such as services without operations,
|
|
205
|
+
handler repositories without CDS service facts, and an empty search index.
|
|
187
206
|
|
|
188
207
|
### ๐ฌ `service-flow inspect ...`
|
|
189
208
|
|
|
@@ -202,10 +221,11 @@ service-flow inspect operation /doWork --workspace /path/to/workspace
|
|
|
202
221
|
|
|
203
222
|
### ๐ฉบ `service-flow doctor`
|
|
204
223
|
|
|
205
|
-
Print stored diagnostics. A clean workspace prints `No diagnostics recorded`.
|
|
224
|
+
Print stored diagnostics. Default output suppresses high-noise entity-only service checks; `--strict` includes them. A clean workspace prints `No diagnostics recorded`.
|
|
206
225
|
|
|
207
226
|
```bash
|
|
208
227
|
service-flow doctor --workspace /path/to/workspace
|
|
228
|
+
service-flow doctor --workspace /path/to/workspace --strict
|
|
209
229
|
```
|
|
210
230
|
|
|
211
231
|
### ๐งน `service-flow clean`
|
|
@@ -220,7 +240,7 @@ service-flow clean --workspace /path/to/workspace
|
|
|
220
240
|
| Flag | Description |
|
|
221
241
|
| --- | --- |
|
|
222
242
|
| `--db-only` | Remove only the configured SQLite database |
|
|
223
|
-
| *(default)* | Remove the
|
|
243
|
+
| *(default)* | Remove the marker-owned `.service-flow` state directory; custom/unowned or dangerous parent directories are refused |
|
|
224
244
|
|
|
225
245
|
---
|
|
226
246
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Service Flow 0.1.3 Resolution Notes
|
|
2
|
+
|
|
3
|
+
- Imported helper bindings: TypeScript imports are resolved for relative modules. When a caller assigns `const client = await connectToService()`, the analyzer follows the imported symbol to an exported helper that returns `cds.connect.to(...)` and persists caller-variable evidence plus the helper source/export chain.
|
|
4
|
+
- Candidate ranking: operation-path matches start as weak candidates. A resolved operation edge requires a strong signal such as exact service path, CDS alias/destination context, or explicit dynamic variable overrides. Otherwise candidates are preserved in edge evidence as ambiguous or unresolved.
|
|
5
|
+
- Edge states: `REMOTE_CALL_RESOLVES_TO_OPERATION` is used only above the resolution threshold; `DYNAMIC_EDGE_CANDIDATE` preserves runtime-dependent service paths/destinations; `UNRESOLVED_EDGE` carries candidate counts and reasons when static evidence is insufficient.
|
|
6
|
+
- Trace cycle safety: trace queues carry repository IDs, visited scope keys are independent of depth, graph edge IDs are emitted once, and revisiting an already-seen downstream operation scope creates a cycle marker instead of recursive expansion.
|
|
7
|
+
- SQLite reliability: the package uses WAL, foreign keys, busy timeouts, and retries around the SQLite adapter. Statement failures throw before output rendering so commands do not report successful JSON/table/Mermaid results after an internal database failure.
|