Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@
"appId": "org.jtklein.raxmlGUI2",
"productName": "raxmlGUI",
"afterSign": "./scripts/notarize.js",
"electronFuses": {
"runAsNode": false,
"enableCookieEncryption": true,
"enableNodeOptionsEnvironmentVariable": false,
"enableNodeCliInspectArguments": false,
"enableEmbeddedAsarIntegrityValidation": true,
"onlyLoadAppFromAsar": true
},
"extends": null,
"directories": {
"buildResources": "public",
Expand Down
13 changes: 12 additions & 1 deletion src/pack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from 'path';

import { getConfig } from 'app-builder-lib/out/util/config/config';
import type { FileSet } from 'app-builder-lib';
import { scripts } from '../package.json';
import { build, scripts } from '../package.json';

// electron-builder does not declare its pack matchers, so they load untyped.
const { getMainFileMatchers, getNodeModuleFileMatcher } = require( 'app-builder-lib/out/fileMatcher' );
Expand Down Expand Up @@ -101,6 +101,17 @@ it( 'packs the built shell and the production dependencies', async () => {
] );
} );

it( 'sets the Electron Fuses of the packaged app', () => {
expect( build.electronFuses ).toEqual( {
runAsNode: false,
enableCookieEncryption: true,
enableNodeOptionsEnvironmentVariable: false,
enableNodeCliInspectArguments: false,
enableEmbeddedAsarIntegrityValidation: true,
onlyLoadAppFromAsar: true,
} );
} );

it( 'pack scripts build the shell, then run electron-builder', () => {
expect( scripts.build ).toBe( 'electron-vite build' );

Expand Down
Loading