Skip to content

1681-engine / electron / WebPatcherOptions

Interface: WebPatcherOptions ​

Defined in: src/electron/webPatcher.ts:10

How a WebPatcher finds its webs and its store.

Properties ​

appVersion ​

ts
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 ​

ts
builtinDir: string;

Defined in: src/electron/webPatcher.ts:14

The web the installed build ships (the folder holding its index.html).


channelUrl ​

ts
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? ​

ts
optional entry?: string;

Defined in: src/electron/webPatcher.ts:28

The page file in a web. Default index.html.


fetch? ​

ts
optional fetch?: {
  (input, init?): Promise<Response>;
  (input, init?): Promise<Response>;
};

Defined in: src/electron/webPatcher.ts:34

Default globalThis.fetch.

Call Signature ​

ts
(input, init?): Promise<Response>;

MDN Reference

Parameters ​
ParameterType
inputURL | RequestInfo
init?RequestInit
Returns ​

Promise<Response>

Call Signature ​

ts
(input, init?): Promise<Response>;

MDN Reference

Parameters ​
ParameterType
inputstring | URL | Request
init?RequestInit
Returns ​

Promise<Response>


fetchTimeoutMs? ​

ts
optional fetchTimeoutMs?: number;

Defined in: src/electron/webPatcher.ts:32

Per request. Default 15 000 ms.


keepPrevious? ​

ts
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? ​

ts
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 ​

ParameterType
...argsunknown[]

Returns ​

void


maxTries? ​

ts
optional maxTries?: number;

Defined in: src/electron/webPatcher.ts:24

Starts an unconfirmed web gets before it is dropped. Default 2.


packaged? ​

ts
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? ​

ts
optional parallel?: number;

Defined in: src/electron/webPatcher.ts:30

Downloads at once. Default 6.


root ​

ts
root: string;

Defined in: src/electron/webPatcher.ts:12

Where patched webs are built and kept, e.g. join(app.getPath('userData'), 'web').


shell ​

ts
shell: string | (() => string);

Defined in: src/electron/webPatcher.ts:18

This shell's identity (shellId), or a function reckoning it on first use.

Released under the MIT License.