This commit is contained in:
2022-09-30 05:39:11 +00:00
parent 41ee9463ae
commit 4687fa49bc
11418 changed files with 1312504 additions and 0 deletions

View File

@ -0,0 +1,2 @@
#! /usr/bin/env node
export {};

213
buildfiles/node_modules/electron-builder/out/cli/cli.js generated vendored Executable file
View File

@ -0,0 +1,213 @@
#! /usr/bin/env node
"use strict";
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _electronVersion() {
const data = require("app-builder-lib/out/electron/electronVersion");
_electronVersion = function () {
return data;
};
return data;
}
function _yarn() {
const data = require("app-builder-lib/out/util/yarn");
_yarn = function () {
return data;
};
return data;
}
function _fsExtra() {
const data = require("fs-extra");
_fsExtra = function () {
return data;
};
return data;
}
function _isCi() {
const data = _interopRequireDefault(require("is-ci"));
_isCi = function () {
return data;
};
return data;
}
var path = _interopRequireWildcard(require("path"));
function _readConfigFile() {
const data = require("read-config-file");
_readConfigFile = function () {
return data;
};
return data;
}
function _updateNotifier() {
const data = _interopRequireDefault(require("update-notifier"));
_updateNotifier = function () {
return data;
};
return data;
}
function _util() {
const data = require("builder-util/out/util");
_util = function () {
return data;
};
return data;
}
function _builder() {
const data = require("../builder");
_builder = function () {
return data;
};
return data;
}
function _createSelfSignedCert() {
const data = require("./create-self-signed-cert");
_createSelfSignedCert = function () {
return data;
};
return data;
}
function _installAppDeps() {
const data = require("./install-app-deps");
_installAppDeps = function () {
return data;
};
return data;
}
function _start() {
const data = require("./start");
_start = function () {
return data;
};
return data;
}
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// tslint:disable:no-unused-expression
(0, _builder().createYargs)().command(["build", "*"], "Build", _builder().configureBuildCommand, wrap(_builder().build)).command("install-app-deps", "Install app deps", _installAppDeps().configureInstallAppDepsCommand, wrap(_installAppDeps().installAppDeps)).command("node-gyp-rebuild", "Rebuild own native code", _installAppDeps().configureInstallAppDepsCommand
/* yes, args the same as for install app deps */
, wrap(rebuildAppNativeCode)).command("create-self-signed-cert", "Create self-signed code signing cert for Windows apps", yargs => yargs.option("publisher", {
alias: ["p"],
type: "string",
requiresArg: true,
description: "The publisher name"
}).demandOption("publisher"), wrap(argv => (0, _createSelfSignedCert().createSelfSignedCert)(argv.publisher))).command("start", "Run application in a development mode using electron-webpack", yargs => yargs, wrap(() => (0, _start().start)())).help().epilog(`See ${_chalk().default.underline("https://electron.build")} for more documentation.`).strict().recommendCommands().argv;
function wrap(task) {
return args => {
checkIsOutdated();
(0, _readConfigFile().loadEnv)(path.join(process.cwd(), "electron-builder.env")).then(() => task(args)).catch(error => {
process.exitCode = 1; // https://github.com/electron-userland/electron-builder/issues/2940
process.on("exit", () => process.exitCode = 1);
if (error instanceof _builderUtil().InvalidConfigurationError) {
_builderUtil().log.error(null, error.message);
} else if (!(error instanceof _util().ExecError) || !error.alreadyLogged) {
_builderUtil().log.error({
stackTrace: error.stack
}, error.message);
}
});
};
}
function checkIsOutdated() {
if (_isCi().default || process.env.NO_UPDATE_NOTIFIER != null) {
return;
}
(0, _fsExtra().readJson)(path.join(__dirname, "..", "..", "package.json")).then(async it => {
if (it.version === "0.0.0-semantic-release") {
return;
}
const packageManager = (await (0, _fsExtra().pathExists)(path.join(__dirname, "..", "..", "package-lock.json"))) ? "npm" : "yarn";
const notifier = (0, _updateNotifier().default)({
pkg: it
});
if (notifier.update != null) {
notifier.notify({
message: `Update available ${_chalk().default.dim(notifier.update.current)}${_chalk().default.reset(" → ")}${_chalk().default.green(notifier.update.latest)} \nRun ${_chalk().default.cyan(`${packageManager} upgrade electron-builder`)} to update`
});
}
}).catch(e => _builderUtil().log.warn({
error: e
}, "cannot check updates"));
}
async function rebuildAppNativeCode(args) {
const projectDir = process.cwd();
_builderUtil().log.info({
platform: args.platform,
arch: args.arch
}, "executing node-gyp rebuild"); // this script must be used only for electron
await (0, _builderUtil().exec)(process.platform === "win32" ? "node-gyp.cmd" : "node-gyp", ["rebuild"], {
env: (0, _yarn().getGypEnv)({
version: await (0, _electronVersion().getElectronVersion)(projectDir),
useCustomDist: true
}, args.platform, args.arch, true)
});
}
// __ts-babel@6.0.4
//# sourceMappingURL=cli.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,121 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createSelfSignedCert = createSelfSignedCert;
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _fs() {
const data = require("builder-util/out/fs");
_fs = function () {
return data;
};
return data;
}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _windowsCodeSign() {
const data = require("app-builder-lib/out/codeSign/windowsCodeSign");
_windowsCodeSign = function () {
return data;
};
return data;
}
function _fsExtra() {
const data = require("fs-extra");
_fsExtra = function () {
return data;
};
return data;
}
var path = _interopRequireWildcard(require("path"));
function _sanitizeFilename() {
const data = _interopRequireDefault(require("sanitize-filename"));
_sanitizeFilename = function () {
return data;
};
return data;
}
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/** @internal */
async function createSelfSignedCert(publisher) {
const tmpDir = new (_builderUtil().TmpDir)("create-self-signed-cert");
const targetDir = process.cwd();
const tempPrefix = path.join(await tmpDir.getTempDir({
prefix: "self-signed-cert-creator"
}), (0, _sanitizeFilename().default)(publisher));
const cer = `${tempPrefix}.cer`;
const pvk = `${tempPrefix}.pvk`;
_builderUtil().log.info(_chalk().default.bold('When asked to enter a password ("Create Private Key Password"), please select "None".'));
try {
await (0, _fsExtra().ensureDir)(path.dirname(tempPrefix));
const vendorPath = path.join(await (0, _windowsCodeSign().getSignVendorPath)(), "windows-10", process.arch);
await (0, _builderUtil().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]);
const pfx = path.join(targetDir, `${(0, _sanitizeFilename().default)(publisher)}.pfx`);
await (0, _fs().unlinkIfExists)(pfx);
await (0, _builderUtil().exec)(path.join(vendorPath, "pvk2pfx.exe"), ["-pvk", pvk, "-spc", cer, "-pfx", pfx]);
_builderUtil().log.info({
file: pfx
}, `created. Please see https://electron.build/code-signing how to use it to sign.`);
const certLocation = "Cert:\\LocalMachine\\TrustedPeople";
_builderUtil().log.info({
file: pfx,
certLocation
}, `importing. Operation will be succeed only if runned from root. Otherwise import file manually.`);
await (0, _builderUtil().spawn)("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", "Import-PfxCertificate", "-FilePath", `"${pfx}"`, "-CertStoreLocation", ""]);
} finally {
await tmpDir.cleanup();
}
}
function quoteString(s) {
if (!s.includes(",") && !s.includes('"')) {
return s;
}
return `"${s.replace(/"/g, '\\"')}"`;
}
// __ts-babel@6.0.4
//# sourceMappingURL=create-self-signed-cert.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../src/cli/create-self-signed-cert.ts"],"names":[],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;;;AAEA;AACO,eAAe,oBAAf,CAAoC,SAApC,EAAqD;AAC1D,QAAM,MAAM,GAAG,KAAI,qBAAJ,EAAW,yBAAX,CAAf;AACA,QAAM,SAAS,GAAG,OAAO,CAAC,GAAR,EAAlB;AACA,QAAM,UAAU,GAAG,IAAI,CAAC,IAAL,CAAU,MAAM,MAAM,CAAC,UAAP,CAAkB;AAAC,IAAA,MAAM,EAAE;AAAT,GAAlB,CAAhB,EAAyE,iCAAiB,SAAjB,CAAzE,CAAnB;AACA,QAAM,GAAG,GAAG,GAAG,UAAU,MAAzB;AACA,QAAM,GAAG,GAAG,GAAG,UAAU,MAAzB;;AAEA,qBAAI,IAAJ,CAAS,iBAAM,IAAN,CAAW,uFAAX,CAAT;;AAEA,MAAI;AACF,UAAM,0BAAU,IAAI,CAAC,OAAL,CAAa,UAAb,CAAV,CAAN;AACA,UAAM,UAAU,GAAG,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X,CAAzB,EAA0C;AACxC,WAAO,CAAP;AACD;;AAED,SAAO,IAAI,CAAC,CAAC,OAAF,CAAU,IAAV,EAAgB,KAAhB,CAAsB,GAAjC;AACD,C","sourcesContent":["import { exec, log, spawn, TmpDir } from \"builder-util\"\nimport { unlinkIfExists } from \"builder-util/out/fs\"\nimport chalk from \"chalk\"\nimport { getSignVendorPath } from \"app-builder-lib/out/codeSign/windowsCodeSign\"\nimport { ensureDir } from \"fs-extra\"\nimport * as path from \"path\"\nimport sanitizeFileName from \"sanitize-filename\"\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 ensureDir(path.dirname(tempPrefix))\n const vendorPath = path.join(await getSignVendorPath(), \"windows-10\", process.arch)\n await exec(path.join(vendorPath, \"makecert.exe\"),\n [\"-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\", \"\"])\n }\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}"],"sourceRoot":""}

View File

@ -0,0 +1,2 @@
#! /usr/bin/env node
export {};

View File

@ -0,0 +1,175 @@
#! /usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.configureInstallAppDepsCommand = configureInstallAppDepsCommand;
exports.installAppDeps = installAppDeps;
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _promise() {
const data = require("builder-util/out/promise");
_promise = function () {
return data;
};
return data;
}
function _config() {
const data = require("app-builder-lib/out/util/config");
_config = function () {
return data;
};
return data;
}
function _electronVersion() {
const data = require("app-builder-lib/out/electron/electronVersion");
_electronVersion = function () {
return data;
};
return data;
}
function _packageDependencies() {
const data = require("app-builder-lib/out/util/packageDependencies");
_packageDependencies = function () {
return data;
};
return data;
}
function _yarn() {
const data = require("app-builder-lib/out/util/yarn");
_yarn = function () {
return data;
};
return data;
}
function _fsExtra() {
const data = require("fs-extra");
_fsExtra = function () {
return data;
};
return data;
}
function _lazyVal() {
const data = require("lazy-val");
_lazyVal = function () {
return data;
};
return data;
}
var path = _interopRequireWildcard(require("path"));
function _readConfigFile() {
const data = require("read-config-file");
_readConfigFile = function () {
return data;
};
return data;
}
function _yargs() {
const data = _interopRequireDefault(require("yargs"));
_yargs = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/** @internal */
function configureInstallAppDepsCommand(yargs) {
// https://github.com/yargs/yargs/issues/760
// demandOption is required to be set
return yargs.parserConfiguration({
"camel-case-expansion": false
}).option("platform", {
choices: ["linux", "darwin", "win32"],
default: process.platform,
description: "The target platform"
}).option("arch", {
choices: (0, _builderUtil().getArchCliNames)().concat("all"),
default: process.arch === "arm" ? "armv7l" : process.arch,
description: "The target arch"
});
}
/** @internal */
async function installAppDeps(args) {
try {
_builderUtil().log.info({
version: "22.9.1"
}, "electron-builder");
} catch (e) {
// error in dev mode without babel
if (!(e instanceof ReferenceError)) {
throw e;
}
}
const projectDir = process.cwd();
const packageMetadata = new (_lazyVal().Lazy)(() => (0, _readConfigFile().orNullIfFileNotExist)((0, _fsExtra().readJson)(path.join(projectDir, "package.json"))));
const config = await (0, _config().getConfig)(projectDir, null, null, packageMetadata);
const results = await Promise.all([(0, _config().computeDefaultAppDirectory)(projectDir, (0, _builderUtil().use)(config.directories, it => it.app)), (0, _electronVersion().getElectronVersion)(projectDir, config, packageMetadata)]); // if two package.json — force full install (user wants to install/update app deps in addition to dev)
await (0, _yarn().installOrRebuild)(config, results[0], {
frameworkInfo: {
version: results[1],
useCustomDist: true
},
platform: args.platform,
arch: args.arch,
productionDeps: (0, _packageDependencies().createLazyProductionDeps)(results[0], null)
}, results[0] !== projectDir);
}
function main() {
return installAppDeps(configureInstallAppDepsCommand(_yargs().default).argv);
}
if (require.main === module) {
_builderUtil().log.warn("please use as subcommand: electron-builder install-app-deps");
main().catch(_promise().printErrorAndExit);
}
// __ts-babel@6.0.4
//# sourceMappingURL=install-app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ADT;AAED,C","sourcesContent":["#! /usr/bin/env node\n\nimport { log, use, getArchCliNames } from \"builder-util\"\nimport { printErrorAndExit } from \"builder-util/out/promise\"\nimport { computeDefaultAppDirectory, getConfig } from \"app-builder-lib/out/util/config\"\nimport { getElectronVersion } from \"app-builder-lib/out/electron/electronVersion\"\nimport { createLazyProductionDeps } from \"app-builder-lib/out/util/packageDependencies\"\nimport { installOrRebuild } from \"app-builder-lib/out/util/yarn\"\nimport { readJson } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { orNullIfFileNotExist } from \"read-config-file\"\nimport yargs from \"yargs\"\n\ndeclare const PACKAGE_VERSION: string\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 }\n catch (e) {\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 results = await Promise.all<string>([\n computeDefaultAppDirectory(projectDir, use(config.directories, it => it!.app)),\n getElectronVersion(projectDir, config, packageMetadata),\n ])\n\n // if two package.json — force full install (user wants to install/update app deps in addition to dev)\n await installOrRebuild(config, results[0], {\n frameworkInfo: {version: results[1], useCustomDist: true},\n platform: args.platform,\n arch: args.arch,\n productionDeps: createLazyProductionDeps(results[0], null),\n }, results[0] !== projectDir)\n}\n\nfunction main() {\n return installAppDeps(configureInstallAppDepsCommand(yargs).argv)\n}\n\nif (require.main === module) {\n log.warn(\"please use as subcommand: electron-builder install-app-deps\")\n main()\n .catch(printErrorAndExit)\n}"],"sourceRoot":""}

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.start = start;
/** @internal */
async function start() {
require("electron-webpack/dev-runner");
}
// __ts-babel@6.0.4
//# sourceMappingURL=start.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../src/cli/start.ts"],"names":[],"mappings":";;;;;;;AAAA;AACO,eAAe,KAAf,GAAoB;AACzB,EAAA,OAAO,CAAC,6BAAD,CAAP;AACD,C","sourcesContent":["/** @internal */\nexport async function start() {\n require(\"electron-webpack/dev-runner\")\n}"],"sourceRoot":""}