@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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isModuleKind } from "./module-kinds.js";
|
|
2
|
+
import { injectedDeclarations, readLibraryLifecycle, readResourceInputs, } from "./resource-input.js";
|
|
2
3
|
/** Parse a single dotted export entry: `Alias.Name` → `{name: "Name", alias: "Alias"}`,
|
|
3
4
|
* bare `Name` → `{name: "Name"}`. The single grammar for `exports.resources` and
|
|
4
5
|
* `exports.kinds`, shared by the kernel's import controller and the analyzer/editor so
|
|
@@ -354,6 +355,12 @@ function forwardReExports(graph, result) {
|
|
|
354
355
|
// the kernel parses them. A module that declares none is absent, leaving importers ungated
|
|
355
356
|
// (see stampExportedKinds).
|
|
356
357
|
const declaredKinds = new Map();
|
|
358
|
+
/** Each library's declared `resources:` block, by module name — the inward
|
|
359
|
+
* half, stamped onto its importers below. */
|
|
360
|
+
const requiredResources = new Map();
|
|
361
|
+
/** Libraries declaring `lifecycle: shared` — a singleton every import
|
|
362
|
+
* resolves to, so a per-import override of it is a contradiction. */
|
|
363
|
+
const sharedModules = new Set();
|
|
357
364
|
for (const [source, mod] of graph.modules) {
|
|
358
365
|
if (source === graph.rootSource)
|
|
359
366
|
continue; // root is an Application — no exports
|
|
@@ -364,6 +371,11 @@ function forwardReExports(graph, result) {
|
|
|
364
371
|
ownerSourceOf.set(moduleName, mod.owner.source);
|
|
365
372
|
specs.push(...reExportSpecsFromExports(moduleName, libDoc.exports?.resources));
|
|
366
373
|
kindModules.push({ module: moduleName, exportsKinds: libDoc.exports?.kinds });
|
|
374
|
+
const inputs = readResourceInputs(libDoc);
|
|
375
|
+
if (inputs.length > 0)
|
|
376
|
+
requiredResources.set(moduleName, inputs);
|
|
377
|
+
if (readLibraryLifecycle(libDoc) === "shared")
|
|
378
|
+
sharedModules.add(moduleName);
|
|
367
379
|
if (libDoc.exports?.kinds !== undefined) {
|
|
368
380
|
declaredKinds.set(moduleName, libDoc.exports.kinds.map((e) => parseExportEntry(e).name));
|
|
369
381
|
}
|
|
@@ -379,17 +391,91 @@ function forwardReExports(graph, result) {
|
|
|
379
391
|
// Telo.Import manifests so the analyzer can register the re-export mappings.
|
|
380
392
|
const exportedKinds = resolveExportedKinds(kindModules, aliasToModule);
|
|
381
393
|
const imports = [];
|
|
394
|
+
const sources = [];
|
|
382
395
|
for (const m of result) {
|
|
383
396
|
if (m.kind !== "Telo.Import")
|
|
384
397
|
continue;
|
|
385
398
|
const owner = m.metadata?.source;
|
|
386
399
|
const alias = m.metadata?.name;
|
|
387
|
-
const
|
|
388
|
-
if (
|
|
389
|
-
imports.push({ manifest: m, targetModule:
|
|
400
|
+
const edge = owner && alias ? graph.importEdges.get(owner)?.get(alias) : undefined;
|
|
401
|
+
if (edge?.targetModuleName)
|
|
402
|
+
imports.push({ manifest: m, targetModule: edge.targetModuleName });
|
|
403
|
+
if (edge?.targetSource)
|
|
404
|
+
sources.push({ manifest: m, targetSource: edge.targetSource });
|
|
390
405
|
}
|
|
406
|
+
stampResolvedSource(sources);
|
|
391
407
|
stampReExportedKinds(imports, exportedKinds);
|
|
392
408
|
stampExportedKinds(imports, declaredKinds);
|
|
409
|
+
stampRequiredResources(imports, requiredResources, aliasToModule);
|
|
410
|
+
stampSharedLifecycle(imports, sharedModules);
|
|
411
|
+
}
|
|
412
|
+
/** Stamp `metadata.resolvedSource` — the canonical resolved URL of an import's
|
|
413
|
+
* target — onto every `Telo.Import`. It is the identity the kernel keys a
|
|
414
|
+
* singleton's registry on, so a check that has to decide whether two imports
|
|
415
|
+
* reach the SAME library has to key on it too: `resolvedModuleName` is the
|
|
416
|
+
* module's own name, which two versions of it share. */
|
|
417
|
+
export function stampResolvedSource(imports) {
|
|
418
|
+
for (const { manifest, targetSource } of imports) {
|
|
419
|
+
manifest.metadata.resolvedSource = targetSource;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
/** Stamp `metadata.sharedLibrary` onto every `Telo.Import` whose target declares
|
|
423
|
+
* `lifecycle: shared`, so the consumer's pass can reject the per-import
|
|
424
|
+
* overrides a singleton has no room for. Stamped on `metadata` for the same
|
|
425
|
+
* reason `exportedKinds` is — the `Telo.Import` schema forbids extra top-level
|
|
426
|
+
* fields. */
|
|
427
|
+
export function stampSharedLifecycle(imports, shared) {
|
|
428
|
+
for (const { manifest, targetModule } of imports) {
|
|
429
|
+
if (!shared.has(targetModule))
|
|
430
|
+
continue;
|
|
431
|
+
manifest.metadata.sharedLibrary = true;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
/** Stamp `metadata.requiredResources` — the target library's declared
|
|
435
|
+
* `resources:` block, with each kind constraint CANONICALIZED in the library's
|
|
436
|
+
* own alias scope — onto every `Telo.Import` whose target declares one.
|
|
437
|
+
*
|
|
438
|
+
* Canonicalized here because this is the only point where the target's own
|
|
439
|
+
* import edges are in hand: the consumer's pass sees the flattened list, from
|
|
440
|
+
* which the library doc and its alias scope are both gone, so an entry written
|
|
441
|
+
* `Sql.Connection` would otherwise be read against whatever the CONSUMER
|
|
442
|
+
* happens to alias `Sql` to. Stamped on `metadata` for the same reason
|
|
443
|
+
* `exportedKinds` is — the `Telo.Import` schema forbids extra top-level
|
|
444
|
+
* fields. An entry whose alias resolves to nothing is stamped with its kind
|
|
445
|
+
* unchanged; `validate-resource-inputs.ts` reports that against the library
|
|
446
|
+
* that wrote it. */
|
|
447
|
+
export function stampRequiredResources(imports, declared, aliasToModule) {
|
|
448
|
+
for (const { manifest, targetModule } of imports) {
|
|
449
|
+
const inputs = declared.get(targetModule);
|
|
450
|
+
if (!inputs?.length)
|
|
451
|
+
continue;
|
|
452
|
+
// A plain name → canonical-kind MAP, deliberately not a list of
|
|
453
|
+
// `{name, kind}` objects: that shape is character-identical to a resolved
|
|
454
|
+
// `!ref`, and every reference walk in the analyzer recognises a reference by
|
|
455
|
+
// exactly those two keys — so the stamp would be read as a malformed
|
|
456
|
+
// reference sitting in `metadata`.
|
|
457
|
+
const table = {};
|
|
458
|
+
for (const input of inputs) {
|
|
459
|
+
table[input.name] = canonicalizeInputKind(input.kind, targetModule, aliasToModule);
|
|
460
|
+
}
|
|
461
|
+
manifest.metadata.requiredResources = table;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/** `Alias.Kind` → `<owning module>.Kind` in the DECLARING library's scope.
|
|
465
|
+
* `Self.` names the library itself and `Telo.` the kernel built-ins, both of
|
|
466
|
+
* which cross no import edge. An unresolvable prefix is returned unchanged. */
|
|
467
|
+
function canonicalizeInputKind(kind, ownModule, aliasToModule) {
|
|
468
|
+
const dot = kind.indexOf(".");
|
|
469
|
+
if (dot <= 0)
|
|
470
|
+
return kind;
|
|
471
|
+
const alias = kind.slice(0, dot);
|
|
472
|
+
const suffix = kind.slice(dot + 1);
|
|
473
|
+
if (alias === "Self")
|
|
474
|
+
return `${ownModule}.${suffix}`;
|
|
475
|
+
if (alias === "Telo")
|
|
476
|
+
return kind;
|
|
477
|
+
const module = aliasToModule(ownModule, alias);
|
|
478
|
+
return module ? `${module}.${suffix}` : kind;
|
|
393
479
|
}
|
|
394
480
|
/** Collect every imported library's FULL document set for the zone stage's
|
|
395
481
|
* per-library export derivation (`AnalysisOptions.moduleDocuments`) — the
|
|
@@ -438,7 +524,20 @@ function collectModuleManifests(mod) {
|
|
|
438
524
|
for (const p of mod.partials) {
|
|
439
525
|
partials.push(...stampFile(p, ownerModuleName(mod.owner)));
|
|
440
526
|
}
|
|
441
|
-
|
|
527
|
+
const all = [...owner, ...partials];
|
|
528
|
+
// A library's `resources:` block declares the instances it requires from
|
|
529
|
+
// whoever imports it. Standing a kind-only declaration behind each entry is
|
|
530
|
+
// what makes `!ref connection` resolve and `resources.connection.<field>` type
|
|
531
|
+
// in the library's OWN pass — the only pass that sees its internals, since a
|
|
532
|
+
// consumer's flattened analysis drops the library doc. `selectModuleManifests-
|
|
533
|
+
// ForAnalysis` drops them again for a non-root module (they are not exported),
|
|
534
|
+
// and the kernel's import controller filters them out in favour of the
|
|
535
|
+
// borrowed instance itself.
|
|
536
|
+
const moduleDoc = all.find((m) => isModuleKind(m.kind));
|
|
537
|
+
if (moduleDoc) {
|
|
538
|
+
all.push(...injectedDeclarations(moduleDoc, moduleDoc.metadata?.name));
|
|
539
|
+
}
|
|
540
|
+
return all;
|
|
442
541
|
}
|
|
443
542
|
function ownerModuleName(file) {
|
|
444
543
|
for (const m of file.manifests) {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ export type { RefFieldInfo } from "./analysis-registry.js";
|
|
|
3
3
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
4
4
|
export { importResolutionDiagnostics } from "./import-resolution-diagnostics.js";
|
|
5
5
|
export type { GraphLoadError, ImportEdge, LoadedFile, LoadedGraph, LoadedModule, ParseError, } from "./loaded-types.js";
|
|
6
|
-
export { collectZoneModuleDocuments, flattenForAnalyzer, flattenLoadedModule, forwardReExportManifests, parseExportEntry, reExportSpecsFromExports, resolveExportedKinds, selectModuleManifestsForAnalysis, stampExportedKinds, stampReExportedKinds, type ParsedExportEntry, type ReExportSpec, } from "./flatten-for-analyzer.js";
|
|
7
|
-
export { buildEvalPaths, celEvalModeAt, celEvalSites, declaresCelRegion, evalPathCovers, mergeCelEvalSites, NO_CEL_EVAL_SITES, } from "./eval-paths.js";
|
|
6
|
+
export { collectZoneModuleDocuments, flattenForAnalyzer, flattenLoadedModule, forwardReExportManifests, parseExportEntry, reExportSpecsFromExports, resolveExportedKinds, selectModuleManifestsForAnalysis, stampExportedKinds, stampReExportedKinds, stampRequiredResources, stampResolvedSource, stampSharedLifecycle, type ParsedExportEntry, type ReExportSpec, } from "./flatten-for-analyzer.js";
|
|
7
|
+
export { buildEvalPaths, celEvalModeAt, celEvalSites, declaresCelRegion, evalPathCovers, mergeCelEvalSites, pathMatchesScope, NO_CEL_EVAL_SITES, } from "./eval-paths.js";
|
|
8
8
|
export type { CelEvalSites } from "./eval-paths.js";
|
|
9
|
+
export { injectedDeclarations, isInjectedDeclaration, readLibraryLifecycle, readResourceInputs, readSuppliedResources, } from "./resource-input.js";
|
|
10
|
+
export type { LibraryLifecycle, ResourceInput } from "./resource-input.js";
|
|
9
11
|
export { BINDINGS_ANNOTATION, bindingContextProperties, bindingDependencies, findBindingSites, resolveBindingOrder, } from "./cel-bindings.js";
|
|
10
12
|
export type { BindingSites } from "./cel-bindings.js";
|
|
11
13
|
export { CEL_RESERVED_WORDS, TYPE_LEVEL_DOC_KINDS, checkName, } from "./identifier-name.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,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,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { AnalysisRegistry } from "./analysis-registry.js";
|
|
2
2
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
3
3
|
export { importResolutionDiagnostics } from "./import-resolution-diagnostics.js";
|
|
4
|
-
export { collectZoneModuleDocuments, flattenForAnalyzer, flattenLoadedModule, forwardReExportManifests, parseExportEntry, reExportSpecsFromExports, resolveExportedKinds, selectModuleManifestsForAnalysis, stampExportedKinds, stampReExportedKinds, } from "./flatten-for-analyzer.js";
|
|
5
|
-
export { buildEvalPaths, celEvalModeAt, celEvalSites, declaresCelRegion, evalPathCovers, mergeCelEvalSites, NO_CEL_EVAL_SITES, } from "./eval-paths.js";
|
|
4
|
+
export { collectZoneModuleDocuments, flattenForAnalyzer, flattenLoadedModule, forwardReExportManifests, parseExportEntry, reExportSpecsFromExports, resolveExportedKinds, selectModuleManifestsForAnalysis, stampExportedKinds, stampReExportedKinds, stampRequiredResources, stampResolvedSource, stampSharedLifecycle, } from "./flatten-for-analyzer.js";
|
|
5
|
+
export { buildEvalPaths, celEvalModeAt, celEvalSites, declaresCelRegion, evalPathCovers, mergeCelEvalSites, pathMatchesScope, NO_CEL_EVAL_SITES, } from "./eval-paths.js";
|
|
6
|
+
export { injectedDeclarations, isInjectedDeclaration, readLibraryLifecycle, readResourceInputs, readSuppliedResources, } from "./resource-input.js";
|
|
6
7
|
export { BINDINGS_ANNOTATION, bindingContextProperties, bindingDependencies, findBindingSites, resolveBindingOrder, } from "./cel-bindings.js";
|
|
7
8
|
export { CEL_RESERVED_WORDS, TYPE_LEVEL_DOC_KINDS, checkName, } from "./identifier-name.js";
|
|
8
9
|
export { applyObservedStateNode, buildObservedStateIndex, buildObservedStateResourcesSchema, collectRunReachableNames, observedStateRead, validateObservedStateDeclarations, OBSERVED_STATE_SCHEMA, } from "./validate-observed-state.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-imports.d.ts","sourceRoot":"","sources":["../src/inline-imports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D;;6CAE6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,gBAAgB,EAChC,cAAc,EAAE,gBAAgB,GAAG,SAAS,GAC3C,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"inline-imports.d.ts","sourceRoot":"","sources":["../src/inline-imports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D;;6CAE6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,gBAAgB,EAChC,cAAc,EAAE,gBAAgB,GAAG,SAAS,GAC3C,eAAe,EAAE,CAiCnB;AAED;;;;;;;iFAOiF;AACjF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAmB9D"}
|
package/dist/inline-imports.js
CHANGED
|
@@ -37,6 +37,7 @@ export function inlineImportManifests(moduleManifest, modulePosition) {
|
|
|
37
37
|
source,
|
|
38
38
|
...(entry.variables !== undefined ? { variables: entry.variables } : {}),
|
|
39
39
|
...(entry.secrets !== undefined ? { secrets: entry.secrets } : {}),
|
|
40
|
+
...(entry.resources !== undefined ? { resources: entry.resources } : {}),
|
|
40
41
|
...(entry.runtime !== undefined ? { runtime: entry.runtime } : {}),
|
|
41
42
|
...(entry.logging !== undefined ? { logging: entry.logging } : {}),
|
|
42
43
|
};
|
|
@@ -130,6 +130,10 @@ export interface VisitOptions {
|
|
|
130
130
|
* Opt-in: the validators / dependency graph must NOT enable it (those refs
|
|
131
131
|
* are runtime-resolved, not boot dependencies). */
|
|
132
132
|
discoverNestedRefs?: boolean;
|
|
133
|
+
/** Root (consumer-owned) module names, paired with `aliasesByModule` so a
|
|
134
|
+
* nested kind inside an imported library's definition resolves through THAT
|
|
135
|
+
* library's aliases. */
|
|
136
|
+
rootModules?: ReadonlySet<string>;
|
|
133
137
|
}
|
|
134
138
|
export declare function visitManifest(resources: ResourceManifest[], registry: DefinitionRegistry, visitor: ManifestVisitor, options?: VisitOptions): void;
|
|
135
139
|
//# sourceMappingURL=manifest-visitor.d.ts.map
|
|
@@ -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;
|
|
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,CAA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kB,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,CAgMN"}
|
package/dist/manifest-visitor.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isRefSentinel, isTaggedSentinel, walkCelExpressions, } from "@telorun/templating";
|
|
2
2
|
import { isRefEntry, isSchemaFromEntry, isScopeEntry, resolveFieldEntries, } from "./reference-field-map.js";
|
|
3
|
+
import { templateBodies, withTemplateSelf } from "./template-body.js";
|
|
3
4
|
import { extractContextsFromSchema, pathMatchesScope } from "./validate-cel-context.js";
|
|
4
5
|
/** Synthetic entry for a value-tree-discovered ref — these carry no declared
|
|
5
6
|
* x-telo-ref constraint. */
|
|
@@ -47,6 +48,14 @@ const scopePrefixOf = (pointer) => pointer.replace(/^\//, "").replace(/\//g, "."
|
|
|
47
48
|
const pathUnderPrefix = (fieldPath, prefix) => fieldPath === prefix ||
|
|
48
49
|
fieldPath.startsWith(prefix + ".") ||
|
|
49
50
|
fieldPath.startsWith(prefix + "[");
|
|
51
|
+
/** The per-declaring-module alias tables, when the caller threaded them. A
|
|
52
|
+
* nested kind inside an imported library's definition is written through THAT
|
|
53
|
+
* library's aliases. */
|
|
54
|
+
function moduleScopes(options) {
|
|
55
|
+
return options.aliasesByModule && options.rootModules
|
|
56
|
+
? { aliasesByModule: options.aliasesByModule, rootModules: options.rootModules }
|
|
57
|
+
: undefined;
|
|
58
|
+
}
|
|
50
59
|
export function visitManifest(resources, registry, visitor, options = {}) {
|
|
51
60
|
const { aliases, aliasesByModule, skipKinds, expand, discoverNestedRefs } = options;
|
|
52
61
|
const wantsRefs = !!visitor.onRef;
|
|
@@ -196,6 +205,25 @@ export function visitManifest(resources, registry, visitor, options = {}) {
|
|
|
196
205
|
// check simply stops existing.
|
|
197
206
|
const authorSchema = registry.effectiveSchemaOf(definition);
|
|
198
207
|
const contexts = authorSchema ? extractContextsFromSchema(authorSchema) : [];
|
|
208
|
+
// A `Telo.Definition`'s `resources:` entries are DECLARATIONS of another
|
|
209
|
+
// kind, so the CEL inside one belongs to THAT kind — its own
|
|
210
|
+
// `x-telo-context` regions, rebased under the entry's path. `self` is
|
|
211
|
+
// merged into each, since the nested kind knows nothing about the
|
|
212
|
+
// configuration its enclosing template was given. Without this a nested
|
|
213
|
+
// body saw one fixed permissive context: `inputs` and `item` undefined
|
|
214
|
+
// wherever the nested kind declares them, `error` offered everywhere.
|
|
215
|
+
for (const body of templateBodies(r, registry, aliases, moduleScopes(options))) {
|
|
216
|
+
const bodySchema = registry.effectiveSchemaOf(body.definition);
|
|
217
|
+
if (!bodySchema)
|
|
218
|
+
continue;
|
|
219
|
+
for (const ctx of extractContextsFromSchema(bodySchema, body.scopePrefix)) {
|
|
220
|
+
contexts.push({ scope: ctx.scope, schema: withTemplateSelf(ctx.schema) });
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
// Longest scope wins, as `extractContextsFromSchema` already orders its
|
|
224
|
+
// own: a nested kind's region is deeper than the enclosing definition's
|
|
225
|
+
// blanket `$.resources[*]`, so it takes precedence.
|
|
226
|
+
contexts.sort((a, b) => b.scope.length - a.scope.length);
|
|
199
227
|
walkCelExpressions(r, "", (expr, path, engineName, surface) => {
|
|
200
228
|
let contextSchema;
|
|
201
229
|
let matchedScope;
|
package/dist/precompile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"precompile.d.ts","sourceRoot":"","sources":["../src/precompile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"precompile.d.ts","sourceRoot":"","sources":["../src/precompile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAkDrE"}
|
package/dist/precompile.js
CHANGED
|
@@ -39,6 +39,14 @@ export function precompileDoc(doc, env) {
|
|
|
39
39
|
__compiled: true,
|
|
40
40
|
engine: doc.engine,
|
|
41
41
|
source: doc.source,
|
|
42
|
+
// The AST-derived root identifiers the engine computed, carried through
|
|
43
|
+
// rather than dropped. This rebuild is where EVERY tagged sentinel's
|
|
44
|
+
// compiled value is produced, so losing `refs` here lost them for every
|
|
45
|
+
// `!cel` in every manifest — leaving a consumer that asks what an
|
|
46
|
+
// expression READS (a template body deciding which nodes survive its
|
|
47
|
+
// `init()`) with nothing but the source text to scan, which cannot tell
|
|
48
|
+
// an identifier from a word inside a string literal.
|
|
49
|
+
...(compiled.refs ? { refs: compiled.refs } : {}),
|
|
42
50
|
call: compiled.call.bind(compiled),
|
|
43
51
|
};
|
|
44
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-ref-sentinels.d.ts","sourceRoot":"","sources":["../src/resolve-ref-sentinels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAGlC;+CAC+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,CAChB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,GACvD,iBAAiB,GAAG,SAAS,CAAC;CAClC;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,aAAa,EACvB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAK5C,kBAAkB,GAAE,gBAAgB,EAAO;AAC3C;;+CAE+C;AAC/C,IAAI,CAAC,EAAE,mBAAmB,GACzB,IAAI,
|
|
1
|
+
{"version":3,"file":"resolve-ref-sentinels.d.ts","sourceRoot":"","sources":["../src/resolve-ref-sentinels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAGlC;+CAC+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,CAChB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,GACvD,iBAAiB,GAAG,SAAS,CAAC;CAClC;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,aAAa,EACvB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAK5C,kBAAkB,GAAE,gBAAgB,EAAO;AAC3C;;+CAE+C;AAC/C,IAAI,CAAC,EAAE,mBAAmB,GACzB,IAAI,CAyIN"}
|
|
@@ -172,7 +172,20 @@ defs) {
|
|
|
172
172
|
for (const r of resources) {
|
|
173
173
|
if (isForeign(r))
|
|
174
174
|
continue;
|
|
175
|
-
if (!r.metadata?.name || !r.kind
|
|
175
|
+
if (!r.metadata?.name || !r.kind)
|
|
176
|
+
continue;
|
|
177
|
+
// A `Telo.Import` is import-time metadata, not a resource instance — except
|
|
178
|
+
// for its `resources:` block, which supplies the instances the target
|
|
179
|
+
// library declared it needs. Those are `!ref`s to the importer's OWN
|
|
180
|
+
// resources and resolve exactly like any other reference; nothing else on
|
|
181
|
+
// the document is a reference slot, so only that subtree is walked.
|
|
182
|
+
if (r.kind === "Telo.Import") {
|
|
183
|
+
const supplied = r.resources;
|
|
184
|
+
if (supplied)
|
|
185
|
+
r.resources = walk(supplied);
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
if (SYSTEM_KINDS.has(r.kind))
|
|
176
189
|
continue;
|
|
177
190
|
walk(r);
|
|
178
191
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ResourceManifest } from "@telorun/sdk";
|
|
2
|
+
/**
|
|
3
|
+
* The `resources:` block on a `Telo.Library` — the instances a library requires
|
|
4
|
+
* from whoever imports it, beside the scalar `variables:` / `secrets:` blocks.
|
|
5
|
+
* Instances used to flow up only (`exports.resources`); this is the inward half.
|
|
6
|
+
*
|
|
7
|
+
* THE SINGLE READER of the block, in both halves (the analyzer's passes and the
|
|
8
|
+
* kernel's import controller), on the `ref-slot.ts` precedent: a boundary whose
|
|
9
|
+
* shape two runtimes must agree about is read in one place, so the next shape
|
|
10
|
+
* change is a one-file edit rather than four surfaces recognising a block by
|
|
11
|
+
* pattern-matching it.
|
|
12
|
+
*
|
|
13
|
+
* Browser-safe — no I/O, no Node built-ins.
|
|
14
|
+
*/
|
|
15
|
+
/** One declared input. */
|
|
16
|
+
export interface ResourceInput {
|
|
17
|
+
/** The entry key. Inside the library the instance is named exactly as a
|
|
18
|
+
* locally declared resource: `!ref <name>` at a ref slot, `resources.<name>`
|
|
19
|
+
* in CEL. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** The alias-qualified kind constraint, as written in the DECLARING library's
|
|
22
|
+
* own scope (`Sql.Connection`, `Self.Store`, `Telo.LogSink`). There is no
|
|
23
|
+
* `use:` here: the boundary is a dependency edge for init order whatever the
|
|
24
|
+
* library does with the instance, and the flattened application analysis
|
|
25
|
+
* drops the library doc, so an app-level claim about internal call sites is
|
|
26
|
+
* one nothing could check. */
|
|
27
|
+
kind: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Read a module document's `resources:` block. Returns `[]` for an
|
|
31
|
+
* `Telo.Application` (which has no such block), for a library that declares
|
|
32
|
+
* none, and for a malformed entry — the document's own schema validation
|
|
33
|
+
* reports the shape against the precise `resources.<name>` path. */
|
|
34
|
+
export declare function readResourceInputs(moduleDoc: unknown): ResourceInput[];
|
|
35
|
+
/** The values an import supplies for a target library's declared inputs, keyed
|
|
36
|
+
* by entry name. Read off a `Telo.Import` (authored or desugared from an
|
|
37
|
+
* `imports:` entry). Values are `!ref` sentinels before Phase 2.5 and
|
|
38
|
+
* `{kind, name}` after it — this reader does not interpret them. */
|
|
39
|
+
export declare function readSuppliedResources(importDoc: unknown): Record<string, unknown>;
|
|
40
|
+
/** True when `manifest` is a synthesized kind-only declaration standing in for a
|
|
41
|
+
* library's `resources:` entry rather than a resource the author declared. */
|
|
42
|
+
export declare function isInjectedDeclaration(manifest: ResourceManifest | undefined): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Synthesize a kind-only declaration per `resources:` entry, in the declaring
|
|
45
|
+
* library's own scope.
|
|
46
|
+
*
|
|
47
|
+
* That model has to exist because a library's internals are validated in the
|
|
48
|
+
* library's own pass — the flattened application analysis drops the library doc
|
|
49
|
+
* — so with nothing behind `connection`, `!ref connection` would have nothing to
|
|
50
|
+
* resolve against.
|
|
51
|
+
*
|
|
52
|
+
* Kind-only is enough because it is already what a ref slot gets: a reading
|
|
53
|
+
* types its `status:` half from the kind, closed so a typo below it is
|
|
54
|
+
* `CEL_UNKNOWN_FIELD`, and leaves the flat half open, since no manifest declares
|
|
55
|
+
* what `snapshot()` returned. So `!ref connection` at a ref slot and
|
|
56
|
+
* `resources.connection.<field>` in CEL answer exactly as they do for a locally
|
|
57
|
+
* declared resource.
|
|
58
|
+
*
|
|
59
|
+
* The declaration is a stand-in, never an instantiation: the per-resource
|
|
60
|
+
* validation loop skips it (its kind is routinely an abstract, and its config is
|
|
61
|
+
* the importer's to supply), and the kernel's import controller filters it out
|
|
62
|
+
* of the manifests it registers, binding the borrowed instance under the name
|
|
63
|
+
* instead.
|
|
64
|
+
*/
|
|
65
|
+
export declare function injectedDeclarations(moduleDoc: ResourceManifest, ownModule: string | undefined): ResourceManifest[];
|
|
66
|
+
/** How many times a library is instantiated in one application. `isolated` —
|
|
67
|
+
* the default, and what every published module was written against — gives
|
|
68
|
+
* each import declaration its own child scope with its own instances;
|
|
69
|
+
* `shared` makes the library a singleton every import resolves to. */
|
|
70
|
+
export type LibraryLifecycle = "isolated" | "shared";
|
|
71
|
+
/** Read a module document's `lifecycle:`. `Telo.Application` has a field of the
|
|
72
|
+
* same name with a different default and no reader; this is the LIBRARY
|
|
73
|
+
* question only, so it answers `isolated` for anything else. */
|
|
74
|
+
export declare function readLibraryLifecycle(moduleDoc: unknown): LibraryLifecycle;
|
|
75
|
+
//# sourceMappingURL=resource-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-input.d.ts","sourceRoot":"","sources":["../src/resource-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;;;GAYG;AAEH,0BAA0B;AAC1B,MAAM,WAAW,aAAa;IAC5B;;kBAEc;IACd,IAAI,EAAE,MAAM,CAAC;IACb;;;;;mCAK+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAOD;;;qEAGqE;AACrE,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,OAAO,GAAG,aAAa,EAAE,CAgBtE;AAED;;;qEAGqE;AACrE,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIjF;AAED;+EAC+E;AAC/E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAErF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,gBAAgB,EAAE,CAgBpB;AAED;;;uEAGuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAErD;;iEAEiE;AACjE,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,OAAO,GAAG,gBAAgB,CAIzE"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Marker stamped on a synthesized kind-only declaration (see
|
|
2
|
+
* {@link injectedDeclarations}). Read through {@link isInjectedDeclaration} —
|
|
3
|
+
* never by testing the field. */
|
|
4
|
+
const INJECTED = "xTeloInjected";
|
|
5
|
+
/** Read a module document's `resources:` block. Returns `[]` for an
|
|
6
|
+
* `Telo.Application` (which has no such block), for a library that declares
|
|
7
|
+
* none, and for a malformed entry — the document's own schema validation
|
|
8
|
+
* reports the shape against the precise `resources.<name>` path. */
|
|
9
|
+
export function readResourceInputs(moduleDoc) {
|
|
10
|
+
const raw = moduleDoc?.resources;
|
|
11
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
12
|
+
return [];
|
|
13
|
+
const out = [];
|
|
14
|
+
for (const [name, value] of Object.entries(raw)) {
|
|
15
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
16
|
+
continue;
|
|
17
|
+
const kind = value.kind;
|
|
18
|
+
if (typeof kind !== "string" || kind.length === 0)
|
|
19
|
+
continue;
|
|
20
|
+
const description = value.description;
|
|
21
|
+
out.push({
|
|
22
|
+
name,
|
|
23
|
+
kind,
|
|
24
|
+
...(typeof description === "string" ? { description } : {}),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
29
|
+
/** The values an import supplies for a target library's declared inputs, keyed
|
|
30
|
+
* by entry name. Read off a `Telo.Import` (authored or desugared from an
|
|
31
|
+
* `imports:` entry). Values are `!ref` sentinels before Phase 2.5 and
|
|
32
|
+
* `{kind, name}` after it — this reader does not interpret them. */
|
|
33
|
+
export function readSuppliedResources(importDoc) {
|
|
34
|
+
const raw = importDoc?.resources;
|
|
35
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
36
|
+
return {};
|
|
37
|
+
return raw;
|
|
38
|
+
}
|
|
39
|
+
/** True when `manifest` is a synthesized kind-only declaration standing in for a
|
|
40
|
+
* library's `resources:` entry rather than a resource the author declared. */
|
|
41
|
+
export function isInjectedDeclaration(manifest) {
|
|
42
|
+
return manifest?.metadata?.[INJECTED] === true;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Synthesize a kind-only declaration per `resources:` entry, in the declaring
|
|
46
|
+
* library's own scope.
|
|
47
|
+
*
|
|
48
|
+
* That model has to exist because a library's internals are validated in the
|
|
49
|
+
* library's own pass — the flattened application analysis drops the library doc
|
|
50
|
+
* — so with nothing behind `connection`, `!ref connection` would have nothing to
|
|
51
|
+
* resolve against.
|
|
52
|
+
*
|
|
53
|
+
* Kind-only is enough because it is already what a ref slot gets: a reading
|
|
54
|
+
* types its `status:` half from the kind, closed so a typo below it is
|
|
55
|
+
* `CEL_UNKNOWN_FIELD`, and leaves the flat half open, since no manifest declares
|
|
56
|
+
* what `snapshot()` returned. So `!ref connection` at a ref slot and
|
|
57
|
+
* `resources.connection.<field>` in CEL answer exactly as they do for a locally
|
|
58
|
+
* declared resource.
|
|
59
|
+
*
|
|
60
|
+
* The declaration is a stand-in, never an instantiation: the per-resource
|
|
61
|
+
* validation loop skips it (its kind is routinely an abstract, and its config is
|
|
62
|
+
* the importer's to supply), and the kernel's import controller filters it out
|
|
63
|
+
* of the manifests it registers, binding the borrowed instance under the name
|
|
64
|
+
* instead.
|
|
65
|
+
*/
|
|
66
|
+
export function injectedDeclarations(moduleDoc, ownModule) {
|
|
67
|
+
const inputs = readResourceInputs(moduleDoc);
|
|
68
|
+
if (inputs.length === 0)
|
|
69
|
+
return [];
|
|
70
|
+
const meta = moduleDoc.metadata;
|
|
71
|
+
return inputs.map((input) => ({
|
|
72
|
+
kind: input.kind,
|
|
73
|
+
metadata: {
|
|
74
|
+
name: input.name,
|
|
75
|
+
...(ownModule ? { module: ownModule } : {}),
|
|
76
|
+
source: meta?.source ?? "",
|
|
77
|
+
sourceLine: meta?.sourceLine ?? 0,
|
|
78
|
+
[INJECTED]: true,
|
|
79
|
+
},
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
/** Read a module document's `lifecycle:`. `Telo.Application` has a field of the
|
|
83
|
+
* same name with a different default and no reader; this is the LIBRARY
|
|
84
|
+
* question only, so it answers `isolated` for anything else. */
|
|
85
|
+
export function readLibraryLifecycle(moduleDoc) {
|
|
86
|
+
const doc = moduleDoc;
|
|
87
|
+
if (doc?.kind !== "Telo.Library")
|
|
88
|
+
return "isolated";
|
|
89
|
+
return doc.lifecycle === "shared" ? "shared" : "isolated";
|
|
90
|
+
}
|
|
@@ -237,6 +237,19 @@ export type ProjectionFailure = {
|
|
|
237
237
|
readonly kind: string;
|
|
238
238
|
readonly entries: string;
|
|
239
239
|
}
|
|
240
|
+
/** The slot names a resource the module does not DECLARE — a library's
|
|
241
|
+
* `resources:` input, standing in for an instance its importer supplies. A
|
|
242
|
+
* projection is DECLARATION-derived, so it cannot be answered here at all;
|
|
243
|
+
* the stand-in has no entries, and reporting that would tell the library
|
|
244
|
+
* author their block is wrong when it is correct. Resolution moves to the
|
|
245
|
+
* injection site, where the real declaration is. Carried as its own reason
|
|
246
|
+
* rather than as `no-entries` so a consumer can tell "unanswerable here"
|
|
247
|
+
* from "answered, and empty". */
|
|
248
|
+
| {
|
|
249
|
+
readonly reason: "injected";
|
|
250
|
+
readonly pointer: string;
|
|
251
|
+
readonly name: string;
|
|
252
|
+
}
|
|
240
253
|
/** An ENTRY of the projected declaration references a shape that could not be
|
|
241
254
|
* read. Reported rather than dropped: the entry would silently vanish from
|
|
242
255
|
* the projected row, so a consumer naming it would be told the property does
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-projection.d.ts","sourceRoot":"","sources":["../src/schema-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;
|
|
1
|
+
{"version":3,"file":"schema-projection.d.ts","sourceRoot":"","sources":["../src/schema-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAMH,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;qEACiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;CAC1C;AAED,mFAAmF;AACnF,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,CAAC,EAAE,M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EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EACzC,KAAK,EAAE,eAAe,EACtB,QAAQ,CAAC,EAAE,iBAAiB,EAAE,GAC7B,OAAO,CAyDT"}
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
* derivation can reach.
|
|
36
36
|
*/
|
|
37
37
|
import { isRefSentinel } from "@telorun/templating";
|
|
38
|
+
import { isInjectedDeclaration } from "./resource-input.js";
|
|
38
39
|
function isObject(value) {
|
|
39
40
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
40
41
|
}
|
|
@@ -378,6 +379,9 @@ function refTarget(value, scope, pointer) {
|
|
|
378
379
|
if ("ambiguous" in found)
|
|
379
380
|
return { reason: "ambiguous", pointer, name };
|
|
380
381
|
const manifest = found.manifest;
|
|
382
|
+
if (isInjectedDeclaration(manifest)) {
|
|
383
|
+
return { reason: "injected", pointer, name };
|
|
384
|
+
}
|
|
381
385
|
if (typeof manifest.kind !== "string")
|
|
382
386
|
return { reason: "unresolved", pointer, name };
|
|
383
387
|
const definition = scope.resolveDefinition(manifest.kind);
|
|
@@ -403,6 +407,9 @@ export function describeProjectionFailure(failure) {
|
|
|
403
407
|
: `'${failure.pointer}' does not hold a reference, so there is no declaration to project.`;
|
|
404
408
|
case "unresolved":
|
|
405
409
|
return `'${failure.pointer}' references '${failure.name}', which resolves to no resource.`;
|
|
410
|
+
case "injected":
|
|
411
|
+
return (`'${failure.pointer}' references '${failure.name}', a resource input this module does ` +
|
|
412
|
+
`not declare — its entries belong to whoever supplies it.`);
|
|
406
413
|
case "ambiguous":
|
|
407
414
|
return (`'${failure.pointer}' references '${failure.name}', which matches more than one resource ` +
|
|
408
415
|
`in scope. Rename one of them so the reference names exactly one declaration.`);
|
package/dist/system-kinds.d.ts
CHANGED
|
@@ -19,7 +19,12 @@ export declare const DEPENDENCY_GRAPH_SKIP_KINDS: ReadonlySet<string>;
|
|
|
19
19
|
/** Skipped by `!ref` sentinel resolution: kinds whose bodies are
|
|
20
20
|
* blueprints or import-time metadata, not resource instances with
|
|
21
21
|
* user-referenced ref slots. Mirrors `REF_VALIDATION_SKIP_KINDS` but
|
|
22
|
-
* also
|
|
23
|
-
*
|
|
22
|
+
* also lists Telo.Import, because walking its field map is pointless —
|
|
23
|
+
* there is no registered kind behind it.
|
|
24
|
+
*
|
|
25
|
+
* `resolveRefSentinels` reaches Telo.Import's `resources:` block AHEAD of this
|
|
26
|
+
* set, deliberately: those are the references an importer supplies for a
|
|
27
|
+
* library's declared inputs, and they resolve exactly like any other. Nothing
|
|
28
|
+
* else on the document is a reference slot, so only that subtree is walked. */
|
|
24
29
|
export declare const REF_RESOLUTION_SKIP_KINDS: ReadonlySet<string>;
|
|
25
30
|
//# sourceMappingURL=system-kinds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-kinds.d.ts","sourceRoot":"","sources":["../src/system-kinds.ts"],"names":[],"mappings":"AAAA;;;;sEAIsE;AAEtE;;;;;;0CAM0C;AAC1C,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAGxD,CAAC;AAEH;;;4CAG4C;AAC5C,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAG1D,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"system-kinds.d.ts","sourceRoot":"","sources":["../src/system-kinds.ts"],"names":[],"mappings":"AAAA;;;;sEAIsE;AAEtE;;;;;;0CAM0C;AAC1C,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAGxD,CAAC;AAEH;;;4CAG4C;AAC5C,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAG1D,CAAC;AAEH;;;;;;;;;gFASgF;AAChF,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAIxD,CAAC"}
|