@krate/runtime 0.5.0-rc.14 → 0.5.0-rc.16
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/NOTICE +10 -0
- package/dist/action-context.js +5 -1
- package/dist/cache-scope.d.ts +10 -2
- package/dist/cache-scope.js +26 -4
- package/dist/dev/api.d.ts +93 -0
- package/dist/dev/api.js +2 -0
- package/dist/dev/app.d.ts +165 -0
- package/dist/dev/app.js +1204 -0
- package/dist/dev/commands.d.ts +49 -0
- package/dist/dev/commands.js +114 -0
- package/dist/dev/highlight.d.ts +4 -0
- package/dist/dev/highlight.js +126 -0
- package/dist/dev/icons.d.ts +4 -0
- package/dist/dev/icons.js +57 -0
- package/dist/dev/inspect.d.ts +55 -0
- package/dist/dev/inspect.js +256 -0
- package/dist/dev/inspector.d.ts +39 -0
- package/dist/dev/inspector.js +348 -0
- package/dist/dev/issues.d.ts +83 -0
- package/dist/dev/issues.js +166 -0
- package/dist/dev/modal.d.ts +16 -0
- package/dist/dev/modal.js +836 -0
- package/dist/dev/native.d.ts +53 -0
- package/dist/dev/native.js +95 -0
- package/dist/dev/palette.d.ts +9 -0
- package/dist/dev/palette.js +250 -0
- package/dist/dev/panel.d.ts +31 -0
- package/dist/dev/panel.js +848 -0
- package/dist/dev/requests.d.ts +36 -0
- package/dist/dev/requests.js +150 -0
- package/dist/dev/settings.d.ts +32 -0
- package/dist/dev/settings.js +78 -0
- package/dist/dev/sourcemap.d.ts +22 -0
- package/dist/dev/sourcemap.js +148 -0
- package/dist/dev/stack.d.ts +38 -0
- package/dist/dev/stack.js +115 -0
- package/dist/dev/styles.d.ts +1 -0
- package/dist/dev/styles.js +424 -0
- package/dist/dev/util.d.ts +63 -0
- package/dist/dev/util.js +190 -0
- package/dist/dev-overlay.d.ts +9 -83
- package/dist/dev-overlay.js +17 -1038
- package/dist/island-swap.js +53 -9
- package/dist/krate-core.js +1 -1
- package/dist/krate-dev.js +441 -871
- package/dist/krate-f-list.js +1 -1
- package/dist/krate-f-navigation.js +1 -1
- package/dist/krate-hydrate-lite.js +5 -5
- package/dist/krate-hydrate.js +5 -5
- package/dist/krate-island-swap.js +1 -1
- package/dist/krate-runtime.js +5 -5
- package/dist/list.js +23 -1
- package/dist/memsize.d.ts +14 -0
- package/dist/memsize.js +71 -0
- package/dist/metadata.js +23 -12
- package/dist/request-context.d.ts +10 -0
- package/dist/request-context.js +24 -0
- package/dist/segmented-lru.d.ts +14 -1
- package/dist/segmented-lru.js +90 -21
- package/dist/server-handler.d.ts +3 -0
- package/dist/server-handler.js +4 -2
- package/dist/server-renderer.js +10 -3
- package/dist/server.d.ts +3 -1
- package/dist/server.js +55 -29
- package/dist/shared-isr.js +2 -1
- package/dist/signal.d.ts +8 -0
- package/dist/signal.js +4 -0
- package/dist/ssr-core.d.ts +13 -2
- package/dist/ssr-core.js +63 -11
- package/package.json +3 -2
package/NOTICE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@krate/runtime
|
|
2
|
+
Copyright 2026 The Krate Authors
|
|
3
|
+
|
|
4
|
+
This package is part of Krate (https://github.com/kratejs/krate,
|
|
5
|
+
https://krate.js.org), licensed under the Apache License, Version 2.0
|
|
6
|
+
(https://www.apache.org/licenses/LICENSE-2.0).
|
|
7
|
+
|
|
8
|
+
Under section 4(d) of the License, any redistribution of this package or of
|
|
9
|
+
a Derivative Work, including a fork, must retain this NOTICE file, or the
|
|
10
|
+
attribution notices it contains.
|
package/dist/action-context.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* read that scope, so they only work while a server action is executing.
|
|
7
7
|
*/
|
|
8
8
|
import { markNoStore } from './cache-scope.js';
|
|
9
|
-
import { getRequestContext, requestCookies, thenable } from './request-context.js';
|
|
9
|
+
import { dynamicUsageError, getRequestContext, requestCookies, thenable } from './request-context.js';
|
|
10
10
|
/** The current action context, or undefined outside a server action. */
|
|
11
11
|
export function getActionContext() {
|
|
12
12
|
const store = globalThis[Symbol.for('krate.action.store')];
|
|
@@ -55,6 +55,8 @@ export function headers() {
|
|
|
55
55
|
return awaitableHeaders(action.headers);
|
|
56
56
|
const req = getRequestContext();
|
|
57
57
|
if (req) {
|
|
58
|
+
if (req.prerender)
|
|
59
|
+
throw dynamicUsageError('headers()');
|
|
58
60
|
markNoStore();
|
|
59
61
|
return awaitableHeaders(req.headers);
|
|
60
62
|
}
|
|
@@ -71,6 +73,8 @@ export function cookies() {
|
|
|
71
73
|
return awaitableActionCookies(action.cookies);
|
|
72
74
|
const req = getRequestContext();
|
|
73
75
|
if (req) {
|
|
76
|
+
if (req.prerender)
|
|
77
|
+
throw dynamicUsageError('cookies()');
|
|
74
78
|
markNoStore();
|
|
75
79
|
return requestCookies(req.cookies);
|
|
76
80
|
}
|
package/dist/cache-scope.d.ts
CHANGED
|
@@ -51,13 +51,21 @@ export interface RevalidateScope {
|
|
|
51
51
|
/** Tasks registered with after(); the host runs them once the response is sent. */
|
|
52
52
|
after?: Array<() => unknown>;
|
|
53
53
|
}
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* In-process data cache with tag index and FIFO bound, by entry count and,
|
|
56
|
+
* with maxBytes, by the approximate size of the values.
|
|
57
|
+
*/
|
|
55
58
|
export declare class DataCache {
|
|
56
59
|
private max;
|
|
60
|
+
private maxBytes;
|
|
57
61
|
private map;
|
|
58
62
|
private byTag;
|
|
59
|
-
|
|
63
|
+
private sizes;
|
|
64
|
+
private used;
|
|
65
|
+
constructor(max?: number, maxBytes?: number);
|
|
60
66
|
get size(): number;
|
|
67
|
+
/** The approximate memory the cached values take (0 without maxBytes). */
|
|
68
|
+
get bytes(): number;
|
|
61
69
|
get(key: string): unknown | undefined;
|
|
62
70
|
set(key: string, value: unknown, ttlSeconds: number, tags: string[]): void;
|
|
63
71
|
delete(key: string): void;
|
package/dist/cache-scope.js
CHANGED
|
@@ -19,18 +19,29 @@
|
|
|
19
19
|
* there the data cache is backed by the Go host (`_go_cache_get/_go_cache_set`).
|
|
20
20
|
*/
|
|
21
21
|
import { HEAD_CLOSE, HEAD_OPEN } from './head-tags.js';
|
|
22
|
+
import { approxBytes, cacheByteBudgets } from './memsize.js';
|
|
22
23
|
const STATE_KEY = Symbol.for('krate.cache.runtime');
|
|
23
24
|
const REVALIDATE_STORE_KEY = Symbol.for('krate.revalidate.store');
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* In-process data cache with tag index and FIFO bound, by entry count and,
|
|
27
|
+
* with maxBytes, by the approximate size of the values.
|
|
28
|
+
*/
|
|
25
29
|
export class DataCache {
|
|
26
|
-
constructor(max = 1000) {
|
|
30
|
+
constructor(max = 1000, maxBytes = 0) {
|
|
27
31
|
this.max = max;
|
|
32
|
+
this.maxBytes = maxBytes;
|
|
28
33
|
this.map = new Map();
|
|
29
34
|
this.byTag = new Map();
|
|
35
|
+
this.sizes = new Map();
|
|
36
|
+
this.used = 0;
|
|
30
37
|
}
|
|
31
38
|
get size() {
|
|
32
39
|
return this.map.size;
|
|
33
40
|
}
|
|
41
|
+
/** The approximate memory the cached values take (0 without maxBytes). */
|
|
42
|
+
get bytes() {
|
|
43
|
+
return this.used;
|
|
44
|
+
}
|
|
34
45
|
get(key) {
|
|
35
46
|
const e = this.map.get(key);
|
|
36
47
|
if (!e)
|
|
@@ -46,7 +57,10 @@ export class DataCache {
|
|
|
46
57
|
return;
|
|
47
58
|
if (this.map.has(key))
|
|
48
59
|
this.delete(key);
|
|
49
|
-
|
|
60
|
+
const n = this.maxBytes > 0 ? approxBytes(value) + key.length : 0;
|
|
61
|
+
if (this.maxBytes > 0 && n > this.maxBytes)
|
|
62
|
+
return;
|
|
63
|
+
while (this.map.size >= this.max || (this.maxBytes > 0 && this.map.size > 0 && this.used + n > this.maxBytes)) {
|
|
50
64
|
const oldest = this.map.keys().next().value;
|
|
51
65
|
if (oldest === undefined)
|
|
52
66
|
break;
|
|
@@ -54,6 +68,10 @@ export class DataCache {
|
|
|
54
68
|
}
|
|
55
69
|
const expires = ttlSeconds === Infinity ? Infinity : Date.now() + ttlSeconds * 1000;
|
|
56
70
|
this.map.set(key, { value, expires, tags: [...tags] });
|
|
71
|
+
if (n > 0) {
|
|
72
|
+
this.sizes.set(key, n);
|
|
73
|
+
this.used += n;
|
|
74
|
+
}
|
|
57
75
|
for (const t of tags) {
|
|
58
76
|
let keys = this.byTag.get(t);
|
|
59
77
|
if (!keys)
|
|
@@ -66,6 +84,8 @@ export class DataCache {
|
|
|
66
84
|
if (!e)
|
|
67
85
|
return;
|
|
68
86
|
this.map.delete(key);
|
|
87
|
+
this.used -= this.sizes.get(key) || 0;
|
|
88
|
+
this.sizes.delete(key);
|
|
69
89
|
for (const t of e.tags) {
|
|
70
90
|
const keys = this.byTag.get(t);
|
|
71
91
|
if (keys) {
|
|
@@ -93,6 +113,8 @@ export class DataCache {
|
|
|
93
113
|
clear() {
|
|
94
114
|
this.map.clear();
|
|
95
115
|
this.byTag.clear();
|
|
116
|
+
this.sizes.clear();
|
|
117
|
+
this.used = 0;
|
|
96
118
|
}
|
|
97
119
|
}
|
|
98
120
|
/** The shared cache runtime, created on first use. */
|
|
@@ -102,7 +124,7 @@ export function cacheRuntime() {
|
|
|
102
124
|
if (!rt) {
|
|
103
125
|
const max = envNumber('KRATE_DATA_CACHE_MAX') || 1000;
|
|
104
126
|
const created = {
|
|
105
|
-
dataCache: new DataCache(max),
|
|
127
|
+
dataCache: new DataCache(max, cacheByteBudgets(envNumber('KRATE_SSR_CACHE_BYTES')).data),
|
|
106
128
|
epoch: 0,
|
|
107
129
|
invalidate(payload) {
|
|
108
130
|
created.epoch++;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export interface BuildPhase {
|
|
2
|
+
name: string;
|
|
3
|
+
ms: number;
|
|
4
|
+
}
|
|
5
|
+
export interface BuildRecord {
|
|
6
|
+
id: number;
|
|
7
|
+
start: number;
|
|
8
|
+
durationMs: number;
|
|
9
|
+
kind: string;
|
|
10
|
+
files: string[];
|
|
11
|
+
routes: string[];
|
|
12
|
+
pages: number;
|
|
13
|
+
ok: boolean;
|
|
14
|
+
diagnostics: number;
|
|
15
|
+
phases?: BuildPhase[];
|
|
16
|
+
}
|
|
17
|
+
export interface ActivityData {
|
|
18
|
+
builds: BuildRecord[];
|
|
19
|
+
lastGoodAt?: number;
|
|
20
|
+
building?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface DevInfo {
|
|
23
|
+
version?: string;
|
|
24
|
+
startedAt?: number;
|
|
25
|
+
logFile?: string;
|
|
26
|
+
docsURL?: string;
|
|
27
|
+
editor?: {
|
|
28
|
+
configured?: string;
|
|
29
|
+
available?: {
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface RouteData {
|
|
36
|
+
path?: string;
|
|
37
|
+
pattern: string;
|
|
38
|
+
source?: string;
|
|
39
|
+
mode?: string;
|
|
40
|
+
revalidate?: number;
|
|
41
|
+
params?: Record<string, string>;
|
|
42
|
+
dynamic?: boolean;
|
|
43
|
+
staticPaths?: number;
|
|
44
|
+
layouts?: string[];
|
|
45
|
+
sizes?: {
|
|
46
|
+
html?: number;
|
|
47
|
+
js?: number;
|
|
48
|
+
css?: number;
|
|
49
|
+
gzipHtml?: number;
|
|
50
|
+
gzipJs?: number;
|
|
51
|
+
gzipCss?: number;
|
|
52
|
+
gzipRuntime?: number;
|
|
53
|
+
gzipIslands?: number;
|
|
54
|
+
};
|
|
55
|
+
islands?: {
|
|
56
|
+
id: string;
|
|
57
|
+
chunk: string;
|
|
58
|
+
gzip: number;
|
|
59
|
+
}[];
|
|
60
|
+
budget?: {
|
|
61
|
+
js?: number;
|
|
62
|
+
hydration?: number;
|
|
63
|
+
islandJS?: number;
|
|
64
|
+
route?: number;
|
|
65
|
+
};
|
|
66
|
+
/** The page as checks.budget measures it (raw bytes), to compare with budget. */
|
|
67
|
+
budgetUsage?: {
|
|
68
|
+
js?: number;
|
|
69
|
+
hydration?: number;
|
|
70
|
+
islandJS?: number;
|
|
71
|
+
route?: number;
|
|
72
|
+
};
|
|
73
|
+
builtAt?: number;
|
|
74
|
+
document?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface LogLine {
|
|
77
|
+
seq: number;
|
|
78
|
+
t: number;
|
|
79
|
+
src: string;
|
|
80
|
+
lvl: 'info' | 'warn' | 'error';
|
|
81
|
+
text: string;
|
|
82
|
+
/** Captured in this tab rather than by the dev server. */
|
|
83
|
+
local?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface FixChange {
|
|
86
|
+
file: string;
|
|
87
|
+
line: number;
|
|
88
|
+
col: number;
|
|
89
|
+
code: string;
|
|
90
|
+
from: string;
|
|
91
|
+
to: string;
|
|
92
|
+
}
|
|
93
|
+
export declare const DEFAULT_DOCS_URL = "https://krate.js.org/docs/reference/diagnostics/#";
|
package/dist/dev/api.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { type BuildRecord, type DevInfo, type FixChange, type LogLine, type RouteData } from './api.js';
|
|
2
|
+
import type { RouteInfo } from './commands.js';
|
|
3
|
+
import { type CodeFrame, type DevClientError, type DevDiagnostic, type Issue } from './issues.js';
|
|
4
|
+
import { RequestLog } from './requests.js';
|
|
5
|
+
import { type Settings } from './settings.js';
|
|
6
|
+
import { type ResolvedConfig } from './util.js';
|
|
7
|
+
import { type Tab } from './panel.js';
|
|
8
|
+
import { Inspector } from './inspector.js';
|
|
9
|
+
export declare class KrateDev {
|
|
10
|
+
cfg: ResolvedConfig;
|
|
11
|
+
settings: Settings;
|
|
12
|
+
host: HTMLElement;
|
|
13
|
+
shadow: ShadowRoot;
|
|
14
|
+
root: HTMLElement;
|
|
15
|
+
dock?: HTMLElement;
|
|
16
|
+
panel?: HTMLElement;
|
|
17
|
+
toastEl?: HTMLElement;
|
|
18
|
+
modal?: HTMLElement;
|
|
19
|
+
pal?: HTMLElement;
|
|
20
|
+
inspector: Inspector;
|
|
21
|
+
conn: 'connecting' | 'open' | 'down';
|
|
22
|
+
building: boolean;
|
|
23
|
+
buildFiles: string[];
|
|
24
|
+
lastBuild?: BuildRecord;
|
|
25
|
+
lastGoodAt?: number;
|
|
26
|
+
builds: BuildRecord[];
|
|
27
|
+
activity: 'unknown' | 'ok' | 'missing';
|
|
28
|
+
info?: DevInfo | null;
|
|
29
|
+
route?: RouteData | null;
|
|
30
|
+
routeFor: string;
|
|
31
|
+
routes?: RouteInfo[] | null;
|
|
32
|
+
issues: Issue[];
|
|
33
|
+
ignored: Set<string>;
|
|
34
|
+
cur: number;
|
|
35
|
+
modalOpen: boolean;
|
|
36
|
+
seen: Set<string>;
|
|
37
|
+
frames: Map<string, CodeFrame | null>;
|
|
38
|
+
/** Log lines around a server crash, with their source and time. */
|
|
39
|
+
tails: Map<string, LogLine[]>;
|
|
40
|
+
fixes: Map<string, FixChange[] | null>;
|
|
41
|
+
busy: Set<string>;
|
|
42
|
+
runtimeTab: 'stack' | 'console' | 'requests';
|
|
43
|
+
/** Failed fetch/XHR requests of the page, for the runtime error's Request tab. */
|
|
44
|
+
requests: RequestLog;
|
|
45
|
+
/**
|
|
46
|
+
* The build failed and the error overlay was dismissed with "Show last good
|
|
47
|
+
* page": the page on screen is the last good build until a build passes.
|
|
48
|
+
*/
|
|
49
|
+
staleView: boolean;
|
|
50
|
+
/** Registry entries of diagnostic codes (null: unknown), from /code. */
|
|
51
|
+
codes: Map<string, {
|
|
52
|
+
title: string;
|
|
53
|
+
explanation: string;
|
|
54
|
+
} | null>;
|
|
55
|
+
/** The code whose "What this means" popover is open. */
|
|
56
|
+
codePop: string;
|
|
57
|
+
unfold: Set<string>;
|
|
58
|
+
panelOpen: boolean;
|
|
59
|
+
tab: Tab;
|
|
60
|
+
hiddenAll: boolean;
|
|
61
|
+
peek: boolean;
|
|
62
|
+
serverLogs: LogLine[];
|
|
63
|
+
localLogs: LogLine[];
|
|
64
|
+
logSeq: number;
|
|
65
|
+
logsMissing: boolean;
|
|
66
|
+
logFilter: 'all' | 'server' | 'api' | 'browser';
|
|
67
|
+
logQuery: string;
|
|
68
|
+
errorsOnly: boolean;
|
|
69
|
+
logsClearedAt: number;
|
|
70
|
+
logsSeenAt: number;
|
|
71
|
+
logOpen: Set<string>;
|
|
72
|
+
localSeq: number;
|
|
73
|
+
hostSeq: number;
|
|
74
|
+
hostRows: string[];
|
|
75
|
+
timers: number[];
|
|
76
|
+
/** Undo functions for listeners outside the shadow root (destroy). */
|
|
77
|
+
private unbind;
|
|
78
|
+
sse?: EventSource;
|
|
79
|
+
private toastTimer?;
|
|
80
|
+
private restoreFocus?;
|
|
81
|
+
private suppressClick;
|
|
82
|
+
init(): void;
|
|
83
|
+
/** Stops timers and removes the overlay (tests). */
|
|
84
|
+
private listen;
|
|
85
|
+
destroy(): void;
|
|
86
|
+
applySettings(): void;
|
|
87
|
+
setSettings(patch: Partial<Settings>): void;
|
|
88
|
+
apiURL(path: string, params?: Record<string, string | number | undefined>): string;
|
|
89
|
+
/** GETs a dev endpoint; null when the host has no such endpoint or it fails. */
|
|
90
|
+
getJSON<T>(path: string, params?: Record<string, string | number | undefined>): Promise<T | null>;
|
|
91
|
+
postJSON(path: string, body: unknown): Promise<{
|
|
92
|
+
status: number;
|
|
93
|
+
data: any;
|
|
94
|
+
}>;
|
|
95
|
+
loadStartup(): Promise<void>;
|
|
96
|
+
loadRoute(force?: boolean): Promise<void>;
|
|
97
|
+
loadRoutes(): Promise<RouteInfo[] | null>;
|
|
98
|
+
/** The route pattern and mode of the page on screen. */
|
|
99
|
+
pageRoute(): {
|
|
100
|
+
route: string;
|
|
101
|
+
mode: string;
|
|
102
|
+
source?: string;
|
|
103
|
+
};
|
|
104
|
+
openInEditor(file: string | undefined, line?: number | string, col?: number | string): Promise<void>;
|
|
105
|
+
runAction(action: string, extra?: Record<string, unknown>): Promise<boolean>;
|
|
106
|
+
renderDock(): void;
|
|
107
|
+
setPeek(on: boolean): void;
|
|
108
|
+
private initDrag;
|
|
109
|
+
togglePanel(tab?: Tab, force?: boolean): void;
|
|
110
|
+
setTab(tab: Tab): void;
|
|
111
|
+
visibleIssues(): Issue[];
|
|
112
|
+
openModal(): void;
|
|
113
|
+
closeModal(): void;
|
|
114
|
+
/** Re-renders whatever shows issues after the list changed. */
|
|
115
|
+
issuesChanged(open: boolean): void;
|
|
116
|
+
ignore(id: string): void;
|
|
117
|
+
toggleHidden(): void;
|
|
118
|
+
toast(text: string, meta?: string, kind?: 'check' | 'x'): void;
|
|
119
|
+
private onClick;
|
|
120
|
+
private onInput;
|
|
121
|
+
private onKey;
|
|
122
|
+
/** Keep the dock route label in sync with SPA (history) navigation. */
|
|
123
|
+
private watchLocation;
|
|
124
|
+
private setConn;
|
|
125
|
+
private connectSSE;
|
|
126
|
+
/**
|
|
127
|
+
* Krate Native: the same events as SSE, as `{hmr: {type, ...}}` frames on a
|
|
128
|
+
* streaming fetch. Reconnects after the stream ends; a second "connected"
|
|
129
|
+
* means the shell restarted, so the page is stale.
|
|
130
|
+
*/
|
|
131
|
+
private connectFrames;
|
|
132
|
+
onBuildStart(d: any): void;
|
|
133
|
+
onBuildEnd(d: any): void;
|
|
134
|
+
onReload(d: any): void;
|
|
135
|
+
onBuildError(d: any): void;
|
|
136
|
+
/** The warnings of the latest build (build-end, build-warnings). */
|
|
137
|
+
onBuildWarnings(d: any): void;
|
|
138
|
+
setWarnings(list: DevDiagnostic[]): void;
|
|
139
|
+
/** Replaces every build issue (errors and warnings), keeping the times of those already on screen. */
|
|
140
|
+
private replaceBuildIssues;
|
|
141
|
+
/** "Show last good page": the overlay closes and the dock says what is on screen. */
|
|
142
|
+
showLastGood(): void;
|
|
143
|
+
onClientError(d: {
|
|
144
|
+
clientError?: DevClientError;
|
|
145
|
+
} | null): void;
|
|
146
|
+
/**
|
|
147
|
+
* Apply a CSS-only rebuild without a full reload: fetch the freshly built
|
|
148
|
+
* document, add its stylesheet links, and drop the ones it no longer has.
|
|
149
|
+
* Inline <style> changes cannot be diffed safely, so they fall back to a
|
|
150
|
+
* reload (the caller reloads when this rejects).
|
|
151
|
+
*/
|
|
152
|
+
swapStylesheets(): Promise<void>;
|
|
153
|
+
private captureRuntimeErrors;
|
|
154
|
+
private captureConsole;
|
|
155
|
+
localLog(lvl: LogLine['lvl'], text: string): void;
|
|
156
|
+
private onConsole;
|
|
157
|
+
private onResourceError;
|
|
158
|
+
private onError;
|
|
159
|
+
private onRejection;
|
|
160
|
+
private report;
|
|
161
|
+
private send;
|
|
162
|
+
addRuntime(origin: NonNullable<Issue['origin']>, message: string, stack?: string, hostStack?: string): void;
|
|
163
|
+
docsURL(code: string): string;
|
|
164
|
+
logFile(): string;
|
|
165
|
+
}
|