electron-builder 26.15.2 → 27.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +1 -2
- package/{out → dist}/builder.d.ts +1 -0
- package/dist/builder.d.ts.map +1 -0
- package/{out → dist}/builder.js +33 -36
- package/dist/builder.js.map +1 -0
- package/{out → dist}/cli/clear-cache.d.ts +1 -0
- package/dist/cli/clear-cache.d.ts.map +1 -0
- package/dist/cli/clear-cache.js +43 -0
- package/dist/cli/clear-cache.js.map +1 -0
- package/{out → dist}/cli/cli-util.d.ts +1 -0
- package/dist/cli/cli-util.d.ts.map +1 -0
- package/dist/cli/cli-util.js +36 -0
- package/dist/cli/cli-util.js.map +1 -0
- package/dist/cli/cli.d.ts +3 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/cli/cli.js +38 -0
- package/dist/cli/cli.js.map +1 -0
- package/{out → dist}/cli/create-self-signed-cert.d.ts +1 -0
- package/dist/cli/create-self-signed-cert.d.ts.map +1 -0
- package/dist/cli/create-self-signed-cert.js +37 -0
- package/dist/cli/create-self-signed-cert.js.map +1 -0
- package/dist/cli/install-app-deps.d.ts +3 -0
- package/dist/cli/install-app-deps.d.ts.map +1 -0
- package/dist/cli/install-app-deps.js +66 -0
- package/dist/cli/install-app-deps.js.map +1 -0
- package/dist/cli/migrate-schema.d.ts +19 -0
- package/dist/cli/migrate-schema.d.ts.map +1 -0
- package/dist/cli/migrate-schema.js +428 -0
- package/dist/cli/migrate-schema.js.map +1 -0
- package/dist/cli/start.d.ts +2 -0
- package/dist/cli/start.d.ts.map +1 -0
- package/dist/cli/start.js +8 -0
- package/dist/cli/start.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/indexInternal.d.ts +1 -0
- package/dist/indexInternal.d.ts.map +1 -0
- package/dist/indexInternal.js +3 -0
- package/dist/indexInternal.js.map +1 -0
- package/{out → dist}/publish.d.ts +2 -1
- package/dist/publish.d.ts.map +1 -0
- package/{out → dist}/publish.js +24 -30
- package/dist/publish.js.map +1 -0
- package/install-app-deps.js +1 -2
- package/package.json +29 -10
- package/out/builder.js.map +0 -1
- package/out/cli/clear-cache.js +0 -46
- package/out/cli/clear-cache.js.map +0 -1
- package/out/cli/cli-util.js +0 -39
- package/out/cli/cli-util.js.map +0 -1
- package/out/cli/cli.d.ts +0 -2
- package/out/cli/cli.js +0 -39
- package/out/cli/cli.js.map +0 -1
- package/out/cli/create-self-signed-cert.js +0 -41
- package/out/cli/create-self-signed-cert.js.map +0 -1
- package/out/cli/install-app-deps.d.ts +0 -2
- package/out/cli/install-app-deps.js +0 -71
- package/out/cli/install-app-deps.js.map +0 -1
- package/out/cli/start.d.ts +0 -1
- package/out/cli/start.js +0 -9
- package/out/cli/start.js.map +0 -1
- package/out/index.d.ts +0 -6
- package/out/index.js +0 -30
- package/out/index.js.map +0 -1
- package/out/publish.js.map +0 -1
package/cli.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,eAAe,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACjH,OAAO,EAAY,IAAI,EAAkB,MAAM,cAAc,CAAA;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,wBAAgB,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAQjD;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe,EAAE,cAAc;CAAG;AAExE,MAAM,WAAW,UAAW,SAAQ,eAAe,EAAE,cAAc;IACjE,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,GAAG,CAAC,EAAE,OAAO,CAAA;CACd;AAED,eAAe;AACf,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CAgJ/D;AAiBD,eAAe;AACf,wBAAgB,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAK1C;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAa7I;AAED,wBAAgB,KAAK,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAGrE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAiFnE"}
|
package/{out → dist}/builder.js
RENAMED
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const yargs = require("yargs");
|
|
14
|
-
function createYargs() {
|
|
15
|
-
return yargs.parserConfiguration({
|
|
1
|
+
import { build as _build, DIR_TARGET, Packager, Platform } from "app-builder-lib";
|
|
2
|
+
import { addValue, Arch, archFromString } from "builder-util";
|
|
3
|
+
import { deepAssign } from "builder-util-runtime";
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import { hideBin } from "yargs/helpers";
|
|
6
|
+
import * as yargs from "yargs";
|
|
7
|
+
export function createYargs() {
|
|
8
|
+
// In ESM, yargs.default is the factory function; call it to create an instance.
|
|
9
|
+
// In CJS, yargs.default is already an Argv singleton.
|
|
10
|
+
const factory = yargs.default ?? yargs;
|
|
11
|
+
const instance = typeof factory?.parserConfiguration === "function" ? factory : factory(hideBin(process.argv));
|
|
12
|
+
return instance.parserConfiguration({
|
|
16
13
|
"camel-case-expansion": false,
|
|
17
14
|
});
|
|
18
15
|
}
|
|
19
16
|
/** @private */
|
|
20
|
-
function normalizeOptions(args) {
|
|
17
|
+
export function normalizeOptions(args) {
|
|
21
18
|
if (args.targets != null) {
|
|
22
19
|
return args;
|
|
23
20
|
}
|
|
@@ -26,21 +23,21 @@ function normalizeOptions(args) {
|
|
|
26
23
|
function commonArch(currentIfNotSpecified) {
|
|
27
24
|
const result = Array();
|
|
28
25
|
if (args.x64) {
|
|
29
|
-
result.push(
|
|
26
|
+
result.push(Arch.x64);
|
|
30
27
|
}
|
|
31
28
|
if (args.armv7l) {
|
|
32
|
-
result.push(
|
|
29
|
+
result.push(Arch.armv7l);
|
|
33
30
|
}
|
|
34
31
|
if (args.arm64) {
|
|
35
|
-
result.push(
|
|
32
|
+
result.push(Arch.arm64);
|
|
36
33
|
}
|
|
37
34
|
if (args.ia32) {
|
|
38
|
-
result.push(
|
|
35
|
+
result.push(Arch.ia32);
|
|
39
36
|
}
|
|
40
37
|
if (args.universal) {
|
|
41
|
-
result.push(
|
|
38
|
+
result.push(Arch.universal);
|
|
42
39
|
}
|
|
43
|
-
return result.length === 0 && currentIfNotSpecified ? [
|
|
40
|
+
return result.length === 0 && currentIfNotSpecified ? [archFromString(process.arch)] : result;
|
|
44
41
|
}
|
|
45
42
|
let archToType = targets.get(platform);
|
|
46
43
|
if (archToType == null) {
|
|
@@ -48,7 +45,7 @@ function normalizeOptions(args) {
|
|
|
48
45
|
targets.set(platform, archToType);
|
|
49
46
|
}
|
|
50
47
|
if (types.length === 0) {
|
|
51
|
-
const defaultTargetValue = args.dir ? [
|
|
48
|
+
const defaultTargetValue = args.dir ? [DIR_TARGET] : [];
|
|
52
49
|
for (const arch of commonArch(args.dir === true)) {
|
|
53
50
|
archToType.set(arch, defaultTargetValue);
|
|
54
51
|
}
|
|
@@ -57,26 +54,26 @@ function normalizeOptions(args) {
|
|
|
57
54
|
for (const type of types) {
|
|
58
55
|
const suffixPos = type.lastIndexOf(":");
|
|
59
56
|
if (suffixPos > 0) {
|
|
60
|
-
|
|
57
|
+
addValue(archToType, archFromString(type.substring(suffixPos + 1)), type.substring(0, suffixPos));
|
|
61
58
|
}
|
|
62
59
|
else {
|
|
63
60
|
for (const arch of commonArch(true)) {
|
|
64
|
-
|
|
61
|
+
addValue(archToType, arch, type);
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
}
|
|
68
65
|
}
|
|
69
66
|
if (args.mac != null) {
|
|
70
|
-
processTargets(
|
|
67
|
+
processTargets(Platform.MAC, args.mac);
|
|
71
68
|
}
|
|
72
69
|
if (args.linux != null) {
|
|
73
|
-
processTargets(
|
|
70
|
+
processTargets(Platform.LINUX, args.linux);
|
|
74
71
|
}
|
|
75
72
|
if (args.win != null) {
|
|
76
|
-
processTargets(
|
|
73
|
+
processTargets(Platform.WINDOWS, args.win);
|
|
77
74
|
}
|
|
78
75
|
if (targets.size === 0) {
|
|
79
|
-
processTargets(
|
|
76
|
+
processTargets(Platform.current(), []);
|
|
80
77
|
}
|
|
81
78
|
const result = { ...args };
|
|
82
79
|
result.targets = targets;
|
|
@@ -110,7 +107,7 @@ function normalizeOptions(args) {
|
|
|
110
107
|
const newConfig = {};
|
|
111
108
|
for (const configItem of config) {
|
|
112
109
|
if (typeof configItem === "object") {
|
|
113
|
-
|
|
110
|
+
deepAssign(newConfig, configItem);
|
|
114
111
|
}
|
|
115
112
|
else if (typeof configItem === "string") {
|
|
116
113
|
newConfig.extends = configItem;
|
|
@@ -161,16 +158,16 @@ function coerceValue(host, key) {
|
|
|
161
158
|
}
|
|
162
159
|
}
|
|
163
160
|
/** @private */
|
|
164
|
-
function coerceTypes(host) {
|
|
161
|
+
export function coerceTypes(host) {
|
|
165
162
|
for (const key of Object.getOwnPropertyNames(host)) {
|
|
166
163
|
coerceValue(host, key);
|
|
167
164
|
}
|
|
168
165
|
return host;
|
|
169
166
|
}
|
|
170
|
-
function createTargets(platforms, type, arch) {
|
|
167
|
+
export function createTargets(platforms, type, arch) {
|
|
171
168
|
const targets = new Map();
|
|
172
169
|
for (const platform of platforms) {
|
|
173
|
-
const archs = arch === "all" ? (platform ===
|
|
170
|
+
const archs = arch === "all" ? (platform === Platform.MAC ? [Arch.x64, Arch.arm64, Arch.universal] : [Arch.x64, Arch.ia32]) : [archFromString(arch == null ? process.arch : arch)];
|
|
174
171
|
const archToType = new Map();
|
|
175
172
|
targets.set(platform, archToType);
|
|
176
173
|
for (const arch of archs) {
|
|
@@ -179,14 +176,14 @@ function createTargets(platforms, type, arch) {
|
|
|
179
176
|
}
|
|
180
177
|
return targets;
|
|
181
178
|
}
|
|
182
|
-
function build(rawOptions) {
|
|
179
|
+
export function build(rawOptions) {
|
|
183
180
|
const buildOptions = normalizeOptions(rawOptions || {});
|
|
184
|
-
return (
|
|
181
|
+
return _build(buildOptions, new Packager(buildOptions));
|
|
185
182
|
}
|
|
186
183
|
/**
|
|
187
184
|
* @private
|
|
188
185
|
*/
|
|
189
|
-
function configureBuildCommand(yargs) {
|
|
186
|
+
export function configureBuildCommand(yargs) {
|
|
190
187
|
const publishGroup = "Publishing:";
|
|
191
188
|
const buildGroup = "Building:";
|
|
192
189
|
return yargs
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAiB,UAAU,EAAE,QAAQ,EAAmB,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACjH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;A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,+BAA+B,EAAE,wBAAwB,CAAC;SAClE,OAAO,CAAC,2CAA2C,EAAE,0CAA0C,CAAC;SAChG,OAAO,CAAC,8CAA8C,EAAE,oCAAoC,CAAC,CAAA;AAClG,CAAC","sourcesContent":["import { build as _build, Configuration, DIR_TARGET, Packager, PackagerOptions, Platform } from \"app-builder-lib\"\nimport { addValue, Arch, archFromString } from \"builder-util\"\nimport { deepAssign } from \"builder-util-runtime\"\nimport chalk from \"chalk\"\nimport { PublishOptions } from \"electron-publish\"\nimport { hideBin } from \"yargs/helpers\"\nimport * as yargs from \"yargs\"\n\nexport function createYargs(): yargs.Argv<unknown> {\n // In ESM, yargs.default is the factory function; call it to create an instance.\n // In CJS, yargs.default is already an Argv singleton.\n const factory = (yargs as any).default ?? yargs\n const instance = typeof factory?.parserConfiguration === \"function\" ? factory : factory(hideBin(process.argv))\n return (instance as unknown as yargs.Argv<unknown>).parserConfiguration({\n \"camel-case-expansion\": false,\n })\n}\n\nexport interface BuildOptions extends PackagerOptions, PublishOptions {}\n\nexport interface CliOptions extends PackagerOptions, PublishOptions {\n x64?: boolean\n ia32?: boolean\n armv7l?: boolean\n arm64?: boolean\n universal?: boolean\n\n dir?: boolean\n}\n\n/** @private */\nexport function normalizeOptions(args: CliOptions): BuildOptions {\n if (args.targets != null) {\n return args\n }\n\n const targets = new Map<Platform, Map<Arch, Array<string>>>()\n\n function processTargets(platform: Platform, types: Array<string>) {\n function commonArch(currentIfNotSpecified: boolean): Array<Arch> {\n const result = Array<Arch>()\n if (args.x64) {\n result.push(Arch.x64)\n }\n if (args.armv7l) {\n result.push(Arch.armv7l)\n }\n if (args.arm64) {\n result.push(Arch.arm64)\n }\n if (args.ia32) {\n result.push(Arch.ia32)\n }\n if (args.universal) {\n result.push(Arch.universal)\n }\n\n return result.length === 0 && currentIfNotSpecified ? [archFromString(process.arch)] : result\n }\n\n let archToType = targets.get(platform)\n if (archToType == null) {\n archToType = new Map<Arch, Array<string>>()\n targets.set(platform, archToType)\n }\n\n if (types.length === 0) {\n const defaultTargetValue = args.dir ? [DIR_TARGET] : []\n for (const arch of commonArch(args.dir === true)) {\n archToType.set(arch, defaultTargetValue)\n }\n return\n }\n\n for (const type of types) {\n const suffixPos = type.lastIndexOf(\":\")\n if (suffixPos > 0) {\n addValue(archToType, archFromString(type.substring(suffixPos + 1)), type.substring(0, suffixPos))\n } else {\n for (const arch of commonArch(true)) {\n addValue(archToType, arch, type)\n }\n }\n }\n }\n\n if (args.mac != null) {\n processTargets(Platform.MAC, args.mac)\n }\n\n if (args.linux != null) {\n processTargets(Platform.LINUX, args.linux)\n }\n\n if (args.win != null) {\n processTargets(Platform.WINDOWS, args.win)\n }\n\n if (targets.size === 0) {\n processTargets(Platform.current(), [])\n }\n\n const result: any = { ...args }\n result.targets = targets\n\n delete result.dir\n delete result.mac\n delete result.linux\n delete result.win\n\n const r = result\n delete r.m\n delete r.o\n delete r.l\n delete r.w\n delete r.windows\n delete r.macos\n delete r.$0\n delete r._\n delete r.version\n delete r.help\n delete r.c\n delete r.p\n delete r.pd\n\n delete result.ia32\n delete result.x64\n delete result.armv7l\n delete result.arm64\n delete result.universal\n\n let config = result.config\n\n // config is array when combining dot-notation values with a config file value\n // https://github.com/electron-userland/electron-builder/issues/2016\n if (Array.isArray(config)) {\n const newConfig: Configuration = {}\n for (const configItem of config) {\n if (typeof configItem === \"object\") {\n deepAssign(newConfig, configItem)\n } else if (typeof configItem === \"string\") {\n newConfig.extends = configItem\n }\n }\n\n config = newConfig\n result.config = newConfig\n }\n\n // AJV cannot coerce \"null\" string to null if string is also allowed (because null string is a valid value)\n if (config != null && typeof config !== \"string\") {\n if (config.extraMetadata != null) {\n coerceTypes(config.extraMetadata)\n }\n\n // ability to disable code sign using -c.mac.identity=null\n if (config.mac != null) {\n coerceValue(config.mac, \"identity\")\n }\n\n // fix Boolean type by coerceTypes\n if (config.nsis != null) {\n coerceTypes(config.nsis)\n }\n if (config.nsisWeb != null) {\n coerceTypes(config.nsisWeb)\n }\n }\n\n if (\"project\" in r && !(\"projectDir\" in result)) {\n result.projectDir = r.project\n }\n delete r.project\n\n return result as BuildOptions\n}\n\nfunction coerceValue(host: any, key: string): void {\n const value = host[key]\n if (value === \"true\") {\n host[key] = true\n } else if (value === \"false\") {\n host[key] = false\n } else if (value === \"null\") {\n host[key] = null\n } else if (key === \"version\" && typeof value === \"number\") {\n host[key] = value.toString()\n } else if (value != null && typeof value === \"object\") {\n coerceTypes(value)\n }\n}\n\n/** @private */\nexport function coerceTypes(host: any): any {\n for (const key of Object.getOwnPropertyNames(host)) {\n coerceValue(host, key)\n }\n return host\n}\n\nexport function createTargets(platforms: Array<Platform>, type?: string | null, arch?: string | null): Map<Platform, Map<Arch, Array<string>>> {\n const targets = new Map<Platform, Map<Arch, Array<string>>>()\n for (const platform of platforms) {\n const archs =\n arch === \"all\" ? (platform === Platform.MAC ? [Arch.x64, Arch.arm64, Arch.universal] : [Arch.x64, Arch.ia32]) : [archFromString(arch == null ? process.arch : arch)]\n const archToType = new Map<Arch, Array<string>>()\n targets.set(platform, archToType)\n\n for (const arch of archs) {\n archToType.set(arch, type == null ? [] : [type])\n }\n }\n return targets\n}\n\nexport function build(rawOptions?: CliOptions): Promise<Array<string>> {\n const buildOptions = normalizeOptions(rawOptions || {})\n return _build(buildOptions, new Packager(buildOptions))\n}\n\n/**\n * @private\n */\nexport function configureBuildCommand(yargs: yargs.Argv): yargs.Argv {\n const publishGroup = \"Publishing:\"\n const buildGroup = \"Building:\"\n return yargs\n .option(\"mac\", {\n group: buildGroup,\n alias: [\"m\", \"o\", \"macos\"],\n description: `Build for macOS, accepts target list (see ${chalk.underline(\"https://www.electron.build/mac\")}).`,\n type: \"array\",\n })\n .option(\"linux\", {\n group: buildGroup,\n alias: \"l\",\n description: `Build for Linux, accepts target list (see ${chalk.underline(\"https://www.electron.build/linux\")})`,\n type: \"array\",\n })\n .option(\"win\", {\n group: buildGroup,\n alias: [\"w\", \"windows\"],\n description: `Build for Windows, accepts target list (see ${chalk.underline(\"https://www.electron.build/win\")})`,\n type: \"array\",\n })\n .option(\"x64\", {\n group: buildGroup,\n description: \"Build for x64\",\n type: \"boolean\",\n })\n .option(\"ia32\", {\n group: buildGroup,\n description: \"Build for ia32\",\n type: \"boolean\",\n })\n .option(\"armv7l\", {\n group: buildGroup,\n description: \"Build for armv7l\",\n type: \"boolean\",\n })\n .option(\"arm64\", {\n group: buildGroup,\n description: \"Build for arm64\",\n type: \"boolean\",\n })\n .option(\"universal\", {\n group: buildGroup,\n description: \"Build for universal\",\n type: \"boolean\",\n })\n .option(\"dir\", {\n group: buildGroup,\n description: \"Build unpacked dir. Useful to test.\",\n type: \"boolean\",\n })\n .option(\"publish\", {\n group: publishGroup,\n alias: \"p\",\n description: `Publish artifacts, see ${chalk.underline(\"https://www.electron.build/publish\")}`,\n choices: [\"onTag\", \"onTagOrDraft\", \"always\", \"never\", undefined as any],\n })\n .option(\"prepackaged\", {\n alias: [\"pd\"],\n group: buildGroup,\n description: \"The path to prepackaged app (to pack in a distributable format)\",\n })\n .option(\"projectDir\", {\n alias: [\"project\"],\n group: buildGroup,\n description: \"The path to project directory. Defaults to current working directory.\",\n })\n .option(\"config\", {\n alias: [\"c\"],\n group: buildGroup,\n description:\n \"The path to an electron-builder config. Defaults to `electron-builder.yml` (or `json`, or `json5`, or `js`, or `ts`), see \" +\n chalk.underline(\"https://www.electron.build/configuration\"),\n })\n .group([\"help\", \"version\"], \"Other:\")\n .example(\"electron-builder -mwl\", \"build for macOS, Windows and Linux\")\n .example(\"electron-builder --linux deb tar.xz\", \"build deb and tar.xz for Linux\")\n .example(\"electron-builder --win --ia32\", \"build for Windows ia32\")\n .example(\"electron-builder -c.extraMetadata.foo=bar\", \"set package.json property `foo` to `bar`\")\n .example(\"electron-builder --config.nsis.unicode=false\", \"configure unicode options for NSIS\")\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-cache.d.ts","sourceRoot":"","sources":["../../src/cli/clear-cache.ts"],"names":[],"mappings":"AAMA,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAoChD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { getCacheDirectory } from "app-builder-lib/internal";
|
|
2
|
+
import { log } from "builder-util";
|
|
3
|
+
import { access, constants, rm } from "fs/promises";
|
|
4
|
+
import { createInterface } from "node:readline/promises";
|
|
5
|
+
import * as path from "path";
|
|
6
|
+
export async function clearCache() {
|
|
7
|
+
const cacheDir = getCacheDirectory({ isAvoidSystemOnWindows: false, allowEnvVarOverride: false });
|
|
8
|
+
if (cacheDir === path.parse(cacheDir).root) {
|
|
9
|
+
log.error({ cacheDir }, "cache directory resolves to a filesystem root — aborting");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
try {
|
|
13
|
+
await access(cacheDir, constants.F_OK | constants.W_OK);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
if (err.code === "ENOENT") {
|
|
17
|
+
log.info({ cacheDir }, "cache directory does not exist, nothing to clear");
|
|
18
|
+
}
|
|
19
|
+
else if (err.code === "EACCES" || err.code === "EPERM") {
|
|
20
|
+
log.error({ cacheDir }, "cache directory is not writable");
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
throw err;
|
|
24
|
+
}
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
28
|
+
let answer;
|
|
29
|
+
try {
|
|
30
|
+
answer = await rl.question(`Clear cache at ${cacheDir}? [y/N] `);
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
rl.close();
|
|
34
|
+
}
|
|
35
|
+
if (answer.trim().toLowerCase() !== "y" && answer.trim().toLowerCase() !== "yes") {
|
|
36
|
+
log.info(null, "aborted");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
log.info({ cacheDir }, "clearing cache");
|
|
40
|
+
await rm(cacheDir, { recursive: true });
|
|
41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AE,iCAAiC,CAAC,CAAA;QAC5D,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAA;QACX,CAAC;QACD,OAAM;IACR,CAAC;IAED,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAC5E,IAAI,MAAc,CAAA;IAClB,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,QAAQ,UAAU,CAAC,CAAA;IAClE,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAA;IACZ,CAAC;IACD,IAAI,MAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,GAAG,IAAI,MAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;QACnF,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QACzB,OAAM;IACR,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,CAAC,CAAA;IACxC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACvC,GAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,CAAC,CAAA;AACzC,CAAC","sourcesContent":["import { getCacheDirectory } from \"app-builder-lib/internal\"\nimport { log } from \"builder-util\"\nimport { access, constants, rm } from \"fs/promises\"\nimport { createInterface } from \"node:readline/promises\"\nimport * as path from \"path\"\n\nexport async function clearCache(): Promise<void> {\n const cacheDir = getCacheDirectory({ isAvoidSystemOnWindows: false, allowEnvVarOverride: false })\n\n if (cacheDir === path.parse(cacheDir).root) {\n log.error({ cacheDir }, \"cache directory resolves to a filesystem root — aborting\")\n return\n }\n\n try {\n await access(cacheDir, constants.F_OK | constants.W_OK)\n } catch (err: any) {\n if (err.code === \"ENOENT\") {\n log.info({ cacheDir }, \"cache directory does not exist, nothing to clear\")\n } else if (err.code === \"EACCES\" || err.code === \"EPERM\") {\n log.error({ cacheDir }, \"cache directory is not writable\")\n } else {\n throw err\n }\n return\n }\n\n const rl = createInterface({ input: process.stdin, output: process.stdout })\n let answer: string\n try {\n answer = await rl.question(`Clear cache at ${cacheDir}? [y/N] `)\n } finally {\n rl.close()\n }\n if (answer!.trim().toLowerCase() !== \"y\" && answer!.trim().toLowerCase() !== \"yes\") {\n log.info(null, \"aborted\")\n return\n }\n\n log.info({ cacheDir }, \"clearing cache\")\n await rm(cacheDir, { recursive: true })\n log.info({ cacheDir }, \"cache cleared\")\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-util.d.ts","sourceRoot":"","sources":["../../src/cli/cli-util.ts"],"names":[],"mappings":"AAQA,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAUrD;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,IAC5C,MAAM,GAAG,kBAelB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { loadEnv } from "app-builder-lib/internal";
|
|
2
|
+
import { ExecError, InvalidConfigurationError, log } from "builder-util";
|
|
3
|
+
import { isCI } from "ci-info";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
import _fsExtra from "fs-extra";
|
|
6
|
+
const { readJson } = _fsExtra;
|
|
7
|
+
export async function checkIsOutdated() {
|
|
8
|
+
if (isCI || process.env.NO_UPDATE_NOTIFIER != null) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const pkg = await readJson(path.join(import.meta.dirname, "..", "..", "package.json"));
|
|
12
|
+
if (pkg.version === "0.0.0-semantic-release") {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const { default: UpdateNotifier } = await import("simple-update-notifier");
|
|
16
|
+
await UpdateNotifier({ pkg });
|
|
17
|
+
}
|
|
18
|
+
export function wrap(task) {
|
|
19
|
+
return (args) => {
|
|
20
|
+
checkIsOutdated().catch((e) => log.warn({ error: e }, "cannot check updates"));
|
|
21
|
+
return loadEnv(path.join(process.cwd(), "electron-builder.env"))
|
|
22
|
+
.then(() => task(args))
|
|
23
|
+
.catch(error => {
|
|
24
|
+
process.exitCode = 1;
|
|
25
|
+
// https://github.com/electron-userland/electron-builder/issues/2940
|
|
26
|
+
process.on("exit", () => (process.exitCode = 1));
|
|
27
|
+
if (error instanceof InvalidConfigurationError) {
|
|
28
|
+
log.error(null, error.message);
|
|
29
|
+
}
|
|
30
|
+
else if (!(error instanceof ExecError) || !error.alreadyLogged) {
|
|
31
|
+
log.error({ failedTask: task.name, stackTrace: error.stack }, error.message);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=cli-util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-util.js","sourceRoot":"","sources":["../../src/cli/cli-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAA;AAE7B,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,IAAI,EAAE,CAAC;QACnD,OAAM;IACR,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CA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AK,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;YAC9E,CAAC;QACH,CAAC,CAAC,CAAA;IACN,CAAC,CAAA;AACH,CAAC","sourcesContent":["import { loadEnv } from \"app-builder-lib/internal\"\nimport { ExecError, InvalidConfigurationError, log } from \"builder-util\"\nimport { isCI } from \"ci-info\"\n\nimport * as path from \"path\"\nimport _fsExtra from \"fs-extra\"\nconst { readJson } = _fsExtra\n\nexport async function checkIsOutdated(): Promise<void> {\n if (isCI || process.env.NO_UPDATE_NOTIFIER != null) {\n return\n }\n const pkg = await readJson(path.join(import.meta.dirname, \"..\", \"..\", \"package.json\"))\n if (pkg.version === \"0.0.0-semantic-release\") {\n return\n }\n const { default: UpdateNotifier } = await import(\"simple-update-notifier\")\n await UpdateNotifier({ pkg })\n}\n\nexport function wrap(task: (args: any) => Promise<any>) {\n return (args: any) => {\n checkIsOutdated().catch((e: any) => log.warn({ error: e }, \"cannot check updates\"))\n return loadEnv(path.join(process.cwd(), \"electron-builder.env\"))\n .then(() => task(args))\n .catch(error => {\n process.exitCode = 1\n // https://github.com/electron-userland/electron-builder/issues/2940\n process.on(\"exit\", () => (process.exitCode = 1))\n if (error instanceof InvalidConfigurationError) {\n log.error(null, error.message)\n } else if (!(error instanceof ExecError) || !error.alreadyLogged) {\n log.error({ failedTask: task.name, stackTrace: error.stack }, error.message)\n }\n })\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli/cli.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
import { getElectronVersion, nodeGypRebuild } from "app-builder-lib/internal";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { build, configureBuildCommand, createYargs } from "../builder.js";
|
|
5
|
+
import { configurePublishCommand, publish } from "../publish.js";
|
|
6
|
+
import { clearCache } from "./clear-cache.js";
|
|
7
|
+
import { wrap } from "./cli-util.js";
|
|
8
|
+
import { createSelfSignedCert } from "./create-self-signed-cert.js";
|
|
9
|
+
import { configureInstallAppDepsCommand, installAppDeps } from "./install-app-deps.js";
|
|
10
|
+
import { configureMigrateSchemaCommand, migrateSchema } from "./migrate-schema.js";
|
|
11
|
+
import { start } from "./start.js";
|
|
12
|
+
// tslint:disable:no-unused-expression
|
|
13
|
+
void createYargs()
|
|
14
|
+
.command(["build", "*"], "Build", configureBuildCommand, wrap(build))
|
|
15
|
+
.command("install-app-deps", "Install app deps", configureInstallAppDepsCommand, wrap(installAppDeps))
|
|
16
|
+
.command("node-gyp-rebuild", "Rebuild own native code", configureInstallAppDepsCommand /* yes, args the same as for install app deps */, wrap(rebuildAppNativeCode))
|
|
17
|
+
.command("publish", "Publish a list of artifacts", configurePublishCommand, wrap(publish))
|
|
18
|
+
.command("create-self-signed-cert", "Create self-signed code signing cert for Windows apps", yargs => yargs
|
|
19
|
+
.option("publisher", {
|
|
20
|
+
alias: ["p"],
|
|
21
|
+
type: "string",
|
|
22
|
+
requiresArg: true,
|
|
23
|
+
description: "The publisher name",
|
|
24
|
+
})
|
|
25
|
+
.demandOption("publisher"), wrap(argv => createSelfSignedCert(argv.publisher)))
|
|
26
|
+
.command("start", "Run application in a development mode using electron-webpack", yargs => yargs, wrap(() => start()))
|
|
27
|
+
.command("clear-cache", "Clear the electron-builder default cache directory", yargs => yargs, wrap(() => clearCache()))
|
|
28
|
+
.command("migrate-schema", "Migrate build config from v26 to v27 format", configureMigrateSchemaCommand, wrap(migrateSchema))
|
|
29
|
+
.help()
|
|
30
|
+
.epilog(`See ${chalk.underline("https://electron.build")} for more documentation.`)
|
|
31
|
+
.strict()
|
|
32
|
+
.recommendCommands().argv;
|
|
33
|
+
async function rebuildAppNativeCode(args) {
|
|
34
|
+
const projectDir = process.cwd();
|
|
35
|
+
// this script must be used only for electron
|
|
36
|
+
return nodeGypRebuild(args.platform, args.arch, { version: await getElectronVersion(projectDir), useCustomDist: true });
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,sCAAsC;AACtC,KAAK,WAAW,EAAE;KACf,OAAO,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KACpE,OAAO,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,8BAA8B,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;KACrG,OAAO,CAAC,kBAAkB,EAAE,yBAAyB,EAAE,8BAA8B,CAAC,gDAAgD,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;KACnK,OAAO,CAAC,SAAS,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;KACzF,OAAO,CACN,yBAAyB,EACzB,uDAAuD,EACvD,KAAK,CAAC,EAAE,CACN,KAAK;KACF,MAAM,CAAC,WAAW,EAAE;IACnB,KAAK,EAAE,CAAC,GAAG,CAAC;IACZ,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,oBAAoB;CAClC,CAAC;KACD,YAAY,CAAC,WAAW,CAAC,EAC9B,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CACnD;KACA,OAAO,CACN,OAAO,EACP,8DAA8D,EAC9D,KAAK,CAAC,EAAE,CAAC,KAAK,EACd,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CACpB;KACA,OAAO,CACN,aAAa,EACb,oDAAoD,EACpD,KAAK,CAAC,EAAE,CAAC,KAAK,EACd,IAAI,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CACzB;KACA,OAAO,CAAC,gBAAgB,EAAE,6CAA6C,EAAE,6BAA6B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC5H,IAAI,EAAE;KACN,MAAM,CAAC,OAAO,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,0BAA0B,CAAC;KAClF,MAAM,EAAE;KACR,iBAAiB,EAAE,CAAC,IAAI,CAAA;AAE3B,KAAK,UAAU,oBAAoB,CAAC,IAAS;IAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IAChC,6CAA6C;IAC7C,OAAO,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC,UAAU,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AACzH,CAAC","sourcesContent":["#! /usr/bin/env node\n\nimport { getElectronVersion, nodeGypRebuild } from \"app-builder-lib/internal\"\nimport chalk from \"chalk\"\nimport { build, configureBuildCommand, createYargs } from \"../builder.js\"\nimport { configurePublishCommand, publish } from \"../publish.js\"\nimport { clearCache } from \"./clear-cache.js\"\nimport { wrap } from \"./cli-util.js\"\nimport { createSelfSignedCert } from \"./create-self-signed-cert.js\"\nimport { configureInstallAppDepsCommand, installAppDeps } from \"./install-app-deps.js\"\nimport { configureMigrateSchemaCommand, migrateSchema } from \"./migrate-schema.js\"\nimport { start } from \"./start.js\"\n\n// tslint:disable:no-unused-expression\nvoid createYargs()\n .command([\"build\", \"*\"], \"Build\", configureBuildCommand, wrap(build))\n .command(\"install-app-deps\", \"Install app deps\", configureInstallAppDepsCommand, wrap(installAppDeps))\n .command(\"node-gyp-rebuild\", \"Rebuild own native code\", configureInstallAppDepsCommand /* yes, args the same as for install app deps */, wrap(rebuildAppNativeCode))\n .command(\"publish\", \"Publish a list of artifacts\", configurePublishCommand, wrap(publish))\n .command(\n \"create-self-signed-cert\",\n \"Create self-signed code signing cert for Windows apps\",\n yargs =>\n yargs\n .option(\"publisher\", {\n alias: [\"p\"],\n type: \"string\",\n requiresArg: true,\n description: \"The publisher name\",\n })\n .demandOption(\"publisher\"),\n wrap(argv => createSelfSignedCert(argv.publisher))\n )\n .command(\n \"start\",\n \"Run application in a development mode using electron-webpack\",\n yargs => yargs,\n wrap(() => start())\n )\n .command(\n \"clear-cache\",\n \"Clear the electron-builder default cache directory\",\n yargs => yargs,\n wrap(() => clearCache())\n )\n .command(\"migrate-schema\", \"Migrate build config from v26 to v27 format\", configureMigrateSchemaCommand, wrap(migrateSchema))\n .help()\n .epilog(`See ${chalk.underline(\"https://electron.build\")} for more documentation.`)\n .strict()\n .recommendCommands().argv\n\nasync function rebuildAppNativeCode(args: any) {\n const projectDir = process.cwd()\n // this script must be used only for electron\n return nodeGypRebuild(args.platform, args.arch, { version: await getElectronVersion(projectDir), useCustomDist: true })\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-self-signed-cert.d.ts","sourceRoot":"","sources":["../../src/cli/create-self-signed-cert.ts"],"names":[],"mappings":"AAmCA,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAM7C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getWindowsKitsBundle } from "app-builder-lib/internal";
|
|
2
|
+
import { archFromString, exec, log, spawn, TmpDir, unlinkIfExists } from "builder-util";
|
|
3
|
+
import { sanitizeFileName } from "builder-util/internal";
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import { mkdir } from "fs/promises";
|
|
6
|
+
import * as path from "path";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export async function createSelfSignedCert(publisher) {
|
|
9
|
+
const tmpDir = new TmpDir("create-self-signed-cert");
|
|
10
|
+
const targetDir = process.cwd();
|
|
11
|
+
const tempPrefix = path.join(await tmpDir.getTempDir({ prefix: "self-signed-cert-creator" }), sanitizeFileName(publisher));
|
|
12
|
+
const cer = `${tempPrefix}.cer`;
|
|
13
|
+
const pvk = `${tempPrefix}.pvk`;
|
|
14
|
+
log.info(chalk.bold('When asked to enter a password ("Create Private Key Password"), please select "None".'));
|
|
15
|
+
try {
|
|
16
|
+
await mkdir(path.dirname(tempPrefix), { recursive: true });
|
|
17
|
+
const vendorPath = (await getWindowsKitsBundle({ winCodeSign: null, arch: archFromString(process.arch), resourcesDir: "" })).kit;
|
|
18
|
+
await exec(path.join(vendorPath, "makecert.exe"), ["-r", "-h", "0", "-n", `CN=${quoteString(publisher)}`, "-eku", "1.3.6.1.5.5.7.3.3", "-pe", "-sv", pvk, cer]);
|
|
19
|
+
const pfx = path.join(targetDir, `${sanitizeFileName(publisher)}.pfx`);
|
|
20
|
+
await unlinkIfExists(pfx);
|
|
21
|
+
await exec(path.join(vendorPath, "pvk2pfx.exe"), ["-pvk", pvk, "-spc", cer, "-pfx", pfx]);
|
|
22
|
+
log.info({ file: pfx }, `created. Please see https://electron.build/code-signing how to use it to sign.`);
|
|
23
|
+
const certLocation = "Cert:\\LocalMachine\\TrustedPeople";
|
|
24
|
+
log.info({ file: pfx, certLocation }, `importing. Operation will be succeed only if runned from root. Otherwise import file manually.`);
|
|
25
|
+
await spawn("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", "Import-PfxCertificate", "-FilePath", `"${pfx}"`, "-CertStoreLocation", certLocation]);
|
|
26
|
+
}
|
|
27
|
+
finally {
|
|
28
|
+
await tmpDir.cleanup();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function quoteString(s) {
|
|
32
|
+
if (!s.includes(",") && !s.includes('"')) {
|
|
33
|
+
return s;
|
|
34
|
+
}
|
|
35
|
+
return `"${s.replace(/"/g, '\\"')}"`;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=create-self-signed-cert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-self-signed-cert.js","sourceRoot":"","sources":["../../src/cli/create-self-signed-cert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,gBAAgB;AAChB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,SAAiB;IAC1D,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,yBAAyB,CAAC,CAAA;IACpD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,CA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I,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,iGAAiG,CAAC,CAAA;QACxI,MAAM,KAAK,CAAC,gBAAgB,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,uBAAuB,EAAE,WAAW,EAAE,IAAI,GAAG,GAAG,EAAE,oBAAoB,EAAE,YAAY,CAAC,CAAC,CAAA;IACpK,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;IACxB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,CAAS;IACnC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,OAAO,CAAC,CAAA;IACV,CAAC;IAED,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAA;AACtC,CAAC","sourcesContent":["import { getWindowsKitsBundle } from \"app-builder-lib/internal\"\nimport { archFromString, exec, log, spawn, TmpDir, unlinkIfExists } from \"builder-util\"\nimport { sanitizeFileName } from \"builder-util/internal\"\nimport chalk from \"chalk\"\nimport { mkdir } from \"fs/promises\"\nimport * as path from \"path\"\n\n/** @internal */\nexport async function createSelfSignedCert(publisher: string) {\n const tmpDir = new TmpDir(\"create-self-signed-cert\")\n const targetDir = process.cwd()\n const tempPrefix = path.join(await tmpDir.getTempDir({ prefix: \"self-signed-cert-creator\" }), sanitizeFileName(publisher))\n const cer = `${tempPrefix}.cer`\n const pvk = `${tempPrefix}.pvk`\n\n log.info(chalk.bold('When asked to enter a password (\"Create Private Key Password\"), please select \"None\".'))\n\n try {\n await mkdir(path.dirname(tempPrefix), { recursive: true })\n const vendorPath = (await getWindowsKitsBundle({ winCodeSign: null, arch: archFromString(process.arch), resourcesDir: \"\" })).kit\n await exec(path.join(vendorPath, \"makecert.exe\"), [\"-r\", \"-h\", \"0\", \"-n\", `CN=${quoteString(publisher)}`, \"-eku\", \"1.3.6.1.5.5.7.3.3\", \"-pe\", \"-sv\", pvk, cer])\n\n const pfx = path.join(targetDir, `${sanitizeFileName(publisher)}.pfx`)\n await unlinkIfExists(pfx)\n await exec(path.join(vendorPath, \"pvk2pfx.exe\"), [\"-pvk\", pvk, \"-spc\", cer, \"-pfx\", pfx])\n log.info({ file: pfx }, `created. Please see https://electron.build/code-signing how to use it to sign.`)\n\n const certLocation = \"Cert:\\\\LocalMachine\\\\TrustedPeople\"\n log.info({ file: pfx, certLocation }, `importing. Operation will be succeed only if runned from root. Otherwise import file manually.`)\n await spawn(\"powershell.exe\", [\"-NoProfile\", \"-NonInteractive\", \"-Command\", \"Import-PfxCertificate\", \"-FilePath\", `\"${pfx}\"`, \"-CertStoreLocation\", certLocation])\n } finally {\n await tmpDir.cleanup()\n }\n}\n\nexport function quoteString(s: string): string {\n if (!s.includes(\",\") && !s.includes('\"')) {\n return s\n }\n\n return `\"${s.replace(/\"/g, '\\\\\"')}\"`\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-app-deps.d.ts","sourceRoot":"","sources":["../../src/cli/install-app-deps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
import { computeDefaultAppDirectory, determinePackageManagerEnv, getConfig, getElectronVersion, installOrRebuild, orNullIfFileNotExist, PACKAGE_VERSION, } from "app-builder-lib/internal";
|
|
3
|
+
import { getArchCliNames, log, printErrorAndExit } from "builder-util";
|
|
4
|
+
import { Lazy } from "lazy-val";
|
|
5
|
+
import * as path from "path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { hideBin } from "yargs/helpers";
|
|
8
|
+
import * as yargs from "yargs";
|
|
9
|
+
import _fsExtra from "fs-extra";
|
|
10
|
+
const { readJson } = _fsExtra;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export function configureInstallAppDepsCommand(yargs) {
|
|
13
|
+
// https://github.com/yargs/yargs/issues/760
|
|
14
|
+
// demandOption is required to be set
|
|
15
|
+
return yargs
|
|
16
|
+
.parserConfiguration({
|
|
17
|
+
"camel-case-expansion": false,
|
|
18
|
+
})
|
|
19
|
+
.option("platform", {
|
|
20
|
+
choices: ["linux", "darwin", "win32"],
|
|
21
|
+
default: process.platform,
|
|
22
|
+
description: "The target platform",
|
|
23
|
+
})
|
|
24
|
+
.option("arch", {
|
|
25
|
+
choices: getArchCliNames().concat("all"),
|
|
26
|
+
default: process.arch === "arm" ? "armv7l" : process.arch,
|
|
27
|
+
description: "The target arch",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** @internal */
|
|
31
|
+
export async function installAppDeps(args) {
|
|
32
|
+
try {
|
|
33
|
+
log.info({ version: PACKAGE_VERSION }, "electron-builder");
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
// error in dev mode without babel
|
|
37
|
+
if (!(e instanceof ReferenceError)) {
|
|
38
|
+
throw e;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const projectDir = process.cwd();
|
|
42
|
+
const packageMetadata = new Lazy(() => orNullIfFileNotExist(readJson(path.join(projectDir, "package.json"))));
|
|
43
|
+
const config = await getConfig(projectDir, null, null, packageMetadata);
|
|
44
|
+
const [appDir, version] = await Promise.all([computeDefaultAppDirectory(projectDir, config.directories?.app), getElectronVersion(projectDir, config)]);
|
|
45
|
+
const packageManagerEnv = determinePackageManagerEnv({ projectDir, appDir, workspaceRoot: undefined });
|
|
46
|
+
// if two package.json — force full install (user wants to install/update app deps in addition to dev)
|
|
47
|
+
await installOrRebuild(config, {
|
|
48
|
+
appDir,
|
|
49
|
+
projectDir,
|
|
50
|
+
workspaceRoot: await (await packageManagerEnv.value).workspaceRoot,
|
|
51
|
+
}, {
|
|
52
|
+
frameworkInfo: { version, useCustomDist: true },
|
|
53
|
+
platform: args.platform,
|
|
54
|
+
arch: args.arch,
|
|
55
|
+
}, appDir !== projectDir, {});
|
|
56
|
+
}
|
|
57
|
+
function main() {
|
|
58
|
+
const factory = yargs.default ?? yargs;
|
|
59
|
+
const instance = typeof factory?.parserConfiguration === "function" ? factory : factory(hideBin(process.argv));
|
|
60
|
+
return installAppDeps(configureInstallAppDepsCommand(instance).argv);
|
|
61
|
+
}
|
|
62
|
+
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
63
|
+
log.warn("please use as subcommand: electron-builder install-app-deps");
|
|
64
|
+
main().catch(printErrorAndExit);
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=install-app-deps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-app-deps.js","sourceRoot":"","sources":["../../src/cli/install-app-deps.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAA;AAE7B,gBAAgB;AAChB,MAAM,UAAU,8BAA8B,CAAC,KAAiB;IAC9D,4CAA4C;IAC5C,qCAAqC;IACrC,OAAO,KAAK;SACT,mBAAmB,CAAC;QACnB,sBAAsB,EAAE,KAAK;KAC9B,CAAC;SACD,MAAM,CAAC,UAAU,EAAE;Q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,CAAA;IAE9J,MAAM,iBAAiB,GAAG,0BAA0B,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAA;IAEtG,sGAAsG;IACtG,MAAM,gBAAgB,CACpB,MAAM,EACN;QACE,MAAM;QACN,UAAU;QACV,aAAa,EAAE,MAAM,CAAC,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAC,aAAa;KACnE,EACD;QACE,aAAa,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE;QAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,EACD,MAAM,KAAK,UAAU,EACrB,EAAE,CACH,CAAA;AACH,CAAC;AAED,SAAS,IAAI;IACX,MAAM,OAAO,GAAI,KAAa,CAAC,OAAO,IAAI,KAAK,CAAA;IAC/C,MAAM,QAAQ,GAAG,OAAO,OAAO,EAAE,mBAAmB,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;IAC9G,OAAO,cAAc,CAAC,8BAA8B,CAAC,QAAiC,CAAC,CAAC,IAAI,CAAC,CAAA;AAC/F,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACvD,GAAG,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAA;IACvE,IAAI,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;AACjC,CAAC","sourcesContent":["#! /usr/bin/env node\n\nimport {\n computeDefaultAppDirectory,\n determinePackageManagerEnv,\n getConfig,\n getElectronVersion,\n installOrRebuild,\n orNullIfFileNotExist,\n PACKAGE_VERSION,\n} from \"app-builder-lib/internal\"\nimport { getArchCliNames, log, printErrorAndExit } from \"builder-util\"\n\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { fileURLToPath } from \"node:url\"\nimport { hideBin } from \"yargs/helpers\"\nimport * as yargs from \"yargs\"\nimport _fsExtra from \"fs-extra\"\nconst { readJson } = _fsExtra\n\n/** @internal */\nexport function configureInstallAppDepsCommand(yargs: yargs.Argv): yargs.Argv {\n // https://github.com/yargs/yargs/issues/760\n // demandOption is required to be set\n return yargs\n .parserConfiguration({\n \"camel-case-expansion\": false,\n })\n .option(\"platform\", {\n choices: [\"linux\", \"darwin\", \"win32\"],\n default: process.platform,\n description: \"The target platform\",\n })\n .option(\"arch\", {\n choices: getArchCliNames().concat(\"all\"),\n default: process.arch === \"arm\" ? \"armv7l\" : process.arch,\n description: \"The target arch\",\n })\n}\n\n/** @internal */\nexport async function installAppDeps(args: any) {\n try {\n log.info({ version: PACKAGE_VERSION }, \"electron-builder\")\n } catch (e: any) {\n // error in dev mode without babel\n if (!(e instanceof ReferenceError)) {\n throw e\n }\n }\n\n const projectDir = process.cwd()\n const packageMetadata = new Lazy(() => orNullIfFileNotExist(readJson(path.join(projectDir, \"package.json\"))))\n const config = await getConfig(projectDir, null, null, packageMetadata)\n const [appDir, version] = await Promise.all<string>([computeDefaultAppDirectory(projectDir, config.directories?.app), getElectronVersion(projectDir, config)])\n\n const packageManagerEnv = determinePackageManagerEnv({ projectDir, appDir, workspaceRoot: undefined })\n\n // if two package.json — force full install (user wants to install/update app deps in addition to dev)\n await installOrRebuild(\n config,\n {\n appDir,\n projectDir,\n workspaceRoot: await (await packageManagerEnv.value).workspaceRoot,\n },\n {\n frameworkInfo: { version, useCustomDist: true },\n platform: args.platform,\n arch: args.arch,\n },\n appDir !== projectDir,\n {}\n )\n}\n\nfunction main() {\n const factory = (yargs as any).default ?? yargs\n const instance = typeof factory?.parserConfiguration === \"function\" ? factory : factory(hideBin(process.argv))\n return installAppDeps(configureInstallAppDepsCommand(instance as unknown as yargs.Argv).argv)\n}\n\nif (process.argv[1] === fileURLToPath(import.meta.url)) {\n log.warn(\"please use as subcommand: electron-builder install-app-deps\")\n main().catch(printErrorAndExit)\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Argv } from "yargs";
|
|
2
|
+
export interface MigrationChange {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MigrationResult {
|
|
7
|
+
readonly migrated: Record<string, any>;
|
|
8
|
+
readonly changes: MigrationChange[];
|
|
9
|
+
readonly warnings: string[];
|
|
10
|
+
readonly modified: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Applies all v26→v27 config transformations to a parsed config object.
|
|
14
|
+
* Pure function — no I/O, safe to call in tests.
|
|
15
|
+
*/
|
|
16
|
+
export declare function migrateConfig(raw: Record<string, any>): MigrationResult;
|
|
17
|
+
export declare function configureMigrateSchemaCommand(yargs: Argv): Argv;
|
|
18
|
+
export declare function migrateSchema(args: any): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=migrate-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-schema.d.ts","sourceRoot":"","sources":["../../src/cli/migrate-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAMjC,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtC,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAC3B;AAOD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,CAuKvE;AA2MD,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAkB/D;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CA4D5D"}
|