@telorun/analyzer 0.3.0 → 0.5.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/README.md +0 -4
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +64 -14
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +11 -1
- package/dist/definition-registry.d.ts +1 -0
- package/dist/definition-registry.d.ts.map +1 -1
- package/dist/definition-registry.js +25 -7
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/manifest-loader.d.ts +5 -5
- package/dist/manifest-loader.d.ts.map +1 -1
- package/dist/manifest-loader.js +100 -67
- package/dist/{adapters/http-adapter.d.ts → sources/http-source.d.ts} +3 -3
- package/dist/sources/http-source.d.ts.map +1 -0
- package/dist/{adapters/http-adapter.js → sources/http-source.js} +1 -1
- package/dist/{adapters/registry-adapter.d.ts → sources/registry-source.d.ts} +3 -3
- package/dist/sources/registry-source.d.ts.map +1 -0
- package/dist/{adapters/registry-adapter.js → sources/registry-source.js} +1 -1
- package/dist/types.d.ts +10 -10
- package/dist/types.d.ts.map +1 -1
- package/dist/validate-extends.d.ts +26 -0
- package/dist/validate-extends.d.ts.map +1 -0
- package/dist/validate-extends.js +163 -0
- package/package.json +2 -2
- package/src/analyzer.ts +65 -16
- package/src/builtins.ts +11 -1
- package/src/definition-registry.ts +24 -6
- package/src/index.ts +7 -4
- package/src/manifest-loader.ts +106 -64
- package/src/{adapters/http-adapter.ts → sources/http-source.ts} +2 -2
- package/src/{adapters/registry-adapter.ts → sources/registry-source.ts} +2 -2
- package/src/types.ts +10 -10
- package/src/validate-extends.ts +175 -0
- package/dist/adapters/http-adapter.d.ts.map +0 -1
- package/dist/adapters/registry-adapter.d.ts.map +0 -1
package/README.md
CHANGED
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;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAa9B,OAAO,EAAsB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAa9B,OAAO,EAAsB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAuP/F,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,OAAO,GAAE,qBAA0B;IAI/C,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,kBAAkB,EAAE;IAsSvB,aAAa,CACX,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,kBAAkB,EAAE;IAMvB,SAAS,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,gBAAgB,GAAG,gBAAgB,EAAE;IAKxF,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;CAiB5F"}
|
package/dist/analyzer.js
CHANGED
|
@@ -9,6 +9,7 @@ import { normalizeInlineResources } from "./normalize-inline-resources.js";
|
|
|
9
9
|
import { celTypeSatisfiesJsonSchema, substituteCelFields, validateAgainstSchema, } from "./schema-compat.js";
|
|
10
10
|
import { DiagnosticSeverity } from "./types.js";
|
|
11
11
|
import { extractAccessChains, getManifestItem, pathMatchesScope, resolveContextAnnotations, resolveTypeFieldToSchema, validateChainAgainstSchema, } from "./validate-cel-context.js";
|
|
12
|
+
import { validateExtends } from "./validate-extends.js";
|
|
12
13
|
import { validateReferences } from "./validate-references.js";
|
|
13
14
|
import { validateThrowsCoverage } from "./validate-throws-coverage.js";
|
|
14
15
|
const TEMPLATE_REGEX = /\$\{\{\s*([^}]+?)\s*\}\}/g;
|
|
@@ -210,9 +211,24 @@ export class StaticAnalyzer {
|
|
|
210
211
|
// Register module identities and aliases.
|
|
211
212
|
// The root module doc (Telo.Application or Telo.Library) provides its own
|
|
212
213
|
// identity; imported modules surface their identity via resolvedModuleName/
|
|
213
|
-
// resolvedNamespace stamped onto the Telo.Import by the loader
|
|
214
|
-
//
|
|
215
|
-
//
|
|
214
|
+
// resolvedNamespace stamped onto the Telo.Import by the loader.
|
|
215
|
+
//
|
|
216
|
+
// Two alias scopes are tracked:
|
|
217
|
+
// - `aliases` — the consumer's aliases, populated from Telo.Imports declared in
|
|
218
|
+
// the entry manifest (its own module).
|
|
219
|
+
// - `aliasesByModule` — per-imported-library aliases, populated from Telo.Imports
|
|
220
|
+
// forwarded by the loader from inside imported libraries. A library may use
|
|
221
|
+
// different alias names than the consumer for the same dependency; resolving
|
|
222
|
+
// a forwarded def's `extends` / `capability` against the consumer's scope
|
|
223
|
+
// would either fail or pick the wrong target. Each forwarded def is normalized
|
|
224
|
+
// in its own library's scope.
|
|
225
|
+
const rootModules = new Set();
|
|
226
|
+
for (const m of manifests) {
|
|
227
|
+
if (isModuleKind(m.kind) && m.metadata?.name) {
|
|
228
|
+
rootModules.add(m.metadata.name);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const aliasesByModule = new Map();
|
|
216
232
|
for (const m of manifests) {
|
|
217
233
|
if (isModuleKind(m.kind)) {
|
|
218
234
|
const namespace = m.metadata.namespace ?? null;
|
|
@@ -226,26 +242,58 @@ export class StaticAnalyzer {
|
|
|
226
242
|
const exportedKinds = m.exports?.kinds ?? [];
|
|
227
243
|
const resolvedModuleName = m.metadata.resolvedModuleName;
|
|
228
244
|
const resolvedNamespace = m.metadata.resolvedNamespace;
|
|
245
|
+
const ownModule = m.metadata?.module;
|
|
229
246
|
if (alias && source) {
|
|
230
247
|
const targetModule = resolvedModuleName ?? source.split("/").filter(Boolean).pop() ?? source;
|
|
231
|
-
|
|
248
|
+
// Module identity is registered globally so x-telo-ref resolution sees
|
|
249
|
+
// transitively-imported modules regardless of which scope brought them in.
|
|
232
250
|
if (resolvedModuleName) {
|
|
233
251
|
defs.registerModuleIdentity(resolvedNamespace ?? null, resolvedModuleName);
|
|
234
252
|
}
|
|
253
|
+
// Alias registration is scoped: consumer imports vs. imported-library imports.
|
|
254
|
+
if (!ownModule || rootModules.has(ownModule)) {
|
|
255
|
+
aliases.registerImport(alias, targetModule, exportedKinds);
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
let libResolver = aliasesByModule.get(ownModule);
|
|
259
|
+
if (!libResolver) {
|
|
260
|
+
libResolver = new AliasResolver();
|
|
261
|
+
aliasesByModule.set(ownModule, libResolver);
|
|
262
|
+
}
|
|
263
|
+
libResolver.registerImport(alias, targetModule, exportedKinds);
|
|
264
|
+
}
|
|
235
265
|
}
|
|
236
266
|
}
|
|
237
267
|
}
|
|
238
|
-
// Register definitions from Telo.Definition resources.
|
|
239
|
-
//
|
|
240
|
-
//
|
|
268
|
+
// Register definitions from Telo.Definition AND Telo.Abstract resources.
|
|
269
|
+
// Abstracts declare contracts that implementations target via `extends` (canonical)
|
|
270
|
+
// or `capability: <AbstractKind>` (legacy). Until they're registered, validateReferences
|
|
271
|
+
// can't resolve x-telo-ref entries pointing at library-declared abstracts — so abstracts
|
|
272
|
+
// must go through register() too, not just the kernel builtins in the constructor.
|
|
273
|
+
//
|
|
274
|
+
// Normalize alias-prefixed `capability` and `extends` to canonical form using the
|
|
275
|
+
// declaring scope's resolver, so `extendedBy` is keyed by canonical kind regardless
|
|
276
|
+
// of alias choices. `capability` covers the legacy implements-this-abstract overload;
|
|
277
|
+
// `extends` is the canonical first-class form.
|
|
241
278
|
for (const m of manifests) {
|
|
242
|
-
if (m.kind
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
279
|
+
if (m.kind !== "Telo.Definition" && m.kind !== "Telo.Abstract")
|
|
280
|
+
continue;
|
|
281
|
+
const def = m;
|
|
282
|
+
const ownModule = def.metadata?.module;
|
|
283
|
+
const scopeResolver = ownModule && !rootModules.has(ownModule)
|
|
284
|
+
? (aliasesByModule.get(ownModule) ?? new AliasResolver())
|
|
285
|
+
: aliases;
|
|
286
|
+
const resolvedCapability = def.capability
|
|
287
|
+
? (scopeResolver.resolveKind(def.capability) ?? def.capability)
|
|
288
|
+
: def.capability;
|
|
289
|
+
const resolvedExtends = def.extends
|
|
290
|
+
? (scopeResolver.resolveKind(def.extends) ?? def.extends)
|
|
291
|
+
: def.extends;
|
|
292
|
+
const needsPatch = resolvedCapability !== def.capability || resolvedExtends !== def.extends;
|
|
293
|
+
const normalized = needsPatch
|
|
294
|
+
? { ...def, capability: resolvedCapability, extends: resolvedExtends }
|
|
295
|
+
: def;
|
|
296
|
+
defs.register(normalized);
|
|
249
297
|
}
|
|
250
298
|
// Phase 2: extract inline resources from x-telo-ref slots into first-class manifests
|
|
251
299
|
const allManifests = normalizeInlineResources(manifests, defs, aliases);
|
|
@@ -401,6 +449,8 @@ export class StaticAnalyzer {
|
|
|
401
449
|
}
|
|
402
450
|
// Validate resource references (Phase 3)
|
|
403
451
|
diagnostics.push(...validateReferences(allManifests, { aliases, definitions: defs }));
|
|
452
|
+
// Validate `extends` fields and flag legacy `capability: <UserAbstract>` overload.
|
|
453
|
+
diagnostics.push(...validateExtends(allManifests, defs, aliases));
|
|
404
454
|
// Validate throws: declarations and catches: coverage (rules 1, 2, 4, 7)
|
|
405
455
|
diagnostics.push(...validateThrowsCoverage(allManifests, defs, aliases, this.celEnv));
|
|
406
456
|
return diagnostics;
|
package/dist/builtins.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,eAAe,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../src/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAsJ/C,CAAC"}
|
package/dist/builtins.js
CHANGED
|
@@ -25,9 +25,13 @@ export const KERNEL_BUILTINS = [
|
|
|
25
25
|
additionalProperties: true,
|
|
26
26
|
},
|
|
27
27
|
capability: { type: "string" },
|
|
28
|
+
schema: { type: "object", additionalProperties: true },
|
|
28
29
|
},
|
|
29
30
|
required: ["metadata"],
|
|
30
|
-
|
|
31
|
+
// Telo.Abstract is an extension point by design — it must accept forward-compatible
|
|
32
|
+
// fields (e.g. inputType/outputType from the typed-abstracts plan) without requiring
|
|
33
|
+
// the analyzer to enumerate them here.
|
|
34
|
+
additionalProperties: true,
|
|
31
35
|
},
|
|
32
36
|
},
|
|
33
37
|
{
|
|
@@ -53,6 +57,12 @@ export const KERNEL_BUILTINS = [
|
|
|
53
57
|
source: { type: "string" },
|
|
54
58
|
variables: { type: "object" },
|
|
55
59
|
secrets: { type: "object" },
|
|
60
|
+
runtime: {
|
|
61
|
+
oneOf: [
|
|
62
|
+
{ type: "string" },
|
|
63
|
+
{ type: "array", items: { type: "string" } },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
56
66
|
},
|
|
57
67
|
required: ["metadata", "source"],
|
|
58
68
|
additionalProperties: false,
|
|
@@ -20,6 +20,7 @@ export declare class DefinitionRegistry {
|
|
|
20
20
|
* Used to compute definition $id values for the AJV schema store. */
|
|
21
21
|
private readonly reverseIdentityMap;
|
|
22
22
|
register(definition: ResourceDefinition): void;
|
|
23
|
+
private addExtendedBy;
|
|
23
24
|
/** Register a module identity for x-telo-ref resolution.
|
|
24
25
|
* Call once per module doc (Telo.Application or Telo.Library) when the manifest is loaded.
|
|
25
26
|
* @param namespace The module's metadata.namespace (e.g. "std"), or null for telo built-ins.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition-registry.d.ts","sourceRoot":"","sources":["../src/definition-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAA0B,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG1F,+EAA+E;AAC/E,qBAAa,kBAAkB;;IAK7B;;sFAEkF;IAClF,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,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;6DACyD;IACzD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IACzD;;0EAEsE;IACtE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;IAEhE,QAAQ,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"definition-registry.d.ts","sourceRoot":"","sources":["../src/definition-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAA0B,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG1F,+EAA+E;AAC/E,qBAAa,kBAAkB;;IAK7B;;sFAEkF;IAClF,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,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;6DACyD;IACzD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IACzD;;0EAEsE;IACtE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;IAEhE,QAAQ,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI;IAiC9C,OAAO,CAAC,aAAa;IASrB;;;yFAGqF;IACrF,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAgB1E;4EACwE;IACxE,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAMnE;wFACoF;IACpF,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE;IAWtE,OAAO,CAAC,iBAAiB;IAczB;;;;;;;;4FAQwF;IACxF,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAUhD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAIrD,+FAA+F;IAC/F,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIxD,gGAAgG;IAChG,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;IAOhC;;qEAEiE;IACjE,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,kBAAkB,EAAE;IAgBxD,KAAK,IAAI,MAAM,EAAE;CAGlB"}
|
|
@@ -28,14 +28,22 @@ export class DefinitionRegistry {
|
|
|
28
28
|
const key = mod ? `${mod}.${name}` : name;
|
|
29
29
|
this.defs.set(key, definition);
|
|
30
30
|
this.fieldMaps.set(key, buildReferenceFieldMap(definition.schema ?? {}));
|
|
31
|
+
// `capability` populates extendedBy for backward-compat with the legacy pattern where
|
|
32
|
+
// a concrete definition overloaded `capability: <AbstractKind>` to mean "implements
|
|
33
|
+
// this abstract." The canonical pattern is `extends` (below). Both populate the index,
|
|
34
|
+
// unioned — so in-flight modules pre-migration keep working.
|
|
31
35
|
if (definition.capability) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
this.addExtendedBy(definition.capability, key);
|
|
37
|
+
}
|
|
38
|
+
// `extends` — first-class "implements-this-abstract" edge. Alias-form resolution
|
|
39
|
+
// happens in the analyzer before register() is called (analyzer.ts pre-resolves
|
|
40
|
+
// via aliases.resolveKind), so the value here is already the canonical kind string
|
|
41
|
+
// (e.g. "workflow.Backend"). If the analyzer could not resolve the alias (partial
|
|
42
|
+
// context, or the declaring file doesn't import the target's alias), the value
|
|
43
|
+
// stays as the original alias-prefixed form; validateExtends emits EXTENDS_MALFORMED
|
|
44
|
+
// or EXTENDS_UNKNOWN_TARGET depending on the case.
|
|
45
|
+
if (definition.extends) {
|
|
46
|
+
this.addExtendedBy(definition.extends, key);
|
|
39
47
|
}
|
|
40
48
|
// Auto-register the telo identity when any Telo built-in is registered.
|
|
41
49
|
if (definition.kind === "Telo.Abstract" && mod === "Telo") {
|
|
@@ -47,6 +55,16 @@ export class DefinitionRegistry {
|
|
|
47
55
|
this.tryRegisterSchema(mod, name, definition.schema);
|
|
48
56
|
}
|
|
49
57
|
}
|
|
58
|
+
addExtendedBy(parent, child) {
|
|
59
|
+
const children = this.extendedBy.get(parent);
|
|
60
|
+
if (children) {
|
|
61
|
+
if (!children.includes(child))
|
|
62
|
+
children.push(child);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this.extendedBy.set(parent, [child]);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
50
68
|
/** Register a module identity for x-telo-ref resolution.
|
|
51
69
|
* Call once per module doc (Telo.Application or Telo.Library) when the manifest is loaded.
|
|
52
70
|
* @param namespace The module's metadata.namespace (e.g. "std"), or null for telo built-ins.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { HttpAdapter } from "./adapters/http-adapter.js";
|
|
2
|
-
export { RegistryAdapter } from "./adapters/registry-adapter.js";
|
|
3
1
|
export { AnalysisRegistry } from "./analysis-registry.js";
|
|
4
2
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
5
3
|
export { Loader } from "./manifest-loader.js";
|
|
6
|
-
export {
|
|
4
|
+
export { isModuleKind, MODULE_KINDS } from "./module-kinds.js";
|
|
7
5
|
export type { ModuleKind } from "./module-kinds.js";
|
|
6
|
+
export { HttpSource } from "./sources/http-source.js";
|
|
7
|
+
export { RegistrySource } from "./sources/registry-source.js";
|
|
8
8
|
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|
|
9
|
-
export type { AnalysisDiagnostic, AnalysisOptions, LoaderInitOptions, LoadOptions,
|
|
9
|
+
export type { AnalysisDiagnostic, AnalysisOptions, LoaderInitOptions, LoadOptions, ManifestSource, Position, PositionIndex, Range } from "./types.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC3E,YAAY,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,aAAa,EACb,KAAK,EACR,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { HttpAdapter } from "./adapters/http-adapter.js";
|
|
2
|
-
export { RegistryAdapter } from "./adapters/registry-adapter.js";
|
|
3
1
|
export { AnalysisRegistry } from "./analysis-registry.js";
|
|
4
2
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
5
3
|
export { Loader } from "./manifest-loader.js";
|
|
6
|
-
export {
|
|
4
|
+
export { isModuleKind, MODULE_KINDS } from "./module-kinds.js";
|
|
5
|
+
export { HttpSource } from "./sources/http-source.js";
|
|
6
|
+
export { RegistrySource } from "./sources/registry-source.js";
|
|
7
7
|
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ResourceManifest } from "@telorun/sdk";
|
|
2
|
-
import { type LoadOptions, type LoaderInitOptions, type
|
|
2
|
+
import { type LoadOptions, type LoaderInitOptions, type ManifestSource } from "./types.js";
|
|
3
3
|
export declare class Loader {
|
|
4
|
-
private
|
|
5
|
-
protected
|
|
4
|
+
private readonly moduleCache;
|
|
5
|
+
protected sources: ManifestSource[];
|
|
6
6
|
private readonly celEnv;
|
|
7
|
-
constructor(
|
|
8
|
-
register(
|
|
7
|
+
constructor(extraSourcesOrOptions?: ManifestSource[] | LoaderInitOptions);
|
|
8
|
+
register(source: ManifestSource): this;
|
|
9
9
|
private pick;
|
|
10
10
|
resolveEntryPoint(url: string): Promise<string>;
|
|
11
11
|
loadModule(url: string, options?: LoadOptions): Promise<ResourceManifest[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../src/manifest-loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOtE,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,
|
|
1
|
+
{"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../src/manifest-loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOtE,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAGpB,MAAM,YAAY,CAAC;AASpB,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAGxB;IAEJ,SAAS,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,qBAAqB,GAAE,cAAc,EAAE,GAAG,iBAAsB;IAmB5E,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAKtC,OAAO,CAAC,IAAI;IAMN,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK/C,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAqGnE,eAAe;YAoBf,eAAe;IAgEvB,iBAAiB,CACrB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,gBAAgB,EAAE,CAAC;QAC9B,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;KAClD,GAAG,IAAI,CAAC;IAiCH,eAAe,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,GAC5C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAsCrC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CA2GnE"}
|
package/dist/manifest-loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isCompiledValue } from "@telorun/sdk";
|
|
2
2
|
import { isMap, isPair, isScalar, isSeq, parseAllDocuments } from "yaml";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { HttpSource } from "./sources/http-source.js";
|
|
4
|
+
import { RegistrySource } from "./sources/registry-source.js";
|
|
5
5
|
import { buildCelEnvironment } from "./cel-environment.js";
|
|
6
6
|
import { isModuleKind } from "./module-kinds.js";
|
|
7
7
|
import { precompileDoc } from "./precompile.js";
|
|
@@ -13,34 +13,34 @@ const SYSTEM_KINDS = new Set([
|
|
|
13
13
|
"Telo.Definition",
|
|
14
14
|
]);
|
|
15
15
|
export class Loader {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
moduleCache = new Map();
|
|
17
|
+
sources;
|
|
18
18
|
celEnv;
|
|
19
|
-
constructor(
|
|
20
|
-
const options = Array.isArray(
|
|
21
|
-
? {
|
|
22
|
-
:
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
this.
|
|
26
|
-
if (
|
|
27
|
-
this.
|
|
28
|
-
if (
|
|
29
|
-
this.
|
|
30
|
-
if (options.
|
|
31
|
-
this.
|
|
19
|
+
constructor(extraSourcesOrOptions = []) {
|
|
20
|
+
const options = Array.isArray(extraSourcesOrOptions)
|
|
21
|
+
? { extraSources: extraSourcesOrOptions }
|
|
22
|
+
: extraSourcesOrOptions;
|
|
23
|
+
const includeHttpSource = options.includeHttpSource ?? true;
|
|
24
|
+
const includeRegistrySource = options.includeRegistrySource ?? true;
|
|
25
|
+
this.sources = [];
|
|
26
|
+
if (includeHttpSource)
|
|
27
|
+
this.sources.push(new HttpSource());
|
|
28
|
+
if (includeRegistrySource)
|
|
29
|
+
this.sources.push(new RegistrySource(options.registryUrl));
|
|
30
|
+
if (options.extraSources?.length) {
|
|
31
|
+
this.sources.unshift(...options.extraSources);
|
|
32
32
|
}
|
|
33
33
|
this.celEnv = buildCelEnvironment(options.celHandlers);
|
|
34
34
|
}
|
|
35
|
-
register(
|
|
36
|
-
this.
|
|
35
|
+
register(source) {
|
|
36
|
+
this.sources.unshift(source);
|
|
37
37
|
return this;
|
|
38
38
|
}
|
|
39
39
|
pick(url) {
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
42
|
-
throw new Error(`No
|
|
43
|
-
return
|
|
40
|
+
const s = this.sources.find((s) => s.supports(url));
|
|
41
|
+
if (!s)
|
|
42
|
+
throw new Error(`No source found for: ${url}`);
|
|
43
|
+
return s;
|
|
44
44
|
}
|
|
45
45
|
async resolveEntryPoint(url) {
|
|
46
46
|
const { source } = await this.pick(url).read(url);
|
|
@@ -49,7 +49,7 @@ export class Loader {
|
|
|
49
49
|
async loadModule(url, options) {
|
|
50
50
|
const { text, source } = await this.pick(url).read(url);
|
|
51
51
|
const cacheKey = `${options?.compile ? "compiled" : "raw"}:${source}`;
|
|
52
|
-
const cached =
|
|
52
|
+
const cached = this.moduleCache.get(cacheKey);
|
|
53
53
|
if (cached && cached.text === text) {
|
|
54
54
|
return cloneManifestArray(cached.manifests);
|
|
55
55
|
}
|
|
@@ -126,8 +126,8 @@ export class Loader {
|
|
|
126
126
|
const includePatterns = moduleManifest.include;
|
|
127
127
|
if (includePatterns?.length) {
|
|
128
128
|
hasIncludes = true;
|
|
129
|
-
const
|
|
130
|
-
const includedFiles = await this.resolveIncludes(source, includePatterns,
|
|
129
|
+
const picked = this.pick(source);
|
|
130
|
+
const includedFiles = await this.resolveIncludes(source, includePatterns, picked);
|
|
131
131
|
for (const includedUrl of includedFiles) {
|
|
132
132
|
const partialManifests = await this.loadPartialFile(includedUrl, moduleName, options);
|
|
133
133
|
resolved.push(...partialManifests);
|
|
@@ -135,22 +135,22 @@ export class Loader {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
if (!hasIncludes) {
|
|
138
|
-
|
|
138
|
+
this.moduleCache.set(cacheKey, { text, manifests: resolved });
|
|
139
139
|
}
|
|
140
140
|
return cloneManifestArray(resolved);
|
|
141
141
|
}
|
|
142
|
-
async resolveIncludes(ownerSource, patterns,
|
|
142
|
+
async resolveIncludes(ownerSource, patterns, source) {
|
|
143
143
|
const hasGlobs = patterns.some((p) => /[*?{}\[\]]/.test(p));
|
|
144
144
|
if (hasGlobs) {
|
|
145
|
-
if (!
|
|
146
|
-
throw new Error(`Include patterns in '${ownerSource}' contain globs but the
|
|
145
|
+
if (!source.expandGlob) {
|
|
146
|
+
throw new Error(`Include patterns in '${ownerSource}' contain globs but the source for this URL ` +
|
|
147
147
|
`does not support glob expansion. Use explicit file paths instead of patterns like: ` +
|
|
148
148
|
patterns.filter((p) => /[*?{}\[\]]/.test(p)).join(", "));
|
|
149
149
|
}
|
|
150
|
-
return
|
|
150
|
+
return source.expandGlob(ownerSource, patterns);
|
|
151
151
|
}
|
|
152
152
|
// Literal relative paths — deduplicate in case the same file appears under multiple patterns.
|
|
153
|
-
return [...new Set(patterns.map((p) =>
|
|
153
|
+
return [...new Set(patterns.map((p) => source.resolveRelative(ownerSource, p)))];
|
|
154
154
|
}
|
|
155
155
|
async loadPartialFile(url, ownerModuleName, options) {
|
|
156
156
|
const { text, source } = await this.pick(url).read(url);
|
|
@@ -228,10 +228,10 @@ export class Loader {
|
|
|
228
228
|
// Otherwise fall through to owner lookup — this is likely a partial file
|
|
229
229
|
}
|
|
230
230
|
// Find the owning telo.yaml via parent-directory traversal
|
|
231
|
-
const
|
|
232
|
-
if (!
|
|
231
|
+
const source = this.pick(fileUrl);
|
|
232
|
+
if (!source.resolveOwnerOf)
|
|
233
233
|
return null;
|
|
234
|
-
const ownerUrl = await
|
|
234
|
+
const ownerUrl = await source.resolveOwnerOf(fileUrl);
|
|
235
235
|
if (!ownerUrl)
|
|
236
236
|
return null;
|
|
237
237
|
// Load the owner module (which will load included files via include expansion)
|
|
@@ -277,7 +277,30 @@ export class Loader {
|
|
|
277
277
|
}
|
|
278
278
|
async loadManifests(entryUrl) {
|
|
279
279
|
const visited = new Set([entryUrl]);
|
|
280
|
+
// Cache resolved library identity per import URL so a Telo.Import re-encountered
|
|
281
|
+
// through a different chain still gets `resolvedModuleName` / `resolvedNamespace`
|
|
282
|
+
// stamped — without re-loading the target. The early `visited` short-circuit used
|
|
283
|
+
// to silently leave duplicate Telo.Imports unstamped, which broke alias resolution
|
|
284
|
+
// when the same library was imported by two different files in the same analysis set.
|
|
285
|
+
const libraryIdentityByUrl = new Map();
|
|
280
286
|
const entry = await this.loadModule(entryUrl);
|
|
287
|
+
// Forward Telo.Definition, Telo.Abstract, AND Telo.Import docs from imported
|
|
288
|
+
// libraries to the analyzer so its downstream passes can see them:
|
|
289
|
+
// - Definitions / Abstracts feed cross-package `x-telo-ref` resolution and
|
|
290
|
+
// `extends` target validation.
|
|
291
|
+
// - Imports feed the per-library alias resolver — alias-form `extends` inside
|
|
292
|
+
// a library (e.g. ai-openai's `extends: Ai.Model`) resolves against THAT
|
|
293
|
+
// library's own `Telo.Import` declarations, not the root manifest's. Without
|
|
294
|
+
// forwarding the imports, importing such a library would surface a spurious
|
|
295
|
+
// EXTENDS_MALFORMED for an alias the library legitimately uses internally.
|
|
296
|
+
// Alias resolution itself stays in the analyzer; the loader's only semantic
|
|
297
|
+
// action is stamping `resolvedModuleName` / `resolvedNamespace` — recording the
|
|
298
|
+
// result of loading. Identity is cached per URL (see libraryIdentityByUrl above)
|
|
299
|
+
// because the same library can be reached through multiple chains, and every
|
|
300
|
+
// Telo.Import doc — including the duplicates short-circuited by `visited` —
|
|
301
|
+
// must end up stamped, otherwise per-scope alias resolution falls back to a
|
|
302
|
+
// path-derived string (e.g. "abstract-lib.yaml") and produces wrong canonical
|
|
303
|
+
// kinds.
|
|
281
304
|
const importedDefs = [];
|
|
282
305
|
const queue = [...entry];
|
|
283
306
|
while (queue.length > 0) {
|
|
@@ -291,36 +314,52 @@ export class Loader {
|
|
|
291
314
|
const importUrl = importSource.startsWith(".") || importSource.startsWith("/")
|
|
292
315
|
? this.pick(base).resolveRelative(base, importSource)
|
|
293
316
|
: importSource;
|
|
294
|
-
if (visited.has(importUrl))
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
317
|
+
if (!visited.has(importUrl)) {
|
|
318
|
+
visited.add(importUrl);
|
|
319
|
+
let imported;
|
|
320
|
+
try {
|
|
321
|
+
imported = await this.loadModule(importUrl);
|
|
322
|
+
}
|
|
323
|
+
catch (err) {
|
|
324
|
+
const e = err instanceof Error ? err : new Error(String(err));
|
|
325
|
+
e.sourceLine = m.metadata?.sourceLine ?? 0;
|
|
326
|
+
throw e;
|
|
327
|
+
}
|
|
328
|
+
// Import target must be a Telo.Library. Check the Library branch
|
|
329
|
+
// explicitly rather than "anything that's a module kind" so that a
|
|
330
|
+
// future third kind can't silently slip past as a valid import target.
|
|
331
|
+
const importedLibrary = imported.find((im) => im.kind === "Telo.Library");
|
|
332
|
+
const importedApplication = imported.find((im) => im.kind === "Telo.Application");
|
|
333
|
+
if (importedApplication) {
|
|
334
|
+
const e = new Error(`Telo.Import target '${importSource}' is a Telo.Application. ` +
|
|
335
|
+
`Only Telo.Library modules may be imported. Applications are run directly, not imported.`);
|
|
336
|
+
e.sourceLine = m.metadata?.sourceLine ?? 0;
|
|
337
|
+
throw e;
|
|
338
|
+
}
|
|
339
|
+
if (importedLibrary?.metadata?.name) {
|
|
340
|
+
libraryIdentityByUrl.set(importUrl, {
|
|
341
|
+
name: importedLibrary.metadata.name,
|
|
342
|
+
namespace: importedLibrary.metadata.namespace ?? null,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
for (const im of imported) {
|
|
346
|
+
if (im.kind === "Telo.Definition" ||
|
|
347
|
+
im.kind === "Telo.Abstract" ||
|
|
348
|
+
im.kind === "Telo.Import") {
|
|
349
|
+
importedDefs.push(im);
|
|
350
|
+
}
|
|
351
|
+
if (im.kind === "Telo.Import")
|
|
352
|
+
queue.push(im);
|
|
353
|
+
}
|
|
316
354
|
}
|
|
317
|
-
|
|
318
|
-
|
|
355
|
+
// Stamp m with cached identity (works for both fresh and duplicate visits).
|
|
356
|
+
const identity = libraryIdentityByUrl.get(importUrl);
|
|
357
|
+
if (identity) {
|
|
319
358
|
const pi = m.metadata?.positionIndex;
|
|
320
359
|
m.metadata = {
|
|
321
360
|
...m.metadata,
|
|
322
|
-
resolvedModuleName:
|
|
323
|
-
resolvedNamespace:
|
|
361
|
+
resolvedModuleName: identity.name,
|
|
362
|
+
resolvedNamespace: identity.namespace,
|
|
324
363
|
};
|
|
325
364
|
if (pi) {
|
|
326
365
|
Object.defineProperty(m.metadata, "positionIndex", {
|
|
@@ -331,12 +370,6 @@ export class Loader {
|
|
|
331
370
|
});
|
|
332
371
|
}
|
|
333
372
|
}
|
|
334
|
-
for (const im of imported) {
|
|
335
|
-
if (im.kind === "Telo.Definition")
|
|
336
|
-
importedDefs.push(im);
|
|
337
|
-
if (im.kind === "Telo.Import")
|
|
338
|
-
queue.push(im);
|
|
339
|
-
}
|
|
340
373
|
}
|
|
341
374
|
return [...entry, ...importedDefs];
|
|
342
375
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare class
|
|
1
|
+
import { type ManifestSource } from "../types.js";
|
|
2
|
+
export declare class HttpSource implements ManifestSource {
|
|
3
3
|
supports(url: string): boolean;
|
|
4
4
|
read(url: string): Promise<{
|
|
5
5
|
text: string;
|
|
@@ -7,4 +7,4 @@ export declare class HttpAdapter implements ManifestAdapter {
|
|
|
7
7
|
}>;
|
|
8
8
|
resolveRelative(base: string, relative: string): string;
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=http-
|
|
10
|
+
//# sourceMappingURL=http-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-source.d.ts","sourceRoot":"","sources":["../../src/sources/http-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7E,qBAAa,UAAW,YAAW,cAAc;IAC/C,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIxB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAWlE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAIxD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare class
|
|
1
|
+
import { type ManifestSource } from "../types.js";
|
|
2
|
+
export declare class RegistrySource implements ManifestSource {
|
|
3
3
|
private registryUrl;
|
|
4
4
|
constructor(registryUrl?: string);
|
|
5
5
|
supports(url: string): boolean;
|
|
@@ -12,4 +12,4 @@ export declare class RegistryAdapter implements ManifestAdapter {
|
|
|
12
12
|
private toRegistryUrl;
|
|
13
13
|
private parseModuleRef;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=registry-
|
|
15
|
+
//# sourceMappingURL=registry-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-source.d.ts","sourceRoot":"","sources":["../../src/sources/registry-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7E,qBAAa,cAAe,YAAW,cAAc;IACvC,OAAO,CAAC,WAAW;gBAAX,WAAW,SAAuB;IAEtD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAWxB,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAWxE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAMvD,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;CAmBvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_MANIFEST_FILENAME } from "../types.js";
|
|
2
2
|
const DEFAULT_REGISTRY_URL = "https://registry.telo.run";
|
|
3
|
-
export class
|
|
3
|
+
export class RegistrySource {
|
|
4
4
|
registryUrl;
|
|
5
5
|
constructor(registryUrl = DEFAULT_REGISTRY_URL) {
|
|
6
6
|
this.registryUrl = registryUrl;
|