Skip to content

Commit

Permalink
feat: add fuse for custom v8 snapshot path on browser process
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Aug 29, 2022
1 parent d69eb9c commit 1ce478f
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.LoadV8SnapshotFromCustomPath]: true, // Loads V8 Snapshot from `custom_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,
LoadV8SnapshotFromCustomPath = 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.LoadV8SnapshotFromCustomPath]),
];
};

Expand Down

0 comments on commit 1ce478f

Please sign in to comment.