1681-engine / electron / WebPatcherOptions
Interface: WebPatcherOptions ​
Defined in: src/electron/webPatcher.ts:10
How a WebPatcher finds its webs and its store.
Properties ​
appVersion ​
appVersion: string;Defined in: src/electron/webPatcher.ts:16
The installed build's version (app.getVersion()): a patched web must be newer to be loaded.
builtinDir ​
builtinDir: string;Defined in: src/electron/webPatcher.ts:14
The web the installed build ships (the folder holding its index.html).
channelUrl ​
channelUrl: string;Defined in: src/electron/webPatcher.ts:20
The store's channel, e.g. https://store.example/public/live: latest.json, web/…, files/… lie under it.
entry? ​
optional entry?: string;Defined in: src/electron/webPatcher.ts:28
The page file in a web. Default index.html.
fetch? ​
optional fetch?: {
(input, init?): Promise<Response>;
(input, init?): Promise<Response>;
};Defined in: src/electron/webPatcher.ts:34
Default globalThis.fetch.
Call Signature ​
(input, init?): Promise<Response>;Parameters ​
| Parameter | Type |
|---|---|
input | URL | RequestInfo |
init? | RequestInit |
Returns ​
Promise<Response>
Call Signature ​
(input, init?): Promise<Response>;Parameters ​
| Parameter | Type |
|---|---|
input | string | URL | Request |
init? | RequestInit |
Returns ​
Promise<Response>
fetchTimeoutMs? ​
optional fetchTimeoutMs?: number;Defined in: src/electron/webPatcher.ts:32
Per request. Default 15 000 ms.
keepPrevious? ​
optional keepPrevious?: boolean;Defined in: src/electron/webPatcher.ts:26
Fall back to the last web that booted, rather than the built-in one, when a new web never boots. Default true.
log? ​
optional log?: (...args) => void;Defined in: src/electron/webPatcher.ts:36
Where a failure to read the patched webs is reported. Default console.error.
Parameters ​
| Parameter | Type |
|---|---|
...args | unknown[] |
Returns ​
void
maxTries? ​
optional maxTries?: number;Defined in: src/electron/webPatcher.ts:24
Starts an unconfirmed web gets before it is dropped. Default 2.
packaged? ​
optional packaged?: boolean;Defined in: src/electron/webPatcher.ts:22
False in a dev run: the built-in web is always loaded and nothing is read or tidied. Default true.
parallel? ​
optional parallel?: number;Defined in: src/electron/webPatcher.ts:30
Downloads at once. Default 6.
root ​
root: string;Defined in: src/electron/webPatcher.ts:12
Where patched webs are built and kept, e.g. join(app.getPath('userData'), 'web').
shell ​
shell: string | (() => string);Defined in: src/electron/webPatcher.ts:18
This shell's identity (shellId), or a function reckoning it on first use.