@telorun/analyzer 0.66.0 → 0.67.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 +37 -2
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +67 -16
- package/dist/cel-scope.d.ts +8 -0
- package/dist/cel-scope.d.ts.map +1 -1
- package/dist/cel-scope.js +66 -8
- package/dist/definition-registry.d.ts +17 -0
- package/dist/definition-registry.d.ts.map +1 -1
- package/dist/definition-registry.js +35 -0
- package/dist/dependency-graph.d.ts.map +1 -1
- package/dist/dependency-graph.js +65 -0
- package/dist/flatten-for-analyzer.d.ts +36 -0
- package/dist/flatten-for-analyzer.d.ts.map +1 -1
- package/dist/flatten-for-analyzer.js +103 -4
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/inline-imports.d.ts.map +1 -1
- package/dist/inline-imports.js +1 -0
- package/dist/manifest-visitor.d.ts +4 -0
- package/dist/manifest-visitor.d.ts.map +1 -1
- package/dist/manifest-visitor.js +28 -0
- package/dist/precompile.d.ts.map +1 -1
- package/dist/precompile.js +8 -0
- package/dist/resolve-ref-sentinels.d.ts.map +1 -1
- package/dist/resolve-ref-sentinels.js +14 -1
- package/dist/resource-input.d.ts +75 -0
- package/dist/resource-input.d.ts.map +1 -0
- package/dist/resource-input.js +90 -0
- package/dist/schema-projection.d.ts +13 -0
- package/dist/schema-projection.d.ts.map +1 -1
- package/dist/schema-projection.js +7 -0
- package/dist/system-kinds.d.ts +7 -2
- package/dist/system-kinds.d.ts.map +1 -1
- package/dist/system-kinds.js +7 -2
- package/dist/telo-version.d.ts +1 -1
- package/dist/telo-version.js +1 -1
- package/dist/template-body.d.ts +50 -0
- package/dist/template-body.d.ts.map +1 -0
- package/dist/template-body.js +58 -0
- package/dist/validate-cel-context.d.ts.map +1 -1
- package/dist/validate-cel-context.js +68 -8
- package/dist/validate-identifier-names.d.ts.map +1 -1
- package/dist/validate-identifier-names.js +17 -2
- package/dist/validate-references.d.ts +17 -0
- package/dist/validate-references.d.ts.map +1 -1
- package/dist/validate-references.js +68 -16
- package/dist/validate-resource-inputs.d.ts +35 -0
- package/dist/validate-resource-inputs.d.ts.map +1 -0
- package/dist/validate-resource-inputs.js +319 -0
- package/dist/validate-template-dispatch.d.ts +27 -0
- package/dist/validate-template-dispatch.d.ts.map +1 -0
- package/dist/validate-template-dispatch.js +95 -0
- package/package.json +3 -3
- package/src/analyzer.ts +45 -2
- package/src/builtins.ts +69 -16
- package/src/cel-scope.ts +90 -14
- package/src/definition-registry.ts +36 -0
- package/src/dependency-graph.ts +66 -0
- package/src/flatten-for-analyzer.ts +116 -3
- package/src/index.ts +12 -0
- package/src/inline-imports.ts +1 -0
- package/src/manifest-visitor.ts +33 -0
- package/src/precompile.ts +8 -0
- package/src/resolve-ref-sentinels.ts +12 -1
- package/src/resource-input.ts +132 -0
- package/src/schema-projection.ts +19 -0
- package/src/system-kinds.ts +7 -2
- package/src/telo-version.ts +1 -1
- package/src/template-body.ts +104 -0
- package/src/validate-cel-context.ts +67 -7
- package/src/validate-identifier-names.ts +18 -3
- package/src/validate-references.ts +70 -14
- package/src/validate-resource-inputs.ts +367 -0
- package/src/validate-template-dispatch.ts +99 -0
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;AA8B9B,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAWvF,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAA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ACH,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,eAAe,CAAC,EAAE,eAAe,GAChC,kBAAkB,EAAE;IA+6DvB,aAAa,CACX,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,eAAe,CAAC,EAAE,eAAe,GAChC,kBAAkB,EAAE;IAMvB,SAAS,CACP,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,gBAAgB,EAI1B,kBAAkB,CAAC,EAAE,gBAAgB,EAAE,GACtC,gBAAgB,EAAE;IAyBrB,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,gBAAgB,GACzB;QAAE,WAAW,EAAE,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
|
@@ -59,8 +59,11 @@ import { validateInvocationContract } from "./validate-invocation-contract.js";
|
|
|
59
59
|
import { collectRefInputIssues, collectStepInputIssues } from "./validate-step-inputs.js";
|
|
60
60
|
import { validateNestedInlineResources } from "./validate-nested-inline.js";
|
|
61
61
|
import { validateProviderCoherence } from "./validate-provider-coherence.js";
|
|
62
|
-
import { validateReferences } from "./validate-references.js";
|
|
62
|
+
import { kindSatisfies, validateReferences } from "./validate-references.js";
|
|
63
63
|
import { validateReferenceForms } from "./validate-reference-forms.js";
|
|
64
|
+
import { isInjectedDeclaration } from "./resource-input.js";
|
|
65
|
+
import { validateResourceInputs } from "./validate-resource-inputs.js";
|
|
66
|
+
import { validateTemplateDispatch } from "./validate-template-dispatch.js";
|
|
64
67
|
import { validateUnusedDeclarations } from "./validate-unused-declarations.js";
|
|
65
68
|
import { validateThrowsCoverage } from "./validate-throws-coverage.js";
|
|
66
69
|
import { readStepSlot } from "./step-slot.js";
|
|
@@ -1399,6 +1402,17 @@ export class StaticAnalyzer {
|
|
|
1399
1402
|
const runReachable = reportsObservedState
|
|
1400
1403
|
? collectRunReachableNames(getCallGraph())
|
|
1401
1404
|
: new Set();
|
|
1405
|
+
// "Nothing starts this" is DECLARATION-derived, and a library does not
|
|
1406
|
+
// declare its injected inputs — whether the application starts the instance
|
|
1407
|
+
// it hands down is answerable only where that instance is declared. Inside
|
|
1408
|
+
// the library the question has no answer, so the name is treated as
|
|
1409
|
+
// reachable rather than reported on a `targets:` list the author cannot
|
|
1410
|
+
// write. The check still runs at the injection site, against the real
|
|
1411
|
+
// declaration.
|
|
1412
|
+
for (const m of allManifests) {
|
|
1413
|
+
if (isInjectedDeclaration(m))
|
|
1414
|
+
runReachable.add(m.metadata?.name);
|
|
1415
|
+
}
|
|
1402
1416
|
// Build typed kernel globals schema so x-telo-context chain validation
|
|
1403
1417
|
// recognises variables, secrets, resources, env automatically
|
|
1404
1418
|
const kernelGlobals = buildKernelGlobalsIndex(allManifests, observedState);
|
|
@@ -1511,6 +1525,15 @@ export class StaticAnalyzer {
|
|
|
1511
1525
|
if (m.metadata?.forwardedExport === true) {
|
|
1512
1526
|
continue;
|
|
1513
1527
|
}
|
|
1528
|
+
// A kind-only stand-in for a `resources:` entry is a DECLARATION, not an
|
|
1529
|
+
// instantiation: its kind is routinely an abstract and its configuration
|
|
1530
|
+
// is the importer's to supply, so validating it here would report a
|
|
1531
|
+
// non-instantiable kind and a page of missing required fields against a
|
|
1532
|
+
// block that is correct. Its kind is checked where it was written, by
|
|
1533
|
+
// `validate-resource-inputs`; it participates here only as a resolution
|
|
1534
|
+
// target and as a CEL type.
|
|
1535
|
+
if (isInjectedDeclaration(m))
|
|
1536
|
+
continue;
|
|
1514
1537
|
const resource = { kind: m.kind, name: m.metadata?.name };
|
|
1515
1538
|
// Resolve kind through alias if needed; direct lookup takes priority so that
|
|
1516
1539
|
// aliases whose name matches the module name (the common case) work without
|
|
@@ -1599,6 +1622,12 @@ export class StaticAnalyzer {
|
|
|
1599
1622
|
const projected = resolveSchemaProjections(schema, m, resourceProjectionScope, projectionFailures);
|
|
1600
1623
|
if (!ownModule || rootModules.has(ownModule)) {
|
|
1601
1624
|
for (const failure of projectionFailures) {
|
|
1625
|
+
// A projection through a library's own resource INPUT is
|
|
1626
|
+
// unanswerable here — the entries belong to the declaration the
|
|
1627
|
+
// importer supplies — so it is not a defect in the block that named
|
|
1628
|
+
// it. The check runs at the injection site instead.
|
|
1629
|
+
if (failure.reason === "injected")
|
|
1630
|
+
continue;
|
|
1602
1631
|
diagnostics.push({
|
|
1603
1632
|
severity: DiagnosticSeverity.Error,
|
|
1604
1633
|
code: "SCHEMA_PROJECTION_FROM_UNRESOLVED",
|
|
@@ -2199,7 +2228,7 @@ export class StaticAnalyzer {
|
|
|
2199
2228
|
}
|
|
2200
2229
|
}
|
|
2201
2230
|
},
|
|
2202
|
-
}, { aliases });
|
|
2231
|
+
}, { aliases, aliasesByModule, rootModules });
|
|
2203
2232
|
// The two halves of "does this expression fit the slot it flows into" meet
|
|
2204
2233
|
// here: the engine resolved the expression's type during the walk above,
|
|
2205
2234
|
// and the schema walk recorded the slot. An expression that failed to check
|
|
@@ -2269,6 +2298,12 @@ export class StaticAnalyzer {
|
|
|
2269
2298
|
diagnostics.push(...validateThrowsCoverage(allManifests, defs, aliases, this.celEnv, aliasesByModule, rootModules));
|
|
2270
2299
|
// Warn about declared variables / secrets / ports that no CEL references.
|
|
2271
2300
|
diagnostics.push(...validateUnusedDeclarations(allManifests, this.celEnv));
|
|
2301
|
+
// A `!ref` at a definition's dispatch slot must name a sibling `resources:`
|
|
2302
|
+
// entry — the slot no reference pass reaches, so the tag would otherwise
|
|
2303
|
+
// advertise a resolution nothing performs.
|
|
2304
|
+
diagnostics.push(...validateTemplateDispatch(allManifests, rootModules));
|
|
2305
|
+
// A library's declared resource inputs, and every import that supplies them.
|
|
2306
|
+
diagnostics.push(...validateResourceInputs(allManifests, defs, aliases, rootModules, (supplied, required) => kindSatisfies(supplied, required, defs)));
|
|
2272
2307
|
// Reroute diagnostics on synthetic (inline-extracted) resources back to
|
|
2273
2308
|
// the chain root so position-index lookups land on the parent doc.
|
|
2274
2309
|
return rewriteSyntheticOrigins(suppressUnreadableModuleDiagnostics(diagnostics, unreadableFiles), allManifests);
|
package/dist/builtins.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AA8OvD,eAAO,MAAM,eAAe,EAAE,kBAAkB,EA+tB/C,CAAC"}
|
package/dist/builtins.js
CHANGED
|
@@ -215,6 +215,33 @@ const ROOT_LOGGING_SCHEMA = {
|
|
|
215
215
|
},
|
|
216
216
|
additionalProperties: false,
|
|
217
217
|
};
|
|
218
|
+
/** A `Telo.Library`'s declared resource inputs — the instances it requires from
|
|
219
|
+
* whoever imports it, the inward half of the symmetry `exports.resources`
|
|
220
|
+
* already had outward. Each entry is constrained by KIND ONLY, through the same
|
|
221
|
+
* alias-qualified grammar `extends:` and `x-telo-ref` use; there is no `use:`,
|
|
222
|
+
* because the boundary is a dependency edge for init order whatever the library
|
|
223
|
+
* does with the instance. See `analyzer/nodejs/src/resource-input.ts`. */
|
|
224
|
+
const LIBRARY_RESOURCE_INPUTS_SCHEMA = {
|
|
225
|
+
type: "object",
|
|
226
|
+
additionalProperties: {
|
|
227
|
+
type: "object",
|
|
228
|
+
required: ["kind"],
|
|
229
|
+
properties: {
|
|
230
|
+
kind: { type: "string" },
|
|
231
|
+
description: { type: "string" },
|
|
232
|
+
},
|
|
233
|
+
additionalProperties: false,
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
/** The importer's side of the same block: entry name → `!ref` to the instance
|
|
237
|
+
* supplied for it. Left open because the accepted KIND is declared by the
|
|
238
|
+
* target library, not by this schema — the constraint is checked by
|
|
239
|
+
* `validate-resource-inputs.ts`, which reads the target's declared block off
|
|
240
|
+
* the `metadata.requiredResources` stamp. */
|
|
241
|
+
const IMPORT_RESOURCE_INPUTS_SCHEMA = {
|
|
242
|
+
type: "object",
|
|
243
|
+
additionalProperties: {},
|
|
244
|
+
};
|
|
218
245
|
export const KERNEL_BUILTINS = [
|
|
219
246
|
{ kind: "Telo.Abstract", metadata: { name: "Template", module: "Telo" } },
|
|
220
247
|
// "Control can be transferred to this" — the parent of Invocable and Runnable,
|
|
@@ -408,28 +435,26 @@ export const KERNEL_BUILTINS = [
|
|
|
408
435
|
items: {
|
|
409
436
|
type: "object",
|
|
410
437
|
additionalProperties: true,
|
|
411
|
-
//
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
//
|
|
415
|
-
//
|
|
438
|
+
// A `resources:` entry is a DECLARATION of another kind, so the
|
|
439
|
+
// CEL inside it belongs to THAT kind: its `x-telo-context` regions
|
|
440
|
+
// are rebased under this entry's path and take precedence (they are
|
|
441
|
+
// deeper), which is what puts `inputs`, `item`, `request`, `steps`
|
|
442
|
+
// and a `catch:`'s `error` in scope exactly where the nested kind
|
|
443
|
+
// declares them — see `analyzer/nodejs/src/template-body.ts`.
|
|
416
444
|
//
|
|
417
|
-
//
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
//
|
|
423
|
-
//
|
|
445
|
+
// What stays here is `self` alone, in force throughout the entry:
|
|
446
|
+
// it is how a body reaches the configuration its enclosing template
|
|
447
|
+
// was given, and no nested kind knows about it. The four names that
|
|
448
|
+
// used to sit beside it (`request` / `result` / `steps` / `error`)
|
|
449
|
+
// were a fixed permissive stand-in for the nested kind's own
|
|
450
|
+
// regions — which is why `error` was offered outside every `catch:`
|
|
451
|
+
// while `inputs` and `item` were undefined wherever a body actually
|
|
452
|
+
// reads them.
|
|
424
453
|
"x-telo-context": {
|
|
425
454
|
type: "object",
|
|
426
455
|
additionalProperties: false,
|
|
427
456
|
properties: {
|
|
428
457
|
self: { "x-telo-context-from-root": "schema" },
|
|
429
|
-
request: {},
|
|
430
|
-
result: {},
|
|
431
|
-
steps: {},
|
|
432
|
-
error: {},
|
|
433
458
|
},
|
|
434
459
|
},
|
|
435
460
|
},
|
|
@@ -592,6 +617,7 @@ export const KERNEL_BUILTINS = [
|
|
|
592
617
|
integrity: { type: "string" },
|
|
593
618
|
variables: { type: "object" },
|
|
594
619
|
secrets: { type: "object" },
|
|
620
|
+
resources: IMPORT_RESOURCE_INPUTS_SCHEMA,
|
|
595
621
|
runtime: {
|
|
596
622
|
oneOf: [
|
|
597
623
|
{ type: "string" },
|
|
@@ -738,6 +764,7 @@ export const KERNEL_BUILTINS = [
|
|
|
738
764
|
integrity: { type: "string" },
|
|
739
765
|
variables: { type: "object" },
|
|
740
766
|
secrets: { type: "object" },
|
|
767
|
+
resources: IMPORT_RESOURCE_INPUTS_SCHEMA,
|
|
741
768
|
runtime: {
|
|
742
769
|
oneOf: [
|
|
743
770
|
{ type: "string" },
|
|
@@ -853,6 +880,29 @@ export const KERNEL_BUILTINS = [
|
|
|
853
880
|
},
|
|
854
881
|
variables: { type: "object" },
|
|
855
882
|
secrets: { type: "object" },
|
|
883
|
+
// How many times this library is instantiated in one application.
|
|
884
|
+
//
|
|
885
|
+
// `isolated` (the default) is what every published module was written
|
|
886
|
+
// against: each import declaration builds its own child scope with its
|
|
887
|
+
// own instances, so two libraries importing a third get two of
|
|
888
|
+
// everything in it. `shared` makes the library a SINGLETON — every
|
|
889
|
+
// import of it resolves to one instantiation, owned by the root and
|
|
890
|
+
// torn down after everything that borrowed it.
|
|
891
|
+
//
|
|
892
|
+
// Default `isolated` rather than `shared` — the opposite of the
|
|
893
|
+
// Application field's — because flipping it would silently collapse
|
|
894
|
+
// every existing app's resource graph and turn per-import `variables:`
|
|
895
|
+
// into a conflict. The `exports.kinds` precedent: private-by-default is
|
|
896
|
+
// the better end state and still needs the ecosystem republished first.
|
|
897
|
+
lifecycle: {
|
|
898
|
+
type: "string",
|
|
899
|
+
enum: ["shared", "isolated"],
|
|
900
|
+
default: "isolated",
|
|
901
|
+
},
|
|
902
|
+
// The inward half of `exports.resources`: instances this library
|
|
903
|
+
// requires from whoever imports it. Library-only — an Application is a
|
|
904
|
+
// root with no importer, so it owns its instances outright.
|
|
905
|
+
resources: LIBRARY_RESOURCE_INPUTS_SCHEMA,
|
|
856
906
|
include: {
|
|
857
907
|
type: "array",
|
|
858
908
|
items: { type: "string" },
|
|
@@ -883,6 +933,7 @@ export const KERNEL_BUILTINS = [
|
|
|
883
933
|
integrity: { type: "string" },
|
|
884
934
|
variables: { type: "object" },
|
|
885
935
|
secrets: { type: "object" },
|
|
936
|
+
resources: IMPORT_RESOURCE_INPUTS_SCHEMA,
|
|
886
937
|
runtime: {
|
|
887
938
|
oneOf: [
|
|
888
939
|
{ type: "string" },
|
package/dist/cel-scope.d.ts
CHANGED
|
@@ -132,6 +132,14 @@ export declare class CelScopeResolver {
|
|
|
132
132
|
private stepContext;
|
|
133
133
|
private invocationContext;
|
|
134
134
|
private errorScopes;
|
|
135
|
+
/** The same two facts per `resources:` entry of a `Telo.Definition` — a
|
|
136
|
+
* template body is a declaration of ANOTHER kind, so its step body and its
|
|
137
|
+
* error branches are that kind's, not the enclosing definition's. */
|
|
138
|
+
private bodyScopes;
|
|
139
|
+
/** The enclosing definition's `self` schema, resolved once per resource. A
|
|
140
|
+
* template body's contexts resolve against the BODY, so `self` — the one
|
|
141
|
+
* binding anchored on the definition — is substituted before they do. */
|
|
142
|
+
private selfSchema;
|
|
135
143
|
constructor(inputs: CelScopeInputs);
|
|
136
144
|
/** The `steps` context schema for the current resource, or undefined when its
|
|
137
145
|
* kind declares no step body. Exposed because the step-inputs check needs the
|
package/dist/cel-scope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cel-scope.d.ts","sourceRoot":"","sources":["../src/cel-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAO9D,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"cel-scope.d.ts","sourceRoot":"","sources":["../src/cel-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAO9D,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAuE7B;;;;;;;;;;;oEAWoE;AACpE,wBAAgB,uBAAuB,CACrC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtB,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EACnC,MAAM,EAAE,YAAY,GACnB,MAAM,CAAC,MAAM,EAAE,GAA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E,gBAAgB,EAAE,UAAU,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IA6CpF;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,QAAQ;IAoCpC;;sEAEkE;IAClE,OAAO,CAAC,iBAAiB;CAgH1B"}
|
package/dist/cel-scope.js
CHANGED
|
@@ -5,6 +5,7 @@ import { analyzerContractScope, PERMISSIVE_CONTRACT, resolveContract, } from "./
|
|
|
5
5
|
import { mergeKernelGlobalsIntoContext, } from "./kernel-globals.js";
|
|
6
6
|
import { resolveLocalRef, walkStepArray } from "./schema-walk.js";
|
|
7
7
|
import { readStepSlot } from "./step-slot.js";
|
|
8
|
+
import { bodyForPath, templateBodies } from "./template-body.js";
|
|
8
9
|
import { getManifestItem, resolveContextAnnotations, resolveTypeFieldToSchema, } from "./validate-cel-context.js";
|
|
9
10
|
/** Build a closed JSON Schema for the `self` CEL variable available inside a
|
|
10
11
|
* `Telo.Definition` template body. Mirrors the runtime template controller's
|
|
@@ -268,6 +269,14 @@ export class CelScopeResolver {
|
|
|
268
269
|
stepContext;
|
|
269
270
|
invocationContext;
|
|
270
271
|
errorScopes = new Map();
|
|
272
|
+
/** The same two facts per `resources:` entry of a `Telo.Definition` — a
|
|
273
|
+
* template body is a declaration of ANOTHER kind, so its step body and its
|
|
274
|
+
* error branches are that kind's, not the enclosing definition's. */
|
|
275
|
+
bodyScopes = [];
|
|
276
|
+
/** The enclosing definition's `self` schema, resolved once per resource. A
|
|
277
|
+
* template body's contexts resolve against the BODY, so `self` — the one
|
|
278
|
+
* binding anchored on the definition — is substituted before they do. */
|
|
279
|
+
selfSchema;
|
|
271
280
|
constructor(inputs) {
|
|
272
281
|
this.inputs = inputs;
|
|
273
282
|
}
|
|
@@ -303,6 +312,20 @@ export class CelScopeResolver {
|
|
|
303
312
|
? buildStepContextSchema(m, authorSchema, allManifests, defs, aliases, scopes)
|
|
304
313
|
: undefined;
|
|
305
314
|
this.errorScopes = collectErrorContextScopes(authorSchema);
|
|
315
|
+
this.selfSchema =
|
|
316
|
+
m.kind === "Telo.Definition" ? buildSelfSchema(m, defs, aliases) : undefined;
|
|
317
|
+
this.bodyScopes = templateBodies(m, defs, aliases, scopes).map((body) => {
|
|
318
|
+
const bodySchema = defs.effectiveSchemaOf(body.definition);
|
|
319
|
+
return {
|
|
320
|
+
prefix: body.prefix,
|
|
321
|
+
scopePrefix: body.scopePrefix,
|
|
322
|
+
manifest: body.manifest,
|
|
323
|
+
stepContext: bodySchema
|
|
324
|
+
? buildStepContextSchema(body.manifest, bodySchema, allManifests, defs, aliases, scopes)
|
|
325
|
+
: undefined,
|
|
326
|
+
errorScopes: collectErrorContextScopes(bodySchema),
|
|
327
|
+
};
|
|
328
|
+
});
|
|
306
329
|
}
|
|
307
330
|
/**
|
|
308
331
|
* What the expression at `site` is typed against.
|
|
@@ -339,7 +362,13 @@ export class CelScopeResolver {
|
|
|
339
362
|
const { path } = site;
|
|
340
363
|
const m = site.source;
|
|
341
364
|
let matched = site.contextSchema ?? this.invocationContext;
|
|
342
|
-
|
|
365
|
+
// Inside a template body the step and error regions are the NESTED kind's.
|
|
366
|
+
// Its `steps` accumulator and its `catch:` branches are declared there, and
|
|
367
|
+
// the enclosing definition's (there are none) would say nothing about them.
|
|
368
|
+
const inBody = this.bodyScopes.length > 0 ? bodyForPath(this.bodyScopes, path) : undefined;
|
|
369
|
+
const stepContext = inBody ? inBody.stepContext : this.stepContext;
|
|
370
|
+
const errorScopes = inBody ? inBody.errorScopes : this.errorScopes;
|
|
371
|
+
if (stepContext) {
|
|
343
372
|
const base = matched ?? { type: "object", properties: {}, additionalProperties: true };
|
|
344
373
|
matched = {
|
|
345
374
|
...base,
|
|
@@ -356,13 +385,13 @@ export class CelScopeResolver {
|
|
|
356
385
|
// which is a separate decision from knowing the name is legal.
|
|
357
386
|
inputs: { type: "object", additionalProperties: true },
|
|
358
387
|
...(base.properties ?? {}),
|
|
359
|
-
steps:
|
|
388
|
+
steps: stepContext,
|
|
360
389
|
},
|
|
361
390
|
};
|
|
362
391
|
}
|
|
363
392
|
// `error` is only in scope inside an error-bearing branch (e.g. a
|
|
364
393
|
// `catch:` / `finally:`), so it's merged per-path, not resource-wide.
|
|
365
|
-
const errorSchema =
|
|
394
|
+
const errorSchema = errorScopes.size > 0 ? errorContextForPath(path, errorScopes) : undefined;
|
|
366
395
|
if (errorSchema) {
|
|
367
396
|
const base = matched ?? { type: "object", properties: {}, additionalProperties: true };
|
|
368
397
|
matched = {
|
|
@@ -378,17 +407,46 @@ export class CelScopeResolver {
|
|
|
378
407
|
return this.inputs.observedStateContext;
|
|
379
408
|
}
|
|
380
409
|
const { defs, aliases, scopes, allManifests, kernelGlobals } = this.inputs;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
410
|
+
// A template body's context annotations are the NESTED kind's, and every one
|
|
411
|
+
// that anchors at a root — `x-telo-context-element-from`,
|
|
412
|
+
// `-collection-from`, `-from-root`, `x-telo-bindings-from` — means the root
|
|
413
|
+
// of the DECLARATION they were written for. Resolving them against the
|
|
414
|
+
// enclosing `Telo.Definition` looked `collection:` up on a document that has
|
|
415
|
+
// no such field, so `item` typed open and a typo below it went unreported —
|
|
416
|
+
// the one place a nested declaration did not answer as the same declaration
|
|
417
|
+
// written at the top level.
|
|
418
|
+
//
|
|
419
|
+
// So the path and the scope are rebased into the body and the body becomes
|
|
420
|
+
// the resolution root. `self` is the single binding that genuinely belongs to
|
|
421
|
+
// the enclosing definition, and it is substituted below rather than left as
|
|
422
|
+
// an annotation the rebased root would misread.
|
|
423
|
+
const body = inBody;
|
|
424
|
+
const localPath = body ? path.slice(body.prefix.length + 1) : path;
|
|
425
|
+
const localScope = body && site.matchedScope?.startsWith(`${body.scopePrefix}.`)
|
|
426
|
+
? `$.${site.matchedScope.slice(body.scopePrefix.length + 1)}`
|
|
427
|
+
: body
|
|
428
|
+
? undefined
|
|
429
|
+
: site.matchedScope;
|
|
430
|
+
const rootManifest = body ? body.manifest : m;
|
|
431
|
+
if (body && this.selfSchema && matched.properties?.self) {
|
|
432
|
+
matched = {
|
|
433
|
+
...matched,
|
|
434
|
+
properties: { ...matched.properties, self: this.selfSchema },
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
const manifestItem = localScope
|
|
438
|
+
? getManifestItem(localPath, localScope, rootManifest)
|
|
439
|
+
: rootManifest;
|
|
440
|
+
const rootForResolver = body
|
|
441
|
+
? rootManifest
|
|
442
|
+
: manifestRootForResolver(m, defs, aliases, allManifests, scopes);
|
|
385
443
|
const resolved = resolveContextAnnotations(matched, manifestItem, {
|
|
386
444
|
manifestRoot: rootForResolver,
|
|
387
445
|
defs,
|
|
388
446
|
aliases,
|
|
389
447
|
allManifests: allManifests,
|
|
390
448
|
});
|
|
391
|
-
return mergeKernelGlobalsIntoContext(withBindingNames(resolved,
|
|
449
|
+
return mergeKernelGlobalsIntoContext(withBindingNames(resolved, rootManifest),
|
|
392
450
|
// Typed in the module that DECLARED this resource — for a manifest
|
|
393
451
|
// forwarded from an imported library, that is its `moduleGlobals` stamp,
|
|
394
452
|
// not the consuming application's block.
|
|
@@ -190,6 +190,23 @@ export declare class DefinitionRegistry {
|
|
|
190
190
|
*/
|
|
191
191
|
resolveSchemaFromNode(schemaFrom: string, ownerScope: AliasResolver): Record<string, any> | undefined;
|
|
192
192
|
private resolveSchemaFromSubMap;
|
|
193
|
+
/** The kinds a definition descends from DIRECTLY — the same two edges
|
|
194
|
+
* `register` feeds into `extendedBy`, read the other way.
|
|
195
|
+
*
|
|
196
|
+
* Both spellings, because either can carry the edge that satisfies a slot:
|
|
197
|
+
* `capability:` is the legacy implements-this form, `extends:` the canonical
|
|
198
|
+
* one. A consumer walking these by hand would be a second reading of what an
|
|
199
|
+
* inheritance edge IS, and the downward index and the upward walk have to
|
|
200
|
+
* agree about that forever. */
|
|
201
|
+
parentsOf(kind: string): string[];
|
|
202
|
+
/** Whether every kind this one descends from is registered.
|
|
203
|
+
*
|
|
204
|
+
* When it is, what the kind implements is FULLY KNOWN: a target it does not
|
|
205
|
+
* reach is one it genuinely does not implement, so a mismatch is a verdict.
|
|
206
|
+
* When a hop is missing — an unimported abstract, an alias the declaring file
|
|
207
|
+
* could not resolve — a mismatch cannot be told from a missing dependency,
|
|
208
|
+
* which is the partial context every reference check stays lenient in. */
|
|
209
|
+
ancestryResolved(kind: string): boolean;
|
|
193
210
|
/** Returns all definitions that transitively extend the given abstract kind.
|
|
194
211
|
* Follows the capability chain to any depth (equivalent to instanceof in OOP).
|
|
195
212
|
* Definitions are included regardless of registration order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition-registry.d.ts","sourceRoot":"","sources":["../src/definition-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAOlC,qBAAa,kBAAkB;;IAK7B;;sFAEkF;IAClF,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAyD;IAC5F;;mFAE+E;IAC/E,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IAEzD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyC;IAC9D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAClE,mEAAmE;IACnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAC1D;iFAC6E;IAC7E,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqD;IACtF;;;;wEAIoE;IACpE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;I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AC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;IAsBlC,OAAO,CAAC,uBAAuB;IAU/B;;;;;;;oCAOgC;IAChC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAQjC;;;;;;+EAM2E;IAC3E,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAavC;;qEAEiE;IACjE,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,kBAAkB,EAAE;IAgBxD,KAAK,IAAI,MAAM,EAAE;CAGlB"}
|
|
@@ -409,6 +409,41 @@ export class DefinitionRegistry {
|
|
|
409
409
|
return null;
|
|
410
410
|
return buildFieldMapAtPath(subSchema, fieldPath);
|
|
411
411
|
}
|
|
412
|
+
/** The kinds a definition descends from DIRECTLY — the same two edges
|
|
413
|
+
* `register` feeds into `extendedBy`, read the other way.
|
|
414
|
+
*
|
|
415
|
+
* Both spellings, because either can carry the edge that satisfies a slot:
|
|
416
|
+
* `capability:` is the legacy implements-this form, `extends:` the canonical
|
|
417
|
+
* one. A consumer walking these by hand would be a second reading of what an
|
|
418
|
+
* inheritance edge IS, and the downward index and the upward walk have to
|
|
419
|
+
* agree about that forever. */
|
|
420
|
+
parentsOf(kind) {
|
|
421
|
+
const def = this.defs.get(kind);
|
|
422
|
+
if (!def)
|
|
423
|
+
return [];
|
|
424
|
+
return [def.capability, def.extends].filter((parent) => typeof parent === "string" && parent.length > 0);
|
|
425
|
+
}
|
|
426
|
+
/** Whether every kind this one descends from is registered.
|
|
427
|
+
*
|
|
428
|
+
* When it is, what the kind implements is FULLY KNOWN: a target it does not
|
|
429
|
+
* reach is one it genuinely does not implement, so a mismatch is a verdict.
|
|
430
|
+
* When a hop is missing — an unimported abstract, an alias the declaring file
|
|
431
|
+
* could not resolve — a mismatch cannot be told from a missing dependency,
|
|
432
|
+
* which is the partial context every reference check stays lenient in. */
|
|
433
|
+
ancestryResolved(kind) {
|
|
434
|
+
const queue = [kind];
|
|
435
|
+
const seen = new Set();
|
|
436
|
+
while (queue.length > 0) {
|
|
437
|
+
const current = queue.shift();
|
|
438
|
+
if (seen.has(current))
|
|
439
|
+
continue;
|
|
440
|
+
seen.add(current);
|
|
441
|
+
if (!this.defs.has(current))
|
|
442
|
+
return false;
|
|
443
|
+
queue.push(...this.parentsOf(current));
|
|
444
|
+
}
|
|
445
|
+
return true;
|
|
446
|
+
}
|
|
412
447
|
/** Returns all definitions that transitively extend the given abstract kind.
|
|
413
448
|
* Follows the capability chain to any depth (equivalent to instanceof in OOP).
|
|
414
449
|
* Definitions are included regardless of registration order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-graph.d.ts","sourceRoot":"","sources":["../src/dependency-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"dependency-graph.d.ts","sourceRoot":"","sources":["../src/dependency-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B;kDAC8C;IAC9C,KAAK,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACpC;oFACgF;IAChF,KAAK,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACrC;AAID;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,CAAC,EAAE,aAAa,EACvB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAC3C,eAAe,CA2DjB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,GAAG,MAAM,CAOtE"}
|
package/dist/dependency-graph.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildCallGraph, projectToPairs } from "./call-graph.js";
|
|
2
|
+
import { readSuppliedResources } from "./resource-input.js";
|
|
2
3
|
const nodeKey = (kind, name) => `${kind}\0${name}`;
|
|
3
4
|
/**
|
|
4
5
|
* Builds a directed acyclic graph (DAG) of boot-time resource dependencies and
|
|
@@ -45,6 +46,7 @@ export function buildDependencyGraph(resources, registry, aliases, aliasesByModu
|
|
|
45
46
|
for (const key of nodes.keys())
|
|
46
47
|
if (!deps.has(key))
|
|
47
48
|
deps.set(key, new Set());
|
|
49
|
+
addResourceInputEdges(resources, nodes, deps);
|
|
48
50
|
// --- Kahn's topological sort ---
|
|
49
51
|
// in-degree[X] = number of X's dependencies (size of deps[X])
|
|
50
52
|
// reverse[dep] = set of nodes that depend on dep (for degree decrement)
|
|
@@ -130,3 +132,66 @@ function findCycle(nodes, deps) {
|
|
|
130
132
|
}
|
|
131
133
|
return [];
|
|
132
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Boot-order edges for the one thing a `Telo.Import` does hold: the instances it
|
|
137
|
+
* hands DOWN to its target library's declared `resources:` inputs.
|
|
138
|
+
*
|
|
139
|
+
* An import is otherwise module wiring rather than a runtime node — it is in
|
|
140
|
+
* `DEPENDENCY_GRAPH_SKIP_KINDS` and the call graph gives it no node at all — but
|
|
141
|
+
* a borrowed instance must exist before the import initializes, and a cycle
|
|
142
|
+
* through one is a cycle like any other. The edges are added here rather than
|
|
143
|
+
* read off the reference field map because the accepted KIND at this slot is
|
|
144
|
+
* declared by the TARGET library, not by the `Telo.Import` schema, so there is
|
|
145
|
+
* no `x-telo-ref` for the map to read; the constraint itself is checked by
|
|
146
|
+
* `validate-resource-inputs`.
|
|
147
|
+
*/
|
|
148
|
+
function addResourceInputEdges(resources, nodes, deps) {
|
|
149
|
+
// Every import that supplies inputs becomes a node FIRST, so a cross-module
|
|
150
|
+
// reference below can resolve to the import that exports its target.
|
|
151
|
+
const imports = [];
|
|
152
|
+
for (const m of resources) {
|
|
153
|
+
if (m.kind !== "Telo.Import")
|
|
154
|
+
continue;
|
|
155
|
+
const alias = m.metadata?.name;
|
|
156
|
+
const supplied = readSuppliedResources(m);
|
|
157
|
+
if (!alias || Object.keys(supplied).length === 0)
|
|
158
|
+
continue;
|
|
159
|
+
const key = nodeKey(m.kind, alias);
|
|
160
|
+
nodes.set(key, { kind: m.kind, name: alias });
|
|
161
|
+
if (!deps.has(key))
|
|
162
|
+
deps.set(key, new Set());
|
|
163
|
+
imports.push({ key, supplied });
|
|
164
|
+
}
|
|
165
|
+
if (imports.length === 0)
|
|
166
|
+
return;
|
|
167
|
+
const byName = new Map();
|
|
168
|
+
for (const [key, node] of nodes)
|
|
169
|
+
byName.set(node.name, key);
|
|
170
|
+
// An import is keyed by its alias, and that is also how a cross-module
|
|
171
|
+
// reference names it — index those so one resolves.
|
|
172
|
+
for (const m of resources) {
|
|
173
|
+
if (m.kind !== "Telo.Import")
|
|
174
|
+
continue;
|
|
175
|
+
const alias = m.metadata?.name;
|
|
176
|
+
const key = alias ? nodeKey(m.kind, alias) : undefined;
|
|
177
|
+
if (alias && key && nodes.has(key))
|
|
178
|
+
byName.set(alias, key);
|
|
179
|
+
}
|
|
180
|
+
for (const { key, supplied } of imports) {
|
|
181
|
+
const set = deps.get(key);
|
|
182
|
+
for (const value of Object.values(supplied)) {
|
|
183
|
+
const ref = value;
|
|
184
|
+
// A CROSS-MODULE reference (`!ref Other.db`) names an instance exported by
|
|
185
|
+
// another import, never a local resource. Looking it up in the local name
|
|
186
|
+
// map would find an unrelated resource of the same name — a wrong edge,
|
|
187
|
+
// and possibly a phantom cycle — or nothing at all. What it depends on is
|
|
188
|
+
// the IMPORT that exports it, which is the projection
|
|
189
|
+
// `localDependencyNames` already makes at runtime.
|
|
190
|
+
const alias = typeof ref?.alias === "string" ? ref.alias : undefined;
|
|
191
|
+
const targetName = alias && alias !== "Self" ? alias : typeof ref?.name === "string" ? ref.name : undefined;
|
|
192
|
+
const target = targetName ? byName.get(targetName) : undefined;
|
|
193
|
+
if (target && target !== key)
|
|
194
|
+
set.add(target);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ResourceManifest } from "@telorun/sdk";
|
|
2
2
|
import type { LoadedGraph, LoadedModule } from "./loaded-types.js";
|
|
3
|
+
import { type ResourceInput } from "./resource-input.js";
|
|
3
4
|
import type { ZoneModuleDocuments } from "./zone-module-documents.js";
|
|
4
5
|
/** One parsed `exports.resources` / `exports.kinds` entry. `name` is the exported
|
|
5
6
|
* instance name or kind suffix (the part after the dot, or the whole entry); `alias`
|
|
@@ -137,6 +138,41 @@ export declare function stampExportedKinds(imports: ReadonlyArray<{
|
|
|
137
138
|
manifest: ResourceManifest;
|
|
138
139
|
targetModule: string;
|
|
139
140
|
}>, declaredKinds: ReadonlyMap<string, readonly string[]>): void;
|
|
141
|
+
/** Stamp `metadata.resolvedSource` — the canonical resolved URL of an import's
|
|
142
|
+
* target — onto every `Telo.Import`. It is the identity the kernel keys a
|
|
143
|
+
* singleton's registry on, so a check that has to decide whether two imports
|
|
144
|
+
* reach the SAME library has to key on it too: `resolvedModuleName` is the
|
|
145
|
+
* module's own name, which two versions of it share. */
|
|
146
|
+
export declare function stampResolvedSource(imports: ReadonlyArray<{
|
|
147
|
+
manifest: ResourceManifest;
|
|
148
|
+
targetSource: string;
|
|
149
|
+
}>): void;
|
|
150
|
+
/** Stamp `metadata.sharedLibrary` onto every `Telo.Import` whose target declares
|
|
151
|
+
* `lifecycle: shared`, so the consumer's pass can reject the per-import
|
|
152
|
+
* overrides a singleton has no room for. Stamped on `metadata` for the same
|
|
153
|
+
* reason `exportedKinds` is — the `Telo.Import` schema forbids extra top-level
|
|
154
|
+
* fields. */
|
|
155
|
+
export declare function stampSharedLifecycle(imports: ReadonlyArray<{
|
|
156
|
+
manifest: ResourceManifest;
|
|
157
|
+
targetModule: string;
|
|
158
|
+
}>, shared: ReadonlySet<string>): void;
|
|
159
|
+
/** Stamp `metadata.requiredResources` — the target library's declared
|
|
160
|
+
* `resources:` block, with each kind constraint CANONICALIZED in the library's
|
|
161
|
+
* own alias scope — onto every `Telo.Import` whose target declares one.
|
|
162
|
+
*
|
|
163
|
+
* Canonicalized here because this is the only point where the target's own
|
|
164
|
+
* import edges are in hand: the consumer's pass sees the flattened list, from
|
|
165
|
+
* which the library doc and its alias scope are both gone, so an entry written
|
|
166
|
+
* `Sql.Connection` would otherwise be read against whatever the CONSUMER
|
|
167
|
+
* happens to alias `Sql` to. Stamped on `metadata` for the same reason
|
|
168
|
+
* `exportedKinds` is — the `Telo.Import` schema forbids extra top-level
|
|
169
|
+
* fields. An entry whose alias resolves to nothing is stamped with its kind
|
|
170
|
+
* unchanged; `validate-resource-inputs.ts` reports that against the library
|
|
171
|
+
* that wrote it. */
|
|
172
|
+
export declare function stampRequiredResources(imports: ReadonlyArray<{
|
|
173
|
+
manifest: ResourceManifest;
|
|
174
|
+
targetModule: string;
|
|
175
|
+
}>, declared: ReadonlyMap<string, readonly ResourceInput[]>, aliasToModule: (module: string, alias: string) => string | undefined): void;
|
|
140
176
|
/** Collect every imported library's FULL document set for the zone stage's
|
|
141
177
|
* per-library export derivation (`AnalysisOptions.moduleDocuments`) — the
|
|
142
178
|
* flat list above deliberately drops library internals, and the zone
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flatten-for-analyzer.d.ts","sourceRoot":"","sources":["../src/flatten-for-analyzer.ts"],"names":[],"m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