@ogygia/insights 0.0.0 → 0.14.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.
@@ -0,0 +1,50 @@
1
+ // src/hole-segments.ts
2
+ const HOLE_SEG_LABEL = {
3
+ wait: "waiting for its answer",
4
+ before: "before its request left",
5
+ slot: "waiting for a render slot on the server",
6
+ render: "the server render",
7
+ server: "waiting on the server",
8
+ rest: "network, the body and the swap"
9
+ };
10
+ /** The segments, in order. Without a timing, one: the wait. A request the document preloaded
11
+ * starts before the fallback counts: its segments start where it left. */
12
+ function hole_segments(h) {
13
+ const shown = h.shown_at ?? 0;
14
+ const at = shown + h.wait_ms;
15
+ if (h.left_at === void 0) return [{
16
+ k: "wait",
17
+ a: shown,
18
+ b: at
19
+ }];
20
+ const out = [];
21
+ const left = h.left_at;
22
+ if (left > shown) out.push({
23
+ k: "before",
24
+ a: shown,
25
+ b: left
26
+ });
27
+ let t = left;
28
+ if (h.server_queue_ms) out.push({
29
+ k: "slot",
30
+ a: t,
31
+ b: t += h.server_queue_ms
32
+ });
33
+ if (h.server_ms !== void 0) out.push({
34
+ k: "render",
35
+ a: t,
36
+ b: t += h.server_ms
37
+ });
38
+ else if (h.first_at !== void 0) out.push({
39
+ k: "server",
40
+ a: t,
41
+ b: t = h.first_at
42
+ });
43
+ if (at > t) out.push({
44
+ k: "rest",
45
+ a: t,
46
+ b: at
47
+ });
48
+ return out;
49
+ }
50
+ export { HOLE_SEG_LABEL, hole_segments };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A readable diff of two HTML strings — the server's markup and what the browser ended up with —
3
+ * for the Hydration tab. HTML is cut into tokens (a tag, or the text between tags; comments dropped,
4
+ * whitespace runs folded), the token lists are diffed (Myers, O(ND)), and the result is grouped into
5
+ * hunks with a little context. No regex. A diff too large to compute (edit distance past `max_d`)
6
+ * falls back to the first difference.
7
+ */
8
+ export type DiffOp = {
9
+ op: "same" | "del" | "add";
10
+ text: string;
11
+ };
12
+ export interface DiffHunk {
13
+ ops: DiffOp[];
14
+ }
15
+ export interface HtmlDiff {
16
+ hunks: DiffHunk[];
17
+ /** tokens removed / added */
18
+ removed: number;
19
+ added: number;
20
+ /** the diff gave up (too many changes) and shows only where they start */
21
+ partial: boolean;
22
+ }
23
+ /** Tags and text runs; comments out; whitespace inside text folded to one space. */
24
+ export declare function tokenize(html: string): string[];
25
+ export declare function html_diff(server: string, browser: string, context?: number, max_d?: number): HtmlDiff;
@@ -0,0 +1,156 @@
1
+ // src/html-diff.ts
2
+ /** Tags and text runs; comments out; whitespace inside text folded to one space. */
3
+ function tokenize(html) {
4
+ const out = [];
5
+ let i = 0;
6
+ while (i < html.length) {
7
+ if (html.startsWith("<!--", i)) {
8
+ const end = html.indexOf("-->", i + 4);
9
+ i = end === -1 ? html.length : end + 3;
10
+ continue;
11
+ }
12
+ if (html[i] === "<") {
13
+ const end = html.indexOf(">", i);
14
+ const stop = end === -1 ? html.length : end + 1;
15
+ out.push(html.slice(i, stop));
16
+ i = stop;
17
+ continue;
18
+ }
19
+ const next = html.indexOf("<", i);
20
+ const stop = next === -1 ? html.length : next;
21
+ const words = [];
22
+ let word = -1;
23
+ for (let k = i; k < stop; k++) {
24
+ const c = html.charCodeAt(k);
25
+ if (c === 32 || c === 9 || c === 10 || c === 13) {
26
+ if (word !== -1) words.push(html.slice(word, k));
27
+ word = -1;
28
+ } else if (word === -1) word = k;
29
+ }
30
+ if (word !== -1) words.push(html.slice(word, stop));
31
+ if (words.length) out.push(words.join(" "));
32
+ i = stop;
33
+ }
34
+ return out;
35
+ }
36
+ /** Myers diff over token arrays; null when the edit distance passes `max_d`. */
37
+ function myers(a, b, max_d) {
38
+ const n = a.length;
39
+ const m = b.length;
40
+ const max = Math.min(n + m, max_d);
41
+ const off = max + 1;
42
+ const v = new Int32Array(2 * max + 3);
43
+ const trace = [];
44
+ for (let d = 0; d <= max; d++) {
45
+ trace.push(v.slice());
46
+ for (let k = -d; k <= d; k += 2) {
47
+ let x = k === -d || k !== d && v[off + k - 1] < v[off + k + 1] ? v[off + k + 1] : v[off + k - 1] + 1;
48
+ let y = x - k;
49
+ while (x < n && y < m && a[x] === b[y]) {
50
+ x++;
51
+ y++;
52
+ }
53
+ v[off + k] = x;
54
+ if (x >= n && y >= m) {
55
+ const ops = [];
56
+ let cx = n;
57
+ let cy = m;
58
+ for (let dd = d; dd > 0; dd--) {
59
+ const pv = trace[dd];
60
+ const kk = cx - cy;
61
+ const prev_k = kk === -dd || kk !== dd && pv[off + kk - 1] < pv[off + kk + 1] ? kk + 1 : kk - 1;
62
+ const px = pv[off + prev_k];
63
+ const py = px - prev_k;
64
+ while (cx > px && cy > py) {
65
+ ops.push({
66
+ op: "same",
67
+ text: a[--cx]
68
+ });
69
+ cy--;
70
+ }
71
+ if (cx === px) ops.push({
72
+ op: "add",
73
+ text: b[--cy]
74
+ });
75
+ else ops.push({
76
+ op: "del",
77
+ text: a[--cx]
78
+ });
79
+ }
80
+ while (cx > 0 && cy > 0) {
81
+ ops.push({
82
+ op: "same",
83
+ text: a[--cx]
84
+ });
85
+ cy--;
86
+ }
87
+ return ops.reverse();
88
+ }
89
+ }
90
+ }
91
+ return null;
92
+ }
93
+ function html_diff(server, browser, context = 3, max_d = 800) {
94
+ const a = tokenize(server);
95
+ const b = tokenize(browser);
96
+ let head = 0;
97
+ while (head < a.length && head < b.length && a[head] === b[head]) head++;
98
+ let tail = 0;
99
+ while (tail < a.length - head && tail < b.length - head && a[a.length - 1 - tail] === b[b.length - 1 - tail]) tail++;
100
+ const mid_a = a.slice(head, a.length - tail);
101
+ const mid_b = b.slice(head, b.length - tail);
102
+ let ops = myers(mid_a, mid_b, max_d);
103
+ let partial = false;
104
+ if (!ops) {
105
+ partial = true;
106
+ ops = [...mid_a.slice(0, 20).map((text) => ({
107
+ op: "del",
108
+ text
109
+ })), ...mid_b.slice(0, 20).map((text) => ({
110
+ op: "add",
111
+ text
112
+ }))];
113
+ }
114
+ const all = [
115
+ ...a.slice(Math.max(0, head - context), head).map((text) => ({
116
+ op: "same",
117
+ text
118
+ })),
119
+ ...ops,
120
+ ...a.slice(a.length - tail, a.length - tail + context).map((text) => ({
121
+ op: "same",
122
+ text
123
+ }))
124
+ ];
125
+ const hunks = [];
126
+ let cur = null;
127
+ let same_run = 0;
128
+ for (let i = 0; i < all.length; i++) {
129
+ const o = all[i];
130
+ if (o.op === "same") {
131
+ if (cur) {
132
+ same_run++;
133
+ if (same_run <= context) cur.push(o);
134
+ else {
135
+ hunks.push({ ops: cur });
136
+ cur = null;
137
+ }
138
+ }
139
+ continue;
140
+ }
141
+ if (!cur) {
142
+ cur = [];
143
+ for (let k = Math.max(0, i - context); k < i; k++) if (all[k].op === "same") cur.push(all[k]);
144
+ }
145
+ same_run = 0;
146
+ cur.push(o);
147
+ }
148
+ if (cur) hunks.push({ ops: cur });
149
+ return {
150
+ hunks: hunks.slice(0, 20),
151
+ removed: ops.filter((o) => o.op === "del").length,
152
+ added: ops.filter((o) => o.op === "add").length,
153
+ partial
154
+ };
155
+ }
156
+ export { html_diff, tokenize };
@@ -0,0 +1,2 @@
1
+ /** An island's hydration status: worked out in the browser (devtools/hydration.ts), read by the testing API. */
2
+ export type HydrationStatus = "failed" | "recovered" | "healed" | "changed" | "asleep" | "clean";
File without changes
@@ -0,0 +1,14 @@
1
+ import { DOM_LARGE, Failure, HeldOpen, HoleBatch, HoleFailure, HoleWait, InteractionCpuInput, IslandCode, IslandRow, NavPhases, PageFinding, PageInput, PageInteraction, PageNav, PageReport, PartedVital, RatedVital, RegionFact, RestoreEvent, ServerProfileBrief, VitalMove, VitalPart, analyze_page, browser_of, defer_keys, dev_compile_ms, engine_of, explain_held_open, first_difference, inline_threshold_tune, late_found, lcp_font, lcp_rivals, prebundled_names, rate, vital_parts, vitals_moved } from "./page-insights.js";
2
+ import { Ref, SessionFinding, SessionReport, TimelineItem, TimelineLane, analyze_session, session_timeline } from "./session-insights.js";
3
+ import { HookEntry, SessionClick, SessionData, SessionFrame, SessionInteraction, SessionNav, SessionRequest, SessionShift } from "./session-data.js";
4
+ import { HydrationStatus } from "./hydration-status.js";
5
+ import { HtmlDiff, html_diff } from "./html-diff.js";
6
+ import { AssetKind, AssetRef, AssetsDiff, PageAssets, RuntimeScripts, Weight, assets_diff, dynamic_imports, runtime_scripts, static_imports, weigh_assets } from "./page-assets.js";
7
+ import { CodeKind, CpuFn, CpuSummary, analyze_cpu, is_trace } from "./cpu.js";
8
+ import { FpDrift, KeptIsland, compare } from "./fp-drift.js";
9
+ import { HOLE_SEG_LABEL, hole_segments } from "./hole-segments.js";
10
+ import { AttrRule, apply_attr_rules } from "./attr-rules.js";
11
+ import { BarrelLeftReason, ChunkBarrel, IslandBarrel, barrel_left_fix, barrel_left_words } from "./barrel-left.js";
12
+ import { TESTING_ENGINE_VERSION } from "./testing-version.js";
13
+ import { DEVTOOLS_COOKIE, DEVTOOLS_ON, DEVTOOLS_PARAM, IslandHazard, TESTING_COOKIE, TESTING_LEAN, TESTING_PARAM, devtools_switched_on, hazard_fix, hazard_words, hydration_hazards, switch_in_url, testing_lean, without_switch, write_switch } from "@ogygia/core/internal/instruments";
14
+ export { type AssetKind, type AssetRef, type AssetsDiff, type AttrRule, type BarrelLeftReason, type ChunkBarrel, type CodeKind, type CpuFn, type CpuSummary, DEVTOOLS_COOKIE, DEVTOOLS_ON, DEVTOOLS_PARAM, DOM_LARGE, type Failure, type FpDrift, HOLE_SEG_LABEL, type HeldOpen, type HoleBatch, type HoleFailure, type HoleWait, type HookEntry, type HtmlDiff, type HydrationStatus, type InteractionCpuInput, type IslandBarrel, type IslandCode, type IslandHazard, type IslandRow, type KeptIsland, type NavPhases, type PageAssets, type PageFinding, type PageInput, type PageInteraction, type PageNav, type PageReport, type PartedVital, type RatedVital, type Ref, type RegionFact, type RestoreEvent, type RuntimeScripts, type ServerProfileBrief, type SessionClick, type SessionData, type SessionFinding, type SessionFrame, type SessionInteraction, type SessionNav, type SessionReport, type SessionRequest, type SessionShift, TESTING_COOKIE, TESTING_ENGINE_VERSION, TESTING_LEAN, TESTING_PARAM, type TimelineItem, type TimelineLane, type VitalMove, type VitalPart, type Weight, analyze_cpu, analyze_page, analyze_session, apply_attr_rules, assets_diff, barrel_left_fix, barrel_left_words, browser_of, defer_keys, dev_compile_ms, devtools_switched_on, dynamic_imports, engine_of, explain_held_open, first_difference, compare as fp_compare, hazard_fix, hazard_words, hole_segments, html_diff, hydration_hazards, inline_threshold_tune, is_trace, late_found, lcp_font, lcp_rivals, prebundled_names, rate, runtime_scripts, session_timeline, static_imports, switch_in_url, testing_lean, vital_parts, vitals_moved, weigh_assets, without_switch, write_switch };
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ import { DOM_LARGE, analyze_page, browser_of, defer_keys, dev_compile_ms, engine_of, explain_held_open, first_difference, inline_threshold_tune, late_found, lcp_font, lcp_rivals, prebundled_names, rate, vital_parts, vitals_moved } from "./page-insights.js";
2
+ import { analyze_session, session_timeline } from "./session-insights.js";
3
+ import { html_diff } from "./html-diff.js";
4
+ import { assets_diff, dynamic_imports, runtime_scripts, static_imports, weigh_assets } from "./page-assets.js";
5
+ import { analyze_cpu, is_trace } from "./cpu.js";
6
+ import { compare } from "./fp-drift.js";
7
+ import { HOLE_SEG_LABEL, hole_segments } from "./hole-segments.js";
8
+ import { apply_attr_rules } from "./attr-rules.js";
9
+ import { barrel_left_fix, barrel_left_words } from "./barrel-left.js";
10
+ import { TESTING_ENGINE_VERSION } from "./testing-version.js";
11
+ import { DEVTOOLS_COOKIE, DEVTOOLS_ON, DEVTOOLS_PARAM, TESTING_COOKIE, TESTING_LEAN, TESTING_PARAM, devtools_switched_on, hazard_fix, hazard_words, hydration_hazards, switch_in_url, testing_lean, without_switch, write_switch } from "@ogygia/core/internal/instruments";
12
+ export { DEVTOOLS_COOKIE, DEVTOOLS_ON, DEVTOOLS_PARAM, DOM_LARGE, HOLE_SEG_LABEL, TESTING_COOKIE, TESTING_ENGINE_VERSION, TESTING_LEAN, TESTING_PARAM, analyze_cpu, analyze_page, analyze_session, apply_attr_rules, assets_diff, barrel_left_fix, barrel_left_words, browser_of, defer_keys, dev_compile_ms, devtools_switched_on, dynamic_imports, engine_of, explain_held_open, first_difference, compare as fp_compare, hazard_fix, hazard_words, hole_segments, html_diff, hydration_hazards, inline_threshold_tune, is_trace, late_found, lcp_font, lcp_rivals, prebundled_names, rate, runtime_scripts, session_timeline, static_imports, switch_in_url, testing_lean, vital_parts, vitals_moved, weigh_assets, without_switch, write_switch };
@@ -0,0 +1,211 @@
1
+ import { FoundTag, UnscopedStyles } from "@ogygia/core/internal/instruments";
2
+ export type AssetKind = "script" | "style" | "font" | "image" | "other";
3
+ export interface AssetRef {
4
+ url: string;
5
+ kind: AssetKind;
6
+ /** the browser must have it before the first paint (a head stylesheet, a classic sync script) */
7
+ blocking: boolean;
8
+ /** how the document asks for it (`island`: the runtime loads it to wake an island) */
9
+ via: "script" | "modulepreload" | "preload" | "stylesheet" | "inline-import" | "img" | "static-import" | "island" | "route-node" | "runtime-phase";
10
+ /** loads later, on demand (an island that wakes when visible / on interaction), not at start */
11
+ lazy?: boolean;
12
+ /** the ogygia runtime's own script (`data-ogygia-runtime`): the parts it loads itself are its own */
13
+ runtime?: true;
14
+ /** a part of the ogygia runtime it loads on demand as islands wake (and what that part imports) */
15
+ phase?: true;
16
+ }
17
+ export interface WeighedAsset extends AssetRef {
18
+ /** decoded bytes (what the browser parses) */
19
+ bytes: number;
20
+ /** bytes on the wire: the response's own when it was compressed, else a gzip estimate */
21
+ wire: number;
22
+ /** what the build put in it (its source files and packages, readable), when the build said */
23
+ contains?: string[];
24
+ /** a font's `Vary` header, as the server answered it */
25
+ vary?: string;
26
+ }
27
+ export interface PageAssets {
28
+ assets: WeighedAsset[];
29
+ /** components whose styles shipped WITHOUT their scope (the build's fallback marker, in a
30
+ * stylesheet or an inline `<style>`): their rules apply to the whole page */
31
+ unscoped?: (UnscopedStyles & {
32
+ in: string;
33
+ })[];
34
+ /** references that could not be weighed (a 404, a timeout, the budget ran out) */
35
+ missed: string[];
36
+ /** each of those, and why: `budget` (time ran out before it), `timeout`, `status 404`, `file cap`,
37
+ * `error: …` — a total with only `status` misses can be trusted; `budget` / `timeout` ones vary */
38
+ missed_why?: {
39
+ url: string;
40
+ why: string;
41
+ }[];
42
+ /** the HTML itself */
43
+ html: {
44
+ bytes: number;
45
+ wire: number;
46
+ };
47
+ /** inline `<script>` / `<style>` text in the document, decoded bytes */
48
+ inline: {
49
+ script: number;
50
+ style: number;
51
+ };
52
+ totals: {
53
+ js: number;
54
+ js_wire: number;
55
+ css: number;
56
+ css_wire: number;
57
+ font: number;
58
+ image: number;
59
+ /** every byte at start, on the wire (HTML included) */
60
+ wire: number;
61
+ /** JS that loads later, on demand (lazy islands), decoded — not in `js` */
62
+ lazy_js: number;
63
+ /** blocking the first paint: stylesheets + classic sync scripts, decoded */
64
+ blocking: number;
65
+ blocking_count: number;
66
+ js_files: number;
67
+ };
68
+ }
69
+ /** Attributes of one start tag `tags()` read, names lower-cased, values entity-decoded; valueless → ''. */
70
+ export declare function tag_attrs(tag: FoundTag): Map<string, string>;
71
+ /** `import("x")` / `import('x')` specifiers in a script's text (Kit's inline start). */
72
+ export declare function dynamic_imports(text: string): string[];
73
+ /**
74
+ * The STATIC imports of a bundled module (`import{a}from"./x.js"`, `import"./y.js"`,
75
+ * `export*from"./z.js"`): specifiers after `from` / a bare `import` that look like module paths
76
+ * (relative or absolute, ending in .js/.mjs). Bundler output writes them plainly; a string that
77
+ * merely contains such text inflates nothing that does not exist — every hit is fetched, and a
78
+ * miss is dropped.
79
+ */
80
+ export declare function static_imports(code: string): string[];
81
+ /**
82
+ * A Kit-hydrated page's route nodes: its inline start script passes `node_ids: [0, 5]` to
83
+ * `kit.start`, and `app.js` imports each node on demand (`import("../nodes/5.<hash>.js")`) — the
84
+ * page's OWN code, the heaviest part, reachable only through that dynamic import. Empty when the
85
+ * page is not Kit-hydrated.
86
+ */
87
+ export declare function kit_node_ids(script: string): number[];
88
+ /** Every file the document asks for at start, in document order, deduped by URL (the first,
89
+ * strongest ask wins: a blocking stylesheet stays blocking). Inline script/style bytes counted. */
90
+ export declare function scan_assets(html: string): {
91
+ refs: AssetRef[];
92
+ inline: {
93
+ script: number;
94
+ style: number;
95
+ };
96
+ kit_nodes: number[];
97
+ };
98
+ export interface Weight {
99
+ bytes: number;
100
+ wire: number;
101
+ /** a module's static imports (resolved to absolute paths), for the walk */
102
+ imports?: string[];
103
+ /** its dynamic imports (resolved) — followed only where the page names them (Kit's route nodes) */
104
+ dynamic?: string[];
105
+ /** a stylesheet's unscoped fallbacks (see contract/unscoped-css.ts) */
106
+ unscoped?: UnscopedStyles[];
107
+ /** a font's `Vary` header (Safari refetches a font preload that varies by Origin when its
108
+ * @font-face comes late) */
109
+ vary?: string;
110
+ }
111
+ /** Resolve a reference against the page (and a module's import against its module). */
112
+ export declare function resolve_ref(ref: string, base: string): string | null;
113
+ export interface WeighOptions {
114
+ /** the page URL references resolve against */
115
+ page_url: string;
116
+ fetch_url: (url: string) => Promise<Response>;
117
+ /** per-URL cache across reports (a hashed asset never changes) */
118
+ cache: Map<string, Weight | null>;
119
+ /** gzip a body to estimate its wire size (node:zlib in the profiler; absent = decoded size) */
120
+ gzip?: (bytes: Uint8Array) => number;
121
+ budget_ms?: number;
122
+ max_files?: number;
123
+ /** the document the refs came from */
124
+ html: string;
125
+ /** files the HTML does not name but the page loads: islands' modules (lazy ones marked) */
126
+ extra?: AssetRef[];
127
+ /** what the build put in a file (by its absolute URL), for naming a hashed chunk */
128
+ contents_of?: (url: string) => string[] | null;
129
+ }
130
+ export declare function weigh_assets(opts: WeighOptions): Promise<PageAssets>;
131
+ export interface AssetChange {
132
+ /** the file's name now (or then, for one that is gone) */
133
+ name: string;
134
+ /** what the build put in it — the identity across builds (hashed names change every build) */
135
+ contains?: string[];
136
+ a: number;
137
+ b: number;
138
+ lazy?: boolean;
139
+ }
140
+ export interface AssetsDiff {
141
+ /** JS at start, decoded, then → now */
142
+ js: {
143
+ a: number;
144
+ b: number;
145
+ };
146
+ lazy_js: {
147
+ a: number;
148
+ b: number;
149
+ };
150
+ added: AssetChange[];
151
+ removed: AssetChange[];
152
+ grew: AssetChange[];
153
+ shrank: AssetChange[];
154
+ /** the same file, now loaded at start (it loaded later before: an island's wake changed) */
155
+ to_start: AssetChange[];
156
+ /** the same file, now loaded later (it loaded at start before) */
157
+ to_later: AssetChange[];
158
+ }
159
+ /**
160
+ * WHAT CHANGED IN THE PAGE'S JS between two weighings (two builds): the files new, gone, grown and
161
+ * shrunk. Hashed names change every build, so a file is known by what the build put in it (its
162
+ * source files and packages, `contains`), and by its URL only when the build said nothing. Changes
163
+ * under 5 KB are left out; each list is heaviest first.
164
+ */
165
+ /** What a diff needs of a weighing: the report's JSON carries this much too (a CI compare). */
166
+ export interface WeighedLike {
167
+ assets: {
168
+ url: string;
169
+ kind: string;
170
+ bytes: number;
171
+ contains?: string[];
172
+ lazy?: boolean;
173
+ }[];
174
+ totals: {
175
+ js: number;
176
+ lazy_js: number;
177
+ };
178
+ }
179
+ export declare function assets_diff(a: WeighedLike, b: WeighedLike): AssetsDiff;
180
+ export interface RuntimeScripts {
181
+ files: number;
182
+ /** decoded */
183
+ bytes: number;
184
+ /** on the wire (a third of decoded where the browser saw none: a cached file) */
185
+ wire: number;
186
+ /** by who serves them: `this app`, or a CDN package / host */
187
+ by: {
188
+ who: string;
189
+ files: number;
190
+ bytes: number;
191
+ }[];
192
+ /** of this app's, the island entry files (`og-region.<id>.…js`): islands no HTML named — the ones
193
+ * a hole's answer brought */
194
+ island_entries?: number;
195
+ }
196
+ /**
197
+ * SCRIPTS LOADED AT RUNTIME — what the browser fetched that neither the HTML nor any module's
198
+ * imports name: a script that loads more scripts (a CDN component library fetching its parts, a tag
199
+ * manager, a runtime's on-demand chunk). The server cannot see them coming; the profiler user's own
200
+ * visit saw them. `until`: the end of "at start" on the visit's clock (a lazy island woken by a
201
+ * scroll later does not count). Null when there are none.
202
+ */
203
+ export declare function runtime_scripts(assets: readonly {
204
+ url: string;
205
+ }[], resources: readonly {
206
+ url: string;
207
+ type: string;
208
+ start: number;
209
+ size?: number;
210
+ transfer?: number;
211
+ }[], origin: string, until: number): RuntimeScripts | null;