-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelectron-builder.json5
More file actions
104 lines (104 loc) · 4.04 KB
/
Copy pathelectron-builder.json5
File metadata and controls
104 lines (104 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// @see - https://www.electron.build/configuration/configuration
{
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
"appId": "com.goworks.app",
"asar": true,
// better-sqlite3 13 is an N-API addon and ships prebuilt binaries for every
// target in `prebuilds/`; its loader (lib/binding.js) reads that directory and
// never looks at `build/Release`. A rebuild here would compile from source for
// minutes and produce a binary nothing loads. It is the only native runtime
// dependency, so the rebuild step has nothing left to do.
"npmRebuild": false,
// Secret guard runs as part of packaging, so `npx electron-builder` cannot
// skip it the way the npm-script-only wiring could.
"beforePack": "./build/secret-guard.cjs",
"afterPack": "./build/secret-guard.cjs",
"afterSign": "./afterSign.cjs",
"productName": "GoWorks",
"directories": {
"output": "release/${version}"
},
"files": [
"dist",
"dist-electron",
// Third-party documentation is never read at runtime, and it is full of
// example credentials — dotenv's README demonstrates multiline env vars with
// a "-----BEGIN RSA PRIVATE KEY-----" block, which the secret guard correctly
// refuses to let into an installer. Dropping the docs removes that whole false
// positive class (and shrinks the installer) rather than teaching the guard to
// ignore things, which would blunt it.
"!node_modules/**/*.{md,markdown}",
// better-sqlite3 13 ships a prebuilt N-API binary for all eight targets
// (~16 MB). Only the one matching the build is ever loaded, and GoWorks
// targets macOS and Windows, so the four Linux builds (~9 MB) are pure dead
// weight. The remaining cross-OS pair (~4 MB) stays: dropping it needs a
// per-platform `files` array, and a platform-specific `files` REPLACES this
// list rather than merging with it — losing the dist/dist-electron allowlist
// and pulling all of node_modules into app.asar (measured: 2.0 GB).
"!node_modules/better-sqlite3/prebuilds/linux*"
],
"extraResources": [
{
"from": "electron/db/schema.sql",
"to": "db/schema.sql"
}
],
"asarUnpack": [
"node_modules/googleapis/**",
"node_modules/google-auth-library/**",
"node_modules/gaxios/**",
"node_modules/gcp-metadata/**",
"node_modules/google-logging-utils/**",
"node_modules/better-sqlite3/**",
"node_modules/bindings/**",
"node_modules/file-uri-to-path/**"
],
// Auto-update is fully removed (no electron-updater, manual distribution).
// Explicit null disables electron-builder's GitHub auto-detect (from the
// package.json `repository` field), so no latest*.yml update metadata is written.
"publish": null,
"mac": {
"target": [
"dmg"
],
"icon": "build/icon.png",
"artifactName": "${productName}-Mac-${version}-Installer.${ext}",
"identity": "-",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist"
},
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
}
],
"icon": "build/icon.png",
"artifactName": "${productName}-Windows-${version}-Setup.${ext}"
},
"nsis": {
"oneClick": true,
"perMachine": false,
// Uninstall prompts the user whether to also wipe userData (vault + DB + logs);
// see build/installer.nsh (customUnInstall). Kept false so the wipe is opt-in.
"deleteAppDataOnUninstall": false,
"include": "build/installer.nsh",
// No differential updates → no Windows .blockmap.
"differentialPackage": false
},
"dmg": {
// No differential updates → no Mac .blockmap (also skips latest-mac.yml).
"writeUpdateInfo": false
},
"linux": {
"target": [
"AppImage"
],
"artifactName": "${productName}-Linux-${version}.${ext}"
}
}