@taggor/runtime 0.4.0 → 0.6.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 +1 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/compat/before-compat.js +1 -1
- package/dist/compat/index.d.ts.map +1 -1
- package/dist/compat/index.js +3 -3
- package/dist/compat/scope.d.ts +2 -2
- package/dist/element/attributes.d.ts +7 -7
- package/dist/element/attributes.d.ts.map +1 -1
- package/dist/element/attributes.js +6 -6
- package/dist/element/component-controller.d.ts +14 -14
- package/dist/element/component-controller.d.ts.map +1 -1
- package/dist/element/component-controller.js +28 -28
- package/dist/element/component-controller.js.map +1 -1
- package/dist/element/contract-gate.d.ts +2 -2
- package/dist/element/contract-gate.js +2 -2
- package/dist/element/create-component-element.d.ts +11 -11
- package/dist/element/create-component-element.js +15 -15
- package/dist/element/create-component-element.js.map +1 -1
- package/dist/element/define-element.d.ts +4 -4
- package/dist/element/define-element.d.ts.map +1 -1
- package/dist/element/define-element.js +1 -1
- package/dist/element/define-element.js.map +1 -1
- package/dist/element/diagnostics.d.ts +2 -2
- package/dist/element/error-boundary.d.ts +2 -2
- package/dist/element/error-boundary.d.ts.map +1 -1
- package/dist/element/error-boundary.js +1 -1
- package/dist/element/error-report.d.ts +2 -2
- package/dist/element/error-report.d.ts.map +1 -1
- package/dist/element/error-report.js +14 -7
- package/dist/element/error-report.js.map +1 -1
- package/dist/element/events.d.ts +5 -6
- package/dist/element/events.d.ts.map +1 -1
- package/dist/element/events.js +5 -6
- package/dist/element/events.js.map +1 -1
- package/dist/element/handler-guard.d.ts +3 -3
- package/dist/element/handler-guard.js +5 -5
- package/dist/element/handler-guard.js.map +1 -1
- package/dist/element/index.d.ts +1 -2
- package/dist/element/index.d.ts.map +1 -1
- package/dist/element/index.js +1 -2
- package/dist/element/index.js.map +1 -1
- package/dist/element/props-script.d.ts +1 -1
- package/dist/element/props-script.js +1 -1
- package/dist/element/styles.d.ts +11 -9
- package/dist/element/styles.d.ts.map +1 -1
- package/dist/element/styles.js +10 -8
- package/dist/element/styles.js.map +1 -1
- package/dist/element/types.d.ts +22 -22
- package/dist/element/types.d.ts.map +1 -1
- package/dist/host/api.d.ts +3 -3
- package/dist/host/api.d.ts.map +1 -1
- package/dist/host/api.js +9 -10
- package/dist/host/api.js.map +1 -1
- package/dist/host/barrier.d.ts +2 -2
- package/dist/host/barrier.js +3 -3
- package/dist/host/barrier.js.map +1 -1
- package/dist/host/index.d.ts +2 -2
- package/dist/host/index.js +2 -2
- package/dist/host/registry.d.ts +2 -2
- package/dist/host/registry.js +2 -2
- package/dist/host/registry.js.map +1 -1
- package/dist/host/types.d.ts +1 -1
- package/dist/host/types.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/loader/config.d.ts +7 -7
- package/dist/loader/config.d.ts.map +1 -1
- package/dist/loader/config.js +4 -4
- package/dist/loader/config.js.map +1 -1
- package/dist/loader/entry.js +9 -4
- package/dist/loader/entry.js.map +1 -1
- package/dist/loader/lazy-transport.d.ts +1 -1
- package/dist/loader/lazy-transport.js +1 -1
- package/dist/loader/loader-code.d.ts +1 -1
- package/dist/loader/loader-code.js +2 -2
- package/dist/loader/loading.d.ts +1 -1
- package/dist/loader/loading.js +1 -1
- package/dist/loader/page-state.d.ts +4 -2
- package/dist/loader/page-state.d.ts.map +1 -1
- package/dist/loader/resilient-import.d.ts +2 -2
- package/dist/loader/resilient-import.d.ts.map +1 -1
- package/dist/loader/resilient-import.js +1 -1
- package/dist/loader/run.d.ts +9 -8
- package/dist/loader/run.d.ts.map +1 -1
- package/dist/loader/run.js +54 -44
- package/dist/loader/run.js.map +1 -1
- package/dist/loader/script-url.d.ts +4 -4
- package/dist/loader/script-url.js +5 -5
- package/dist/loader/script-url.js.map +1 -1
- package/dist/loader/script.d.ts +2 -2
- package/dist/loader/script.js +2 -2
- package/dist/server/render-fragment.d.ts +1 -1
- package/dist/server/render-fragment.d.ts.map +1 -1
- package/dist/server/render-fragment.js +2 -2
- package/dist/server/render-fragment.js.map +1 -1
- package/dist/server/ssr-code.d.ts +1 -1
- package/dist/server/ssr-code.js +3 -3
- package/dist/server/worker.d.ts +2 -2
- package/dist/server/worker.js +1 -1
- package/package.json +2 -2
package/dist/loader/run.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The site loader's logic
|
|
2
|
+
* The site loader's logic: what runs on the host page when `/s/<siteKey>.js` is
|
|
3
3
|
* executed. Written against injected ports (`LoaderPorts`) so it is tested in happy-dom without a
|
|
4
4
|
* network; `entry.ts` wires the browser's own.
|
|
5
5
|
*
|
|
6
|
-
* Order of events: install `window.taggor` at once (it exists before anything is downloaded
|
|
7
|
-
*
|
|
8
|
-
* Firefox import map bug of docs/testing/compatibility.md §4.1); look in the DOM for the tags of
|
|
6
|
+
* Order of events: install `window.taggor` at once (it exists before anything is downloaded); wait for the parser to finish (no `import()` while the document is still loading: the
|
|
7
|
+
* Firefox import map bug); look in the DOM for the tags of
|
|
9
8
|
* the manifest only; download the runtime once and the bundle of each present tag only; register
|
|
10
9
|
* it with `createComponentElement`; keep one `MutationObserver` for tags a single-page app inserts
|
|
11
|
-
* later, until every tag of the manifest was handled.
|
|
10
|
+
* later, until every tag of the manifest was handled. The observer looks only inside the nodes a
|
|
11
|
+
* mutation added, never the whole document again: on a page that mutates a lot while some
|
|
12
|
+
* manifest tag never appears, a document scan per batch was continuous main-thread work.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
+
* A component whose manifest declares `data` gets a lazy data transport (`lazy-transport.ts`)
|
|
14
15
|
* as `host.transport`; the data module is imported on its first submission, not before.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
+
* Every import has a 10 s limit and one retry after a backoff (`resilient-import.ts`); a
|
|
17
18
|
* component whose bundle never arrives, answers an error or throws on evaluation is skipped, its tag
|
|
18
|
-
* stays as the page wrote it (the fallback), and the other components are not affected.
|
|
19
|
+
* stays as the page wrote it (the fallback), and the other components are not affected. A runtime
|
|
20
|
+
* that failed is not remembered: the next tag that appears downloads it again.
|
|
19
21
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
22
|
+
* Once the runtime answers that it defined a component (`status: "defined"`; a collision or an
|
|
23
|
+
* unsupported contract mounts nothing and is not counted) the loader reports it with one `beacon`
|
|
24
|
+
* (a keepalive `fetch` to `/e/<siteKey>` of the delivery origin, body: the published version hash),
|
|
25
|
+
* the browser half of the render count; the edge ingest is `apps/edge` `ingest-event.ts`.
|
|
23
26
|
*
|
|
24
27
|
* Golden rule 2: everything is inside `try`, failures are silent (`window.taggor` carries the
|
|
25
28
|
* diagnostics port, which only debug mode prints), and a bundle that does not load or does not
|
|
@@ -32,7 +35,7 @@ import { resilientImport } from "./resilient-import.js";
|
|
|
32
35
|
import { claimSite, claimTag, pageState } from "./page-state.js";
|
|
33
36
|
/**
|
|
34
37
|
* The page's own timers, wrapped: `setTimeout` and `clearTimeout` throw "Illegal invocation" in a
|
|
35
|
-
* browser when called as methods of another object (found by the
|
|
38
|
+
* browser when called as methods of another object (found by the chaos suite).
|
|
36
39
|
*/
|
|
37
40
|
const pageTimers = {
|
|
38
41
|
setTimeout: (callback, ms) => setTimeout(callback, ms),
|
|
@@ -53,7 +56,7 @@ function dataTransport(data, importModule, csp) {
|
|
|
53
56
|
baseUrl: data.baseUrl,
|
|
54
57
|
siteKey: data.siteKey,
|
|
55
58
|
turnstileSiteKey: data.turnstileSiteKey,
|
|
56
|
-
//
|
|
59
|
+
// The Turnstile script the data module injects needs the nonce and a trusted URL.
|
|
57
60
|
nonce: csp.nonce,
|
|
58
61
|
scriptUrl: csp.scriptUrl,
|
|
59
62
|
});
|
|
@@ -73,7 +76,7 @@ function warnConflict(diagnostics, tag) {
|
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
/**
|
|
76
|
-
* Whether a bundle's own manifest agrees with the published one (
|
|
79
|
+
* Whether a bundle's own manifest agrees with the published one (the extracted manifest
|
|
77
80
|
* describes the Node branch, which can differ from the browser's). The published manifest names
|
|
78
81
|
* the tag and the contract version; any other tag or version is a divergence and the component is not
|
|
79
82
|
* registered. Props and events are not compared: the published manifest does not carry them yet.
|
|
@@ -97,7 +100,7 @@ export function startLoader(raw, rawPorts) {
|
|
|
97
100
|
...rawPorts,
|
|
98
101
|
importModule: resilientImport(rawPorts.importModule, rawPorts.timers ?? pageTimers),
|
|
99
102
|
};
|
|
100
|
-
//
|
|
103
|
+
// Shared by every loader of the page, so `window.taggor` covers all sites.
|
|
101
104
|
const state = pageState(ports.target);
|
|
102
105
|
const { barrier } = state;
|
|
103
106
|
installHostApi(createHostApi({
|
|
@@ -112,7 +115,7 @@ export function startLoader(raw, rawPorts) {
|
|
|
112
115
|
barrier.expect([]);
|
|
113
116
|
return;
|
|
114
117
|
}
|
|
115
|
-
//
|
|
118
|
+
// The same site's snippet again (cache plugin, theme) does nothing.
|
|
116
119
|
if (!claimSite(state, config.siteKey))
|
|
117
120
|
return;
|
|
118
121
|
const toUrl = rawPorts.scriptUrl ?? ((url) => url);
|
|
@@ -120,20 +123,22 @@ export function startLoader(raw, rawPorts) {
|
|
|
120
123
|
const importUrl = async (url) => ports.importModule(toUrl(url, new URL(config.runtimeUrl).origin));
|
|
121
124
|
const pending = new Map(config.components);
|
|
122
125
|
let runtimeLoad;
|
|
123
|
-
const loadRuntime = () => (runtimeLoad ??= importUrl(config.runtimeUrl).then((module) => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
const loadRuntime = () => (runtimeLoad ??= importUrl(config.runtimeUrl).then((module) => (state.runtime = module), (error) => {
|
|
127
|
+
// Forgotten, so a tag a single-page app inserts later tries again.
|
|
128
|
+
runtimeLoad = undefined;
|
|
129
|
+
throw error;
|
|
126
130
|
}));
|
|
127
131
|
const mount = async (entry) => {
|
|
128
132
|
try {
|
|
129
|
-
//
|
|
133
|
+
// `idle` waits in the lazy `loading.js`; a release without it (an older ring) or a
|
|
130
134
|
// failed download means "eager", never a skipped component.
|
|
131
135
|
if (entry.loading === "idle") {
|
|
132
136
|
await importUrl(new URL("loading.js", config.runtimeUrl).href).then((module) => module.idle(), () => undefined);
|
|
133
137
|
}
|
|
134
138
|
const [loaded, bundle] = await Promise.all([loadRuntime(), importUrl(entry.bundleUrl)]);
|
|
135
139
|
const definition = definitionOf(bundle);
|
|
136
|
-
if (definition !== undefined &&
|
|
140
|
+
if (definition !== undefined &&
|
|
141
|
+
agrees(definition, entry) &&
|
|
137
142
|
loaded.createComponentElement(definition, {
|
|
138
143
|
contractVersion: entry.contractVersion,
|
|
139
144
|
version: entry.version,
|
|
@@ -145,10 +150,9 @@ export function startLoader(raw, rawPorts) {
|
|
|
145
150
|
...(config.data !== undefined
|
|
146
151
|
? { transport: dataTransport(config.data, importUrl, ports) }
|
|
147
152
|
: {}),
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
153
|
+
}).status === "defined" &&
|
|
154
|
+
config.siteKey)
|
|
155
|
+
ports.beacon?.(new URL(`/e/${config.siteKey}`, config.runtimeUrl), entry.version);
|
|
152
156
|
}
|
|
153
157
|
catch {
|
|
154
158
|
// Network, a bundle that throws on import or a broken runtime: this component is skipped.
|
|
@@ -158,39 +162,45 @@ export function startLoader(raw, rawPorts) {
|
|
|
158
162
|
}
|
|
159
163
|
};
|
|
160
164
|
/**
|
|
161
|
-
* Takes the pending tags
|
|
162
|
-
* selector)
|
|
165
|
+
* Takes the pending tags found in `roots`: each root itself and what one query (all pending tags
|
|
166
|
+
* in one selector) finds inside it. The first call passes the document; the observer passes only
|
|
167
|
+
* the nodes a mutation added (a text node has no `querySelectorAll` and no tag).
|
|
163
168
|
*/
|
|
164
|
-
const take = () => {
|
|
169
|
+
const take = (roots) => {
|
|
165
170
|
const present = [];
|
|
166
171
|
if (pending.size === 0)
|
|
167
172
|
return present;
|
|
168
|
-
const
|
|
169
|
-
for (const
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
173
|
+
const selector = [...pending.keys()].join(",");
|
|
174
|
+
for (const root of roots)
|
|
175
|
+
for (const element of [
|
|
176
|
+
root,
|
|
177
|
+
...(root.querySelectorAll?.(selector) ?? []),
|
|
178
|
+
]) {
|
|
179
|
+
const entry = pending.get(element.localName);
|
|
180
|
+
if (entry === undefined)
|
|
181
|
+
continue;
|
|
182
|
+
pending.delete(element.localName);
|
|
183
|
+
const claim = claimTag(state, entry.tag, entry.version, config.siteKey);
|
|
184
|
+
if (claim === "mine")
|
|
185
|
+
present.push(entry);
|
|
186
|
+
else if (claim === "other")
|
|
187
|
+
warnConflict(ports.diagnostics, entry.tag);
|
|
188
|
+
}
|
|
180
189
|
return present;
|
|
181
190
|
};
|
|
182
191
|
const start = () => {
|
|
183
192
|
try {
|
|
184
|
-
const initial = take();
|
|
193
|
+
const initial = take([ports.document]);
|
|
185
194
|
barrier.expect(initial.map((entry) => entry.tag));
|
|
186
195
|
for (const entry of initial)
|
|
187
196
|
void mount(entry);
|
|
188
197
|
if (pending.size === 0)
|
|
189
198
|
return;
|
|
190
|
-
const observer = ports.observe(() => {
|
|
199
|
+
const observer = ports.observe((records) => {
|
|
191
200
|
try {
|
|
192
|
-
for (const
|
|
193
|
-
|
|
201
|
+
for (const record of records)
|
|
202
|
+
for (const entry of take(record.addedNodes))
|
|
203
|
+
void mount(entry);
|
|
194
204
|
if (pending.size === 0)
|
|
195
205
|
observer.disconnect();
|
|
196
206
|
}
|
package/dist/loader/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/loader/run.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/loader/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;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AAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7E,CAAC;aAAM,CAAC;YACN,KAAK,EAAE,CAAC;QACV,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,4DAA4D;IAC9D,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The loader's Trusted Types policy for `import()` URLs
|
|
2
|
+
* The loader's Trusted Types policy for `import()` URLs. A page that sends
|
|
3
3
|
* `require-trusted-types-for 'script'` may also list the policies it allows (`trusted-types
|
|
4
4
|
* taggor`); the loader owns exactly one, named `taggor`, and uses it for nothing but the URLs it
|
|
5
5
|
* passes to `import()`. It never creates a `default` policy (that would reroute the host page's
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* that lists `trusted-types taggor` for it.
|
|
11
11
|
*
|
|
12
12
|
* Golden rule 2: when the page's CSP does not list `taggor`, `createPolicy` throws; the loader
|
|
13
|
-
* catches it, warns once on the console and imports the checked string (documented fallback
|
|
14
|
-
*
|
|
13
|
+
* catches it, warns once on the console and imports the checked string (documented fallback).
|
|
14
|
+
* Lives in the loader, not the runtime: the runtime bundle is
|
|
15
15
|
* 5 B under its ceiling, the loader has room.
|
|
16
16
|
*/
|
|
17
17
|
/** What `createScriptURL` returns: a `TrustedScriptURL`, which `import()` reads as its string. */
|
|
@@ -27,7 +27,7 @@ export interface PolicyFactory {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* What the loaders of one page share about the policy
|
|
30
|
+
* What the loaders of one page share about the policy: `createPolicy("taggor")` a
|
|
31
31
|
* second time throws on a page whose `trusted-types` lacks `'allow-duplicates'`, so the second
|
|
32
32
|
* snippet reuses the first one's policy (or its refusal, without warning again).
|
|
33
33
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The loader's Trusted Types policy for `import()` URLs
|
|
2
|
+
* The loader's Trusted Types policy for `import()` URLs. A page that sends
|
|
3
3
|
* `require-trusted-types-for 'script'` may also list the policies it allows (`trusted-types
|
|
4
4
|
* taggor`); the loader owns exactly one, named `taggor`, and uses it for nothing but the URLs it
|
|
5
5
|
* passes to `import()`. It never creates a `default` policy (that would reroute the host page's
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* that lists `trusted-types taggor` for it.
|
|
11
11
|
*
|
|
12
12
|
* Golden rule 2: when the page's CSP does not list `taggor`, `createPolicy` throws; the loader
|
|
13
|
-
* catches it, warns once on the console and imports the checked string (documented fallback
|
|
14
|
-
*
|
|
13
|
+
* catches it, warns once on the console and imports the checked string (documented fallback).
|
|
14
|
+
* Lives in the loader, not the runtime: the runtime bundle is
|
|
15
15
|
* 5 B under its ceiling, the loader has room.
|
|
16
16
|
*/
|
|
17
|
-
/** Origins the Turnstile script may come from (the data module passes its origin
|
|
17
|
+
/** Origins the Turnstile script may come from (the data module passes its origin). */
|
|
18
18
|
const TURNSTILE_ORIGIN = "https://challenges.cloudflare.com";
|
|
19
19
|
/** `url` when it is http(s) on `origin`; otherwise throws. */
|
|
20
20
|
function checkedUrl(url, origin) {
|
|
@@ -41,7 +41,7 @@ export function createScriptUrls(factory, warn, state = {}) {
|
|
|
41
41
|
if (state.tried !== true && factory !== undefined) {
|
|
42
42
|
state.tried = true;
|
|
43
43
|
try {
|
|
44
|
-
// L1
|
|
44
|
+
// L1: the accepted origins are pinned here, in the closure; the origin a
|
|
45
45
|
// caller passes to `createScriptURL` is ignored, so a page script that reaches the shared
|
|
46
46
|
// policy cannot mint a TrustedScriptURL for another origin.
|
|
47
47
|
const allowed = [origin, TURNSTILE_ORIGIN];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-url.js","sourceRoot":"","sources":["../../src/loader/script-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAyBH
|
|
1
|
+
{"version":3,"file":"script-url.js","sourceRoot":"","sources":["../../src/loader/script-url.ts"],"names":[],"m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;oBAC/D,CAAC;iBACF,CAAC,CAAC;YACL,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,CACF,wFAAwF,CACzF,CAAC;YACJ,CAAC;QACH,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;YAAE,OAAO,OAAO,CAAC;QAC/C,IAAI,CAAC;YACH,OAAO,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACvD,CAAC;QAAC,MAAM,CAAC;YACP,2FAA2F;YAC3F,4FAA4F;YAC5F,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/loader/script.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Builds the text of `/s/<siteKey>.js
|
|
2
|
+
* Builds the text of `/s/<siteKey>.js`: the built loader code with the site's
|
|
3
3
|
* configuration embedded. Pure string work, safe to import in a Worker; the loader code itself
|
|
4
4
|
* comes from `dist/loader-code.js` (`scripts/build-loader.ts`), exported as `LOADER_CODE` by
|
|
5
5
|
* `@taggor/runtime/loader-script`.
|
|
@@ -21,7 +21,7 @@ export declare function scriptJson(value: unknown): string;
|
|
|
21
21
|
* as markup if the file is ever inlined. Errors: `TypeError` when the configuration is not
|
|
22
22
|
* serializable. Side effects: none.
|
|
23
23
|
*
|
|
24
|
-
* `prepare` (
|
|
24
|
+
* `prepare` (optional): the source of a function expression the SERVER wrote, called in
|
|
25
25
|
* the browser with the configuration object before the loader reads it (the edge's domain gate,
|
|
26
26
|
* which empties the components on a hostname outside the allowed domains). It must return the
|
|
27
27
|
* configuration; it is never built from request data. The loader bundle does not contain this file,
|
package/dist/loader/script.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Builds the text of `/s/<siteKey>.js
|
|
2
|
+
* Builds the text of `/s/<siteKey>.js`: the built loader code with the site's
|
|
3
3
|
* configuration embedded. Pure string work, safe to import in a Worker; the loader code itself
|
|
4
4
|
* comes from `dist/loader-code.js` (`scripts/build-loader.ts`), exported as `LOADER_CODE` by
|
|
5
5
|
* `@taggor/runtime/loader-script`.
|
|
@@ -26,7 +26,7 @@ export function scriptJson(value) {
|
|
|
26
26
|
* as markup if the file is ever inlined. Errors: `TypeError` when the configuration is not
|
|
27
27
|
* serializable. Side effects: none.
|
|
28
28
|
*
|
|
29
|
-
* `prepare` (
|
|
29
|
+
* `prepare` (optional): the source of a function expression the SERVER wrote, called in
|
|
30
30
|
* the browser with the configuration object before the loader reads it (the edge's domain gate,
|
|
31
31
|
* which empties the components on a hostname outside the allowed domains). It must return the
|
|
32
32
|
* configuration; it is never built from request data. The loader bundle does not contain this file,
|
|
@@ -19,7 +19,7 @@ export interface FragmentRequest {
|
|
|
19
19
|
readonly contractVersion?: unknown;
|
|
20
20
|
/** The ISO day the edge serves on, for the contract's support window (as the loader stamps it). */
|
|
21
21
|
readonly servedOn?: string | undefined;
|
|
22
|
-
/** The site's saved prop defaults
|
|
22
|
+
/** The site's saved prop defaults, as the loader gives them to the wrapper. */
|
|
23
23
|
readonly siteDefaults?: unknown;
|
|
24
24
|
}
|
|
25
25
|
/** Why no fragment was produced; the caller then serves the bare tag (the page renders it itself). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-fragment.d.ts","sourceRoot":"","sources":["../../src/server/render-fragment.ts"],"names":[],"mappings":"AAgCA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAKlD,CAAC;AAEH,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,0GAA0G;IAC1G,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,oGAAoG;IACpG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,s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H,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,eAAe,GACvB,cAAc,CAqEhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Server rendering of a component to a Declarative Shadow DOM fragment
|
|
2
|
+
* Server rendering of a component to a Declarative Shadow DOM fragment.
|
|
3
3
|
*
|
|
4
4
|
* The browser wrapper (`element/`) needs a DOM; this module does not. It reuses the wrapper's pure
|
|
5
5
|
* parts, the contract gate (`checkComponentContract`) and the attribute coercion (`bindProps`,
|
|
@@ -83,7 +83,7 @@ function serverHost(tag, attributes) {
|
|
|
83
83
|
tagName: tag.toUpperCase(),
|
|
84
84
|
isConnected: true,
|
|
85
85
|
// No light DOM (the SDK's slot hooks see no content) and a document with nothing in it (the
|
|
86
|
-
// font
|
|
86
|
+
// font hook reads `fonts`, `defaultView` and `location` from it, all optional).
|
|
87
87
|
childNodes: [],
|
|
88
88
|
ownerDocument: {},
|
|
89
89
|
getAttribute: read,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-fragment.js","sourceRoot":"","sources":["../../src/server/render-fragment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpG,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAA2B,MAAM,qBAAqB,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,C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The built render Worker: an ES module exporting `createRenderWorker` (src/server/worker.ts). */
|
|
4
4
|
export declare const SSR_WORKER_CODE: string;
|
|
5
|
-
/** The first 16 hex characters of the SHA-256 of `SSR_WORKER_CODE
|
|
5
|
+
/** The first 16 hex characters of the SHA-256 of `SSR_WORKER_CODE`. */
|
|
6
6
|
export declare const SSR_CODE_VERSION: string;
|