electron-builder 26.10.0 → 26.11.1

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.
@@ -0,0 +1 @@
1
+ export declare function clearCache(): Promise<void>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearCache = clearCache;
4
+ const electronGet_1 = require("app-builder-lib/out/util/electronGet");
5
+ const builder_util_1 = require("builder-util");
6
+ const promises_1 = require("fs/promises");
7
+ const promises_2 = require("readline/promises");
8
+ const path = require("path");
9
+ async function clearCache() {
10
+ const cacheDir = (0, electronGet_1.getCacheDirectory)(false, false);
11
+ if (cacheDir === path.parse(cacheDir).root) {
12
+ builder_util_1.log.error({ cacheDir }, "cache directory resolves to a filesystem root — aborting");
13
+ return;
14
+ }
15
+ try {
16
+ await (0, promises_1.access)(cacheDir, promises_1.constants.F_OK | promises_1.constants.W_OK);
17
+ }
18
+ catch (err) {
19
+ if (err.code === "ENOENT") {
20
+ builder_util_1.log.info({ cacheDir }, "cache directory does not exist, nothing to clear");
21
+ }
22
+ else if (err.code === "EACCES" || err.code === "EPERM") {
23
+ builder_util_1.log.error({ cacheDir }, "cache directory is not writable");
24
+ }
25
+ else {
26
+ throw err;
27
+ }
28
+ return;
29
+ }
30
+ const rl = (0, promises_2.createInterface)({ input: process.stdin, output: process.stdout });
31
+ let answer;
32
+ try {
33
+ answer = await rl.question(`Clear cache at ${cacheDir}? [y/N] `);
34
+ }
35
+ finally {
36
+ rl.close();
37
+ }
38
+ if (answer.trim().toLowerCase() !== "y" && answer.trim().toLowerCase() !== "yes") {
39
+ builder_util_1.log.info(null, "aborted");
40
+ return;
41
+ }
42
+ builder_util_1.log.info({ cacheDir }, "clearing cache");
43
+ await (0, promises_1.rm)(cacheDir, { recursive: true });
44
+ builder_util_1.log.info({ cacheDir }, "cache cleared");
45
+ }
46
+ //# sourceMappingURL=clear-cache.js.map
@@ -0,0 +1 @@
1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,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,kBAAG,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QACzB,OAAM;IACR,CAAC;IAED,kBAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,CAAC,CAAA;IACxC,MAAM,IAAA,aAAE,EAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACvC,kBAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,CAAC,CAAA;AACzC,CAAC","sourcesContent":["import { getCacheDirectory } from \"app-builder-lib/out/util/electronGet\"\nimport { log } from \"builder-util\"\nimport { access, constants, rm } from \"fs/promises\"\nimport { createInterface } from \"readline/promises\"\nimport * as path from \"path\"\n\nexport async function clearCache(): Promise<void> {\n const cacheDir = getCacheDirectory(false, 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,2 @@
1
+ export declare function checkIsOutdated(): Promise<void>;
2
+ export declare function wrap(task: (args: any) => Promise<any>): (args: any) => Promise<any>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkIsOutdated = checkIsOutdated;
4
+ exports.wrap = wrap;
5
+ const load_1 = require("app-builder-lib/out/util/config/load");
6
+ const builder_util_1 = require("builder-util");
7
+ const ci_info_1 = require("ci-info");
8
+ const fs_extra_1 = require("fs-extra");
9
+ const path = require("path");
10
+ async function checkIsOutdated() {
11
+ if (ci_info_1.isCI || process.env.NO_UPDATE_NOTIFIER != null) {
12
+ return;
13
+ }
14
+ const pkg = await (0, fs_extra_1.readJson)(path.join(__dirname, "..", "..", "package.json"));
15
+ if (pkg.version === "0.0.0-semantic-release") {
16
+ return;
17
+ }
18
+ const UpdateNotifier = require("simple-update-notifier");
19
+ await UpdateNotifier({ pkg });
20
+ }
21
+ function wrap(task) {
22
+ return (args) => {
23
+ checkIsOutdated().catch((e) => builder_util_1.log.warn({ error: e }, "cannot check updates"));
24
+ return (0, load_1.loadEnv)(path.join(process.cwd(), "electron-builder.env"))
25
+ .then(() => task(args))
26
+ .catch(error => {
27
+ process.exitCode = 1;
28
+ // https://github.com/electron-userland/electron-builder/issues/2940
29
+ process.on("exit", () => (process.exitCode = 1));
30
+ if (error instanceof builder_util_1.InvalidConfigurationError) {
31
+ builder_util_1.log.error(null, error.message);
32
+ }
33
+ else if (!(error instanceof builder_util_1.ExecError) || !error.alreadyLogged) {
34
+ builder_util_1.log.error({ failedTask: task.name, stackTrace: error.stack }, error.message);
35
+ }
36
+ });
37
+ };
38
+ }
39
+ //# sourceMappingURL=cli-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-util.js","sourceRoot":"","s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CAAyB,EAAE,CAAC;gBAC/C,kBAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;YAChC,CAAC;iBAAM,IAAI,CAAC,CAAC,KAAK,YAAY,wBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;gBACjE,kBAAG,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,KAAK,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/out/util/config/load\"\nimport { ExecError, InvalidConfigurationError, log } from \"builder-util\"\nimport { isCI } from \"ci-info\"\nimport { readJson } from \"fs-extra\"\nimport * as path from \"path\"\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(__dirname, \"..\", \"..\", \"package.json\"))\n if (pkg.version === \"0.0.0-semantic-release\") {\n return\n }\n const UpdateNotifier = require(\"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"]}
package/out/cli/cli.js CHANGED
@@ -2,24 +2,21 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const electronVersion_1 = require("app-builder-lib/out/electron/electronVersion");
5
- const load_1 = require("app-builder-lib/out/util/config/load");
6
5
  const yarn_1 = require("app-builder-lib/out/util/yarn");
7
- const builder_util_1 = require("builder-util");
8
6
  const chalk = require("chalk");
9
- const fs_extra_1 = require("fs-extra");
10
- const ci_info_1 = require("ci-info");
11
- const path = require("path");
12
7
  const builder_1 = require("../builder");
13
8
  const publish_1 = require("../publish");
9
+ const clear_cache_1 = require("./clear-cache");
10
+ const cli_util_1 = require("./cli-util");
14
11
  const create_self_signed_cert_1 = require("./create-self-signed-cert");
15
12
  const install_app_deps_1 = require("./install-app-deps");
16
13
  const start_1 = require("./start");
17
14
  // tslint:disable:no-unused-expression
18
15
  void (0, builder_1.createYargs)()
19
- .command(["build", "*"], "Build", builder_1.configureBuildCommand, wrap(builder_1.build))
20
- .command("install-app-deps", "Install app deps", install_app_deps_1.configureInstallAppDepsCommand, wrap(install_app_deps_1.installAppDeps))
21
- .command("node-gyp-rebuild", "Rebuild own native code", install_app_deps_1.configureInstallAppDepsCommand /* yes, args the same as for install app deps */, wrap(rebuildAppNativeCode))
22
- .command("publish", "Publish a list of artifacts", publish_1.configurePublishCommand, wrap(publish_1.publish))
16
+ .command(["build", "*"], "Build", builder_1.configureBuildCommand, (0, cli_util_1.wrap)(builder_1.build))
17
+ .command("install-app-deps", "Install app deps", install_app_deps_1.configureInstallAppDepsCommand, (0, cli_util_1.wrap)(install_app_deps_1.installAppDeps))
18
+ .command("node-gyp-rebuild", "Rebuild own native code", install_app_deps_1.configureInstallAppDepsCommand /* yes, args the same as for install app deps */, (0, cli_util_1.wrap)(rebuildAppNativeCode))
19
+ .command("publish", "Publish a list of artifacts", publish_1.configurePublishCommand, (0, cli_util_1.wrap)(publish_1.publish))
23
20
  .command("create-self-signed-cert", "Create self-signed code signing cert for Windows apps", yargs => yargs
24
21
  .option("publisher", {
25
22
  alias: ["p"],
@@ -27,41 +24,13 @@ void (0, builder_1.createYargs)()
27
24
  requiresArg: true,
28
25
  description: "The publisher name",
29
26
  })
30
- .demandOption("publisher"), wrap(argv => (0, create_self_signed_cert_1.createSelfSignedCert)(argv.publisher)))
31
- .command("start", "Run application in a development mode using electron-webpack", yargs => yargs, wrap(() => (0, start_1.start)()))
27
+ .demandOption("publisher"), (0, cli_util_1.wrap)(argv => (0, create_self_signed_cert_1.createSelfSignedCert)(argv.publisher)))
28
+ .command("start", "Run application in a development mode using electron-webpack", yargs => yargs, (0, cli_util_1.wrap)(() => (0, start_1.start)()))
29
+ .command("clear-cache", "Clear the electron-builder default cache directory", yargs => yargs, (0, cli_util_1.wrap)(() => (0, clear_cache_1.clearCache)()))
32
30
  .help()
33
31
  .epilog(`See ${chalk.underline("https://electron.build")} for more documentation.`)
34
32
  .strict()
35
33
  .recommendCommands().argv;
36
- function wrap(task) {
37
- return (args) => {
38
- checkIsOutdated().catch((e) => builder_util_1.log.warn({ error: e }, "cannot check updates"));
39
- (0, load_1.loadEnv)(path.join(process.cwd(), "electron-builder.env"))
40
- .then(() => task(args))
41
- .catch(error => {
42
- process.exitCode = 1;
43
- // https://github.com/electron-userland/electron-builder/issues/2940
44
- process.on("exit", () => (process.exitCode = 1));
45
- if (error instanceof builder_util_1.InvalidConfigurationError) {
46
- builder_util_1.log.error(null, error.message);
47
- }
48
- else if (!(error instanceof builder_util_1.ExecError) || !error.alreadyLogged) {
49
- builder_util_1.log.error({ failedTask: task.name, stackTrace: error.stack }, error.message);
50
- }
51
- });
52
- };
53
- }
54
- async function checkIsOutdated() {
55
- if (ci_info_1.isCI || process.env.NO_UPDATE_NOTIFIER != null) {
56
- return;
57
- }
58
- const pkg = await (0, fs_extra_1.readJson)(path.join(__dirname, "..", "..", "package.json"));
59
- if (pkg.version === "0.0.0-semantic-release") {
60
- return;
61
- }
62
- const UpdateNotifier = require("simple-update-notifier");
63
- await UpdateNotifier({ pkg });
64
- }
65
34
  async function rebuildAppNativeCode(args) {
66
35
  const projectDir = process.cwd();
67
36
  // this script must be used only for electron
@@ -1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,kBAAkB,IAAI,IAAI,EAAE,CAAC;QACnD,OAAM;IACR,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAA;IAC5E,IAAI,GAAG,CAAC,OAAO,KAAK,wBAAwB,EAAE,CAAC;QAC7C,OAAM;IACR,CAAC;IACD,MAAM,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAA;IACxD,MAAM,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;AAC/B,CAAC;AAED,KAAK,UAAU,oBAAoB,CAAC,IAAS;IAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IAChC,6CAA6C;IAC7C,OAAO,IAAA,qBAAc,EAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,IAAA,oCAAkB,EAAC,UAAU,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AACzH,CAAC","sourcesContent":["#! /usr/bin/env node\n\nimport { getElectronVersion } from \"app-builder-lib/out/electron/electronVersion\"\nimport { loadEnv } from \"app-builder-lib/out/util/config/load\"\nimport { nodeGypRebuild } from \"app-builder-lib/out/util/yarn\"\nimport { ExecError, InvalidConfigurationError, log } from \"builder-util\"\nimport * as chalk from \"chalk\"\nimport { readJson } from \"fs-extra\"\nimport { isCI } from \"ci-info\"\nimport * as path from \"path\"\nimport { build, configureBuildCommand, createYargs } from \"../builder\"\nimport { configurePublishCommand, publish } from \"../publish\"\nimport { createSelfSignedCert } from \"./create-self-signed-cert\"\nimport { configureInstallAppDepsCommand, installAppDeps } from \"./install-app-deps\"\nimport { start } from \"./start\"\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 .help()\n .epilog(`See ${chalk.underline(\"https://electron.build\")} for more documentation.`)\n .strict()\n .recommendCommands().argv\n\nfunction wrap(task: (args: any) => Promise<any>) {\n return (args: any) => {\n checkIsOutdated().catch((e: any) => log.warn({ error: e }, \"cannot check updates\"))\n 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\nasync function checkIsOutdated() {\n if (isCI || process.env.NO_UPDATE_NOTIFIER != null) {\n return\n }\n\n const pkg = await readJson(path.join(__dirname, \"..\", \"..\", \"package.json\"))\n if (pkg.version === \"0.0.0-semantic-release\") {\n return\n }\n const UpdateNotifier = require(\"simple-update-notifier\")\n await UpdateNotifier({ pkg })\n}\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"]}
1
+ {"version":3,"file":"cli.js","sourceRo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KAAK,EACd,IAAA,eAAI,EAAC,GAAG,EAAE,CAAC,IAAA,wBAAU,GAAE,CAAC,CACzB;KACA,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,IAAA,qBAAc,EAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,IAAA,oCAAkB,EAAC,UAAU,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AACzH,CAAC","sourcesContent":["#! /usr/bin/env node\n\nimport { getElectronVersion } from \"app-builder-lib/out/electron/electronVersion\"\nimport { nodeGypRebuild } from \"app-builder-lib/out/util/yarn\"\nimport * as chalk from \"chalk\"\nimport { build, configureBuildCommand, createYargs } from \"../builder\"\nimport { configurePublishCommand, publish } from \"../publish\"\nimport { clearCache } from \"./clear-cache\"\nimport { wrap } from \"./cli-util\"\nimport { createSelfSignedCert } from \"./create-self-signed-cert\"\nimport { configureInstallAppDepsCommand, installAppDeps } from \"./install-app-deps\"\nimport { start } from \"./start\"\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 .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"]}
@@ -1 +1 @@
1
- export {};
1
+ export declare function quoteString(s: string): string;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createSelfSignedCert = createSelfSignedCert;
4
+ exports.quoteString = quoteString;
4
5
  const windows_1 = require("app-builder-lib/out/toolsets/windows");
5
6
  const builder_util_1 = require("builder-util");
6
7
  const filename_1 = require("builder-util/out/filename");
@@ -1 +1 @@
1
- {"version":3,"file":"create-self-signed-cert.js","sourceRoot":"","sources":["../../src/cli/create-self-signed-cert.ts"],"names":[],"mappings":";;AAQA,oDAyBC;AAjCD,kEAA2E;AAC3E,+CAAuF;AACvF,wDAA4D;AAC5D,+BAA8B;AAC9B,0CAAmC;AACnC,6BAA4B;AAE5B,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CAAC,SAAiB;IAC1D,MAAM,MAAM,GAAG,IAAI,qBAAM,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,IAAA,2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QAEzG,MAAM,YAAY,GAAG,oCAAoC,CAAA;QACzD,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,iGAAiG,CAAC,CAAA;QACxI,MAAM,IAAA,oBAAK,EAAC,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,SAAS,WAAW,CAAC,CAAS;IAC5B,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/out/toolsets/windows\"\nimport { archFromString, exec, log, spawn, TmpDir, unlinkIfExists } from \"builder-util\"\nimport { sanitizeFileName } from \"builder-util/out/filename\"\nimport * as 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) })).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\nfunction quoteString(s: string): string {\n if (!s.includes(\",\") && !s.includes('\"')) {\n return s\n }\n\n return `\"${s.replace(/\"/g, '\\\\\"')}\"`\n}\n"]}
1
+ {"version":3,"file":"create-self-signed-cert.js","sourceRoot":"","sources":["../../src/cli/create-self-signed-cert.ts"],"names":[],"mappings":";;AAQA,oDAyBC;AAED,kCAMC;AAzCD,kEAA2E;AAC3E,+CAAuF;AACvF,wDAA4D;AAC5D,+BAA8B;AAC9B,0CAAmC;AACnC,6BAA4B;AAE5B,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CAAC,SAAiB;IAC1D,MAAM,MAAM,GAAG,IAAI,qBAAM,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,IAAA,2BAAg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G,MAAM,YAAY,GAAG,oCAAoC,CAAA;QACzD,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,iGAAiG,CAAC,CAAA;QACxI,MAAM,IAAA,oBAAK,EAAC,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,SAAgB,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/out/toolsets/windows\"\nimport { archFromString, exec, log, spawn, TmpDir, unlinkIfExists } from \"builder-util\"\nimport { sanitizeFileName } from \"builder-util/out/filename\"\nimport * as 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) })).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"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "electron-builder",
3
3
  "description": "A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box",
4
- "version": "26.10.0",
4
+ "version": "26.11.1",
5
5
  "main": "out/index.js",
6
6
  "files": [
7
7
  "out"
@@ -57,10 +57,10 @@
57
57
  "lazy-val": "^1.0.5",
58
58
  "simple-update-notifier": "2.0.0",
59
59
  "yargs": "^17.6.2",
60
- "app-builder-lib": "26.10.0",
61
- "builder-util": "26.10.0",
62
- "builder-util-runtime": "9.6.0",
63
- "dmg-builder": "26.10.0"
60
+ "builder-util": "26.11.1",
61
+ "builder-util-runtime": "9.6.1",
62
+ "dmg-builder": "26.11.1",
63
+ "app-builder-lib": "26.11.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/fs-extra": "9.0.13",