Skip to content

Commit

Permalink
update docs and add additional pnpm docs:preview for easy local pre…
Browse files Browse the repository at this point in the history
…viewing of generated docs site
  • Loading branch information
mmaietta committed Oct 12, 2024
1 parent 957e02a commit 523fe4c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
13 changes: 8 additions & 5 deletions packages/app-builder-lib/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
/**
Expand Down
27 changes: 14 additions & 13 deletions pages/tutorials/adding-electron-fuses.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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!}

0 comments on commit 523fe4c

Please # to comment.