-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathconfig.ts
36 lines (33 loc) · 1.12 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
export enum FuseVersion {
V1 = '1',
}
/**
* Maps config keys to their index in the fuse wire
*/
export enum FuseV1Options {
RunAsNode = 0,
EnableCookieEncryption = 1,
EnableNodeOptionsEnvironmentVariable = 2,
EnableNodeCliInspectArguments = 3,
EnableEmbeddedAsarIntegrityValidation = 4,
OnlyLoadAppFromAsar = 5,
LoadBrowserProcessSpecificV8Snapshot = 6,
GrantFileProtocolExtraPrivileges = 7,
}
export type FuseV1Config<T = boolean> = {
version: FuseVersion.V1;
resetAdHocDarwinSignature?: boolean;
/**
* Ensures that all fuses in the fuse wire being set have been defined to a set value
* by the provided config. Set this to true to ensure you don't accidentally miss a
* fuse being added in future Electron upgrades.
*
* This option may default to "true" in a future version of @electron/fuses but currently
* defaults to "false"
*/
strictlyRequireAllFuses?: boolean;
} & (
| (Partial<Record<FuseV1Options, T>> & { strictlyRequireAllFuses?: false | undefined })
| (Record<FuseV1Options, T> & { strictlyRequireAllFuses: true })
);
export type FuseConfig<T = boolean> = FuseV1Config<T>;