Skip to content

Commit

Permalink
feat: add fuse for custom v8 snapshot path on browser process (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Sep 22, 2022
1 parent b460c20 commit 51724d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ await flipFuses(
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // Disables the NODE_OPTIONS environment variable
[FuseV1Options.EnableNodeCliInspectArguments]: false, // Disables the --inspect and --inspect-brk family of ClI options
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, // Enables validation of the app.asar archive on macOS
[FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of it's normall search paths
[FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of it's normal search paths
[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true, // Loads V8 Snapshot from `browser_v8_context_snapshot.bin` for the browser process
},
);
```
Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export enum FuseV1Options {
EnableNodeCliInspectArguments = 3,
EnableEmbeddedAsarIntegrityValidation = 4,
OnlyLoadAppFromAsar = 5,
LoadBrowserProcessSpecificV8Snapshot = 6,
}

export type FuseV1Config<T = boolean> = {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const buildFuseV1Wire = (config: FuseV1Config, wireLength: number) => {
state(config[FuseV1Options.EnableNodeCliInspectArguments]),
state(config[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]),
state(config[FuseV1Options.OnlyLoadAppFromAsar]),
state(config[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]),
];
};

Expand Down

0 comments on commit 51724d9

Please sign in to comment.