@saptools/service-flow 0.1.67 → 0.1.69
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 +20 -0
- package/README.md +27 -9
- package/TECHNICAL-NOTE.md +36 -0
- package/dist/chunk-3N3B5KHV.js +19596 -0
- package/dist/chunk-3N3B5KHV.js.map +1 -0
- package/dist/cli.js +2645 -521
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +67 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/cli/001-index-summary.ts +22 -0
- package/src/cli/003-doctor-package-resolution.ts +68 -0
- package/src/cli/doctor.ts +25 -14
- package/src/cli.ts +151 -87
- package/src/db/000-call-fact-repository.ts +499 -340
- package/src/db/001-fact-lifecycle.ts +60 -30
- package/src/db/002-fact-json-inventory.ts +169 -0
- package/src/db/003-current-fact-semantics.ts +699 -0
- package/src/db/004-package-target-invalidation.ts +183 -0
- package/src/db/005-schema-structure.ts +201 -0
- package/src/db/006-relative-symbol-resolution.ts +464 -0
- package/src/db/007-package-fact-semantics.ts +573 -0
- package/src/db/008-relative-fact-semantics.ts +210 -0
- package/src/db/009-binding-fact-semantics.ts +352 -0
- package/src/db/010-package-symbol-surface-semantics.ts +320 -0
- package/src/db/011-symbol-call-semantics.ts +144 -0
- package/src/db/012-binding-reference-proof.ts +268 -0
- package/src/db/013-index-publication-failure.ts +91 -0
- package/src/db/014-binding-helper-provenance.ts +17 -0
- package/src/db/migrations.ts +16 -3
- package/src/db/repositories.ts +130 -6
- package/src/db/schema.ts +4 -2
- package/src/index.ts +12 -0
- package/src/indexer/cds-extension-resolver.ts +27 -3
- package/src/indexer/repository-indexer.ts +135 -13
- package/src/indexer/workspace-indexer.ts +237 -34
- package/src/linker/003-package-import-symbol-resolver.ts +363 -131
- package/src/linker/004-event-subscription-handler-linker.ts +34 -11
- package/src/linker/005-odata-path-structure.ts +371 -0
- package/src/linker/006-event-template-link.ts +72 -0
- package/src/linker/007-call-edge-insertion.ts +568 -0
- package/src/linker/cross-repo-linker.ts +4 -166
- package/src/linker/odata-path-normalizer.ts +273 -180
- package/src/linker/service-resolver.ts +197 -77
- package/src/parsers/000-direct-query-execution.ts +11 -0
- package/src/parsers/002-symbol-import-bindings.ts +516 -0
- package/src/parsers/003-package-public-surface.ts +661 -0
- package/src/parsers/004-fact-identity.ts +108 -0
- package/src/parsers/005-event-subscription-facts.ts +281 -0
- package/src/parsers/006-binding-identity.ts +348 -0
- package/src/parsers/007-source-fact-reconciliation.ts +105 -0
- package/src/parsers/008-package-surface-publication.ts +82 -0
- package/src/parsers/009-symbol-call-facts.ts +528 -0
- package/src/parsers/010-package-public-surface-analysis.ts +352 -0
- package/src/parsers/011-binding-lexical-scope.ts +583 -0
- package/src/parsers/012-package-fact-contract.ts +306 -0
- package/src/parsers/013-executable-body-eligibility.ts +35 -0
- package/src/parsers/014-service-binding-helper-flow.ts +306 -0
- package/src/parsers/015-service-binding-collector.ts +693 -0
- package/src/parsers/016-local-symbol-reference.ts +261 -0
- package/src/parsers/017-symbol-derived-contexts.ts +268 -0
- package/src/parsers/018-package-commonjs-syntax.ts +142 -0
- package/src/parsers/019-binding-assignment-targets.ts +76 -0
- package/src/parsers/020-stable-local-value.ts +217 -0
- package/src/parsers/021-binding-visibility.ts +168 -0
- package/src/parsers/022-outbound-expression-analysis.ts +700 -0
- package/src/parsers/023-outbound-call-classifier.ts +692 -0
- package/src/parsers/operation-path-analysis.ts +6 -1
- package/src/parsers/outbound-call-parser.ts +162 -512
- package/src/parsers/package-json-parser.ts +45 -3
- package/src/parsers/service-binding-parser-helpers.ts +86 -15
- package/src/parsers/service-binding-parser.ts +147 -597
- package/src/parsers/symbol-parser.ts +513 -352
- package/src/trace/002-trace-diagnostics.ts +36 -1
- package/src/trace/007-implementation-start-diagnostic.ts +1 -0
- package/src/trace/011-event-subscriber-traversal.ts +100 -8
- package/src/trace/013-trace-root-scopes.ts +2 -3
- package/src/trace/014-compact-contract.ts +6 -0
- package/src/trace/015-trace-edge-recorder.ts +61 -4
- package/src/trace/016-compact-projector.ts +15 -17
- package/src/trace/019-trace-edge-semantics.ts +6 -10
- package/src/trace/020-compact-field-projection.ts +122 -38
- package/src/trace/021-compact-decision-normalization.ts +171 -0
- package/src/trace/022-trace-fact-preflight.ts +21 -0
- package/src/trace/023-nested-event-scopes.ts +23 -0
- package/src/trace/024-compact-observation-decision.ts +81 -0
- package/src/trace/025-trace-implementation-scope.ts +123 -0
- package/src/trace/026-trace-start-scope.ts +336 -0
- package/src/trace/027-trace-scope-execution.ts +566 -0
- package/src/trace/028-trace-operation-execution.ts +336 -0
- package/src/trace/029-trace-start-implementation.ts +172 -0
- package/src/trace/030-event-runtime-resolution.ts +151 -0
- package/src/trace/031-local-call-expansion.ts +37 -0
- package/src/trace/implementation-hints.ts +9 -6
- package/src/trace/selectors.ts +1 -0
- package/src/trace/trace-engine.ts +122 -624
- package/src/types.ts +57 -0
- package/src/utils/001-placeholders.ts +188 -10
- package/src/version.ts +1 -1
- package/dist/chunk-ZQABU7MR.js +0 -12151
- package/dist/chunk-ZQABU7MR.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ImplementationHint } from '../types.js';
|
|
2
2
|
import { projectBounded } from '../utils/000-bounded-projection.js';
|
|
3
|
+
import { compareBinary } from './010-traversal-scope.js';
|
|
3
4
|
|
|
4
5
|
interface Candidate {
|
|
5
6
|
accepted?: boolean;
|
|
@@ -106,6 +107,7 @@ export function implementationHintSuggestions(rawEvidence: Record<string, unknow
|
|
|
106
107
|
|
|
107
108
|
export function implementationHintSuggestionProjection(
|
|
108
109
|
rawEvidence: Record<string, unknown>,
|
|
110
|
+
limit?: number,
|
|
109
111
|
): ImplementationHintSuggestionProjection {
|
|
110
112
|
const evidence = asEvidence(rawEvidence);
|
|
111
113
|
const accepted = (evidence.candidates ?? []).filter((candidate) => candidate.accepted);
|
|
@@ -119,7 +121,7 @@ export function implementationHintSuggestionProjection(
|
|
|
119
121
|
}
|
|
120
122
|
const repos = selectableRepositories(accepted);
|
|
121
123
|
const repositoryProjection = projectBounded(
|
|
122
|
-
repos,
|
|
124
|
+
repos, compareBinary, limit,
|
|
123
125
|
);
|
|
124
126
|
const suggestions = accepted
|
|
125
127
|
.flatMap((candidate) => {
|
|
@@ -142,7 +144,7 @@ export function implementationHintSuggestionProjection(
|
|
|
142
144
|
cli: `--implementation-hint ${hintString(hint)}`,
|
|
143
145
|
}];
|
|
144
146
|
});
|
|
145
|
-
const projection = projectBounded(suggestions, compareSuggestion);
|
|
147
|
+
const projection = projectBounded(suggestions, compareSuggestion, limit);
|
|
146
148
|
return {
|
|
147
149
|
suggestions: projection.items,
|
|
148
150
|
suggestionCount: projection.totalCount,
|
|
@@ -170,15 +172,16 @@ function projectedSuggestions(value: unknown): ImplementationHintSuggestionProje
|
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
function compareHints(left: ImplementationHint, right: ImplementationHint): number {
|
|
173
|
-
return hintString(left)
|
|
175
|
+
return compareBinary(hintString(left), hintString(right));
|
|
174
176
|
}
|
|
175
177
|
|
|
176
178
|
function compareSuggestion(
|
|
177
179
|
left: Record<string, unknown>,
|
|
178
180
|
right: Record<string, unknown>,
|
|
179
181
|
): number {
|
|
180
|
-
return String(left.cli ?? '')
|
|
181
|
-
||
|
|
182
|
+
return compareBinary(String(left.cli ?? ''), String(right.cli ?? ''))
|
|
183
|
+
|| compareBinary(
|
|
184
|
+
String(left.implementationRepo ?? ''),
|
|
182
185
|
String(right.implementationRepo ?? ''),
|
|
183
186
|
);
|
|
184
187
|
}
|
|
@@ -202,7 +205,7 @@ function selectableRepositories(candidates: Candidate[]): string[] {
|
|
|
202
205
|
const repos = new Set(candidates.flatMap((candidate) => candidate.handlerPackage?.name ? [candidate.handlerPackage.name] : []));
|
|
203
206
|
return [...repos]
|
|
204
207
|
.filter((repo) => candidates.filter((candidate) => candidateMatchesRepo(candidate, repo)).length === 1)
|
|
205
|
-
.sort();
|
|
208
|
+
.sort(compareBinary);
|
|
206
209
|
}
|
|
207
210
|
|
|
208
211
|
function assignHintField(hint: Partial<ImplementationHint>, key: string, value: string): void {
|
package/src/trace/selectors.ts
CHANGED
|
@@ -550,6 +550,7 @@ export function ambiguousStartDiagnostic(
|
|
|
550
550
|
severity: 'warning',
|
|
551
551
|
code: 'trace_start_ambiguous',
|
|
552
552
|
message,
|
|
553
|
+
selectorKind: 'operation',
|
|
553
554
|
normalizedSelectorValue: requested,
|
|
554
555
|
resolutionStage: 'operation',
|
|
555
556
|
resolutionStatus: 'ambiguous_operation',
|