@telorun/analyzer 0.1.2 → 0.1.4
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 +233 -0
- package/dist/adapters/http-adapter.d.ts +1 -1
- package/dist/adapters/http-adapter.d.ts.map +1 -1
- package/dist/adapters/http-adapter.js +2 -1
- package/dist/adapters/node-adapter.d.ts +3 -1
- package/dist/adapters/node-adapter.d.ts.map +1 -1
- package/dist/adapters/node-adapter.js +43 -4
- package/dist/adapters/registry-adapter.d.ts +1 -1
- package/dist/adapters/registry-adapter.d.ts.map +1 -1
- package/dist/adapters/registry-adapter.js +2 -1
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +6 -1
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +4 -0
- package/dist/cel-environment.d.ts +5 -2
- package/dist/cel-environment.d.ts.map +1 -1
- package/dist/cel-environment.js +5 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/kernel-globals.d.ts +34 -0
- package/dist/kernel-globals.d.ts.map +1 -0
- package/dist/kernel-globals.js +94 -0
- package/dist/manifest-loader.d.ts +10 -2
- package/dist/manifest-loader.d.ts.map +1 -1
- package/dist/manifest-loader.js +164 -0
- package/dist/schema-compat.d.ts +1 -1
- package/dist/schema-compat.d.ts.map +1 -1
- package/dist/schema-compat.js +43 -14
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -0
- package/dist/validate-references.d.ts.map +1 -1
- package/dist/validate-references.js +13 -1
- package/package.json +22 -3
- package/src/adapters/http-adapter.ts +2 -2
- package/src/adapters/registry-adapter.ts +2 -2
- package/src/analyzer.ts +7 -1
- package/src/builtins.ts +4 -0
- package/src/cel-environment.ts +5 -3
- package/src/index.ts +1 -2
- package/src/kernel-globals.ts +110 -0
- package/src/manifest-loader.ts +204 -7
- package/src/schema-compat.ts +47 -13
- package/src/types.ts +13 -0
- package/src/validate-references.ts +13 -1
- package/src/adapters/node-adapter.ts +0 -38
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# ⚡ Telo
|
|
2
|
+
|
|
3
|
+
Runtime for declarative backends.
|
|
4
|
+
|
|
5
|
+
Telo is an execution engine (Micro-Kernel) that runs logic defined entirely in YAML manifests. Instead of writing imperative backend code, you define your routes, databases, schemas, and AI workflows as atomic, interconnected YAML documents. Telo takes those manifests and runs them.
|
|
6
|
+
|
|
7
|
+
Built to be language-agnostic and infinitely extensible.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Reconcile your manifest into a running backend
|
|
11
|
+
$ telo ./examples/hello-api.yaml
|
|
12
|
+
|
|
13
|
+
{"level":30,"time":1771610393008,"pid":1310178,"hostname":"dev","msg":"Server listening at http://127.0.0.1:8844"}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Why use Telo?
|
|
17
|
+
|
|
18
|
+
- **Open Standards:** Built on YAML, JSON Schema, and CEL — no proprietary DSL.
|
|
19
|
+
- **Static Analysis:** CEL type checking, reference validation, and IDE diagnostics catch errors before runtime.
|
|
20
|
+
- **Micro-Kernel Architecture:** Telo itself knows nothing about HTTP or SQL. Everything is a module you import, scope, and compose with typed variable and secret contracts.
|
|
21
|
+
- **Language Agnostic:** Available as a Node.js runtime today, with a shared YAML runtime contract that allows for future Rust or Go implementations without changing your manifests.
|
|
22
|
+
|
|
23
|
+
## What It Does
|
|
24
|
+
|
|
25
|
+
- **Loads** YAML resources and compiles CEL expressions (`${{ }}`) into an in-memory registry.
|
|
26
|
+
- **Resolves** resource dependencies via a multi-pass init loop, handling ordering automatically.
|
|
27
|
+
- **Indexes** resources by Kind and Name for constant-time lookup.
|
|
28
|
+
- **Dispatches** execution to the controller that owns each Kind.
|
|
29
|
+
|
|
30
|
+
Manifests also support directives for dynamic generation: `$let`, `$if`, `$for`, `$eval`, and `$include`. See [CEL-YAML Templating](./yaml-cel-templating/README.md) for documentation.
|
|
31
|
+
|
|
32
|
+
## Example manifest
|
|
33
|
+
|
|
34
|
+
Here is an example Telo application that defines a simple HTTP API:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
kind: Kernel.Module
|
|
38
|
+
metadata:
|
|
39
|
+
name: feedback
|
|
40
|
+
version: 1.0.0
|
|
41
|
+
description: |
|
|
42
|
+
A complete feedback collection REST API — no code, pure YAML.
|
|
43
|
+
Persists entries to SQLite and serves them over HTTP.
|
|
44
|
+
targets:
|
|
45
|
+
- Migrations
|
|
46
|
+
- Server
|
|
47
|
+
---
|
|
48
|
+
kind: Kernel.Import
|
|
49
|
+
metadata:
|
|
50
|
+
name: Http
|
|
51
|
+
source: ../modules/http-server
|
|
52
|
+
---
|
|
53
|
+
kind: Kernel.Import
|
|
54
|
+
metadata:
|
|
55
|
+
name: Sql
|
|
56
|
+
source: ../modules/sql
|
|
57
|
+
---
|
|
58
|
+
# SQLite database — swap driver/host/database for PostgreSQL with zero YAML changes
|
|
59
|
+
kind: Sql.Connection
|
|
60
|
+
metadata:
|
|
61
|
+
name: Db
|
|
62
|
+
driver: sqlite
|
|
63
|
+
file: ./tmp/feedback.db
|
|
64
|
+
---
|
|
65
|
+
# Migrations: applied automatically before the server starts
|
|
66
|
+
kind: Sql.Migrations
|
|
67
|
+
metadata:
|
|
68
|
+
name: Migrations
|
|
69
|
+
connection:
|
|
70
|
+
kind: Sql.Connection
|
|
71
|
+
name: Db
|
|
72
|
+
---
|
|
73
|
+
kind: Sql.Migration
|
|
74
|
+
metadata:
|
|
75
|
+
name: Migration_20260413_182154_CreateFeedback
|
|
76
|
+
sql: |
|
|
77
|
+
CREATE TABLE IF NOT EXISTS feedback (
|
|
78
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
79
|
+
text TEXT NOT NULL,
|
|
80
|
+
source TEXT,
|
|
81
|
+
score INTEGER NOT NULL DEFAULT 0,
|
|
82
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
83
|
+
)
|
|
84
|
+
---
|
|
85
|
+
kind: Http.Server
|
|
86
|
+
metadata:
|
|
87
|
+
name: Server
|
|
88
|
+
baseUrl: http://localhost:8844
|
|
89
|
+
port: 8844
|
|
90
|
+
logger: true
|
|
91
|
+
openapi:
|
|
92
|
+
info:
|
|
93
|
+
title: Feedback API
|
|
94
|
+
version: 1.0.0
|
|
95
|
+
mounts:
|
|
96
|
+
- path: /v1
|
|
97
|
+
type: Http.Api.FeedbackRoutes
|
|
98
|
+
---
|
|
99
|
+
kind: Http.Api
|
|
100
|
+
metadata:
|
|
101
|
+
name: FeedbackRoutes
|
|
102
|
+
routes:
|
|
103
|
+
# POST /v1/feedback — insert a new entry, score derived from body length heuristic
|
|
104
|
+
- request:
|
|
105
|
+
path: /feedback
|
|
106
|
+
method: POST
|
|
107
|
+
schema:
|
|
108
|
+
body:
|
|
109
|
+
type: object
|
|
110
|
+
properties:
|
|
111
|
+
text:
|
|
112
|
+
type: string
|
|
113
|
+
minLength: 1
|
|
114
|
+
source:
|
|
115
|
+
type: string
|
|
116
|
+
required: [text]
|
|
117
|
+
handler:
|
|
118
|
+
kind: Sql.Exec
|
|
119
|
+
connection:
|
|
120
|
+
kind: Sql.Connection
|
|
121
|
+
name: Db
|
|
122
|
+
inputs:
|
|
123
|
+
sql: "INSERT INTO feedback (text, source, score) VALUES (?, ?, ?)"
|
|
124
|
+
bindings:
|
|
125
|
+
- "${{ request.body.text }}"
|
|
126
|
+
- "${{ request.body.source }}"
|
|
127
|
+
- "${{ size(request.body.text) }}"
|
|
128
|
+
response:
|
|
129
|
+
- status: 201
|
|
130
|
+
headers:
|
|
131
|
+
Content-Type: application/json
|
|
132
|
+
body:
|
|
133
|
+
ok: true
|
|
134
|
+
message: Feedback received
|
|
135
|
+
|
|
136
|
+
# GET /v1/feedback — list all entries, newest first
|
|
137
|
+
- request:
|
|
138
|
+
path: /feedback
|
|
139
|
+
method: GET
|
|
140
|
+
handler:
|
|
141
|
+
kind: Sql.Select
|
|
142
|
+
connection:
|
|
143
|
+
kind: Sql.Connection
|
|
144
|
+
name: Db
|
|
145
|
+
from: feedback
|
|
146
|
+
columns: [id, text, source, score, created_at]
|
|
147
|
+
orderBy:
|
|
148
|
+
- { column: created_at, direction: desc }
|
|
149
|
+
response:
|
|
150
|
+
- status: 200
|
|
151
|
+
headers:
|
|
152
|
+
Content-Type: application/json
|
|
153
|
+
body: "${{ result.rows }}"
|
|
154
|
+
|
|
155
|
+
# GET /v1/feedback/{id} — fetch a single entry
|
|
156
|
+
- request:
|
|
157
|
+
path: /feedback/{id}
|
|
158
|
+
method: GET
|
|
159
|
+
schema:
|
|
160
|
+
params:
|
|
161
|
+
type: object
|
|
162
|
+
properties:
|
|
163
|
+
id:
|
|
164
|
+
type: integer
|
|
165
|
+
required: [id]
|
|
166
|
+
handler:
|
|
167
|
+
kind: Sql.Select
|
|
168
|
+
connection:
|
|
169
|
+
kind: Sql.Connection
|
|
170
|
+
name: Db
|
|
171
|
+
from: feedback
|
|
172
|
+
columns: [id, text, source, score, created_at]
|
|
173
|
+
where:
|
|
174
|
+
- { column: id, op: "=", value: "${{ request.params.id }}" }
|
|
175
|
+
response:
|
|
176
|
+
- status: 200
|
|
177
|
+
when: "size(result.rows) > 0"
|
|
178
|
+
headers:
|
|
179
|
+
Content-Type: application/json
|
|
180
|
+
body: "${{ result.rows[0] }}"
|
|
181
|
+
- status: 404
|
|
182
|
+
headers:
|
|
183
|
+
Content-Type: application/json
|
|
184
|
+
body:
|
|
185
|
+
ok: false
|
|
186
|
+
message: Not found
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Status
|
|
190
|
+
|
|
191
|
+
Telo is under **active development**. The core runtime, module system, and standard library are functional, but the API surface — including YAML shapes — may change without notice. Not yet recommended for production use.
|
|
192
|
+
|
|
193
|
+
## The Meaning of Telo
|
|
194
|
+
|
|
195
|
+
The name Telo is derived from the Greek root Telos - meaning the "end goal", "purpose", or "final state". That is exactly the philosophy behind this runtime. In standard imperative programming, you have to write thousands of lines of code to tell a server exactly how to start. With Telo, you simply declare your desired final state.
|
|
196
|
+
|
|
197
|
+
You define the end state. Telo makes it real.
|
|
198
|
+
|
|
199
|
+
## Philosophy
|
|
200
|
+
|
|
201
|
+
Modern platforms often spend disproportionate effort on technical mechanics-wiring frameworks, managing infrastructure, and negotiating toolchains-while the original business problem gets delayed or diluted. Telo pushes in the opposite direction: it treats kernel execution as a stable, predictable host so teams can concentrate on the **business logic and outcomes** instead of the plumbing.
|
|
202
|
+
|
|
203
|
+
By separating "what the system should do" from "how it is hosted", the runtime reduces friction for domain‑level changes. Teams can move faster on product requirements, experiment more safely, and keep conversations centered on value delivered rather than implementation trivia.
|
|
204
|
+
|
|
205
|
+
Telo also aims to **join forces across all programming language communities**, so the best ideas, patterns, and implementations can converge into a shared kernel truth without forcing everyone into a single stack.
|
|
206
|
+
|
|
207
|
+
YAML also makes the system more **AI‑friendly** than traditional programming languages: it is explicit, structured, and easier for tools to generate, review, and transform without losing intent.
|
|
208
|
+
|
|
209
|
+
## Modularity
|
|
210
|
+
|
|
211
|
+
Telo is built around **modules** that own specific resource kinds. A module is loaded from a manifest, declares which kinds it implements, and then receives only the resources of those kinds. This keeps concerns isolated and lets teams compose systems from focused building blocks rather than monolithic services.
|
|
212
|
+
|
|
213
|
+
At kernel execution time, execution is always routed by **Kind.Name**. The kernel resolves the Kind to its owning module and hands off execution. Modules can call back into the kernel to execute other resources, enabling composition without tight coupling.
|
|
214
|
+
|
|
215
|
+
## Architecture
|
|
216
|
+
|
|
217
|
+
The architecture is inspired by Kubernetes-style manifests: declarative resources, explicit kinds, and a control plane that routes work based on those definitions.
|
|
218
|
+
Those manifests were taken to the next level by allowing them to run inside a standalone runtime host.
|
|
219
|
+
|
|
220
|
+
## See more at
|
|
221
|
+
|
|
222
|
+
- [Telo Kernel](./kernel/README.md)
|
|
223
|
+
- [CEL-YAML Templating](./yaml-cel-templating/README.md)
|
|
224
|
+
- [Telo SDK for module authors](sdk/README.md)
|
|
225
|
+
- [Modules](modules/README.md)
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
See [LICENSE](https://github.com/telorun/telo/blob/main/LICENSE).
|
|
230
|
+
|
|
231
|
+
## Contribution Note
|
|
232
|
+
|
|
233
|
+
By contributing, you agree that code and examples in this repository may be translated or re‑implemented in other programming languages (including by AI systems) to support the project’s polyglot goals.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/http-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"http-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/http-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9E,qBAAa,WAAY,YAAW,eAAe;IACjD,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,9 +1,10 @@
|
|
|
1
|
+
import { DEFAULT_MANIFEST_FILENAME } from "../types.js";
|
|
1
2
|
export class HttpAdapter {
|
|
2
3
|
supports(url) {
|
|
3
4
|
return url.startsWith("http://") || url.startsWith("https://");
|
|
4
5
|
}
|
|
5
6
|
async read(url) {
|
|
6
|
-
const fetchUrl = url.includes(".yaml") ? url : `${url}
|
|
7
|
+
const fetchUrl = url.includes(".yaml") ? url : `${url}/${DEFAULT_MANIFEST_FILENAME}`;
|
|
7
8
|
const response = await fetch(fetchUrl);
|
|
8
9
|
if (!response.ok) {
|
|
9
10
|
throw new Error(`Failed to fetch manifest from ${fetchUrl}: ${response.status} ${response.statusText}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ManifestAdapter } from "../types.js";
|
|
2
2
|
/** Node.js fs-based ManifestAdapter for local files. Not browser-compatible. */
|
|
3
3
|
export declare class NodeAdapter implements ManifestAdapter {
|
|
4
4
|
private readonly cwd;
|
|
@@ -9,6 +9,8 @@ export declare class NodeAdapter implements ManifestAdapter {
|
|
|
9
9
|
source: string;
|
|
10
10
|
}>;
|
|
11
11
|
resolveRelative(base: string, relative: string): string;
|
|
12
|
+
expandGlob(base: string, patterns: string[]): Promise<string[]>;
|
|
13
|
+
resolveOwnerOf(fileUrl: string): Promise<string | null>;
|
|
12
14
|
}
|
|
13
15
|
/** @deprecated Use `new NodeAdapter(cwd)` instead */
|
|
14
16
|
export declare function createNodeAdapter(cwd?: string): ManifestAdapter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/node-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/node-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAM9E,gFAAgF;AAChF,qBAAa,WAAY,YAAW,eAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,GAAE,MAAsB;IAExD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAUxB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IASlE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAKjD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAc/D,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAoB9D;AAED,qDAAqD;AACrD,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAsB,GAAG,eAAe,CAE9E"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import * as fs from "fs/promises";
|
|
2
2
|
import * as path from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { minimatch } from "minimatch";
|
|
5
|
+
import { DEFAULT_MANIFEST_FILENAME } from "../types.js";
|
|
6
|
+
function toFilePath(url) {
|
|
7
|
+
return url.startsWith("file://") ? fileURLToPath(url) : url;
|
|
8
|
+
}
|
|
3
9
|
/** Node.js fs-based ManifestAdapter for local files. Not browser-compatible. */
|
|
4
10
|
export class NodeAdapter {
|
|
5
11
|
cwd;
|
|
@@ -14,17 +20,50 @@ export class NodeAdapter {
|
|
|
14
20
|
(!url.includes("://") && !url.includes("@")));
|
|
15
21
|
}
|
|
16
22
|
async read(url) {
|
|
17
|
-
const filePath =
|
|
23
|
+
const filePath = toFilePath(url);
|
|
18
24
|
const stat = await fs.stat(filePath).catch(() => null);
|
|
19
|
-
const resolvedPath = stat?.isDirectory() ? path.join(filePath,
|
|
25
|
+
const resolvedPath = stat?.isDirectory() ? path.join(filePath, DEFAULT_MANIFEST_FILENAME) : filePath;
|
|
20
26
|
const text = await fs.readFile(resolvedPath, "utf8");
|
|
21
27
|
return { text, source: resolvedPath };
|
|
22
28
|
}
|
|
23
29
|
resolveRelative(base, relative) {
|
|
24
|
-
const
|
|
25
|
-
const baseDir = path.dirname(path.resolve(this.cwd, basePath));
|
|
30
|
+
const baseDir = path.dirname(path.resolve(this.cwd, toFilePath(base)));
|
|
26
31
|
return path.resolve(baseDir, relative);
|
|
27
32
|
}
|
|
33
|
+
async expandGlob(base, patterns) {
|
|
34
|
+
const baseDir = path.dirname(path.resolve(this.cwd, toFilePath(base)));
|
|
35
|
+
const entries = await fs.readdir(baseDir, { recursive: true, encoding: "utf8" });
|
|
36
|
+
const normalizedPatterns = patterns.map((p) => p.replace(/\\/g, "/").replace(/^\.\//, ""));
|
|
37
|
+
const matched = [];
|
|
38
|
+
for (const entry of entries) {
|
|
39
|
+
const normalized = entry.replace(/\\/g, "/");
|
|
40
|
+
if (normalizedPatterns.some((p) => minimatch(normalized, p))) {
|
|
41
|
+
matched.push(path.resolve(baseDir, entry));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return matched.sort();
|
|
45
|
+
}
|
|
46
|
+
async resolveOwnerOf(fileUrl) {
|
|
47
|
+
const resolved = path.resolve(this.cwd, toFilePath(fileUrl));
|
|
48
|
+
let dir = path.dirname(resolved);
|
|
49
|
+
while (true) {
|
|
50
|
+
const candidate = path.join(dir, DEFAULT_MANIFEST_FILENAME);
|
|
51
|
+
if (candidate !== resolved) {
|
|
52
|
+
try {
|
|
53
|
+
await fs.access(candidate);
|
|
54
|
+
return candidate;
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// telo.yaml not found at this level
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const parent = path.dirname(dir);
|
|
61
|
+
if (parent === dir)
|
|
62
|
+
break;
|
|
63
|
+
dir = parent;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
28
67
|
}
|
|
29
68
|
/** @deprecated Use `new NodeAdapter(cwd)` instead */
|
|
30
69
|
export function createNodeAdapter(cwd = process.cwd()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/registry-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"registry-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/registry-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9E,qBAAa,eAAgB,YAAW,eAAe;IACzC,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,3 +1,4 @@
|
|
|
1
|
+
import { DEFAULT_MANIFEST_FILENAME } from "../types.js";
|
|
1
2
|
const DEFAULT_REGISTRY_URL = "https://registry.telo.run";
|
|
2
3
|
export class RegistryAdapter {
|
|
3
4
|
registryUrl;
|
|
@@ -31,7 +32,7 @@ export class RegistryAdapter {
|
|
|
31
32
|
return `${normalizedBase}/${parsed.modulePath}/${parsed.version}`;
|
|
32
33
|
}
|
|
33
34
|
toRegistryUrl(moduleRef) {
|
|
34
|
-
return `${this.toRegistryModuleBase(moduleRef)}
|
|
35
|
+
return `${this.toRegistryModuleBase(moduleRef)}/${DEFAULT_MANIFEST_FILENAME}`;
|
|
35
36
|
}
|
|
36
37
|
parseModuleRef(moduleRef) {
|
|
37
38
|
const atIdx = moduleRef.lastIndexOf("@");
|
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;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAY1D,OAAO,EAAsB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AA0O/F,qBAAa,cAAc;IACzB,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,kBAAkB,EAAE;IAoPvB,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
|
@@ -2,6 +2,7 @@ import { AliasResolver } from "./alias-resolver.js";
|
|
|
2
2
|
import { buildTypedCelEnvironment, celEnvironment } from "./cel-environment.js";
|
|
3
3
|
import { DefinitionRegistry } from "./definition-registry.js";
|
|
4
4
|
import { buildDependencyGraph, formatCycle } from "./dependency-graph.js";
|
|
5
|
+
import { buildKernelGlobalsSchema, mergeKernelGlobalsIntoContext } from "./kernel-globals.js";
|
|
5
6
|
import { normalizeInlineResources } from "./normalize-inline-resources.js";
|
|
6
7
|
import { celTypeSatisfiesJsonSchema, substituteCelFields, validateAgainstSchema, } from "./schema-compat.js";
|
|
7
8
|
import { DiagnosticSeverity } from "./types.js";
|
|
@@ -238,6 +239,9 @@ export class StaticAnalyzer {
|
|
|
238
239
|
byName.set(m.metadata.name, m);
|
|
239
240
|
}
|
|
240
241
|
}
|
|
242
|
+
// Build typed kernel globals schema so x-telo-context chain validation
|
|
243
|
+
// recognises variables, secrets, resources, env automatically
|
|
244
|
+
const kernelGlobals = buildKernelGlobalsSchema(allManifests);
|
|
241
245
|
// Validate each non-definition, non-system resource
|
|
242
246
|
for (const m of allManifests) {
|
|
243
247
|
if (!m.kind || !m.metadata?.name) {
|
|
@@ -366,7 +370,8 @@ export class StaticAnalyzer {
|
|
|
366
370
|
const manifestItem = matchedScope
|
|
367
371
|
? getManifestItem(path, matchedScope, m)
|
|
368
372
|
: m;
|
|
369
|
-
const
|
|
373
|
+
const resolvedContext = resolveContextAnnotations(matchedContext, manifestItem, allManifests);
|
|
374
|
+
const effectiveContext = mergeKernelGlobalsIntoContext(resolvedContext, kernelGlobals);
|
|
370
375
|
for (const chain of accessChains) {
|
|
371
376
|
const err = validateChainAgainstSchema(chain, effectiveContext);
|
|
372
377
|
if (!err)
|
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,EAgH/C,CAAC"}
|
package/dist/builtins.js
CHANGED
|
@@ -6,7 +6,10 @@ export declare const celEnvironment: Environment;
|
|
|
6
6
|
*
|
|
7
7
|
* - `variables`: typed from the manifest's `variables` field if it is a schema map
|
|
8
8
|
* (only `Kernel.Module` resources carry this); otherwise registered as `map` (dyn).
|
|
9
|
-
* - `secrets`, `resources`, `
|
|
10
|
-
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
9
|
+
* - `secrets`, `resources`, `env`: always `map` (dyn — output schemas unknown).
|
|
10
|
+
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
11
|
+
*
|
|
12
|
+
* NOTE: The set of kernel globals registered here must match `KERNEL_GLOBAL_NAMES`
|
|
13
|
+
* in kernel-globals.ts, which is used for chain-access validation. */
|
|
11
14
|
export declare function buildTypedCelEnvironment(manifest: ResourceManifest, extraContextSchema?: Record<string, any> | null): Environment;
|
|
12
15
|
//# sourceMappingURL=cel-environment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cel-environment.d.ts","sourceRoot":"","sources":["../src/cel-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,eAAO,MAAM,cAAc,aAWvB,CAAC;AAEL
|
|
1
|
+
{"version":3,"file":"cel-environment.d.ts","sourceRoot":"","sources":["../src/cel-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,eAAO,MAAM,cAAc,aAWvB,CAAC;AAEL;;;;;;;;;uEASuE;AACvE,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,gBAAgB,EAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAC9C,WAAW,CAyCb"}
|
package/dist/cel-environment.js
CHANGED
|
@@ -17,8 +17,11 @@ export const celEnvironment = new Environment({ unlistedVariablesAreDyn: true })
|
|
|
17
17
|
*
|
|
18
18
|
* - `variables`: typed from the manifest's `variables` field if it is a schema map
|
|
19
19
|
* (only `Kernel.Module` resources carry this); otherwise registered as `map` (dyn).
|
|
20
|
-
* - `secrets`, `resources`, `
|
|
21
|
-
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
20
|
+
* - `secrets`, `resources`, `env`: always `map` (dyn — output schemas unknown).
|
|
21
|
+
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
22
|
+
*
|
|
23
|
+
* NOTE: The set of kernel globals registered here must match `KERNEL_GLOBAL_NAMES`
|
|
24
|
+
* in kernel-globals.ts, which is used for chain-access validation. */
|
|
22
25
|
export function buildTypedCelEnvironment(manifest, extraContextSchema) {
|
|
23
26
|
try {
|
|
24
27
|
const env = celEnvironment.clone();
|
|
@@ -42,7 +45,6 @@ export function buildTypedCelEnvironment(manifest, extraContextSchema) {
|
|
|
42
45
|
}
|
|
43
46
|
env.registerVariable("secrets", "map");
|
|
44
47
|
env.registerVariable("resources", "map");
|
|
45
|
-
env.registerVariable("imports", "map");
|
|
46
48
|
env.registerVariable("env", "map");
|
|
47
49
|
if (extraContextSchema?.properties) {
|
|
48
50
|
for (const [name, propSchema] of Object.entries(extraContextSchema.properties)) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export { HttpAdapter } from "./adapters/http-adapter.js";
|
|
2
|
-
export { createNodeAdapter, NodeAdapter } from "./adapters/node-adapter.js";
|
|
3
2
|
export { RegistryAdapter } from "./adapters/registry-adapter.js";
|
|
4
3
|
export { AnalysisRegistry } from "./analysis-registry.js";
|
|
5
4
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
6
5
|
export { Loader } from "./manifest-loader.js";
|
|
7
|
-
export { DiagnosticSeverity } from "./types.js";
|
|
6
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|
|
8
7
|
export type { AnalysisDiagnostic, AnalysisOptions, LoaderInitOptions, LoadOptions, ManifestAdapter, Position, PositionIndex, Range } from "./types.js";
|
|
9
8
|
//# 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,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,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,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC3E,YAAY,EACR,kBAAkB,EAClB,eAAe,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAChE,QAAQ,EACR,aAAa,EACb,KAAK,EACR,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { HttpAdapter } from "./adapters/http-adapter.js";
|
|
2
|
-
export { createNodeAdapter, NodeAdapter } from "./adapters/node-adapter.js";
|
|
3
2
|
export { RegistryAdapter } from "./adapters/registry-adapter.js";
|
|
4
3
|
export { AnalysisRegistry } from "./analysis-registry.js";
|
|
5
4
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
6
5
|
export { Loader } from "./manifest-loader.js";
|
|
7
|
-
export { DiagnosticSeverity } from "./types.js";
|
|
6
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ResourceManifest } from "@telorun/sdk";
|
|
2
|
+
/**
|
|
3
|
+
* Kernel global names available in every CEL evaluation context at runtime.
|
|
4
|
+
* Both `buildKernelGlobalsSchema` (chain-access validation) and
|
|
5
|
+
* `buildTypedCelEnvironment` in cel-environment.ts (CEL type-checking)
|
|
6
|
+
* must stay in sync with this list.
|
|
7
|
+
*
|
|
8
|
+
* Note: `env` is only available in the root module context. Child modules
|
|
9
|
+
* loaded via Kernel.Import do not receive host environment variables.
|
|
10
|
+
* There is no `imports` namespace at runtime — import snapshots are stored
|
|
11
|
+
* under `resources.<alias>`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const KERNEL_GLOBAL_NAMES: readonly ["variables", "secrets", "resources", "env"];
|
|
14
|
+
/**
|
|
15
|
+
* Build a typed JSON Schema describing the kernel globals available in the
|
|
16
|
+
* given manifest set. Used to merge into `x-telo-context` schemas so that
|
|
17
|
+
* chain-access validation recognises kernel globals without module authors
|
|
18
|
+
* having to re-declare them.
|
|
19
|
+
*
|
|
20
|
+
* - `variables` / `secrets`: typed from the `Kernel.Module` declaration
|
|
21
|
+
* - `resources`: enumerates all non-system resource names
|
|
22
|
+
* - `env`: dynamic (runtime env vars, root module only)
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildKernelGlobalsSchema(manifests: ResourceManifest[]): Record<string, any>;
|
|
25
|
+
/**
|
|
26
|
+
* Merge kernel globals into an `x-telo-context` schema so chain-access
|
|
27
|
+
* validation recognises `variables`, `secrets`, `resources`, `env`
|
|
28
|
+
* without module authors having to re-declare them.
|
|
29
|
+
*
|
|
30
|
+
* Context-specific properties take precedence over globals (spread order).
|
|
31
|
+
* The original `additionalProperties` setting is preserved.
|
|
32
|
+
*/
|
|
33
|
+
export declare function mergeKernelGlobalsIntoContext(contextSchema: Record<string, any>, globalsSchema: Record<string, any>): Record<string, any>;
|
|
34
|
+
//# sourceMappingURL=kernel-globals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kernel-globals.d.ts","sourceRoot":"","sources":["../src/kernel-globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,uDAAwD,CAAC;AAQzF;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,gBAAgB,EAAE,GAC5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA6BrB;AA2BD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CASrB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kernel global names available in every CEL evaluation context at runtime.
|
|
3
|
+
* Both `buildKernelGlobalsSchema` (chain-access validation) and
|
|
4
|
+
* `buildTypedCelEnvironment` in cel-environment.ts (CEL type-checking)
|
|
5
|
+
* must stay in sync with this list.
|
|
6
|
+
*
|
|
7
|
+
* Note: `env` is only available in the root module context. Child modules
|
|
8
|
+
* loaded via Kernel.Import do not receive host environment variables.
|
|
9
|
+
* There is no `imports` namespace at runtime — import snapshots are stored
|
|
10
|
+
* under `resources.<alias>`.
|
|
11
|
+
*/
|
|
12
|
+
export const KERNEL_GLOBAL_NAMES = ["variables", "secrets", "resources", "env"];
|
|
13
|
+
const SYSTEM_KINDS = new Set([
|
|
14
|
+
"Kernel.Definition",
|
|
15
|
+
"Kernel.Module",
|
|
16
|
+
"Kernel.Abstract",
|
|
17
|
+
]);
|
|
18
|
+
/**
|
|
19
|
+
* Build a typed JSON Schema describing the kernel globals available in the
|
|
20
|
+
* given manifest set. Used to merge into `x-telo-context` schemas so that
|
|
21
|
+
* chain-access validation recognises kernel globals without module authors
|
|
22
|
+
* having to re-declare them.
|
|
23
|
+
*
|
|
24
|
+
* - `variables` / `secrets`: typed from the `Kernel.Module` declaration
|
|
25
|
+
* - `resources`: enumerates all non-system resource names
|
|
26
|
+
* - `env`: dynamic (runtime env vars, root module only)
|
|
27
|
+
*/
|
|
28
|
+
export function buildKernelGlobalsSchema(manifests) {
|
|
29
|
+
const moduleManifest = manifests.find((m) => m.kind === "Kernel.Module");
|
|
30
|
+
const resourceProps = {};
|
|
31
|
+
for (const m of manifests) {
|
|
32
|
+
const name = m.metadata?.name;
|
|
33
|
+
if (!name || !m.kind)
|
|
34
|
+
continue;
|
|
35
|
+
// Kernel.Import snapshots are stored under resources.<alias> at runtime,
|
|
36
|
+
// so they appear here alongside regular resources.
|
|
37
|
+
if (!SYSTEM_KINDS.has(m.kind)) {
|
|
38
|
+
resourceProps[name] = { type: "object", additionalProperties: true };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
variables: buildSchemaMapSchema(moduleManifest?.variables),
|
|
45
|
+
secrets: buildSchemaMapSchema(moduleManifest?.secrets),
|
|
46
|
+
resources: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: resourceProps,
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
},
|
|
51
|
+
env: { type: "object", additionalProperties: true },
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** Wrap a JSON Schema property map (like `Kernel.Module.variables`) into a
|
|
56
|
+
* closed object schema suitable for chain-access validation. Falls back to
|
|
57
|
+
* an open map when the module declares no variables/secrets. */
|
|
58
|
+
function buildSchemaMapSchema(schemaMap) {
|
|
59
|
+
if (!schemaMap || typeof schemaMap !== "object" || Array.isArray(schemaMap)) {
|
|
60
|
+
return { type: "object", additionalProperties: true };
|
|
61
|
+
}
|
|
62
|
+
const props = {};
|
|
63
|
+
for (const [key, value] of Object.entries(schemaMap)) {
|
|
64
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
65
|
+
props[key] = value;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (Object.keys(props).length === 0) {
|
|
69
|
+
return { type: "object", additionalProperties: true };
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: props,
|
|
74
|
+
additionalProperties: false,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Merge kernel globals into an `x-telo-context` schema so chain-access
|
|
79
|
+
* validation recognises `variables`, `secrets`, `resources`, `env`
|
|
80
|
+
* without module authors having to re-declare them.
|
|
81
|
+
*
|
|
82
|
+
* Context-specific properties take precedence over globals (spread order).
|
|
83
|
+
* The original `additionalProperties` setting is preserved.
|
|
84
|
+
*/
|
|
85
|
+
export function mergeKernelGlobalsIntoContext(contextSchema, globalsSchema) {
|
|
86
|
+
return {
|
|
87
|
+
...contextSchema,
|
|
88
|
+
properties: {
|
|
89
|
+
...globalsSchema.properties,
|
|
90
|
+
...(contextSchema.properties ?? {}),
|
|
91
|
+
},
|
|
92
|
+
additionalProperties: contextSchema.additionalProperties ?? false,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type ResourceManifest } from "@telorun/sdk";
|
|
2
|
+
import { type LoadOptions, type LoaderInitOptions, type ManifestAdapter } from "./types.js";
|
|
3
3
|
export declare class Loader {
|
|
4
|
+
private static readonly moduleCache;
|
|
4
5
|
protected adapters: ManifestAdapter[];
|
|
5
6
|
constructor(extraAdaptersOrOptions?: ManifestAdapter[] | LoaderInitOptions);
|
|
6
7
|
register(adapter: ManifestAdapter): this;
|
|
7
8
|
private pick;
|
|
8
9
|
resolveEntryPoint(url: string): Promise<string>;
|
|
9
10
|
loadModule(url: string, options?: LoadOptions): Promise<ResourceManifest[]>;
|
|
11
|
+
private resolveIncludes;
|
|
12
|
+
private loadPartialFile;
|
|
13
|
+
loadModuleForFile(fileUrl: string): Promise<{
|
|
14
|
+
ownerUrl: string;
|
|
15
|
+
manifests: ResourceManifest[];
|
|
16
|
+
sourceManifests: Map<string, ResourceManifest[]>;
|
|
17
|
+
} | null>;
|
|
10
18
|
loadModuleGraph(entryUrl: string, onError?: (url: string, error: Error) => void): Promise<Map<string, ResourceManifest[]>>;
|
|
11
19
|
loadManifests(entryUrl: string): Promise<ResourceManifest[]>;
|
|
12
20
|
}
|