diff --git a/package.json b/package.json index 56dee7cf669..15c32f791bc 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "docs:prebuild": "docker build -t mkdocs-dockerfile -f mkdocs-dockerfile . ", "docs:build": "pnpm compile && node scripts/renderer/out/typedoc2html.js", "docs:mkdocs": "docker run --rm -v ${PWD}:/docs -v ${PWD}/site:/site mkdocs-dockerfile build", + "docs:preview": "open ./site/index.html", "docs:all": "pnpm docs:prebuild && pnpm docs:build && pnpm docs:mkdocs", "prepare": "husky install" }, diff --git a/packages/app-builder-lib/src/configuration.ts b/packages/app-builder-lib/src/configuration.ts index b0a37aac546..edf5556cd9e 100644 --- a/packages/app-builder-lib/src/configuration.ts +++ b/packages/app-builder-lib/src/configuration.ts @@ -406,8 +406,10 @@ export interface FuseOptionsV1 { /** * The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive. * Currently, ASAR integrity checking is supported on: - * - macOS as of electron>=16.0.0 - * - Windows as of electron>=30.0.0 + * + * - macOS as of electron>=16.0.0 + * - Windows as of electron>=30.0.0 + * * For more information on how to use asar integrity validation please read the [Asar Integrity](https://github.com/electron/electron/blob/main/docs/tutorial/asar-integrity.md) documentation. */ enableEmbeddedAsarIntegrityValidation?: boolean @@ -422,9 +424,10 @@ export interface FuseOptionsV1 { /** * The grantFileProtocolExtraPrivileges fuse changes whether pages loaded from the `file://` protocol are given privileges beyond what they would receive in a traditional web browser. This behavior was core to Electron apps in original versions of Electron but is no longer required as apps should be [serving local files from custom protocols](https://github.com/electron/electron/blob/main/docs/tutorial/security.md#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) now instead. If you aren't serving pages from `file://` you should disable this fuse. * The extra privileges granted to the `file://` protocol by this fuse are incompletely documented below: - * - `file://` protocol pages can use `fetch` to load other assets over `file://` - * - `file://` protocol pages can use service workers - * - `file://` protocol pages have universal access granted to child frames also running on `file://` protocols regardless of sandbox settings + * + * - `file://` protocol pages can use `fetch` to load other assets over `file://` + * - `file://` protocol pages can use service workers + * - `file://` protocol pages have universal access granted to child frames also running on `file://` protocols regardless of sandbox settings */ grantFileProtocolExtraPrivileges?: boolean /** diff --git a/pages/tutorials/adding-electron-fuses.md b/pages/tutorials/adding-electron-fuses.md index 5f79c382d29..6c5b9415deb 100644 --- a/pages/tutorials/adding-electron-fuses.md +++ b/pages/tutorials/adding-electron-fuses.md @@ -13,9 +13,9 @@ Under-the-hood, electron-builder leverages the official [`@electron/fuses`](http ### Example !!! note - The true/false below are just an example, customize your configuration to your own requirements + The true/false below are just an example, customize your configuration to your own requirements -```js +```typescript electronFuses: { runAsNode: false, enableCookieEncryption: true, @@ -34,17 +34,17 @@ This convience method was opened so that custom FuseConfig's could be provided, !!! example "afterPack.ts" ```typescript - const { FuseConfig, FuseVersion } = require("@electron/fuses") - - exports.default = function (context: AfterPackContext) { - const fuses: FuseConfig = { - version: FuseVersion.V1, - strictlyRequireAllFuses: true, - [FuseV1Options.RunAsNode]: false, - ... // all other flags must be specified since `strictlyRequireAllFuses = true` - } - await context.packager.addElectronFuses(context, fuses) - } +const { FuseConfig, FuseVersion, FuseV1Options } = require("@electron/fuses") + +exports.default = function (context: AfterPackContext) { + const fuses: FuseConfig = { + version: FuseVersion.V1, + strictlyRequireAllFuses: true, + [FuseV1Options.RunAsNode]: false, + ... // all other flags must be specified since `strictlyRequireAllFuses = true` + } + await context.packager.addElectronFuses(context, fuses) +} ``` ## Validating Fuses @@ -55,4 +55,5 @@ You can validate the fuses have been flipped or check the fuse status of an arbi npx @electron/fuses read --app /Applications/Foo.app ``` +## Typedoc {!./app-builder-lib.Interface.FuseOptionsV1.md!} \ No newline at end of file