@telorun/analyzer 0.71.0 → 0.72.0
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/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +42 -2
- package/dist/catch-scope.d.ts +72 -0
- package/dist/catch-scope.d.ts.map +1 -0
- package/dist/catch-scope.js +102 -0
- package/dist/deprecation.d.ts +21 -0
- package/dist/deprecation.d.ts.map +1 -0
- package/dist/deprecation.js +26 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/manifest-visitor.d.ts +17 -1
- package/dist/manifest-visitor.d.ts.map +1 -1
- package/dist/manifest-visitor.js +5 -1
- package/dist/migrations/report.d.ts +1 -1
- package/dist/migrations/report.d.ts.map +1 -1
- package/dist/migrations/report.js +5 -0
- package/dist/ref-slot.d.ts +15 -0
- package/dist/ref-slot.d.ts.map +1 -1
- package/dist/ref-slot.js +7 -0
- package/dist/resolve-throws-union.d.ts +29 -1
- package/dist/resolve-throws-union.d.ts.map +1 -1
- package/dist/resolve-throws-union.js +111 -16
- package/dist/schema-compat.d.ts.map +1 -1
- package/dist/schema-compat.js +13 -1
- package/dist/schema-error-report.d.ts.map +1 -1
- package/dist/schema-error-report.js +48 -4
- package/dist/schema-keywords.d.ts.map +1 -1
- package/dist/schema-keywords.js +3 -1
- package/dist/schema-walk.d.ts +27 -0
- package/dist/schema-walk.d.ts.map +1 -1
- package/dist/schema-walk.js +44 -0
- package/dist/telo-version.d.ts +1 -1
- package/dist/telo-version.js +1 -1
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +11 -0
- package/dist/validate-identifier-names.d.ts +2 -2
- package/dist/validate-identifier-names.d.ts.map +1 -1
- package/dist/validate-identifier-names.js +22 -7
- package/dist/validate-ref-slots.d.ts +1 -1
- package/dist/validate-ref-slots.d.ts.map +1 -1
- package/dist/validate-ref-slots.js +34 -0
- package/dist/validate-references.d.ts.map +1 -1
- package/dist/validate-references.js +27 -3
- package/dist/validate-throws-coverage.d.ts.map +1 -1
- package/dist/validate-throws-coverage.js +236 -85
- package/package.json +2 -2
- package/src/analyzer.ts +54 -1
- package/src/catch-scope.ts +157 -0
- package/src/deprecation.ts +36 -0
- package/src/index.ts +8 -1
- package/src/manifest-visitor.ts +19 -2
- package/src/migrations/report.ts +5 -1
- package/src/ref-slot.ts +19 -0
- package/src/resolve-throws-union.ts +139 -21
- package/src/schema-compat.ts +13 -0
- package/src/schema-error-report.ts +50 -6
- package/src/schema-keywords.ts +4 -1
- package/src/schema-walk.ts +56 -0
- package/src/telo-version.ts +1 -1
- package/src/types.ts +18 -0
- package/src/validate-identifier-names.ts +28 -9
- package/src/validate-ref-slots.ts +41 -1
- package/src/validate-references.ts +33 -3
- package/src/validate-throws-coverage.ts +333 -92
package/dist/analyzer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAiBzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAiBzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAgC9B,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAWvF,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC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kBAAkB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;CAsB5F"}
|
package/dist/analyzer.js
CHANGED
|
@@ -3,6 +3,7 @@ import { defaultRegistry, isRefSentinel, isTaggedSentinel, plainChainOf, } from
|
|
|
3
3
|
import { AliasResolver, scopeResolverForModule, } from "./alias-resolver.js";
|
|
4
4
|
import { buildCelEnvironment, isKindDocument, } from "./cel-environment.js";
|
|
5
5
|
import { DefinitionRegistry } from "./definition-registry.js";
|
|
6
|
+
import { readDeprecation } from "./deprecation.js";
|
|
6
7
|
import { effectiveAuthorSchema } from "./extends-resolution.js";
|
|
7
8
|
import { analyzerContractScope, resolveContract, } from "./invocation-contract.js";
|
|
8
9
|
import { buildCallGraph } from "./call-graph.js";
|
|
@@ -44,7 +45,7 @@ import { validateSchemaTypeRefs } from "./validate-schema-type-refs.js";
|
|
|
44
45
|
import { rewriteSyntheticOrigins } from "./rewrite-synthetic-origins.js";
|
|
45
46
|
import { celTypeSatisfiesJsonSchema, checkSchemaCompatibility, navigateSchemaToExprPath, substituteCelFields, validateAgainstSchema, } from "./schema-compat.js";
|
|
46
47
|
import { collectValueSchemaIssues } from "./validate-value-schema.js";
|
|
47
|
-
import { DiagnosticSeverity } from "./types.js";
|
|
48
|
+
import { DiagnosticSeverity, DiagnosticTag, } from "./types.js";
|
|
48
49
|
import { extractAccessChains, } from "./validate-cel-context.js";
|
|
49
50
|
import { celEvalModeAt, celEvalSites, mergeCelEvalSites, NO_CEL_EVAL_SITES, } from "./eval-paths.js";
|
|
50
51
|
import { BINDINGS_ANNOTATION, findBindingSites, resolveBindingOrder, } from "./cel-bindings.js";
|
|
@@ -1308,7 +1309,7 @@ export class StaticAnalyzer {
|
|
|
1308
1309
|
// unchecked where it is declared and its consequences land at whichever
|
|
1309
1310
|
// CEL site reads it — for a hyphen, sometimes as silent arithmetic. Takes
|
|
1310
1311
|
// the call graph for step names rather than re-walking the step arrays.
|
|
1311
|
-
diagnostics.push(...validateIdentifierNames(allManifests, defs, aliases, rootModules, getCallGraph()));
|
|
1312
|
+
diagnostics.push(...validateIdentifierNames(allManifests, defs, aliases, rootModules, getCallGraph(), { aliasesByModule, rootModules }));
|
|
1312
1313
|
// A file embed resolves at resource creation, so one written on a doc that
|
|
1313
1314
|
// is never instantiated is read by nothing and would ship silently.
|
|
1314
1315
|
diagnostics.push(...validateIncludePlacement(allManifests));
|
|
@@ -1652,6 +1653,45 @@ export class StaticAnalyzer {
|
|
|
1652
1653
|
});
|
|
1653
1654
|
continue;
|
|
1654
1655
|
}
|
|
1656
|
+
// A kind its own author marked `metadata.deprecated` still works exactly as
|
|
1657
|
+
// it did — the manifest is valid and keeps running — so this is a WARNING,
|
|
1658
|
+
// reported at the declaration because `kind:` is the line that has to
|
|
1659
|
+
// change. Emitted here rather than in a pass of its own so it reads the
|
|
1660
|
+
// kind THIS walk resolved: the resolution is alias- and gate-aware and
|
|
1661
|
+
// scope-dependent, and a second implementation of it would eventually
|
|
1662
|
+
// disagree about which definition a name means.
|
|
1663
|
+
//
|
|
1664
|
+
// Entry-module-scoped, like every other "not the consumer's to fix" check:
|
|
1665
|
+
// a library's internal use of a kind its own author deprecated is that
|
|
1666
|
+
// author's concern, and reporting it floods a consumer with lines they
|
|
1667
|
+
// cannot act on.
|
|
1668
|
+
//
|
|
1669
|
+
// No `DiagnosticFix`. `replacedBy` names a kind through the DECLARING
|
|
1670
|
+
// module's aliases; writing it into the consumer's file would produce a
|
|
1671
|
+
// prefix that resolves to nothing there — and a kind swap is not a
|
|
1672
|
+
// whole-value replacement anyway, since the successor needs its own import
|
|
1673
|
+
// and usually a different configuration.
|
|
1674
|
+
const deprecation = readDeprecation(definition.metadata);
|
|
1675
|
+
if (deprecation && (!ownModule || rootModules.has(ownModule))) {
|
|
1676
|
+
// Quoted CANONICALLY, not verbatim: `Self.Thing` is how the declaring
|
|
1677
|
+
// library names its own kind and means nothing where the warning lands.
|
|
1678
|
+
const declaringScope = scopeResolverForModule(definition.metadata?.module, rootModules, aliasesByModule) ?? aliases;
|
|
1679
|
+
const replacement = deprecation.replacedBy
|
|
1680
|
+
? (declaringScope.resolveKind(deprecation.replacedBy) ?? deprecation.replacedBy)
|
|
1681
|
+
: undefined;
|
|
1682
|
+
diagnostics.push({
|
|
1683
|
+
severity: DiagnosticSeverity.Warning,
|
|
1684
|
+
code: "DEPRECATED_KIND",
|
|
1685
|
+
source: SOURCE,
|
|
1686
|
+
// Warning-grade AND a deprecation: the severity says it must
|
|
1687
|
+
// eventually be dealt with, the tag says what it is, and an editor
|
|
1688
|
+
// strikes the kind through on the strength of the second.
|
|
1689
|
+
tags: [DiagnosticTag.Deprecated],
|
|
1690
|
+
message: `Kind '${m.kind}' is deprecated: ${deprecation.reason}` +
|
|
1691
|
+
(replacement ? ` Use '${replacement}' instead.` : ""),
|
|
1692
|
+
data: { resource, filePath, path: "kind" },
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1655
1695
|
// Validate resource config against the definition's AUTHOR-FACING schema —
|
|
1656
1696
|
// inheritance-resolved, with `kind` / `metadata` injected. See
|
|
1657
1697
|
// `validationSchemaFor`, which is where both derivations and the reason
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which `catches:` lists answer for one dispatch site.
|
|
3
|
+
*
|
|
4
|
+
* A catch list is one rung of a SCOPE LADDER — a route's, its router's, its
|
|
5
|
+
* server's — and every rule over those lists needs the same two answers: what
|
|
6
|
+
* a scope list is checked against, and which scopes enclose a given site. This
|
|
7
|
+
* module owns that model; the rule checks in `validate-throws-coverage.ts` read
|
|
8
|
+
* one answer instead of rebuilding it beside four unrelated jobs.
|
|
9
|
+
*
|
|
10
|
+
* Browser-safe: no Node built-ins.
|
|
11
|
+
*/
|
|
12
|
+
import type { DefinitionRegistry } from "./definition-registry.js";
|
|
13
|
+
import type { AliasResolver } from "./alias-resolver.js";
|
|
14
|
+
import type { ResourceManifest } from "@telorun/sdk";
|
|
15
|
+
import { type ResolveCtx } from "./resolve-throws-union.js";
|
|
16
|
+
/** What a list proves it renders: the codes its coverage-proving `when:` clauses
|
|
17
|
+
* name, and whether it ends in a catch-all.
|
|
18
|
+
*
|
|
19
|
+
* Unfiltered by any denominator, because this is also what an enclosing scope
|
|
20
|
+
* contributes DOWNWARD — a server entry naming a code the server's own closure
|
|
21
|
+
* could not enumerate still renders it for the route that throws it. Filtering
|
|
22
|
+
* the local answer against the declared union happens where that answer is
|
|
23
|
+
* used, and subtracting from the declared set makes the two equivalent there. */
|
|
24
|
+
export interface ProvenCoverage {
|
|
25
|
+
codes: Set<string>;
|
|
26
|
+
hasCatchAll: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const NO_COVERAGE: ProvenCoverage;
|
|
29
|
+
/** A declaration inside another resource's `x-telo-scope` array, kept with the
|
|
30
|
+
* resource that encloses it and the path it is written at in that resource's
|
|
31
|
+
* document. Both are needed: the owner is the only place its kind's alias scope
|
|
32
|
+
* can be found, and the only document position lookup can reach. */
|
|
33
|
+
export interface ScopedManifest {
|
|
34
|
+
manifest: ResourceManifest;
|
|
35
|
+
owner: ResourceManifest;
|
|
36
|
+
/** Concrete owner-relative path of the declaration (`with[0]`). */
|
|
37
|
+
path: string;
|
|
38
|
+
}
|
|
39
|
+
/** Every `with:`-scoped declaration in the set, once each.
|
|
40
|
+
*
|
|
41
|
+
* Scoped resources are absent from the flat manifest list, so every check that
|
|
42
|
+
* iterates it skips them — and standing a server up around a test is exactly
|
|
43
|
+
* that shape, so the sanctioned pattern was the one the pass could not see.
|
|
44
|
+
* Discovered through the shared visitor rather than a second scope walk. */
|
|
45
|
+
export declare function collectScopedManifests(manifests: ResourceManifest[], defs: DefinitionRegistry, aliases: AliasResolver, aliasesByModule: Map<string, AliasResolver>, rootModules: Set<string>): ScopedManifest[];
|
|
46
|
+
/** Which resources each resource's scope list encloses, along the slots that
|
|
47
|
+
* declare `throwsThrough` — one fact stated once, since the edge a throws
|
|
48
|
+
* closure crosses is the edge a catch scope encloses through. */
|
|
49
|
+
export declare function buildEnclosers(manifests: ResourceManifest[], definitionOf: (m: ResourceManifest) => {
|
|
50
|
+
schema?: Record<string, any>;
|
|
51
|
+
} | undefined, moduleOf: (m: ResourceManifest) => string | undefined, ctx: ResolveCtx): Map<ResourceManifest, ResourceManifest[]>;
|
|
52
|
+
/**
|
|
53
|
+
* What every scope enclosing a resource is guaranteed to render for it.
|
|
54
|
+
*
|
|
55
|
+
* **Across enclosers this INTERSECTS, and that is the whole correctness of the
|
|
56
|
+
* reduction.** Coverage claims that a throw cannot escape unrendered, so it holds
|
|
57
|
+
* only when EVERY path to the site renders it — a router mounted on a public
|
|
58
|
+
* server with a catch-all and an internal one without is covered on one path and
|
|
59
|
+
* bare on the other, and unioning the two reported it as fully covered while the
|
|
60
|
+
* internal server answered with the built-in envelope. A resource with no
|
|
61
|
+
* encloser contributes nothing rather than everything: the empty set is the
|
|
62
|
+
* identity for the site's own coverage, and treating "no paths" as "all paths
|
|
63
|
+
* agree" would assert coverage no list provides.
|
|
64
|
+
*
|
|
65
|
+
* A resource's OWN scope list is unioned in, because it applies on every path.
|
|
66
|
+
*
|
|
67
|
+
* Memoized, and a cycle among `throwsThrough` edges resolves to what has been
|
|
68
|
+
* accumulated so far rather than raising: this answers what a scope renders, and
|
|
69
|
+
* no cycle makes that answer larger.
|
|
70
|
+
*/
|
|
71
|
+
export declare function enclosingCoverage(manifest: ResourceManifest, ownScope: Map<ResourceManifest, ProvenCoverage>, enclosers: Map<ResourceManifest, ResourceManifest[]>, memo?: Map<ResourceManifest, ProvenCoverage>, walking?: Set<ResourceManifest>): ProvenCoverage;
|
|
72
|
+
//# sourceMappingURL=catch-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catch-scope.d.ts","sourceRoot":"","sources":["../src/catch-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO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AAE,gBAAgB,EAC1B,QAAQ,EAAE,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAC/C,SAAS,EAAE,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,CAAC,EACpD,IAAI,GAAE,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAa,EACvD,OAAO,GAAE,GAAG,CAAC,gBAAgB,CAAa,GACzC,cAAc,CAgChB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { visitManifest } from "./manifest-visitor.js";
|
|
2
|
+
import { forEachDrivenSlot } from "./schema-walk.js";
|
|
3
|
+
import { resolveRefManifest } from "./resolve-throws-union.js";
|
|
4
|
+
export const NO_COVERAGE = { codes: new Set(), hasCatchAll: false };
|
|
5
|
+
/** Every `with:`-scoped declaration in the set, once each.
|
|
6
|
+
*
|
|
7
|
+
* Scoped resources are absent from the flat manifest list, so every check that
|
|
8
|
+
* iterates it skips them — and standing a server up around a test is exactly
|
|
9
|
+
* that shape, so the sanctioned pattern was the one the pass could not see.
|
|
10
|
+
* Discovered through the shared visitor rather than a second scope walk. */
|
|
11
|
+
export function collectScopedManifests(manifests, defs, aliases, aliasesByModule, rootModules) {
|
|
12
|
+
const scoped = [];
|
|
13
|
+
visitManifest(manifests, defs, {
|
|
14
|
+
onScope: (event) => {
|
|
15
|
+
for (const { manifest, path } of event.declarations) {
|
|
16
|
+
if (!manifest?.kind || !manifest.metadata?.name)
|
|
17
|
+
continue;
|
|
18
|
+
scoped.push({ manifest, owner: event.source, path });
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
}, { aliases, aliasesByModule, rootModules });
|
|
22
|
+
return scoped;
|
|
23
|
+
}
|
|
24
|
+
/** Which resources each resource's scope list encloses, along the slots that
|
|
25
|
+
* declare `throwsThrough` — one fact stated once, since the edge a throws
|
|
26
|
+
* closure crosses is the edge a catch scope encloses through. */
|
|
27
|
+
export function buildEnclosers(manifests, definitionOf, moduleOf, ctx) {
|
|
28
|
+
const enclosers = new Map();
|
|
29
|
+
for (const manifest of manifests) {
|
|
30
|
+
const definition = definitionOf(manifest);
|
|
31
|
+
if (!definition?.schema)
|
|
32
|
+
continue;
|
|
33
|
+
forEachDrivenSlot(definition.schema, manifest, (driven) => {
|
|
34
|
+
if (driven.kind !== "ref" || !driven.slot.throwsThrough)
|
|
35
|
+
return;
|
|
36
|
+
const target = resolveRefManifest(driven.data, ctx, moduleOf(manifest));
|
|
37
|
+
if (!target || target === manifest)
|
|
38
|
+
return;
|
|
39
|
+
const list = enclosers.get(target);
|
|
40
|
+
if (list)
|
|
41
|
+
list.push(manifest);
|
|
42
|
+
else
|
|
43
|
+
enclosers.set(target, [manifest]);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return enclosers;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* What every scope enclosing a resource is guaranteed to render for it.
|
|
50
|
+
*
|
|
51
|
+
* **Across enclosers this INTERSECTS, and that is the whole correctness of the
|
|
52
|
+
* reduction.** Coverage claims that a throw cannot escape unrendered, so it holds
|
|
53
|
+
* only when EVERY path to the site renders it — a router mounted on a public
|
|
54
|
+
* server with a catch-all and an internal one without is covered on one path and
|
|
55
|
+
* bare on the other, and unioning the two reported it as fully covered while the
|
|
56
|
+
* internal server answered with the built-in envelope. A resource with no
|
|
57
|
+
* encloser contributes nothing rather than everything: the empty set is the
|
|
58
|
+
* identity for the site's own coverage, and treating "no paths" as "all paths
|
|
59
|
+
* agree" would assert coverage no list provides.
|
|
60
|
+
*
|
|
61
|
+
* A resource's OWN scope list is unioned in, because it applies on every path.
|
|
62
|
+
*
|
|
63
|
+
* Memoized, and a cycle among `throwsThrough` edges resolves to what has been
|
|
64
|
+
* accumulated so far rather than raising: this answers what a scope renders, and
|
|
65
|
+
* no cycle makes that answer larger.
|
|
66
|
+
*/
|
|
67
|
+
export function enclosingCoverage(manifest, ownScope, enclosers, memo = new Map(), walking = new Set()) {
|
|
68
|
+
const cached = memo.get(manifest);
|
|
69
|
+
if (cached)
|
|
70
|
+
return cached;
|
|
71
|
+
if (walking.has(manifest))
|
|
72
|
+
return NO_COVERAGE;
|
|
73
|
+
walking.add(manifest);
|
|
74
|
+
try {
|
|
75
|
+
const own = ownScope.get(manifest);
|
|
76
|
+
const result = {
|
|
77
|
+
codes: new Set(own?.codes ?? []),
|
|
78
|
+
hasCatchAll: own?.hasCatchAll ?? false,
|
|
79
|
+
};
|
|
80
|
+
const outer = (enclosers.get(manifest) ?? []).map((e) => enclosingCoverage(e, ownScope, enclosers, memo, walking));
|
|
81
|
+
if (outer.length > 0) {
|
|
82
|
+
const [first, ...rest] = outer;
|
|
83
|
+
const shared = new Set(first.codes);
|
|
84
|
+
let everyCatchAll = first.hasCatchAll;
|
|
85
|
+
for (const other of rest) {
|
|
86
|
+
for (const code of [...shared])
|
|
87
|
+
if (!other.codes.has(code))
|
|
88
|
+
shared.delete(code);
|
|
89
|
+
everyCatchAll &&= other.hasCatchAll;
|
|
90
|
+
}
|
|
91
|
+
for (const code of shared)
|
|
92
|
+
result.codes.add(code);
|
|
93
|
+
if (everyCatchAll)
|
|
94
|
+
result.hasCatchAll = true;
|
|
95
|
+
}
|
|
96
|
+
memo.set(manifest, result);
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
finally {
|
|
100
|
+
walking.delete(manifest);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `metadata.deprecated` — the annotation's single reader.
|
|
3
|
+
*
|
|
4
|
+
* Structural validity belongs to `validate-module-metadata.ts` (the strict half,
|
|
5
|
+
* the `ref-slot.ts` split). This side is deliberately lenient: it reads a
|
|
6
|
+
* well-formed block and treats everything else as absent, so a malformed
|
|
7
|
+
* declaration in a published dependency never becomes a warning at a consumer's
|
|
8
|
+
* use site. The consumer can fix neither one, and reporting the second blames
|
|
9
|
+
* the wrong author.
|
|
10
|
+
*/
|
|
11
|
+
/** A deprecation as declared: why, and optionally what to use instead. */
|
|
12
|
+
export interface Deprecation {
|
|
13
|
+
/** What a consumer reads to know what to do instead. Always non-empty. */
|
|
14
|
+
reason: string;
|
|
15
|
+
/** Alias-qualified kind (kind docs) or module ref (module docs), **as written
|
|
16
|
+
* in the declaring file's own scope** — `Self.Thing` means nothing to a
|
|
17
|
+
* consumer, so a use site resolves it before quoting it. */
|
|
18
|
+
replacedBy?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function readDeprecation(metadata: unknown): Deprecation | undefined;
|
|
21
|
+
//# sourceMappingURL=deprecation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../src/deprecation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf;;iEAE6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAc1E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `metadata.deprecated` — the annotation's single reader.
|
|
3
|
+
*
|
|
4
|
+
* Structural validity belongs to `validate-module-metadata.ts` (the strict half,
|
|
5
|
+
* the `ref-slot.ts` split). This side is deliberately lenient: it reads a
|
|
6
|
+
* well-formed block and treats everything else as absent, so a malformed
|
|
7
|
+
* declaration in a published dependency never becomes a warning at a consumer's
|
|
8
|
+
* use site. The consumer can fix neither one, and reporting the second blames
|
|
9
|
+
* the wrong author.
|
|
10
|
+
*/
|
|
11
|
+
export function readDeprecation(metadata) {
|
|
12
|
+
if (metadata === null || typeof metadata !== "object" || Array.isArray(metadata))
|
|
13
|
+
return undefined;
|
|
14
|
+
const block = metadata.deprecated;
|
|
15
|
+
if (block === null || typeof block !== "object" || Array.isArray(block))
|
|
16
|
+
return undefined;
|
|
17
|
+
const { reason, replacedBy } = block;
|
|
18
|
+
if (typeof reason !== "string" || reason.trim() === "")
|
|
19
|
+
return undefined;
|
|
20
|
+
return {
|
|
21
|
+
reason: reason.trim(),
|
|
22
|
+
...(typeof replacedBy === "string" && replacedBy.trim() !== ""
|
|
23
|
+
? { replacedBy: replacedBy.trim() }
|
|
24
|
+
: {}),
|
|
25
|
+
};
|
|
26
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export { hasDeclaredUse, isRefSlot, isRefUse, possibleUses, readRefSlot, REF_USE
|
|
|
37
37
|
export type { RefSlot, RefUse, RefUseCases } from "./ref-slot.js";
|
|
38
38
|
export { isStepSlot, readStepSlot, STEP_FRAGMENT } from "./step-slot.js";
|
|
39
39
|
export type { StepSlot } from "./step-slot.js";
|
|
40
|
+
export { readDeprecation } from "./deprecation.js";
|
|
41
|
+
export type { Deprecation } from "./deprecation.js";
|
|
40
42
|
export { ANNOTATION_KEYWORDS, registerTeloKeywords, valueTypeKeyword, } from "./value-type-keyword.js";
|
|
41
43
|
export { applyTextEdits, isPlainSafe, quoteStyleOf, renderFixReplacement, } from "./yaml-source-edit.js";
|
|
42
44
|
export type { QuoteStyle, TextEdit } from "./yaml-source-edit.js";
|
|
@@ -125,7 +127,7 @@ export type { CelScopeQueryContext, ContextDeclarationSite } from "./cel-scope-q
|
|
|
125
127
|
export { navigateConcretePath } from "./manifest-path.js";
|
|
126
128
|
export { ManifestAnalysis } from "./manifest-analysis.js";
|
|
127
129
|
export type { ManifestRef } from "./manifest-analysis.js";
|
|
128
|
-
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, diagnosticFix } from "./types.js";
|
|
130
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, DiagnosticTag, diagnosticFix, } from "./types.js";
|
|
129
131
|
export type { AnalysisDiagnostic, AnalysisOptions, DiagnosticData, DiagnosticFix, LoaderInitOptions, LoadOptions, ManifestSource, Position, PositionIndex, Range } from "./types.js";
|
|
130
132
|
export * from "./manifest-schemas.js";
|
|
131
133
|
export * from "./schema-keywords.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,YAAY,EACR,cAAc,EACd,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB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GACvB,MAAM,4BAA4B,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export { AMBIENT_CAPABILITIES, buildModuleGraph, contentKey, edgeClassOf, isAmbi
|
|
|
19
19
|
export { buildReferenceFieldMap, isRefEntry, isScopeEntry, satisfiesValueBranch, } from "./reference-field-map.js";
|
|
20
20
|
export { hasDeclaredUse, isRefSlot, isRefUse, possibleUses, readRefSlot, REF_USES, refSlotAnnotation, rewriteRefSlotKinds, transfersControl, } from "./ref-slot.js";
|
|
21
21
|
export { isStepSlot, readStepSlot, STEP_FRAGMENT } from "./step-slot.js";
|
|
22
|
+
export { readDeprecation } from "./deprecation.js";
|
|
22
23
|
export { ANNOTATION_KEYWORDS, registerTeloKeywords, valueTypeKeyword, } from "./value-type-keyword.js";
|
|
23
24
|
export { applyTextEdits, isPlainSafe, quoteStyleOf, renderFixReplacement, } from "./yaml-source-edit.js";
|
|
24
25
|
export { KNOWN_HOST_AXES, evaluateRequires, readRequires } from "./requires-block.js";
|
|
@@ -82,7 +83,7 @@ export { CelScopeQuery } from "./cel-scope-query.js";
|
|
|
82
83
|
// threads for every question that needs both.
|
|
83
84
|
export { navigateConcretePath } from "./manifest-path.js";
|
|
84
85
|
export { ManifestAnalysis } from "./manifest-analysis.js";
|
|
85
|
-
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, diagnosticFix } from "./types.js";
|
|
86
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity, DiagnosticTag, diagnosticFix, } from "./types.js";
|
|
86
87
|
export * from "./manifest-schemas.js";
|
|
87
88
|
// The JSON Schema vocabulary a manifest may write, as data — the source both the
|
|
88
89
|
// validating fragments and the IDE's completion are built from.
|
|
@@ -45,8 +45,24 @@ export interface ScopeBoundaryEvent {
|
|
|
45
45
|
source: ResourceManifest;
|
|
46
46
|
/** Dot-form prefixes of every `x-telo-scope` field on this resource. */
|
|
47
47
|
scopePrefixes: string[];
|
|
48
|
-
/**
|
|
48
|
+
/** VISIBILITY pointer (an `x-telo-scope` entry, e.g. `/steps`) → the manifests
|
|
49
|
+
* visible there. Keyed by where scoped names may be REFERENCED, which is not
|
|
50
|
+
* where they are DECLARED: `Run.Sequence` declares `x-telo-scope:
|
|
51
|
+
* ["/steps", "/targets"]` on its `with:` field, so one declaration appears
|
|
52
|
+
* under two keys and neither names `with`. Use {@link declarations} for the
|
|
53
|
+
* declaration site. */
|
|
49
54
|
manifestsByPointer: Map<string, ResourceManifest[]>;
|
|
55
|
+
/** Every inline declaration inside this resource's scopes, ONCE each, with the
|
|
56
|
+
* concrete path it is written at in the owner's document (`with[0]`).
|
|
57
|
+
*
|
|
58
|
+
* A diagnostic about a scoped resource has to anchor there: the resource is
|
|
59
|
+
* not a top-level document, so position lookup finds the OWNER and then walks
|
|
60
|
+
* this path into it. Deriving one from a visibility pointer instead names a
|
|
61
|
+
* region the declaration is not in (`steps[0]`). */
|
|
62
|
+
declarations: {
|
|
63
|
+
manifest: ResourceManifest;
|
|
64
|
+
path: string;
|
|
65
|
+
}[];
|
|
50
66
|
/** Names of every resource declared inside this resource's scopes. Used by
|
|
51
67
|
* the dependency graph to drop boot edges to scoped (on-demand) targets. */
|
|
52
68
|
enclosedNames: Set<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-visitor.d.ts","sourceRoot":"","sources":["../src/manifest-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAMlC;;;;;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G,IAAI,CAAC;IAC9C,OAAO,CAAC,CAAC,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACtC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,CAAC,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC5C,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,cAAc,CAAC,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC7C,6EAA6E;IAC7E,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC;;+EAE2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;wDAMoD;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;6BAEyB;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACnC;AA+DD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,YAAiB,GACzB,IAAI,CA2MN"}
|
package/dist/manifest-visitor.js
CHANGED
|
@@ -95,6 +95,7 @@ export function visitManifest(resources, registry, visitor, options = {}) {
|
|
|
95
95
|
if (refScopeMap && (wantsRefs || wantsScope)) {
|
|
96
96
|
const manifestsByPointer = new Map();
|
|
97
97
|
const scopeRefEntries = [];
|
|
98
|
+
const declarations = [];
|
|
98
99
|
for (const [fieldPath, entry] of refScopeMap) {
|
|
99
100
|
if (!isScopeEntry(entry))
|
|
100
101
|
continue;
|
|
@@ -104,6 +105,7 @@ export function visitManifest(resources, registry, visitor, options = {}) {
|
|
|
104
105
|
items.forEach((v, i) => {
|
|
105
106
|
if (!v || typeof v !== "object")
|
|
106
107
|
return;
|
|
108
|
+
const declarationPath = Array.isArray(fe.value) ? `${fe.path}[${i}]` : fe.path;
|
|
107
109
|
// A scope entry must be an inline resource definition; a `!ref`
|
|
108
110
|
// (tagged sentinel or resolved `{kind, name}`) is not — record it
|
|
109
111
|
// so a static diagnostic flags it instead of registering a
|
|
@@ -112,12 +114,13 @@ export function visitManifest(resources, registry, visitor, options = {}) {
|
|
|
112
114
|
if (isRefSentinel(v) ||
|
|
113
115
|
(typeof rec.kind === "string" && typeof rec.name === "string")) {
|
|
114
116
|
scopeRefEntries.push({
|
|
115
|
-
path:
|
|
117
|
+
path: declarationPath,
|
|
116
118
|
refName: isRefSentinel(v) ? v.source : String(rec.name),
|
|
117
119
|
});
|
|
118
120
|
return;
|
|
119
121
|
}
|
|
120
122
|
raw.push(v);
|
|
123
|
+
declarations.push({ manifest: v, path: declarationPath });
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
126
|
const pointers = Array.isArray(entry.scope) ? entry.scope : [entry.scope];
|
|
@@ -138,6 +141,7 @@ export function visitManifest(resources, registry, visitor, options = {}) {
|
|
|
138
141
|
source: r,
|
|
139
142
|
scopePrefixes,
|
|
140
143
|
manifestsByPointer,
|
|
144
|
+
declarations,
|
|
141
145
|
enclosedNames,
|
|
142
146
|
scopeRefEntries,
|
|
143
147
|
});
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import type { ResourceManifest } from "@telorun/sdk";
|
|
15
15
|
import { type PatchPlan } from "./patch.js";
|
|
16
16
|
import type { MigrationEntry, MigrationOperation, MigrationPath, MigrationRewrite } from "./types.js";
|
|
17
|
-
import type
|
|
17
|
+
import { type AnalysisDiagnostic } from "../types.js";
|
|
18
18
|
/** One patch that applied, as the reporting side needs to see it. */
|
|
19
19
|
export interface AppliedPatch {
|
|
20
20
|
readonly entry: MigrationEntry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/migrations/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;0CAY0C;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/migrations/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;0CAY0C;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAiB,KAAK,kBAAkB,EAAsB,MAAM,aAAa,CAAC;AAEzF,qEAAqE;AACrE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAC7C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAUjE;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,aAAa,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAChD,kBAAkB,CAmCpB"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* a clause of the generated sentence. */
|
|
14
14
|
import { isTaggedSentinel } from "@telorun/templating";
|
|
15
15
|
import { formatMigrationPath } from "./patch.js";
|
|
16
|
+
import { DiagnosticTag } from "../types.js";
|
|
16
17
|
export function toRewrite(applied) {
|
|
17
18
|
return {
|
|
18
19
|
entryId: applied.entry.id,
|
|
@@ -36,6 +37,10 @@ export function toDiagnostic(applied, rewrite, source, manifests) {
|
|
|
36
37
|
severity: applied.entry.severity,
|
|
37
38
|
code: applied.entry.code,
|
|
38
39
|
source: "telo-analyzer",
|
|
40
|
+
// A migration IS a deprecation — a legacy spelling still read, and the one
|
|
41
|
+
// an author is being asked to stop writing — so the range carries the tag
|
|
42
|
+
// whatever severity the entry chose for itself.
|
|
43
|
+
tags: [DiagnosticTag.Deprecated],
|
|
39
44
|
message: `${rewrite.summary}\n${applied.entry.reason}\n${closing}`,
|
|
40
45
|
data: {
|
|
41
46
|
filePath: source,
|
package/dist/ref-slot.d.ts
CHANGED
|
@@ -77,6 +77,21 @@ export interface RefSlot {
|
|
|
77
77
|
* that carries this call's arguments. Replaces
|
|
78
78
|
* `x-telo-topology-role: inputs`. */
|
|
79
79
|
inputs?: string;
|
|
80
|
+
/** Throws raised by the target — or by anything the target drives — surface
|
|
81
|
+
* through the DECLARING resource, so its own throws union includes the
|
|
82
|
+
* target's and its catch scope encloses the target's.
|
|
83
|
+
*
|
|
84
|
+
* It exists because the relation is real where `use` correctly says nothing:
|
|
85
|
+
* `Http.Server.mounts[].mount` is a `dependency` (the server holds the mount
|
|
86
|
+
* and calls a convention method on it — control reaches a route through the
|
|
87
|
+
* MOUNT's own `trigger.inbound` slot, not through this one), yet a throw from
|
|
88
|
+
* that route is exactly what the server renders. Following every `dependency`
|
|
89
|
+
* edge instead would drag a connection's throws into a router's denominator.
|
|
90
|
+
*
|
|
91
|
+
* Declared by the kind that HOLDS, because only it knows the throws surface
|
|
92
|
+
* through it, and it is the same fact its runtime establishes by rethrowing —
|
|
93
|
+
* so the annotation and the behaviour cannot disagree. */
|
|
94
|
+
throwsThrough?: boolean;
|
|
80
95
|
/** `x-telo-inline: true` on the slot or any `anyOf` branch — accepts an inline
|
|
81
96
|
* `{kind, ...config}` definition, not only a `!ref`. */
|
|
82
97
|
inline: boolean;
|
package/dist/ref-slot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref-slot.d.ts","sourceRoot":"","sources":["../src/ref-slot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;mDAEmD;AACnD,MAAM,MAAM,MAAM;AAChB,sEAAsE;AACpE,QAAQ;AACV,oEAAoE;GAClE,YAAY;AACd,gEAAgE;GAC9D,MAAM;AACR;oCACoC;GAClC,UAAU;AACZ;8EAC8E;GAC5E,iBAAiB;AACnB;kDACkD;GAChD,kBAAkB,CAAC;AAEvB,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAOrC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED;qCACqC;AACrC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;0DAE0D;AAC1D,MAAM,WAAW,WAAW;IAC1B;;8DAE0D;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACjC;AAED,4EAA4E;AAC5E,MAAM,WAAW,OAAO;IACtB;;;yDAGqD;IACrD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;6DAIyD;IACzD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yEAAyE;IACzE,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB;;0CAEsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;6DACyD;IACzD,MAAM,EAAE,OAAO,CAAC;IAChB;;;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EAAE,CAAC;IACf,yEAAyE;IACzE,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB;;0CAEsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;;;+DAa2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;6DACyD;IACzD,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;;;;;;;+BAW2B;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CACtC;AAED;yDACyD;AACzD,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAOpD;AAED;kDACkD;AAClD,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAErD;AAiFD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAiCtF;AAED;+DAC+D;AAC/D,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,OAAO,CAExE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GACxC,IAAI,CAiBN"}
|
package/dist/ref-slot.js
CHANGED
|
@@ -166,6 +166,7 @@ export function readRefSlot(node) {
|
|
|
166
166
|
const uses = new Set();
|
|
167
167
|
let useCases;
|
|
168
168
|
let inputs;
|
|
169
|
+
let throwsThrough = false;
|
|
169
170
|
for (const carrier of nodes) {
|
|
170
171
|
const annotation = carrier["x-telo-ref"];
|
|
171
172
|
for (const kind of readKinds(annotation)) {
|
|
@@ -180,6 +181,8 @@ export function readRefSlot(node) {
|
|
|
180
181
|
useCases ??= readUseCases(obj.use);
|
|
181
182
|
if (typeof obj.inputs === "string")
|
|
182
183
|
inputs ??= obj.inputs;
|
|
184
|
+
if (obj.throwsThrough === true)
|
|
185
|
+
throwsThrough = true;
|
|
183
186
|
}
|
|
184
187
|
const slot = {
|
|
185
188
|
kinds,
|
|
@@ -191,6 +194,8 @@ export function readRefSlot(node) {
|
|
|
191
194
|
slot.useCases = useCases;
|
|
192
195
|
if (inputs !== undefined)
|
|
193
196
|
slot.inputs = inputs;
|
|
197
|
+
if (throwsThrough)
|
|
198
|
+
slot.throwsThrough = true;
|
|
194
199
|
return slot;
|
|
195
200
|
}
|
|
196
201
|
/** True when the node declares a reference slot in any accepted shape. The
|
|
@@ -218,6 +223,8 @@ export function refSlotAnnotation(slot) {
|
|
|
218
223
|
annotation.use = slot.uses;
|
|
219
224
|
if (slot.inputs !== undefined)
|
|
220
225
|
annotation.inputs = slot.inputs;
|
|
226
|
+
if (slot.throwsThrough)
|
|
227
|
+
annotation.throwsThrough = true;
|
|
221
228
|
return annotation;
|
|
222
229
|
}
|
|
223
230
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResourceManifest } from "@telorun/sdk";
|
|
1
|
+
import type { ResourceDefinition, ResourceManifest } from "@telorun/sdk";
|
|
2
2
|
import { type AliasResolver } from "./alias-resolver.js";
|
|
3
3
|
import type { DefinitionRegistry } from "./definition-registry.js";
|
|
4
4
|
export interface ThrowsCodeMeta {
|
|
@@ -61,4 +61,32 @@ export declare function createResolveCtx(allManifests: ResourceManifest[], defs:
|
|
|
61
61
|
* unresolvable passthrough call sites. Cycles short-circuit to an empty
|
|
62
62
|
* result so resolution always terminates. */
|
|
63
63
|
export declare function resolveThrowsUnion(manifest: ResourceManifest, ctx: ResolveCtx): ThrowsUnion;
|
|
64
|
+
/**
|
|
65
|
+
* The union a SCOPE-LEVEL `catches:` list can be asked to render — everything
|
|
66
|
+
* the resource it is written on drives, transitively.
|
|
67
|
+
*
|
|
68
|
+
* `x-telo-catches-for: ""` is itself the claim that this is the denominator, so
|
|
69
|
+
* nothing is inferred from a kind that did not opt in, and no definition has to
|
|
70
|
+
* declare a `throws:` block to carry a catch scope (the kernel forbids one on a
|
|
71
|
+
* `Telo.Service` and a `Telo.Mount`, and rightly: what a router renders is not
|
|
72
|
+
* what a router THROWS).
|
|
73
|
+
*
|
|
74
|
+
* Three edges, three answers. A **step body** contributes its own traversal,
|
|
75
|
+
* subtraction included. A **control-transferring ref** contributes the target's
|
|
76
|
+
* own declared union — a route handler is a leaf here, and asking what IT drives
|
|
77
|
+
* would credit this scope with codes the handler catches internally. A
|
|
78
|
+
* **`throwsThrough` ref** recurses, because the target is another scope on the
|
|
79
|
+
* same ladder: a server renders what its mounts' routes throw, not what the
|
|
80
|
+
* mounts themselves declare.
|
|
81
|
+
*/
|
|
82
|
+
export declare function resolveScopeUnion(manifest: ResourceManifest, definition: ResourceDefinition, ctx: ResolveCtx, seen?: Set<ResourceManifest>): ThrowsUnion;
|
|
83
|
+
/**
|
|
84
|
+
* The manifest a resolved reference value names, in either shape it arrives in —
|
|
85
|
+
* a `{kind, name}` pair, or a `!ref` still carrying its parse-time sentinel.
|
|
86
|
+
*
|
|
87
|
+
* Exported because the catch-scope enclosure walk asks the same question about
|
|
88
|
+
* the same values; resolving a name twice by two rules is how two passes end up
|
|
89
|
+
* disagreeing about which resource a slot points at.
|
|
90
|
+
*/
|
|
91
|
+
export declare function resolveRefManifest(refValue: unknown, ctx: ResolveCtx, ownerModule: string | undefined): ResourceManifest | undefined;
|
|
64
92
|
//# sourceMappingURL=resolve-throws-union.d.ts.map
|