stuff
This commit is contained in:
36
buildfiles/node_modules/app-builder-lib/out/Framework.d.ts
generated
vendored
Normal file
36
buildfiles/node_modules/app-builder-lib/out/Framework.d.ts
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
import { FileTransformer } from "builder-util/out/fs";
|
||||
import { AsarIntegrity } from "./asar/integrity";
|
||||
import { Platform, PlatformPackager, ElectronPlatformName, AfterPackContext } from "./index";
|
||||
export interface Framework {
|
||||
readonly name: string;
|
||||
readonly version: string;
|
||||
readonly distMacOsAppName: string;
|
||||
readonly macOsDefaultTargets: Array<string>;
|
||||
readonly defaultAppIdPrefix: string;
|
||||
readonly isNpmRebuildRequired: boolean;
|
||||
readonly isCopyElevateHelper: boolean;
|
||||
getDefaultIcon?(platform: Platform): string | null;
|
||||
getMainFile?(platform: Platform): string | null;
|
||||
getExcludedDependencies?(platform: Platform): Array<string> | null;
|
||||
prepareApplicationStageDirectory(options: PrepareApplicationStageDirectoryOptions): Promise<any>;
|
||||
beforeCopyExtraFiles?(options: BeforeCopyExtraFilesOptions): Promise<any>;
|
||||
afterPack?(context: AfterPackContext): Promise<any>;
|
||||
createTransformer?(): FileTransformer | null;
|
||||
}
|
||||
export interface BeforeCopyExtraFilesOptions {
|
||||
packager: PlatformPackager<any>;
|
||||
appOutDir: string;
|
||||
asarIntegrity: AsarIntegrity | null;
|
||||
platformName: string;
|
||||
}
|
||||
export interface PrepareApplicationStageDirectoryOptions {
|
||||
readonly packager: PlatformPackager<any>;
|
||||
/**
|
||||
* Platform doesn't process application output directory in any way. Unpack implementation must create or empty dir if need.
|
||||
*/
|
||||
readonly appOutDir: string;
|
||||
readonly platformName: ElectronPlatformName;
|
||||
readonly arch: string;
|
||||
readonly version: string;
|
||||
}
|
||||
export declare function isElectronBased(framework: Framework): boolean;
|
12
buildfiles/node_modules/app-builder-lib/out/Framework.js
generated
vendored
Normal file
12
buildfiles/node_modules/app-builder-lib/out/Framework.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isElectronBased = isElectronBased;
|
||||
|
||||
function isElectronBased(framework) {
|
||||
return framework.name === "electron";
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=Framework.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/Framework.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/Framework.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/Framework.ts"],"names":[],"mappings":";;;;;;;AAmDM,SAAU,eAAV,CAA0B,SAA1B,EAA8C;AAClD,SAAO,SAAS,CAAC,IAAV,KAAmB,UAA1B;AACD,C","sourcesContent":["import { FileTransformer } from \"builder-util/out/fs\"\nimport { AsarIntegrity } from \"./asar/integrity\"\nimport { Platform, PlatformPackager, ElectronPlatformName, AfterPackContext } from \"./index\"\n\nexport interface Framework {\n readonly name: string\n readonly version: string\n readonly distMacOsAppName: string\n readonly macOsDefaultTargets: Array<string>\n readonly defaultAppIdPrefix: string\n\n readonly isNpmRebuildRequired: boolean\n\n readonly isCopyElevateHelper: boolean\n\n getDefaultIcon?(platform: Platform): string | null\n\n getMainFile?(platform: Platform): string | null\n\n getExcludedDependencies?(platform: Platform): Array<string> | null\n\n prepareApplicationStageDirectory(options: PrepareApplicationStageDirectoryOptions): Promise<any>\n\n beforeCopyExtraFiles?(options: BeforeCopyExtraFilesOptions): Promise<any>\n\n afterPack?(context: AfterPackContext): Promise<any>\n\n createTransformer?(): FileTransformer | null\n}\n\nexport interface BeforeCopyExtraFilesOptions {\n packager: PlatformPackager<any>\n appOutDir: string\n\n asarIntegrity: AsarIntegrity | null\n\n // ElectronPlatformName\n platformName: string\n}\n\nexport interface PrepareApplicationStageDirectoryOptions {\n readonly packager: PlatformPackager<any>\n /**\n * Platform doesn't process application output directory in any way. Unpack implementation must create or empty dir if need.\n */\n readonly appOutDir: string\n readonly platformName: ElectronPlatformName\n readonly arch: string\n readonly version: string\n}\n\nexport function isElectronBased(framework: Framework): boolean {\n return framework.name === \"electron\"\n}"],"sourceRoot":""}
|
10
buildfiles/node_modules/app-builder-lib/out/ProtonFramework.d.ts
generated
vendored
Normal file
10
buildfiles/node_modules/app-builder-lib/out/ProtonFramework.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { FileTransformer } from "builder-util/out/fs";
|
||||
import { Platform } from "./core";
|
||||
import { LibUiFramework } from "./frameworks/LibUiFramework";
|
||||
export declare class ProtonFramework extends LibUiFramework {
|
||||
readonly name = "proton";
|
||||
readonly defaultAppIdPrefix = "com.proton-native.";
|
||||
constructor(version: string, distMacOsAppName: string, isUseLaunchUi: boolean);
|
||||
getDefaultIcon(platform: Platform): string;
|
||||
createTransformer(): FileTransformer | null;
|
||||
}
|
159
buildfiles/node_modules/app-builder-lib/out/ProtonFramework.js
generated
vendored
Normal file
159
buildfiles/node_modules/app-builder-lib/out/ProtonFramework.js
generated
vendored
Normal file
@ -0,0 +1,159 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.ProtonFramework = void 0;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _builderUtilRuntime() {
|
||||
const data = require("builder-util-runtime");
|
||||
|
||||
_builderUtilRuntime = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require("./core");
|
||||
|
||||
_core = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fileTransformer() {
|
||||
const data = require("./fileTransformer");
|
||||
|
||||
_fileTransformer = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _LibUiFramework() {
|
||||
const data = require("./frameworks/LibUiFramework");
|
||||
|
||||
_LibUiFramework = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _pathManager() {
|
||||
const data = require("./util/pathManager");
|
||||
|
||||
_pathManager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
class ProtonFramework extends _LibUiFramework().LibUiFramework {
|
||||
constructor(version, distMacOsAppName, isUseLaunchUi) {
|
||||
super(version, distMacOsAppName, isUseLaunchUi);
|
||||
this.name = "proton"; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.defaultAppIdPrefix = "com.proton-native.";
|
||||
}
|
||||
|
||||
getDefaultIcon(platform) {
|
||||
if (platform === _core().Platform.WINDOWS) {
|
||||
return (0, _pathManager().getTemplatePath)("icons/proton-native/proton-native.ico");
|
||||
} else if (platform === _core().Platform.LINUX) {
|
||||
return (0, _pathManager().getTemplatePath)("icons/proton-native/linux");
|
||||
} else {
|
||||
return (0, _pathManager().getTemplatePath)("icons/proton-native/proton-native.icns");
|
||||
}
|
||||
}
|
||||
|
||||
createTransformer() {
|
||||
let babel;
|
||||
const babelOptions = {
|
||||
ast: false,
|
||||
sourceMaps: "inline"
|
||||
};
|
||||
|
||||
if (process.env.TEST_SET_BABEL_PRESET === "true") {
|
||||
babel = require("@babel/core"); // eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
|
||||
babel = testOnlyBabel(babel, babelOptions, this.version);
|
||||
} else {
|
||||
try {
|
||||
babel = require("babel-core");
|
||||
} catch (e) {
|
||||
// babel isn't installed
|
||||
_builderUtil().log.debug(null, "don't transpile source code using Babel");
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
_builderUtil().log.info({
|
||||
options: (0, _builderUtilRuntime().safeStringifyJson)(babelOptions, new Set(["presets"]))
|
||||
}, "transpile source code using Babel");
|
||||
|
||||
return file => {
|
||||
if (!(file.endsWith(".js") || file.endsWith(".jsx")) || file.includes(_fileTransformer().NODE_MODULES_PATTERN)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return babel.transformFile(file, babelOptions, (error, result) => {
|
||||
if (error == null) {
|
||||
resolve(result.code);
|
||||
} else {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.ProtonFramework = ProtonFramework;
|
||||
|
||||
function testOnlyBabel(babel, babelOptions, nodeVersion) {
|
||||
// out test dir can be located outside of electron-builder node_modules and babel cannot resolve string names of preset
|
||||
babelOptions.presets = [[require("@babel/preset-env").default, {
|
||||
targets: {
|
||||
node: nodeVersion
|
||||
}
|
||||
}], require("@babel/preset-react")];
|
||||
babelOptions.plugins = [// stage 0
|
||||
require("@babel/plugin-proposal-function-bind").default, // stage 1
|
||||
require("@babel/plugin-proposal-export-default-from").default, require("@babel/plugin-proposal-logical-assignment-operators").default, [require("@babel/plugin-proposal-optional-chaining").default, {
|
||||
loose: false
|
||||
}], [require("@babel/plugin-proposal-pipeline-operator").default, {
|
||||
proposal: "minimal"
|
||||
}], [require("@babel/plugin-proposal-nullish-coalescing-operator").default, {
|
||||
loose: false
|
||||
}], require("@babel/plugin-proposal-do-expressions").default, // stage 2
|
||||
[require("@babel/plugin-proposal-decorators").default, {
|
||||
legacy: true
|
||||
}], require("@babel/plugin-proposal-function-sent").default, require("@babel/plugin-proposal-export-namespace-from").default, require("@babel/plugin-proposal-numeric-separator").default, require("@babel/plugin-proposal-throw-expressions").default, // stage 3
|
||||
require("@babel/plugin-syntax-dynamic-import").default, require("@babel/plugin-syntax-import-meta").default, [require("@babel/plugin-proposal-class-properties").default, {
|
||||
loose: false
|
||||
}], require("@babel/plugin-proposal-json-strings").default];
|
||||
babelOptions.babelrc = false;
|
||||
return babel;
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=ProtonFramework.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/ProtonFramework.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/ProtonFramework.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
28
buildfiles/node_modules/app-builder-lib/out/appInfo.d.ts
generated
vendored
Normal file
28
buildfiles/node_modules/app-builder-lib/out/appInfo.d.ts
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import { PlatformSpecificBuildOptions } from "./options/PlatformSpecificBuildOptions";
|
||||
import { Packager } from "./packager";
|
||||
export declare function smarten(s: string): string;
|
||||
export declare class AppInfo {
|
||||
private readonly info;
|
||||
private readonly platformSpecificOptions;
|
||||
readonly description: string;
|
||||
readonly version: string;
|
||||
readonly shortVersion: string | undefined;
|
||||
readonly shortVersionWindows: string | undefined;
|
||||
readonly buildNumber: string | undefined;
|
||||
readonly buildVersion: string;
|
||||
readonly productName: string;
|
||||
readonly productFilename: string;
|
||||
constructor(info: Packager, buildVersion: string | null | undefined, platformSpecificOptions?: PlatformSpecificBuildOptions | null);
|
||||
get channel(): string | null;
|
||||
getVersionInWeirdWindowsForm(isSetBuildNumber?: boolean): string;
|
||||
private get notNullDevMetadata();
|
||||
get companyName(): string | null;
|
||||
get id(): string;
|
||||
get macBundleIdentifier(): string;
|
||||
get name(): string;
|
||||
get linuxPackageName(): string;
|
||||
get sanitizedName(): string;
|
||||
get updaterCacheDirName(): string;
|
||||
get copyright(): string;
|
||||
computePackageUrl(): Promise<string | null>;
|
||||
}
|
211
buildfiles/node_modules/app-builder-lib/out/appInfo.js
generated
vendored
Normal file
211
buildfiles/node_modules/app-builder-lib/out/appInfo.js
generated
vendored
Normal file
@ -0,0 +1,211 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.smarten = smarten;
|
||||
exports.filterCFBundleIdentifier = filterCFBundleIdentifier;
|
||||
exports.AppInfo = void 0;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _sanitizeFilename() {
|
||||
const data = _interopRequireDefault(require("sanitize-filename"));
|
||||
|
||||
_sanitizeFilename = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _semver() {
|
||||
const data = require("semver");
|
||||
|
||||
_semver = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _macroExpander() {
|
||||
const data = require("./util/macroExpander");
|
||||
|
||||
_macroExpander = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// fpm bug - rpm build --description is not escaped, well... decided to replace quite to smart quote
|
||||
// http://leancrew.com/all-this/2010/11/smart-quotes-in-javascript/
|
||||
function smarten(s) {
|
||||
// opening singles
|
||||
s = s.replace(/(^|[-\u2014\s(["])'/g, "$1\u2018"); // closing singles & apostrophes
|
||||
|
||||
s = s.replace(/'/g, "\u2019"); // opening doubles
|
||||
|
||||
s = s.replace(/(^|[-\u2014/[(\u2018\s])"/g, "$1\u201c"); // closing doubles
|
||||
|
||||
s = s.replace(/"/g, "\u201d");
|
||||
return s;
|
||||
}
|
||||
|
||||
class AppInfo {
|
||||
constructor(info, buildVersion, platformSpecificOptions = null) {
|
||||
this.info = info;
|
||||
this.platformSpecificOptions = platformSpecificOptions;
|
||||
this.description = smarten(this.info.metadata.description || "");
|
||||
this.version = info.metadata.version;
|
||||
|
||||
if (buildVersion == null) {
|
||||
buildVersion = info.config.buildVersion;
|
||||
}
|
||||
|
||||
this.buildNumber = process.env.BUILD_NUMBER || process.env.TRAVIS_BUILD_NUMBER || process.env.APPVEYOR_BUILD_NUMBER || process.env.CIRCLE_BUILD_NUM || process.env.BUILD_BUILDNUMBER || process.env.CI_PIPELINE_IID;
|
||||
|
||||
if (buildVersion == null) {
|
||||
buildVersion = this.version;
|
||||
|
||||
if (!(0, _builderUtil().isEmptyOrSpaces)(this.buildNumber)) {
|
||||
buildVersion += `.${this.buildNumber}`;
|
||||
}
|
||||
}
|
||||
|
||||
this.buildVersion = buildVersion;
|
||||
|
||||
if (info.metadata.shortVersion) {
|
||||
this.shortVersion = info.metadata.shortVersion;
|
||||
}
|
||||
|
||||
if (info.metadata.shortVersionWindows) {
|
||||
this.shortVersionWindows = info.metadata.shortVersionWindows;
|
||||
}
|
||||
|
||||
this.productName = info.config.productName || info.metadata.productName || info.metadata.name;
|
||||
this.productFilename = (0, _sanitizeFilename().default)(this.productName);
|
||||
}
|
||||
|
||||
get channel() {
|
||||
const prereleaseInfo = (0, _semver().prerelease)(this.version);
|
||||
|
||||
if (prereleaseInfo != null && prereleaseInfo.length > 0) {
|
||||
return prereleaseInfo[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
getVersionInWeirdWindowsForm(isSetBuildNumber = true) {
|
||||
const parsedVersion = new (_semver().SemVer)(this.version); // https://github.com/electron-userland/electron-builder/issues/2635#issuecomment-371792272
|
||||
|
||||
let buildNumber = isSetBuildNumber ? this.buildNumber : null;
|
||||
|
||||
if (buildNumber == null || !/^\d+$/.test(buildNumber)) {
|
||||
buildNumber = "0";
|
||||
}
|
||||
|
||||
return `${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch}.${buildNumber}`;
|
||||
}
|
||||
|
||||
get notNullDevMetadata() {
|
||||
return this.info.devMetadata || {};
|
||||
}
|
||||
|
||||
get companyName() {
|
||||
const author = this.info.metadata.author || this.notNullDevMetadata.author;
|
||||
return author == null ? null : author.name;
|
||||
}
|
||||
|
||||
get id() {
|
||||
let appId = null;
|
||||
|
||||
for (const options of [this.platformSpecificOptions, this.info.config]) {
|
||||
if (options != null && appId == null) {
|
||||
appId = options.appId;
|
||||
}
|
||||
}
|
||||
|
||||
const generateDefaultAppId = () => {
|
||||
const info = this.info;
|
||||
return `${info.framework.defaultAppIdPrefix}${info.metadata.name.toLowerCase()}`;
|
||||
};
|
||||
|
||||
if (appId != null && (appId === "your.id" || (0, _builderUtil().isEmptyOrSpaces)(appId))) {
|
||||
const incorrectAppId = appId;
|
||||
appId = generateDefaultAppId();
|
||||
|
||||
_builderUtil().log.warn(`do not use "${incorrectAppId}" as appId, "${appId}" will be used instead`);
|
||||
}
|
||||
|
||||
return appId == null ? generateDefaultAppId() : appId;
|
||||
}
|
||||
|
||||
get macBundleIdentifier() {
|
||||
return filterCFBundleIdentifier(this.id);
|
||||
}
|
||||
|
||||
get name() {
|
||||
return this.info.metadata.name;
|
||||
}
|
||||
|
||||
get linuxPackageName() {
|
||||
const name = this.name; // https://github.com/electron-userland/electron-builder/issues/2963
|
||||
|
||||
return name.startsWith("@") ? this.productFilename : name;
|
||||
}
|
||||
|
||||
get sanitizedName() {
|
||||
return (0, _sanitizeFilename().default)(this.name);
|
||||
}
|
||||
|
||||
get updaterCacheDirName() {
|
||||
return this.sanitizedName.toLowerCase() + "-updater";
|
||||
}
|
||||
|
||||
get copyright() {
|
||||
const copyright = this.info.config.copyright;
|
||||
|
||||
if (copyright != null) {
|
||||
return (0, _macroExpander().expandMacro)(copyright, null, this);
|
||||
}
|
||||
|
||||
return `Copyright © ${new Date().getFullYear()} ${this.companyName || this.productName}`;
|
||||
}
|
||||
|
||||
async computePackageUrl() {
|
||||
const url = this.info.metadata.homepage || this.notNullDevMetadata.homepage;
|
||||
|
||||
if (url != null) {
|
||||
return url;
|
||||
}
|
||||
|
||||
const info = await this.info.repositoryInfo;
|
||||
return info == null || info.type !== "github" ? null : `https://${info.domain}/${info.user}/${info.project}`;
|
||||
}
|
||||
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
exports.AppInfo = AppInfo;
|
||||
|
||||
function filterCFBundleIdentifier(identifier) {
|
||||
// Remove special characters and allow only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.)
|
||||
// Apple documentation: https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070
|
||||
return identifier.replace(/ /g, "-").replace(/[^a-zA-Z0-9.-]/g, "");
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=appInfo.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/appInfo.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/appInfo.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
buildfiles/node_modules/app-builder-lib/out/asar/asar.d.ts
generated
vendored
Normal file
2
buildfiles/node_modules/app-builder-lib/out/asar/asar.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare function readAsar(archive: string): Promise<AsarFilesystem>;
|
||||
export declare function readAsarJson(archive: string, file: string): Promise<any>;
|
213
buildfiles/node_modules/app-builder-lib/out/asar/asar.js
generated
vendored
Normal file
213
buildfiles/node_modules/app-builder-lib/out/asar/asar.js
generated
vendored
Normal file
@ -0,0 +1,213 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.readAsar = readAsar;
|
||||
exports.readAsarJson = readAsarJson;
|
||||
exports.AsarFilesystem = exports.Node = void 0;
|
||||
|
||||
function _chromiumPickleJs() {
|
||||
const data = require("chromium-pickle-js");
|
||||
|
||||
_chromiumPickleJs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
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 */
|
||||
class Node {}
|
||||
/** @internal */
|
||||
|
||||
|
||||
exports.Node = Node;
|
||||
|
||||
class AsarFilesystem {
|
||||
constructor(src, header = new Node(), headerSize = -1) {
|
||||
this.src = src;
|
||||
this.header = header;
|
||||
this.headerSize = headerSize;
|
||||
this.offset = 0;
|
||||
|
||||
if (this.header.files == null) {
|
||||
this.header.files = {};
|
||||
}
|
||||
}
|
||||
|
||||
searchNodeFromDirectory(p, isCreate) {
|
||||
let node = this.header;
|
||||
|
||||
for (const dir of p.split(path.sep)) {
|
||||
if (dir !== ".") {
|
||||
let child = node.files[dir];
|
||||
|
||||
if (child == null) {
|
||||
if (!isCreate) {
|
||||
return null;
|
||||
}
|
||||
|
||||
child = new Node();
|
||||
child.files = {};
|
||||
node.files[dir] = child;
|
||||
}
|
||||
|
||||
node = child;
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
getOrCreateNode(p) {
|
||||
if (p == null || p.length === 0) {
|
||||
return this.header;
|
||||
}
|
||||
|
||||
const name = path.basename(p);
|
||||
const dirNode = this.searchNodeFromDirectory(path.dirname(p), true);
|
||||
|
||||
if (dirNode.files == null) {
|
||||
dirNode.files = {};
|
||||
}
|
||||
|
||||
let result = dirNode.files[name];
|
||||
|
||||
if (result == null) {
|
||||
result = new Node();
|
||||
dirNode.files[name] = result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
addFileNode(file, dirNode, size, unpacked, stat) {
|
||||
if (size > 4294967295) {
|
||||
throw new Error(`${file}: file size cannot be larger than 4.2GB`);
|
||||
}
|
||||
|
||||
const node = new Node();
|
||||
node.size = size;
|
||||
|
||||
if (unpacked) {
|
||||
node.unpacked = true;
|
||||
} else {
|
||||
// electron expects string
|
||||
node.offset = this.offset.toString();
|
||||
|
||||
if (process.platform !== "win32" && stat.mode & 0o100) {
|
||||
node.executable = true;
|
||||
}
|
||||
|
||||
this.offset += node.size;
|
||||
}
|
||||
|
||||
let children = dirNode.files;
|
||||
|
||||
if (children == null) {
|
||||
children = {};
|
||||
dirNode.files = children;
|
||||
}
|
||||
|
||||
children[path.basename(file)] = node;
|
||||
return node;
|
||||
}
|
||||
|
||||
getNode(p) {
|
||||
const node = this.searchNodeFromDirectory(path.dirname(p), false);
|
||||
return node.files[path.basename(p)];
|
||||
}
|
||||
|
||||
getFile(p, followLinks = true) {
|
||||
const info = this.getNode(p); // if followLinks is false we don't resolve symlinks
|
||||
|
||||
return followLinks && info.link != null ? this.getFile(info.link) : info;
|
||||
}
|
||||
|
||||
async readJson(file) {
|
||||
return JSON.parse((await this.readFile(file)).toString());
|
||||
}
|
||||
|
||||
readFile(file) {
|
||||
return readFileFromAsar(this, file, this.getFile(file));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.AsarFilesystem = AsarFilesystem;
|
||||
|
||||
async function readAsar(archive) {
|
||||
const fd = await (0, _fsExtra().open)(archive, "r");
|
||||
let size;
|
||||
let headerBuf;
|
||||
|
||||
try {
|
||||
const sizeBuf = Buffer.allocUnsafe(8);
|
||||
|
||||
if ((await (0, _fsExtra().read)(fd, sizeBuf, 0, 8, null)).bytesRead !== 8) {
|
||||
throw new Error("Unable to read header size");
|
||||
}
|
||||
|
||||
const sizePickle = (0, _chromiumPickleJs().createFromBuffer)(sizeBuf);
|
||||
size = sizePickle.createIterator().readUInt32();
|
||||
headerBuf = Buffer.allocUnsafe(size);
|
||||
|
||||
if ((await (0, _fsExtra().read)(fd, headerBuf, 0, size, null)).bytesRead !== size) {
|
||||
throw new Error("Unable to read header");
|
||||
}
|
||||
} finally {
|
||||
await (0, _fsExtra().close)(fd);
|
||||
}
|
||||
|
||||
const headerPickle = (0, _chromiumPickleJs().createFromBuffer)(headerBuf);
|
||||
const header = headerPickle.createIterator().readString();
|
||||
return new AsarFilesystem(archive, JSON.parse(header), size);
|
||||
}
|
||||
|
||||
async function readAsarJson(archive, file) {
|
||||
const fs = await readAsar(archive);
|
||||
return await fs.readJson(file);
|
||||
}
|
||||
|
||||
async function readFileFromAsar(filesystem, filename, info) {
|
||||
const size = info.size;
|
||||
const buffer = Buffer.allocUnsafe(size);
|
||||
|
||||
if (size <= 0) {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
if (info.unpacked) {
|
||||
return await (0, _fsExtra().readFile)(path.join(`${filesystem.src}.unpacked`, filename));
|
||||
}
|
||||
|
||||
const fd = await (0, _fsExtra().open)(filesystem.src, "r");
|
||||
|
||||
try {
|
||||
const offset = 8 + filesystem.headerSize + parseInt(info.offset, 10);
|
||||
await (0, _fsExtra().read)(fd, buffer, 0, size, offset);
|
||||
} finally {
|
||||
await (0, _fsExtra().close)(fd);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=asar.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/asar/asar.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/asar.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
buildfiles/node_modules/app-builder-lib/out/asar/asarFileChecker.d.ts
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/asarFileChecker.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
66
buildfiles/node_modules/app-builder-lib/out/asar/asarFileChecker.js
generated
vendored
Normal file
66
buildfiles/node_modules/app-builder-lib/out/asar/asarFileChecker.js
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.checkFileInArchive = checkFileInArchive;
|
||||
|
||||
function _fs() {
|
||||
const data = require("builder-util/out/fs");
|
||||
|
||||
_fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _asar() {
|
||||
const data = require("./asar");
|
||||
|
||||
_asar = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
async function checkFileInArchive(asarFile, relativeFile, messagePrefix) {
|
||||
function error(text) {
|
||||
return new Error(`${messagePrefix} "${relativeFile}" in the "${asarFile}" ${text}`);
|
||||
}
|
||||
|
||||
let fs;
|
||||
|
||||
try {
|
||||
fs = await (0, _asar().readAsar)(asarFile);
|
||||
} catch (e) {
|
||||
throw error(`is corrupted: ${e}`);
|
||||
}
|
||||
|
||||
let stat;
|
||||
|
||||
try {
|
||||
stat = fs.getFile(relativeFile);
|
||||
} catch (e) {
|
||||
const fileStat = await (0, _fs().statOrNull)(asarFile);
|
||||
|
||||
if (fileStat == null) {
|
||||
throw error(`does not exist. Seems like a wrong configuration.`);
|
||||
} // asar throws error on access to undefined object (info.link)
|
||||
|
||||
|
||||
stat = null;
|
||||
}
|
||||
|
||||
if (stat == null) {
|
||||
throw error(`does not exist. Seems like a wrong configuration.`);
|
||||
}
|
||||
|
||||
if (stat.size === 0) {
|
||||
throw error(`is corrupted: size 0`);
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=asarFileChecker.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/asar/asarFileChecker.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/asarFileChecker.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/asar/asarFileChecker.ts"],"names":[],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AACO,eAAe,kBAAf,CAAkC,QAAlC,EAAoD,YAApD,EAA0E,aAA1E,EAA+F;AACpG,WAAS,KAAT,CAAe,IAAf,EAA2B;AACzB,WAAO,IAAI,KAAJ,CAAU,GAAG,aAAa,KAAK,YAAY,aAAa,QAAQ,KAAK,IAAI,EAAzE,CAAP;AACD;;AAED,MAAI,EAAJ;;AACA,MAAI;AACF,IAAA,EAAE,GAAG,MAAM,sBAAS,QAAT,CAAX;AACD,GAFD,CAGA,OAAO,CAAP,EAAU;AACR,UAAM,KAAK,CAAC,iBAAiB,CAAC,EAAnB,CAAX;AACD;;AAED,MAAI,IAAJ;;AACA,MAAI;AACF,IAAA,IAAI,GAAG,EAAE,CAAC,OAAH,CAAW,YAAX,CAAP;AACD,GAFD,CAGA,OAAO,CAAP,EAAU;AACR,UAAM,QAAQ,GAAG,MAAM,sBAAW,QAAX,CAAvB;;AACA,QAAI,QAAQ,IAAI,IAAhB,EAAsB;AACpB,YAAM,KAAK,CAAC,mDAAD,CAAX;AACD,KAJO,CAMR;;;AACA,IAAA,IAAI,GAAG,IAAP;AACD;;AAED,MAAI,IAAI,IAAI,IAAZ,EAAkB;AAChB,UAAM,KAAK,CAAC,mDAAD,CAAX;AACD;;AACD,MAAI,IAAI,CAAC,IAAL,KAAc,CAAlB,EAAqB;AACnB,UAAM,KAAK,CAAC,sBAAD,CAAX;AACD;AACF,C","sourcesContent":["import { statOrNull } from \"builder-util/out/fs\"\nimport { Node, readAsar } from \"./asar\"\n\n/** @internal */\nexport async function checkFileInArchive(asarFile: string, relativeFile: string, messagePrefix: string) {\n function error(text: string) {\n return new Error(`${messagePrefix} \"${relativeFile}\" in the \"${asarFile}\" ${text}`)\n }\n\n let fs\n try {\n fs = await readAsar(asarFile)\n }\n catch (e) {\n throw error(`is corrupted: ${e}`)\n }\n\n let stat: Node | null\n try {\n stat = fs.getFile(relativeFile)\n }\n catch (e) {\n const fileStat = await statOrNull(asarFile)\n if (fileStat == null) {\n throw error(`does not exist. Seems like a wrong configuration.`)\n }\n\n // asar throws error on access to undefined object (info.link)\n stat = null\n }\n\n if (stat == null) {\n throw error(`does not exist. Seems like a wrong configuration.`)\n }\n if (stat.size === 0) {\n throw error(`is corrupted: size 0`)\n }\n}\n"],"sourceRoot":""}
|
1
buildfiles/node_modules/app-builder-lib/out/asar/asarUtil.d.ts
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/asarUtil.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
347
buildfiles/node_modules/app-builder-lib/out/asar/asarUtil.js
generated
vendored
Normal file
347
buildfiles/node_modules/app-builder-lib/out/asar/asarUtil.js
generated
vendored
Normal file
@ -0,0 +1,347 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.AsarPackager = void 0;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
var _fs2 = require("fs");
|
||||
|
||||
function _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _appFileCopier() {
|
||||
const data = require("../util/appFileCopier");
|
||||
|
||||
_appFileCopier = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _asar() {
|
||||
const data = require("./asar");
|
||||
|
||||
_asar = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _unpackDetector() {
|
||||
const data = require("./unpackDetector");
|
||||
|
||||
_unpackDetector = 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; }
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const pickle = require("chromium-pickle-js");
|
||||
/** @internal */
|
||||
|
||||
|
||||
class AsarPackager {
|
||||
constructor(src, destination, options, unpackPattern) {
|
||||
this.src = src;
|
||||
this.destination = destination;
|
||||
this.options = options;
|
||||
this.unpackPattern = unpackPattern;
|
||||
this.fs = new (_asar().AsarFilesystem)(this.src);
|
||||
this.outFile = path.join(destination, "app.asar");
|
||||
this.unpackedDest = `${this.outFile}.unpacked`;
|
||||
} // sort files to minimize file change (i.e. asar file is not changed dramatically on small change)
|
||||
|
||||
|
||||
async pack(fileSets, packager) {
|
||||
if (this.options.ordering != null) {
|
||||
// ordering doesn't support transformed files, but ordering is not used functionality - wait user report to fix it
|
||||
await order(fileSets[0].files, this.options.ordering, fileSets[0].src);
|
||||
}
|
||||
|
||||
await (0, _fsExtra().ensureDir)(path.dirname(this.outFile));
|
||||
const unpackedFileIndexMap = new Map();
|
||||
|
||||
for (const fileSet of fileSets) {
|
||||
unpackedFileIndexMap.set(fileSet, await this.createPackageFromFiles(fileSet, packager.info));
|
||||
}
|
||||
|
||||
await this.writeAsarFile(fileSets, unpackedFileIndexMap);
|
||||
}
|
||||
|
||||
async createPackageFromFiles(fileSet, packager) {
|
||||
const metadata = fileSet.metadata; // search auto unpacked dir
|
||||
|
||||
const unpackedDirs = new Set();
|
||||
const rootForAppFilesWithoutAsar = path.join(this.destination, "app");
|
||||
|
||||
if (this.options.smartUnpack !== false) {
|
||||
await (0, _unpackDetector().detectUnpackedDirs)(fileSet, unpackedDirs, this.unpackedDest, rootForAppFilesWithoutAsar);
|
||||
}
|
||||
|
||||
const dirToCreateForUnpackedFiles = new Set(unpackedDirs);
|
||||
|
||||
const correctDirNodeUnpackedFlag = async (filePathInArchive, dirNode) => {
|
||||
for (const dir of unpackedDirs) {
|
||||
if (filePathInArchive.length > dir.length + 2 && filePathInArchive[dir.length] === path.sep && filePathInArchive.startsWith(dir)) {
|
||||
dirNode.unpacked = true;
|
||||
unpackedDirs.add(filePathInArchive); // not all dirs marked as unpacked after first iteration - because node module dir can be marked as unpacked after processing node module dir content
|
||||
// e.g. node-notifier/example/advanced.js processed, but only on process vendor/terminal-notifier.app module will be marked as unpacked
|
||||
|
||||
await (0, _fsExtra().ensureDir)(path.join(this.unpackedDest, filePathInArchive));
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const transformedFiles = fileSet.transformedFiles;
|
||||
const taskManager = new (_builderUtil().AsyncTaskManager)(packager.cancellationToken);
|
||||
const fileCopier = new (_fs().FileCopier)();
|
||||
let currentDirNode = null;
|
||||
let currentDirPath = null;
|
||||
const unpackedFileIndexSet = new Set();
|
||||
|
||||
for (let i = 0, n = fileSet.files.length; i < n; i++) {
|
||||
const file = fileSet.files[i];
|
||||
const stat = metadata.get(file);
|
||||
|
||||
if (stat == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const pathInArchive = path.relative(rootForAppFilesWithoutAsar, (0, _appFileCopier().getDestinationPath)(file, fileSet));
|
||||
|
||||
if (stat.isSymbolicLink()) {
|
||||
const s = stat;
|
||||
this.fs.getOrCreateNode(pathInArchive).link = s.relativeLink;
|
||||
s.pathInArchive = pathInArchive;
|
||||
unpackedFileIndexSet.add(i);
|
||||
continue;
|
||||
}
|
||||
|
||||
let fileParent = path.dirname(pathInArchive);
|
||||
|
||||
if (fileParent === ".") {
|
||||
fileParent = "";
|
||||
}
|
||||
|
||||
if (currentDirPath !== fileParent) {
|
||||
if (fileParent.startsWith("..")) {
|
||||
throw new Error(`Internal error: path must not start with "..": ${fileParent}`);
|
||||
}
|
||||
|
||||
currentDirPath = fileParent;
|
||||
currentDirNode = this.fs.getOrCreateNode(fileParent); // do not check for root
|
||||
|
||||
if (fileParent !== "" && !currentDirNode.unpacked) {
|
||||
if (unpackedDirs.has(fileParent)) {
|
||||
currentDirNode.unpacked = true;
|
||||
} else {
|
||||
await correctDirNodeUnpackedFlag(fileParent, currentDirNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const dirNode = currentDirNode;
|
||||
const newData = transformedFiles == null ? null : transformedFiles.get(i);
|
||||
const isUnpacked = dirNode.unpacked || this.unpackPattern != null && this.unpackPattern(file, stat);
|
||||
this.fs.addFileNode(file, dirNode, newData == null ? stat.size : Buffer.byteLength(newData), isUnpacked, stat);
|
||||
|
||||
if (isUnpacked) {
|
||||
if (!dirNode.unpacked && !dirToCreateForUnpackedFiles.has(fileParent)) {
|
||||
dirToCreateForUnpackedFiles.add(fileParent);
|
||||
await (0, _fsExtra().ensureDir)(path.join(this.unpackedDest, fileParent));
|
||||
}
|
||||
|
||||
const unpackedFile = path.join(this.unpackedDest, pathInArchive);
|
||||
taskManager.addTask(copyFileOrData(fileCopier, newData, file, unpackedFile, stat));
|
||||
|
||||
if (taskManager.tasks.length > _fs().MAX_FILE_REQUESTS) {
|
||||
await taskManager.awaitTasks();
|
||||
}
|
||||
|
||||
unpackedFileIndexSet.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (taskManager.tasks.length > 0) {
|
||||
await taskManager.awaitTasks();
|
||||
}
|
||||
|
||||
return unpackedFileIndexSet;
|
||||
}
|
||||
|
||||
writeAsarFile(fileSets, unpackedFileIndexMap) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const headerPickle = pickle.createEmpty();
|
||||
headerPickle.writeString(JSON.stringify(this.fs.header));
|
||||
const headerBuf = headerPickle.toBuffer();
|
||||
const sizePickle = pickle.createEmpty();
|
||||
sizePickle.writeUInt32(headerBuf.length);
|
||||
const sizeBuf = sizePickle.toBuffer();
|
||||
const writeStream = (0, _fsExtra().createWriteStream)(this.outFile);
|
||||
writeStream.on("error", reject);
|
||||
writeStream.on("close", resolve);
|
||||
writeStream.write(sizeBuf);
|
||||
let fileSetIndex = 0;
|
||||
let files = fileSets[0].files;
|
||||
let metadata = fileSets[0].metadata;
|
||||
let transformedFiles = fileSets[0].transformedFiles;
|
||||
let unpackedFileIndexSet = unpackedFileIndexMap.get(fileSets[0]);
|
||||
|
||||
const w = index => {
|
||||
while (true) {
|
||||
if (index >= files.length) {
|
||||
if (++fileSetIndex >= fileSets.length) {
|
||||
writeStream.end();
|
||||
return;
|
||||
} else {
|
||||
files = fileSets[fileSetIndex].files;
|
||||
metadata = fileSets[fileSetIndex].metadata;
|
||||
transformedFiles = fileSets[fileSetIndex].transformedFiles;
|
||||
unpackedFileIndexSet = unpackedFileIndexMap.get(fileSets[fileSetIndex]);
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!unpackedFileIndexSet.has(index)) {
|
||||
break;
|
||||
} else {
|
||||
const stat = metadata.get(files[index]);
|
||||
|
||||
if (stat != null && stat.isSymbolicLink()) {
|
||||
(0, _fs2.symlink)(stat.linkRelativeToFile, path.join(this.unpackedDest, stat.pathInArchive), () => w(index + 1));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
const data = transformedFiles == null ? null : transformedFiles.get(index);
|
||||
const file = files[index];
|
||||
|
||||
if (data !== null && data !== undefined) {
|
||||
writeStream.write(data, () => w(index + 1));
|
||||
return;
|
||||
} // https://github.com/yarnpkg/yarn/pull/3539
|
||||
|
||||
|
||||
const stat = metadata.get(file);
|
||||
|
||||
if (stat != null && stat.size < 2 * 1024 * 1024) {
|
||||
(0, _fsExtra().readFile)(file).then(it => {
|
||||
writeStream.write(it, () => w(index + 1));
|
||||
}).catch(e => reject(`Cannot read file ${file}: ${e.stack || e}`));
|
||||
} else {
|
||||
const readStream = (0, _fsExtra().createReadStream)(file);
|
||||
readStream.on("error", reject);
|
||||
readStream.once("end", () => w(index + 1));
|
||||
readStream.pipe(writeStream, {
|
||||
end: false
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
writeStream.write(headerBuf, () => w(0));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.AsarPackager = AsarPackager;
|
||||
|
||||
async function order(filenames, orderingFile, src) {
|
||||
const orderingFiles = (await (0, _fsExtra().readFile)(orderingFile, "utf8")).split("\n").map(line => {
|
||||
if (line.indexOf(":") !== -1) {
|
||||
line = line.split(":").pop();
|
||||
}
|
||||
|
||||
line = line.trim();
|
||||
|
||||
if (line[0] === "/") {
|
||||
line = line.slice(1);
|
||||
}
|
||||
|
||||
return line;
|
||||
});
|
||||
const ordering = [];
|
||||
|
||||
for (const file of orderingFiles) {
|
||||
const pathComponents = file.split(path.sep);
|
||||
|
||||
for (const pathComponent of pathComponents) {
|
||||
ordering.push(path.join(src, pathComponent));
|
||||
}
|
||||
}
|
||||
|
||||
const sortedFiles = [];
|
||||
let missing = 0;
|
||||
const total = filenames.length;
|
||||
|
||||
for (const file of ordering) {
|
||||
if (!sortedFiles.includes(file) && filenames.includes(file)) {
|
||||
sortedFiles.push(file);
|
||||
}
|
||||
}
|
||||
|
||||
for (const file of filenames) {
|
||||
if (!sortedFiles.includes(file)) {
|
||||
sortedFiles.push(file);
|
||||
missing += 1;
|
||||
}
|
||||
}
|
||||
|
||||
_builderUtil().log.info({
|
||||
coverage: (total - missing) / total * 100
|
||||
}, "ordering files in ASAR archive");
|
||||
|
||||
return sortedFiles;
|
||||
}
|
||||
|
||||
function copyFileOrData(fileCopier, data, source, destination, stats) {
|
||||
if (data == null) {
|
||||
return fileCopier.copy(source, destination, stats);
|
||||
} else {
|
||||
return (0, _fsExtra().writeFile)(destination, data);
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=asarUtil.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/asar/asarUtil.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/asarUtil.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
14
buildfiles/node_modules/app-builder-lib/out/asar/integrity.d.ts
generated
vendored
Normal file
14
buildfiles/node_modules/app-builder-lib/out/asar/integrity.d.ts
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
export interface AsarIntegrityOptions {
|
||||
/**
|
||||
* Allows external asar files.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly externalAllowed?: boolean;
|
||||
}
|
||||
export interface AsarIntegrity extends AsarIntegrityOptions {
|
||||
checksums: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
export declare function computeData(resourcesPath: string, options?: AsarIntegrityOptions | null): Promise<AsarIntegrity>;
|
77
buildfiles/node_modules/app-builder-lib/out/asar/integrity.js
generated
vendored
Normal file
77
buildfiles/node_modules/app-builder-lib/out/asar/integrity.js
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.computeData = computeData;
|
||||
|
||||
function _bluebirdLst() {
|
||||
const data = _interopRequireDefault(require("bluebird-lst"));
|
||||
|
||||
_bluebirdLst = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _crypto() {
|
||||
const data = require("crypto");
|
||||
|
||||
_crypto = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _fs = require("fs");
|
||||
|
||||
function _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
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 }; }
|
||||
|
||||
async function computeData(resourcesPath, options) {
|
||||
// sort to produce constant result
|
||||
const names = (await (0, _fsExtra().readdir)(resourcesPath)).filter(it => it.endsWith(".asar")).sort();
|
||||
const checksums = await _bluebirdLst().default.map(names, it => hashFile(path.join(resourcesPath, it)));
|
||||
const result = {};
|
||||
|
||||
for (let i = 0; i < names.length; i++) {
|
||||
result[names[i]] = checksums[i];
|
||||
}
|
||||
|
||||
return {
|
||||
checksums: result,
|
||||
...options
|
||||
};
|
||||
}
|
||||
|
||||
function hashFile(file, algorithm = "sha512", encoding = "base64") {
|
||||
return new Promise((resolve, reject) => {
|
||||
const hash = (0, _crypto().createHash)(algorithm);
|
||||
hash.on("error", reject).setEncoding(encoding);
|
||||
(0, _fs.createReadStream)(file).on("error", reject).on("end", () => {
|
||||
hash.end();
|
||||
resolve(hash.read());
|
||||
}).pipe(hash, {
|
||||
end: false
|
||||
});
|
||||
});
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=integrity.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/asar/integrity.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/integrity.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/asar/integrity.ts"],"names":[],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;;;;;;;;AAeO,eAAe,WAAf,CAA2B,aAA3B,EAAkD,OAAlD,EAAuF;AAC5F;AACA,QAAM,KAAK,GAAG,CAAC,MAAM,wBAAQ,aAAR,CAAP,EAA+B,MAA/B,CAAsC,EAAE,IAAI,EAAE,CAAC,QAAH,CAAY,OAAZ,CAA5C,EAAkE,IAAlE,EAAd;AACA,QAAM,SAAS,GAAG,MAAM,uBAAgB,GAAhB,CAAoB,KAApB,EAA2B,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAL,CAAU,aAAV,EAAyB,EAAzB,CAAD,CAAzC,CAAxB;AAEA,QAAM,MAAM,GAA8B,EAA1C;;AACA,OAAK,IAAI,CAAC,GAAG,CAAb,EAAgB,CAAC,GAAG,KAAK,CAAC,MAA1B,EAAkC,CAAC,EAAnC,EAAuC;AACrC,IAAA,MAAM,CAAC,KAAK,CAAC,CAAD,CAAN,CAAN,GAAmB,SAAS,CAAC,CAAD,CAA5B;AACD;;AACD,SAAO;AAAC,IAAA,SAAS,EAAE,MAAZ;AAAoB,OAAG;AAAvB,GAAP;AACD;;AAED,SAAS,QAAT,CAAkB,IAAlB,EAAgC,SAAA,GAAoB,QAApD,EAA8D,QAAA,GAAwC,QAAtG,EAA8G;AAC5G,SAAO,IAAI,OAAJ,CAAoB,CAAC,OAAD,EAAU,MAAV,KAAoB;AAC7C,UAAM,IAAI,GAAG,0BAAW,SAAX,CAAb;AACA,IAAA,IAAI,CACD,EADH,CACM,OADN,EACe,MADf,EAEG,WAFH,CAEe,QAFf;AAIA,8BAAiB,IAAjB,EACG,EADH,CACM,OADN,EACe,MADf,EAEG,EAFH,CAEM,KAFN,EAEa,MAAK;AACd,MAAA,IAAI,CAAC,GAAL;AACA,MAAA,OAAO,CAAC,IAAI,CAAC,IAAL,EAAD,CAAP;AACD,KALH,EAMG,IANH,CAMQ,IANR,EAMc;AAAC,MAAA,GAAG,EAAE;AAAN,KANd;AAOD,GAbM,CAAP;AAcD,C","sourcesContent":["import BluebirdPromise from \"bluebird-lst\"\nimport { createHash } from \"crypto\"\nimport { createReadStream } from \"fs\"\nimport { readdir } from \"fs-extra\"\nimport * as path from \"path\"\n\nexport interface AsarIntegrityOptions {\n /**\n * Allows external asar files.\n *\n * @default false\n */\n readonly externalAllowed?: boolean\n}\n\nexport interface AsarIntegrity extends AsarIntegrityOptions {\n checksums: { [key: string]: string }\n}\n\nexport async function computeData(resourcesPath: string, options?: AsarIntegrityOptions | null): Promise<AsarIntegrity> {\n // sort to produce constant result\n const names = (await readdir(resourcesPath)).filter(it => it.endsWith(\".asar\")).sort()\n const checksums = await BluebirdPromise.map(names, it => hashFile(path.join(resourcesPath, it)))\n\n const result: { [key: string]: string } = {}\n for (let i = 0; i < names.length; i++) {\n result[names[i]] = checksums[i]\n }\n return {checksums: result, ...options}\n}\n\nfunction hashFile(file: string, algorithm: string = \"sha512\", encoding: \"hex\" | \"base64\" | \"latin1\" = \"base64\") {\n return new Promise<string>((resolve, reject) => {\n const hash = createHash(algorithm)\n hash\n .on(\"error\", reject)\n .setEncoding(encoding)\n\n createReadStream(file)\n .on(\"error\", reject)\n .on(\"end\", () => {\n hash.end()\n resolve(hash.read() as string)\n })\n .pipe(hash, {end: false})\n })\n}"],"sourceRoot":""}
|
1
buildfiles/node_modules/app-builder-lib/out/asar/unpackDetector.d.ts
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/unpackDetector.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function isLibOrExe(file: string): boolean;
|
206
buildfiles/node_modules/app-builder-lib/out/asar/unpackDetector.js
generated
vendored
Normal file
206
buildfiles/node_modules/app-builder-lib/out/asar/unpackDetector.js
generated
vendored
Normal file
@ -0,0 +1,206 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isLibOrExe = isLibOrExe;
|
||||
exports.detectUnpackedDirs = detectUnpackedDirs;
|
||||
|
||||
function _bluebirdLst() {
|
||||
const data = _interopRequireDefault(require("bluebird-lst"));
|
||||
|
||||
_bluebirdLst = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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 _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _isbinaryfile() {
|
||||
const data = require("isbinaryfile");
|
||||
|
||||
_isbinaryfile = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _fileTransformer() {
|
||||
const data = require("../fileTransformer");
|
||||
|
||||
_fileTransformer = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _appFileCopier() {
|
||||
const data = require("../util/appFileCopier");
|
||||
|
||||
_appFileCopier = 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 }; }
|
||||
|
||||
function addValue(map, key, value) {
|
||||
let list = map.get(key);
|
||||
|
||||
if (list == null) {
|
||||
list = [value];
|
||||
map.set(key, list);
|
||||
} else {
|
||||
list.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
function isLibOrExe(file) {
|
||||
return file.endsWith(".dll") || file.endsWith(".exe") || file.endsWith(".dylib") || file.endsWith(".so");
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
async function detectUnpackedDirs(fileSet, autoUnpackDirs, unpackedDest, rootForAppFilesWithoutAsar) {
|
||||
const dirToCreate = new Map();
|
||||
const metadata = fileSet.metadata;
|
||||
|
||||
function addParents(child, root) {
|
||||
child = path.dirname(child);
|
||||
|
||||
if (autoUnpackDirs.has(child)) {
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
autoUnpackDirs.add(child);
|
||||
const p = path.dirname(child); // create parent dir to be able to copy file later without directory existence check
|
||||
|
||||
addValue(dirToCreate, p, path.basename(child));
|
||||
|
||||
if (child === root || p === root || autoUnpackDirs.has(p)) {
|
||||
break;
|
||||
}
|
||||
|
||||
child = p;
|
||||
} while (true);
|
||||
|
||||
autoUnpackDirs.add(root);
|
||||
}
|
||||
|
||||
for (let i = 0, n = fileSet.files.length; i < n; i++) {
|
||||
const file = fileSet.files[i];
|
||||
const index = file.lastIndexOf(_fileTransformer().NODE_MODULES_PATTERN);
|
||||
|
||||
if (index < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let nextSlashIndex = file.indexOf(path.sep, index + _fileTransformer().NODE_MODULES_PATTERN.length + 1);
|
||||
|
||||
if (nextSlashIndex < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file[index + _fileTransformer().NODE_MODULES_PATTERN.length] === "@") {
|
||||
nextSlashIndex = file.indexOf(path.sep, nextSlashIndex + 1);
|
||||
}
|
||||
|
||||
if (!metadata.get(file).isFile()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const packageDir = file.substring(0, nextSlashIndex);
|
||||
const packageDirPathInArchive = path.relative(rootForAppFilesWithoutAsar, (0, _appFileCopier().getDestinationPath)(packageDir, fileSet));
|
||||
const pathInArchive = path.relative(rootForAppFilesWithoutAsar, (0, _appFileCopier().getDestinationPath)(file, fileSet));
|
||||
|
||||
if (autoUnpackDirs.has(packageDirPathInArchive)) {
|
||||
// if package dir is unpacked, any file also unpacked
|
||||
addParents(pathInArchive, packageDirPathInArchive);
|
||||
continue;
|
||||
} // https://github.com/electron-userland/electron-builder/issues/2679
|
||||
|
||||
|
||||
let shouldUnpack = false; // ffprobe-static and ffmpeg-static are known packages to always unpack
|
||||
|
||||
const moduleName = path.basename(packageDir);
|
||||
|
||||
if (moduleName === "ffprobe-static" || moduleName === "ffmpeg-static" || isLibOrExe(file)) {
|
||||
shouldUnpack = true;
|
||||
} else if (!file.includes(".", nextSlashIndex) && path.extname(file) === "") {
|
||||
shouldUnpack = await (0, _isbinaryfile().isBinaryFile)(file);
|
||||
}
|
||||
|
||||
if (!shouldUnpack) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_builderUtil().log.isDebugEnabled) {
|
||||
_builderUtil().log.debug({
|
||||
file: pathInArchive,
|
||||
reason: "contains executable code"
|
||||
}, "not packed into asar archive");
|
||||
}
|
||||
|
||||
addParents(pathInArchive, packageDirPathInArchive);
|
||||
}
|
||||
|
||||
if (dirToCreate.size > 0) {
|
||||
await (0, _fsExtra().ensureDir)(unpackedDest + path.sep + "node_modules"); // child directories should be not created asynchronously - parent directories should be created first
|
||||
|
||||
await _bluebirdLst().default.map(dirToCreate.keys(), async parentDir => {
|
||||
const base = unpackedDest + path.sep + parentDir;
|
||||
await (0, _fsExtra().ensureDir)(base);
|
||||
await _bluebirdLst().default.each(dirToCreate.get(parentDir), it => {
|
||||
if (dirToCreate.has(parentDir + path.sep + it)) {
|
||||
// already created
|
||||
return null;
|
||||
} else {
|
||||
return (0, _fsExtra().ensureDir)(base + path.sep + it);
|
||||
}
|
||||
});
|
||||
}, _fs().CONCURRENCY);
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=unpackDetector.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/asar/unpackDetector.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/asar/unpackDetector.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
buildfiles/node_modules/app-builder-lib/out/binDownload.d.ts
generated
vendored
Normal file
3
buildfiles/node_modules/app-builder-lib/out/binDownload.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export declare function download(url: string, output: string, checksum?: string | null): Promise<void>;
|
||||
export declare function getBinFromUrl(name: string, version: string, checksum: string): Promise<string>;
|
||||
export declare function getBin(name: string, url?: string | null, checksum?: string | null): Promise<string>;
|
76
buildfiles/node_modules/app-builder-lib/out/binDownload.js
generated
vendored
Normal file
76
buildfiles/node_modules/app-builder-lib/out/binDownload.js
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.download = download;
|
||||
exports.getBinFromUrl = getBinFromUrl;
|
||||
exports.getBin = getBin;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
const versionToPromise = new Map();
|
||||
|
||||
function download(url, output, checksum) {
|
||||
const args = ["download", "--url", url, "--output", output];
|
||||
|
||||
if (checksum != null) {
|
||||
args.push("--sha512", checksum);
|
||||
}
|
||||
|
||||
return (0, _builderUtil().executeAppBuilder)(args);
|
||||
}
|
||||
|
||||
function getBinFromUrl(name, version, checksum) {
|
||||
const dirName = `${name}-${version}`;
|
||||
let url;
|
||||
|
||||
if (process.env.ELECTRON_BUILDER_BINARIES_DOWNLOAD_OVERRIDE_URL) {
|
||||
url = process.env.ELECTRON_BUILDER_BINARIES_DOWNLOAD_OVERRIDE_URL + "/" + dirName + ".7z";
|
||||
} else {
|
||||
const baseUrl = process.env.NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR || process.env.npm_config_electron_builder_binaries_mirror || process.env.npm_package_config_electron_builder_binaries_mirror || process.env.ELECTRON_BUILDER_BINARIES_MIRROR || "https://github.com/electron-userland/electron-builder-binaries/releases/download/";
|
||||
const middleUrl = process.env.NPM_CONFIG_ELECTRON_BUILDER_BINARIES_CUSTOM_DIR || process.env.npm_config_electron_builder_binaries_custom_dir || process.env.npm_package_config_electron_builder_binaries_custom_dir || process.env.ELECTRON_BUILDER_BINARIES_CUSTOM_DIR || dirName;
|
||||
const urlSuffix = dirName + ".7z";
|
||||
url = `${baseUrl}${middleUrl}/${urlSuffix}`;
|
||||
}
|
||||
|
||||
return getBin(dirName, url, checksum);
|
||||
}
|
||||
|
||||
function getBin(name, url, checksum) {
|
||||
// Old cache is ignored if cache environment variable changes
|
||||
const cacheName = process.env.ELECTRON_BUILDER_CACHE + name;
|
||||
let promise = versionToPromise.get(cacheName); // if rejected, we will try to download again
|
||||
|
||||
if (promise != null) {
|
||||
return promise;
|
||||
}
|
||||
|
||||
promise = doGetBin(name, url, checksum);
|
||||
versionToPromise.set(cacheName, promise);
|
||||
return promise;
|
||||
}
|
||||
|
||||
function doGetBin(name, url, checksum) {
|
||||
const args = ["download-artifact", "--name", name];
|
||||
|
||||
if (url != null) {
|
||||
args.push("--url", url);
|
||||
}
|
||||
|
||||
if (checksum != null) {
|
||||
args.push("--sha512", checksum);
|
||||
}
|
||||
|
||||
return (0, _builderUtil().executeAppBuilder)(args);
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=binDownload.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/binDownload.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/binDownload.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/binDownload.ts"],"names":[],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA,MAAM,gBAAgB,GAAG,IAAI,GAAJ,EAAzB;;AAEM,SAAU,QAAV,CAAmB,GAAnB,EAAgC,MAAhC,EAAgD,QAAhD,EAAwE;AAC5E,QAAM,IAAI,GAAG,CAAC,UAAD,EAAa,OAAb,EAAsB,GAAtB,EAA2B,UAA3B,EAAuC,MAAvC,CAAb;;AACA,MAAI,QAAQ,IAAI,IAAhB,EAAsB;AACpB,IAAA,IAAI,CAAC,IAAL,CAAU,UAAV,EAAsB,QAAtB;AACD;;AACD,SAAO,sCAAkB,IAAlB,CAAP;AACD;;AAEK,SAAU,aAAV,CAAwB,IAAxB,EAAsC,OAAtC,EAAuD,QAAvD,EAAuE;AAC3E,QAAM,OAAO,GAAG,GAAG,IAAI,IAAI,OAAO,EAAlC;AACA,MAAI,GAAJ;;AACA,MAAI,OAAO,CAAC,GAAR,CAAY,+CAAhB,EAAiE;AAC/D,IAAA,GAAG,GAAG,OAAO,CAAC,GAAR,CAAY,+CAAZ,GAA8D,GAA9D,GAAoE,OAApE,GAA8E,KAApF;AACD,GAFD,MAGK;AAEH,UAAM,OAAO,GAAG,OAAO,CAAC,GAAR,CAAY,2CAAZ,IACd,OAAO,CAAC,GAAR,CAAY,2CADE,IAEd,OAAO,CAAC,GAAR,CAAY,mDAFE,IAGd,OAAO,CAAC,GAAR,CAAY,gCAHE,IAId,mFAJF;AAKA,UAAM,SAAS,GAAG,OAAO,CAAC,GAAR,CAAY,+CAAZ,IAChB,OAAO,CAAC,GAAR,CAAY,+CADI,IAEhB,OAAO,CAAC,GAAR,CAAY,uDAFI,IAGhB,OAAO,CAAC,GAAR,CAAY,oCAHI,IAIhB,OAJF;AAKA,UAAM,SAAS,GAAG,OAAO,GAAG,KAA5B;AACA,IAAA,GAAG,GAAG,GAAG,OAAO,GAAG,SAAS,IAAI,SAAS,EAAzC;AACD;;AAED,SAAO,MAAM,CAAC,OAAD,EAAU,GAAV,EAAe,QAAf,CAAb;AACD;;AAEK,SAAU,MAAV,CAAiB,IAAjB,EAA+B,GAA/B,EAAoD,QAApD,EAA4E;AAChF;AACA,QAAM,SAAS,GAAG,OAAO,CAAC,GAAR,CAAY,sBAAZ,GAAqC,IAAvD;AACA,MAAI,OAAO,GAAG,gBAAgB,CAAC,GAAjB,CAAqB,SAArB,CAAd,CAHgF,CAGlC;;AAE9C,MAAI,OAAO,IAAI,IAAf,EAAqB;AACnB,WAAO,OAAP;AACD;;AAED,EAAA,OAAO,GAAG,QAAQ,CAAC,IAAD,EAAO,GAAP,EAAY,QAAZ,CAAlB;AACA,EAAA,gBAAgB,CAAC,GAAjB,CAAqB,SAArB,EAAgC,OAAhC;AACA,SAAO,OAAP;AACD;;AAED,SAAS,QAAT,CAAkB,IAAlB,EAAgC,GAAhC,EAAgE,QAAhE,EAAmG;AACjG,QAAM,IAAI,GAAG,CAAC,mBAAD,EAAsB,QAAtB,EAAgC,IAAhC,CAAb;;AACA,MAAI,GAAG,IAAI,IAAX,EAAiB;AACf,IAAA,IAAI,CAAC,IAAL,CAAU,OAAV,EAAmB,GAAnB;AACD;;AACD,MAAI,QAAQ,IAAI,IAAhB,EAAsB;AACpB,IAAA,IAAI,CAAC,IAAL,CAAU,UAAV,EAAsB,QAAtB;AACD;;AACD,SAAO,sCAAkB,IAAlB,CAAP;AACD,C","sourcesContent":["import { executeAppBuilder } from \"builder-util\"\n\nconst versionToPromise = new Map<string, Promise<string>>()\n\nexport function download(url: string, output: string, checksum?: string | null): Promise<void> {\n const args = [\"download\", \"--url\", url, \"--output\", output]\n if (checksum != null) {\n args.push(\"--sha512\", checksum)\n }\n return executeAppBuilder(args) as Promise<any>\n}\n\nexport function getBinFromUrl(name: string, version: string, checksum: string): Promise<string> {\n const dirName = `${name}-${version}`\n let url: string\n if (process.env.ELECTRON_BUILDER_BINARIES_DOWNLOAD_OVERRIDE_URL) {\n url = process.env.ELECTRON_BUILDER_BINARIES_DOWNLOAD_OVERRIDE_URL + \"/\" + dirName + \".7z\"\n }\n else {\n\n const baseUrl = process.env.NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR ||\n process.env.npm_config_electron_builder_binaries_mirror ||\n process.env.npm_package_config_electron_builder_binaries_mirror ||\n process.env.ELECTRON_BUILDER_BINARIES_MIRROR ||\n \"https://github.com/electron-userland/electron-builder-binaries/releases/download/\"\n const middleUrl = process.env.NPM_CONFIG_ELECTRON_BUILDER_BINARIES_CUSTOM_DIR ||\n process.env.npm_config_electron_builder_binaries_custom_dir ||\n process.env.npm_package_config_electron_builder_binaries_custom_dir ||\n process.env.ELECTRON_BUILDER_BINARIES_CUSTOM_DIR ||\n dirName\n const urlSuffix = dirName + \".7z\"\n url = `${baseUrl}${middleUrl}/${urlSuffix}`\n }\n\n return getBin(dirName, url, checksum)\n}\n\nexport function getBin(name: string, url?: string | null, checksum?: string | null): Promise<string> {\n // Old cache is ignored if cache environment variable changes\n const cacheName = process.env.ELECTRON_BUILDER_CACHE + name;\n let promise = versionToPromise.get(cacheName);// if rejected, we will try to download again\n\n if (promise != null) {\n return promise\n }\n\n promise = doGetBin(name, url, checksum)\n versionToPromise.set(cacheName, promise)\n return promise\n}\n\nfunction doGetBin(name: string, url: string | undefined | null, checksum: string | null | undefined): Promise<string> {\n const args = [\"download-artifact\", \"--name\", name]\n if (url != null) {\n args.push(\"--url\", url)\n }\n if (checksum != null) {\n args.push(\"--sha512\", checksum)\n }\n return executeAppBuilder(args)\n}"],"sourceRoot":""}
|
3
buildfiles/node_modules/app-builder-lib/out/codeSign/codesign.d.ts
generated
vendored
Normal file
3
buildfiles/node_modules/app-builder-lib/out/codeSign/codesign.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { TmpDir } from "temp-file";
|
||||
/** @private */
|
||||
export declare function downloadCertificate(urlOrBase64: string, tmpDir: TmpDir, currentDir: string): Promise<string>;
|
107
buildfiles/node_modules/app-builder-lib/out/codeSign/codesign.js
generated
vendored
Normal file
107
buildfiles/node_modules/app-builder-lib/out/codeSign/codesign.js
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.downloadCertificate = downloadCertificate;
|
||||
|
||||
function _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _os() {
|
||||
const data = require("os");
|
||||
|
||||
_os = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
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 _binDownload() {
|
||||
const data = require("../binDownload");
|
||||
|
||||
_binDownload = 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; }
|
||||
|
||||
/** @private */
|
||||
async function downloadCertificate(urlOrBase64, tmpDir, currentDir) {
|
||||
urlOrBase64 = urlOrBase64.trim();
|
||||
let file = null;
|
||||
|
||||
if (urlOrBase64.length > 3 && urlOrBase64[1] === ":" || urlOrBase64.startsWith("/") || urlOrBase64.startsWith(".")) {
|
||||
file = urlOrBase64;
|
||||
} else if (urlOrBase64.startsWith("file://")) {
|
||||
file = urlOrBase64.substring("file://".length);
|
||||
} else if (urlOrBase64.startsWith("~/")) {
|
||||
file = path.join((0, _os().homedir)(), urlOrBase64.substring("~/".length));
|
||||
} else {
|
||||
const isUrl = urlOrBase64.startsWith("https://");
|
||||
|
||||
if (isUrl || urlOrBase64.length > 2048 || urlOrBase64.endsWith("=")) {
|
||||
const tempFile = await tmpDir.getTempFile({
|
||||
suffix: ".p12"
|
||||
});
|
||||
|
||||
if (isUrl) {
|
||||
await (0, _binDownload().download)(urlOrBase64, tempFile);
|
||||
} else {
|
||||
await (0, _fsExtra().outputFile)(tempFile, Buffer.from(urlOrBase64, "base64"));
|
||||
}
|
||||
|
||||
return tempFile;
|
||||
} else {
|
||||
file = urlOrBase64;
|
||||
}
|
||||
}
|
||||
|
||||
file = path.resolve(currentDir, file);
|
||||
const stat = await (0, _fs().statOrNull)(file);
|
||||
|
||||
if (stat == null) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`${file} doesn't exist`);
|
||||
} else if (!stat.isFile()) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`${file} not a file`);
|
||||
} else {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=codesign.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/codeSign/codesign.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/codeSign/codesign.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/codeSign/codesign.ts"],"names":[],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;AAEA;AACO,eAAe,mBAAf,CAAmC,WAAnC,EAAwD,MAAxD,EAAwE,UAAxE,EAA0F;AAC/F,EAAA,WAAW,GAAG,WAAW,CAAC,IAAZ,EAAd;AAEA,MAAI,IAAI,GAAkB,IAA1B;;AACA,MAAK,WAAW,CAAC,MAAZ,GAAqB,CAArB,IAA0B,WAAW,CAAC,CAAD,CAAX,KAAmB,GAA9C,IAAsD,WAAW,CAAC,UAAZ,CAAuB,GAAvB,CAAtD,IAAqF,WAAW,CAAC,UAAZ,CAAuB,GAAvB,CAAzF,EAAsH;AACpH,IAAA,IAAI,GAAG,WAAP;AACD,GAFD,MAGK,IAAI,WAAW,CAAC,UAAZ,CAAuB,SAAvB,CAAJ,EAAuC;AAC1C,IAAA,IAAI,GAAG,WAAW,CAAC,SAAZ,CAAsB,UAAU,MAAhC,CAAP;AACD,GAFI,MAGA,IAAI,WAAW,CAAC,UAAZ,CAAuB,IAAvB,CAAJ,EAAkC;AACrC,IAAA,IAAI,GAAG,IAAI,CAAC,IAAL,CAAU,oBAAV,EAAqB,WAAW,CAAC,SAAZ,CAAsB,KAAK,MAA3B,CAArB,CAAP;AACD,GAFI,MAGA;AACH,UAAM,KAAK,GAAG,WAAW,CAAC,UAAZ,CAAuB,UAAvB,CAAd;;AACA,QAAI,KAAK,IAAI,WAAW,CAAC,MAAZ,GAAqB,IAA9B,IAAsC,WAAW,CAAC,QAAZ,CAAqB,GAArB,CAA1C,EAAqE;AACnE,YAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAP,CAAmB;AAAC,QAAA,MAAM,EAAE;AAAT,OAAnB,CAAvB;;AACA,UAAI,KAAJ,EAAW;AACT,cAAM,6BAAS,WAAT,EAAsB,QAAtB,CAAN;AACD,OAFD,MAGK;AACH,cAAM,2BAAW,QAAX,EAAqB,MAAM,CAAC,IAAP,CAAY,WAAZ,EAAyB,QAAzB,CAArB,CAAN;AACD;;AACD,aAAO,QAAP;AACD,KATD,MAUK;AACH,MAAA,IAAI,GAAG,WAAP;AACD;AACF;;AAED,EAAA,IAAI,GAAG,IAAI,CAAC,OAAL,CAAa,UAAb,EAAyB,IAAzB,CAAP;AACA,QAAM,IAAI,GAAG,MAAM,sBAAW,IAAX,CAAnB;;AACA,MAAI,IAAI,IAAI,IAAZ,EAAkB;AAChB,UAAM,KAAI,wCAAJ,EAA8B,GAAG,IAAI,gBAArC,CAAN;AACD,GAFD,MAGK,IAAI,CAAC,IAAI,CAAC,MAAL,EAAL,EAAoB;AACvB,UAAM,KAAI,wCAAJ,EAA8B,GAAG,IAAI,aAArC,CAAN;AACD,GAFI,MAGA;AACH,WAAO,IAAP;AACD;AACF,C","sourcesContent":["import { outputFile } from \"fs-extra\"\nimport { homedir } from \"os\"\nimport * as path from \"path\"\nimport { TmpDir } from \"temp-file\"\nimport { InvalidConfigurationError } from \"builder-util\"\nimport { statOrNull } from \"builder-util/out/fs\"\nimport { download } from \"../binDownload\"\n\n/** @private */\nexport async function downloadCertificate(urlOrBase64: string, tmpDir: TmpDir, currentDir: string): Promise<string> {\n urlOrBase64 = urlOrBase64.trim()\n\n let file: string | null = null\n if ((urlOrBase64.length > 3 && urlOrBase64[1] === \":\") || urlOrBase64.startsWith(\"/\") || urlOrBase64.startsWith(\".\")) {\n file = urlOrBase64\n }\n else if (urlOrBase64.startsWith(\"file://\")) {\n file = urlOrBase64.substring(\"file://\".length)\n }\n else if (urlOrBase64.startsWith(\"~/\")) {\n file = path.join(homedir(), urlOrBase64.substring(\"~/\".length))\n }\n else {\n const isUrl = urlOrBase64.startsWith(\"https://\")\n if (isUrl || urlOrBase64.length > 2048 || urlOrBase64.endsWith(\"=\")) {\n const tempFile = await tmpDir.getTempFile({suffix: \".p12\"})\n if (isUrl) {\n await download(urlOrBase64, tempFile)\n }\n else {\n await outputFile(tempFile, Buffer.from(urlOrBase64, \"base64\"))\n }\n return tempFile\n }\n else {\n file = urlOrBase64\n }\n }\n\n file = path.resolve(currentDir, file)\n const stat = await statOrNull(file)\n if (stat == null) {\n throw new InvalidConfigurationError(`${file} doesn't exist`)\n }\n else if (!stat.isFile()) {\n throw new InvalidConfigurationError(`${file} not a file`)\n }\n else {\n return file\n }\n}"],"sourceRoot":""}
|
27
buildfiles/node_modules/app-builder-lib/out/codeSign/macCodeSign.d.ts
generated
vendored
Normal file
27
buildfiles/node_modules/app-builder-lib/out/codeSign/macCodeSign.d.ts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
import { TmpDir } from "builder-util/out/util";
|
||||
export declare const appleCertificatePrefixes: string[];
|
||||
export declare type CertType = "Developer ID Application" | "Developer ID Installer" | "3rd Party Mac Developer Application" | "3rd Party Mac Developer Installer" | "Mac Developer";
|
||||
export interface CodeSigningInfo {
|
||||
keychainFile?: string | null;
|
||||
}
|
||||
export declare function isSignAllowed(isPrintWarn?: boolean): boolean;
|
||||
export declare function reportError(isMas: boolean, certificateType: CertType, qualifier: string | null | undefined, keychainFile: string | null | undefined, isForceCodeSigning: boolean): Promise<void>;
|
||||
export interface CreateKeychainOptions {
|
||||
tmpDir: TmpDir;
|
||||
cscLink: string;
|
||||
cscKeyPassword: string;
|
||||
cscILink?: string | null;
|
||||
cscIKeyPassword?: string | null;
|
||||
currentDir: string;
|
||||
}
|
||||
export declare function removeKeychain(keychainFile: string, printWarn?: boolean): Promise<any>;
|
||||
export declare function createKeychain({ tmpDir, cscLink, cscKeyPassword, cscILink, cscIKeyPassword, currentDir }: CreateKeychainOptions): Promise<CodeSigningInfo>;
|
||||
/** @private */
|
||||
export declare function sign(path: string, name: string, keychain: string): Promise<any>;
|
||||
export declare let findIdentityRawResult: Promise<Array<string>> | null;
|
||||
export declare class Identity {
|
||||
readonly name: string;
|
||||
readonly hash: string;
|
||||
constructor(name: string, hash: string);
|
||||
}
|
||||
export declare function findIdentity(certType: CertType, qualifier?: string | null, keychain?: string | null): Promise<Identity | null>;
|
427
buildfiles/node_modules/app-builder-lib/out/codeSign/macCodeSign.js
generated
vendored
Normal file
427
buildfiles/node_modules/app-builder-lib/out/codeSign/macCodeSign.js
generated
vendored
Normal file
@ -0,0 +1,427 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isSignAllowed = isSignAllowed;
|
||||
exports.reportError = reportError;
|
||||
exports.removeKeychain = removeKeychain;
|
||||
exports.createKeychain = createKeychain;
|
||||
exports.sign = sign;
|
||||
exports.findIdentity = findIdentity;
|
||||
exports.findIdentityRawResult = exports.appleCertificatePrefixes = void 0;
|
||||
|
||||
function _bluebirdLst() {
|
||||
const data = _interopRequireDefault(require("bluebird-lst"));
|
||||
|
||||
_bluebirdLst = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _util() {
|
||||
const data = require("builder-util/out/util");
|
||||
|
||||
_util = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fs() {
|
||||
const data = require("builder-util/out/fs");
|
||||
|
||||
_fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _log() {
|
||||
const data = require("builder-util/out/log");
|
||||
|
||||
_log = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _crypto() {
|
||||
const data = require("crypto");
|
||||
|
||||
_crypto = 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;
|
||||
}
|
||||
|
||||
function _os() {
|
||||
const data = require("os");
|
||||
|
||||
_os = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _tempFile() {
|
||||
const data = require("temp-file");
|
||||
|
||||
_tempFile = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _flags() {
|
||||
const data = require("../util/flags");
|
||||
|
||||
_flags = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _codesign() {
|
||||
const data = require("./codesign");
|
||||
|
||||
_codesign = 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 }; }
|
||||
|
||||
const appleCertificatePrefixes = ["Developer ID Application:", "Developer ID Installer:", "3rd Party Mac Developer Application:", "3rd Party Mac Developer Installer:"];
|
||||
exports.appleCertificatePrefixes = appleCertificatePrefixes;
|
||||
|
||||
function isSignAllowed(isPrintWarn = true) {
|
||||
if (process.platform !== "darwin") {
|
||||
if (isPrintWarn) {
|
||||
_util().log.warn({
|
||||
reason: "supported only on macOS"
|
||||
}, "skipped macOS application code signing");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const buildForPrWarning = "There are serious security concerns with CSC_FOR_PULL_REQUEST=true (see the CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)" + "\nIf you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.";
|
||||
|
||||
if ((0, _util().isPullRequest)()) {
|
||||
if ((0, _util().isEnvTrue)(process.env.CSC_FOR_PULL_REQUEST)) {
|
||||
if (isPrintWarn) {
|
||||
_util().log.warn(buildForPrWarning);
|
||||
}
|
||||
} else {
|
||||
if (isPrintWarn) {
|
||||
// https://github.com/electron-userland/electron-builder/issues/1524
|
||||
_util().log.warn("Current build is a part of pull request, code signing will be skipped." + "\nSet env CSC_FOR_PULL_REQUEST to true to force code signing." + `\n${buildForPrWarning}`);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
async function reportError(isMas, certificateType, qualifier, keychainFile, isForceCodeSigning) {
|
||||
const logFields = {};
|
||||
|
||||
if (qualifier == null) {
|
||||
logFields.reason = "";
|
||||
|
||||
if ((0, _flags().isAutoDiscoveryCodeSignIdentity)()) {
|
||||
logFields.reason += `cannot find valid "${certificateType}" identity${isMas ? "" : ` or custom non-Apple code signing certificate`}`;
|
||||
}
|
||||
|
||||
logFields.reason += ", see https://electron.build/code-signing";
|
||||
|
||||
if (!(0, _flags().isAutoDiscoveryCodeSignIdentity)()) {
|
||||
logFields.CSC_IDENTITY_AUTO_DISCOVERY = false;
|
||||
}
|
||||
} else {
|
||||
logFields.reason = "Identity name is specified, but no valid identity with this name in the keychain";
|
||||
logFields.identity = qualifier;
|
||||
}
|
||||
|
||||
const args = ["find-identity"];
|
||||
|
||||
if (keychainFile != null) {
|
||||
args.push(keychainFile);
|
||||
}
|
||||
|
||||
if (qualifier != null || (0, _flags().isAutoDiscoveryCodeSignIdentity)()) {
|
||||
logFields.allIdentities = (await (0, _util().exec)("security", args)).trim().split("\n").filter(it => !(it.includes("Policy: X.509 Basic") || it.includes("Matching identities"))).join("\n");
|
||||
}
|
||||
|
||||
if (isMas || isForceCodeSigning) {
|
||||
throw new Error(_log().Logger.createMessage("skipped macOS application code signing", logFields, "error", it => it));
|
||||
} else {
|
||||
_util().log.warn(logFields, "skipped macOS application code signing");
|
||||
}
|
||||
} // "Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list."
|
||||
// but "security list-keychains" doesn't support add - we should 1) get current list 2) set new list - it is very bad http://stackoverflow.com/questions/10538942/add-a-keychain-to-search-list
|
||||
// "overly complicated and introduces a race condition."
|
||||
// https://github.com/electron-userland/electron-builder/issues/398
|
||||
|
||||
|
||||
const bundledCertKeychainAdded = new (_lazyVal().Lazy)(async () => {
|
||||
// copy to temp and then atomic rename to final path
|
||||
const cacheDir = getCacheDirectory();
|
||||
const tmpKeychainPath = path.join(cacheDir, (0, _tempFile().getTempName)("electron-builder-root-certs"));
|
||||
const keychainPath = path.join(cacheDir, "electron-builder-root-certs.keychain");
|
||||
const results = await Promise.all([listUserKeychains(), (0, _fs().copyFile)(path.join(__dirname, "..", "..", "certs", "root_certs.keychain"), tmpKeychainPath).then(() => (0, _fsExtra().rename)(tmpKeychainPath, keychainPath))]);
|
||||
const list = results[0];
|
||||
|
||||
if (!list.includes(keychainPath)) {
|
||||
await (0, _util().exec)("security", ["list-keychains", "-d", "user", "-s", keychainPath].concat(list));
|
||||
}
|
||||
});
|
||||
|
||||
function getCacheDirectory() {
|
||||
const env = process.env.ELECTRON_BUILDER_CACHE;
|
||||
return (0, _util().isEmptyOrSpaces)(env) ? path.join((0, _os().homedir)(), "Library", "Caches", "electron-builder") : path.resolve(env);
|
||||
}
|
||||
|
||||
function listUserKeychains() {
|
||||
return (0, _util().exec)("security", ["list-keychains", "-d", "user"]).then(it => it.split("\n").map(it => {
|
||||
const r = it.trim();
|
||||
return r.substring(1, r.length - 1);
|
||||
}).filter(it => it.length > 0));
|
||||
}
|
||||
|
||||
function removeKeychain(keychainFile, printWarn = true) {
|
||||
return (0, _util().exec)("security", ["delete-keychain", keychainFile]).catch(e => {
|
||||
if (printWarn) {
|
||||
_util().log.warn({
|
||||
file: keychainFile,
|
||||
error: e.stack || e
|
||||
}, "cannot delete keychain");
|
||||
}
|
||||
|
||||
return (0, _fs().unlinkIfExists)(keychainFile);
|
||||
});
|
||||
}
|
||||
|
||||
async function createKeychain({
|
||||
tmpDir,
|
||||
cscLink,
|
||||
cscKeyPassword,
|
||||
cscILink,
|
||||
cscIKeyPassword,
|
||||
currentDir
|
||||
}) {
|
||||
// travis has correct AppleWWDRCA cert
|
||||
if (process.env.TRAVIS !== "true") {
|
||||
await bundledCertKeychainAdded.value;
|
||||
} // https://github.com/electron-userland/electron-builder/issues/3685
|
||||
// use constant file
|
||||
|
||||
|
||||
const keychainFile = path.join(process.env.APP_BUILDER_TMP_DIR || (0, _os().tmpdir)(), `${(0, _crypto().createHash)("sha256").update(currentDir).update("app-builder").digest("hex")}.keychain`); // noinspection JSUnusedLocalSymbols
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
||||
await removeKeychain(keychainFile, false).catch(_ => {});
|
||||
const certLinks = [cscLink];
|
||||
|
||||
if (cscILink != null) {
|
||||
certLinks.push(cscILink);
|
||||
}
|
||||
|
||||
const certPaths = new Array(certLinks.length);
|
||||
const keychainPassword = (0, _crypto().randomBytes)(32).toString("base64");
|
||||
const securityCommands = [["create-keychain", "-p", keychainPassword, keychainFile], ["unlock-keychain", "-p", keychainPassword, keychainFile], ["set-keychain-settings", keychainFile]]; // https://stackoverflow.com/questions/42484678/codesign-keychain-gets-ignored
|
||||
// https://github.com/electron-userland/electron-builder/issues/1457
|
||||
|
||||
const list = await listUserKeychains();
|
||||
|
||||
if (!list.includes(keychainFile)) {
|
||||
securityCommands.push(["list-keychains", "-d", "user", "-s", keychainFile].concat(list));
|
||||
}
|
||||
|
||||
await Promise.all([// we do not clear downloaded files - will be removed on tmpDir cleanup automatically. not a security issue since in any case data is available as env variables and protected by password.
|
||||
_bluebirdLst().default.map(certLinks, (link, i) => (0, _codesign().downloadCertificate)(link, tmpDir, currentDir).then(it => certPaths[i] = it)), _bluebirdLst().default.mapSeries(securityCommands, it => (0, _util().exec)("security", it))]);
|
||||
return await importCerts(keychainFile, certPaths, [cscKeyPassword, cscIKeyPassword].filter(it => it != null));
|
||||
}
|
||||
|
||||
async function importCerts(keychainFile, paths, keyPasswords) {
|
||||
for (let i = 0; i < paths.length; i++) {
|
||||
const password = keyPasswords[i];
|
||||
await (0, _util().exec)("security", ["import", paths[i], "-k", keychainFile, "-T", "/usr/bin/codesign", "-T", "/usr/bin/productbuild", "-P", password]); // https://stackoverflow.com/questions/39868578/security-codesign-in-sierra-keychain-ignores-access-control-settings-and-ui-p
|
||||
// https://github.com/electron-userland/electron-packager/issues/701#issuecomment-322315996
|
||||
|
||||
await (0, _util().exec)("security", ["set-key-partition-list", "-S", "apple-tool:,apple:", "-s", "-k", password, keychainFile]);
|
||||
}
|
||||
|
||||
return {
|
||||
keychainFile
|
||||
};
|
||||
}
|
||||
/** @private */
|
||||
|
||||
|
||||
function sign(path, name, keychain) {
|
||||
const args = ["--deep", "--force", "--sign", name, path];
|
||||
|
||||
if (keychain != null) {
|
||||
args.push("--keychain", keychain);
|
||||
}
|
||||
|
||||
return (0, _util().exec)("codesign", args);
|
||||
}
|
||||
|
||||
let findIdentityRawResult = null;
|
||||
exports.findIdentityRawResult = findIdentityRawResult;
|
||||
|
||||
async function getValidIdentities(keychain) {
|
||||
function addKeychain(args) {
|
||||
if (keychain != null) {
|
||||
args.push(keychain);
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
let result = findIdentityRawResult;
|
||||
|
||||
if (result == null || keychain != null) {
|
||||
// https://github.com/electron-userland/electron-builder/issues/481
|
||||
// https://github.com/electron-userland/electron-builder/issues/535
|
||||
result = Promise.all([(0, _util().exec)("security", addKeychain(["find-identity", "-v"])).then(it => it.trim().split("\n").filter(it => {
|
||||
for (const prefix of appleCertificatePrefixes) {
|
||||
if (it.includes(prefix)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
})), (0, _util().exec)("security", addKeychain(["find-identity", "-v", "-p", "codesigning"])).then(it => it.trim().split("\n"))]).then(it => {
|
||||
const array = it[0].concat(it[1]).filter(it => !it.includes("(Missing required extension)") && !it.includes("valid identities found") && !it.includes("iPhone ") && !it.includes("com.apple.idms.appleid.prd.")) // remove 1)
|
||||
.map(it => it.substring(it.indexOf(")") + 1).trim());
|
||||
return Array.from(new Set(array));
|
||||
});
|
||||
|
||||
if (keychain == null) {
|
||||
exports.findIdentityRawResult = findIdentityRawResult = result;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async function _findIdentity(type, qualifier, keychain) {
|
||||
// https://github.com/electron-userland/electron-builder/issues/484
|
||||
//noinspection SpellCheckingInspection
|
||||
const lines = await getValidIdentities(keychain);
|
||||
const namePrefix = `${type}:`;
|
||||
|
||||
for (const line of lines) {
|
||||
if (qualifier != null && !line.includes(qualifier)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (line.includes(namePrefix)) {
|
||||
return parseIdentity(line);
|
||||
}
|
||||
}
|
||||
|
||||
if (type === "Developer ID Application") {
|
||||
// find non-Apple certificate
|
||||
// https://github.com/electron-userland/electron-builder/issues/458
|
||||
l: for (const line of lines) {
|
||||
if (qualifier != null && !line.includes(qualifier)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (line.includes("Mac Developer:")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (const prefix of appleCertificatePrefixes) {
|
||||
if (line.includes(prefix)) {
|
||||
continue l;
|
||||
}
|
||||
}
|
||||
|
||||
return parseIdentity(line);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
const _Identity = require("../../electron-osx-sign/util-identities").Identity;
|
||||
|
||||
function parseIdentity(line) {
|
||||
const firstQuoteIndex = line.indexOf('"');
|
||||
const name = line.substring(firstQuoteIndex + 1, line.lastIndexOf('"'));
|
||||
const hash = line.substring(0, firstQuoteIndex - 1);
|
||||
return new _Identity(name, hash);
|
||||
}
|
||||
|
||||
function findIdentity(certType, qualifier, keychain) {
|
||||
let identity = qualifier || process.env.CSC_NAME;
|
||||
|
||||
if ((0, _util().isEmptyOrSpaces)(identity)) {
|
||||
if ((0, _flags().isAutoDiscoveryCodeSignIdentity)()) {
|
||||
return _findIdentity(certType, null, keychain);
|
||||
} else {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
} else {
|
||||
identity = identity.trim();
|
||||
|
||||
for (const prefix of appleCertificatePrefixes) {
|
||||
checkPrefix(identity, prefix);
|
||||
}
|
||||
|
||||
return _findIdentity(certType, identity, keychain);
|
||||
}
|
||||
}
|
||||
|
||||
function checkPrefix(name, prefix) {
|
||||
if (name.startsWith(prefix)) {
|
||||
throw new (_util().InvalidConfigurationError)(`Please remove prefix "${prefix}" from the specified name — appropriate certificate will be chosen automatically`);
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=macCodeSign.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/codeSign/macCodeSign.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/codeSign/macCodeSign.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
38
buildfiles/node_modules/app-builder-lib/out/codeSign/windowsCodeSign.d.ts
generated
vendored
Normal file
38
buildfiles/node_modules/app-builder-lib/out/codeSign/windowsCodeSign.d.ts
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
import { WindowsConfiguration } from "..";
|
||||
import { VmManager } from "../vm/vm";
|
||||
import { WinPackager } from "../winPackager";
|
||||
export declare function getSignVendorPath(): Promise<string>;
|
||||
export declare type CustomWindowsSign = (configuration: CustomWindowsSignTaskConfiguration, packager?: WinPackager) => Promise<any>;
|
||||
export interface WindowsSignOptions {
|
||||
readonly path: string;
|
||||
readonly name?: string | null;
|
||||
readonly cscInfo?: FileCodeSigningInfo | CertificateFromStoreInfo | null;
|
||||
readonly site?: string | null;
|
||||
readonly options: WindowsConfiguration;
|
||||
}
|
||||
export interface WindowsSignTaskConfiguration extends WindowsSignOptions {
|
||||
resultOutputPath?: string;
|
||||
hash: string;
|
||||
isNest: boolean;
|
||||
}
|
||||
export interface CustomWindowsSignTaskConfiguration extends WindowsSignTaskConfiguration {
|
||||
computeSignToolArgs(isWin: boolean): Array<string>;
|
||||
}
|
||||
export declare function sign(options: WindowsSignOptions, packager: WinPackager): Promise<void>;
|
||||
export interface FileCodeSigningInfo {
|
||||
readonly file: string;
|
||||
readonly password: string | null;
|
||||
}
|
||||
export declare function getCertInfo(file: string, password: string): Promise<CertificateInfo>;
|
||||
export interface CertificateInfo {
|
||||
readonly commonName: string;
|
||||
readonly bloodyMicrosoftSubjectDn: string;
|
||||
}
|
||||
export interface CertificateFromStoreInfo {
|
||||
thumbprint: string;
|
||||
subject: string;
|
||||
store: string;
|
||||
isLocalMachineStore: boolean;
|
||||
}
|
||||
export declare function getCertificateFromStoreInfo(options: WindowsConfiguration, vm: VmManager): Promise<CertificateFromStoreInfo>;
|
||||
export declare function doSign(configuration: CustomWindowsSignTaskConfiguration, packager: WinPackager): Promise<void>;
|
398
buildfiles/node_modules/app-builder-lib/out/codeSign/windowsCodeSign.js
generated
vendored
Normal file
398
buildfiles/node_modules/app-builder-lib/out/codeSign/windowsCodeSign.js
generated
vendored
Normal file
@ -0,0 +1,398 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getSignVendorPath = getSignVendorPath;
|
||||
exports.sign = sign;
|
||||
exports.getCertInfo = getCertInfo;
|
||||
exports.getCertificateFromStoreInfo = getCertificateFromStoreInfo;
|
||||
exports.doSign = doSign;
|
||||
exports.isOldWin6 = isOldWin6;
|
||||
|
||||
function _util() {
|
||||
const data = require("builder-util/out/util");
|
||||
|
||||
_util = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _binDownload() {
|
||||
const data = require("../binDownload");
|
||||
|
||||
_binDownload = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _appBuilder() {
|
||||
const data = require("../util/appBuilder");
|
||||
|
||||
_appBuilder = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _bundledTool() {
|
||||
const data = require("../util/bundledTool");
|
||||
|
||||
_bundledTool = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function os() {
|
||||
const data = _interopRequireWildcard(require("os"));
|
||||
|
||||
os = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _platformPackager() {
|
||||
const data = require("../platformPackager");
|
||||
|
||||
_platformPackager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _flags() {
|
||||
const data = require("../util/flags");
|
||||
|
||||
_flags = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _vm() {
|
||||
const data = require("../vm/vm");
|
||||
|
||||
_vm = 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 getSignVendorPath() {
|
||||
return (0, _binDownload().getBin)("winCodeSign");
|
||||
}
|
||||
|
||||
async function sign(options, packager) {
|
||||
let hashes = options.options.signingHashAlgorithms; // msi does not support dual-signing
|
||||
|
||||
if (options.path.endsWith(".msi")) {
|
||||
hashes = [hashes != null && !hashes.includes("sha1") ? "sha256" : "sha1"];
|
||||
} else if (options.path.endsWith(".appx")) {
|
||||
hashes = ["sha256"];
|
||||
} else if (hashes == null) {
|
||||
hashes = ["sha1", "sha256"];
|
||||
} else {
|
||||
hashes = Array.isArray(hashes) ? hashes : [hashes];
|
||||
}
|
||||
|
||||
const executor = (0, _platformPackager().resolveFunction)(options.options.sign, "sign") || doSign;
|
||||
let isNest = false;
|
||||
|
||||
for (const hash of hashes) {
|
||||
const taskConfiguration = { ...options,
|
||||
hash,
|
||||
isNest
|
||||
};
|
||||
await executor({ ...taskConfiguration,
|
||||
computeSignToolArgs: isWin => computeSignToolArgs(taskConfiguration, isWin)
|
||||
}, packager);
|
||||
isNest = true;
|
||||
|
||||
if (taskConfiguration.resultOutputPath != null) {
|
||||
await (0, _fsExtra().rename)(taskConfiguration.resultOutputPath, options.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function getCertInfo(file, password) {
|
||||
let result = null;
|
||||
const errorMessagePrefix = "Cannot extract publisher name from code signing certificate. As workaround, set win.publisherName. Error: ";
|
||||
|
||||
try {
|
||||
result = await (0, _appBuilder().executeAppBuilderAsJson)(["certificate-info", "--input", file, "--password", password]);
|
||||
} catch (e) {
|
||||
throw new Error(`${errorMessagePrefix}${e.stack || e}`);
|
||||
}
|
||||
|
||||
if (result.error != null) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
throw new (_util().InvalidConfigurationError)(`${errorMessagePrefix}${result.error}`);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async function getCertificateFromStoreInfo(options, vm) {
|
||||
const certificateSubjectName = options.certificateSubjectName;
|
||||
const certificateSha1 = options.certificateSha1 ? options.certificateSha1.toUpperCase() : options.certificateSha1; // ExcludeProperty doesn't work, so, we cannot exclude RawData, it is ok
|
||||
// powershell can return object if the only item
|
||||
|
||||
const rawResult = await vm.exec("powershell.exe", ["Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress"]);
|
||||
const certList = rawResult.length === 0 ? [] : (0, _util().asArray)(JSON.parse(rawResult));
|
||||
|
||||
for (const certInfo of certList) {
|
||||
if (certificateSubjectName != null && !certInfo.Subject.includes(certificateSubjectName) || certificateSha1 != null && certInfo.Thumbprint.toUpperCase() !== certificateSha1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const parentPath = certInfo.PSParentPath;
|
||||
const store = parentPath.substring(parentPath.lastIndexOf("\\") + 1);
|
||||
|
||||
_util().log.debug({
|
||||
store,
|
||||
PSParentPath: parentPath
|
||||
}, "auto-detect certificate store"); // https://github.com/electron-userland/electron-builder/issues/1717
|
||||
|
||||
|
||||
const isLocalMachineStore = parentPath.includes("Certificate::LocalMachine");
|
||||
|
||||
_util().log.debug(null, "auto-detect using of LocalMachine store");
|
||||
|
||||
return {
|
||||
thumbprint: certInfo.Thumbprint,
|
||||
subject: certInfo.Subject,
|
||||
store,
|
||||
isLocalMachineStore
|
||||
};
|
||||
}
|
||||
|
||||
throw new Error(`Cannot find certificate ${certificateSubjectName || certificateSha1}, all certs: ${rawResult}`);
|
||||
}
|
||||
|
||||
async function doSign(configuration, packager) {
|
||||
// https://github.com/electron-userland/electron-builder/pull/1944
|
||||
const timeout = parseInt(process.env.SIGNTOOL_TIMEOUT, 10) || 10 * 60 * 1000;
|
||||
let tool;
|
||||
let args;
|
||||
let env = process.env;
|
||||
let vm;
|
||||
|
||||
if (configuration.path.endsWith(".appx") || !("file" in configuration.cscInfo)
|
||||
/* certificateSubjectName and other such options */
|
||||
) {
|
||||
vm = await packager.vm.value;
|
||||
tool = getWinSignTool(await getSignVendorPath());
|
||||
args = computeSignToolArgs(configuration, true, vm);
|
||||
} else {
|
||||
vm = new (_vm().VmManager)();
|
||||
const toolInfo = await getToolPath();
|
||||
tool = toolInfo.path;
|
||||
args = configuration.computeSignToolArgs(process.platform === "win32");
|
||||
|
||||
if (toolInfo.env != null) {
|
||||
env = toolInfo.env;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await vm.exec(tool, args, {
|
||||
timeout,
|
||||
env
|
||||
});
|
||||
} catch (e) {
|
||||
if (e.message.includes("The file is being used by another process") || e.message.includes("The specified timestamp server either could not be reached")) {
|
||||
_util().log.warn(`First attempt to code sign failed, another attempt will be made in 15 seconds: ${e.message}`);
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
vm.exec(tool, args, {
|
||||
timeout,
|
||||
env
|
||||
}).then(resolve).catch(reject);
|
||||
}, 15000);
|
||||
});
|
||||
}
|
||||
|
||||
throw e;
|
||||
}
|
||||
} // on windows be aware of http://stackoverflow.com/a/32640183/1910191
|
||||
|
||||
|
||||
function computeSignToolArgs(options, isWin, vm = new (_vm().VmManager)()) {
|
||||
const inputFile = vm.toVmFile(options.path);
|
||||
const outputPath = isWin ? inputFile : getOutputPath(inputFile, options.hash);
|
||||
|
||||
if (!isWin) {
|
||||
options.resultOutputPath = outputPath;
|
||||
}
|
||||
|
||||
const args = isWin ? ["sign"] : ["-in", inputFile, "-out", outputPath];
|
||||
|
||||
if (process.env.ELECTRON_BUILDER_OFFLINE !== "true") {
|
||||
const timestampingServiceUrl = options.options.timeStampServer || "http://timestamp.digicert.com";
|
||||
|
||||
if (isWin) {
|
||||
args.push(options.isNest || options.hash === "sha256" ? "/tr" : "/t", options.isNest || options.hash === "sha256" ? options.options.rfc3161TimeStampServer || "http://timestamp.digicert.com" : timestampingServiceUrl);
|
||||
} else {
|
||||
args.push("-t", timestampingServiceUrl);
|
||||
}
|
||||
}
|
||||
|
||||
const certificateFile = options.cscInfo.file;
|
||||
|
||||
if (certificateFile == null) {
|
||||
const cscInfo = options.cscInfo;
|
||||
const subjectName = cscInfo.thumbprint;
|
||||
|
||||
if (!isWin) {
|
||||
throw new Error(`${subjectName == null ? "certificateSha1" : "certificateSubjectName"} supported only on Windows`);
|
||||
}
|
||||
|
||||
args.push("/sha1", cscInfo.thumbprint);
|
||||
args.push("/s", cscInfo.store);
|
||||
|
||||
if (cscInfo.isLocalMachineStore) {
|
||||
args.push("/sm");
|
||||
}
|
||||
} else {
|
||||
const certExtension = path.extname(certificateFile);
|
||||
|
||||
if (certExtension === ".p12" || certExtension === ".pfx") {
|
||||
args.push(isWin ? "/f" : "-pkcs12", vm.toVmFile(certificateFile));
|
||||
} else {
|
||||
throw new Error(`Please specify pkcs12 (.p12/.pfx) file, ${certificateFile} is not correct`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isWin || options.hash !== "sha1") {
|
||||
args.push(isWin ? "/fd" : "-h", options.hash);
|
||||
|
||||
if (isWin && process.env.ELECTRON_BUILDER_OFFLINE !== "true") {
|
||||
args.push("/td", "sha256");
|
||||
}
|
||||
}
|
||||
|
||||
if (options.name) {
|
||||
args.push(isWin ? "/d" : "-n", options.name);
|
||||
}
|
||||
|
||||
if (options.site) {
|
||||
args.push(isWin ? "/du" : "-i", options.site);
|
||||
} // msi does not support dual-signing
|
||||
|
||||
|
||||
if (options.isNest) {
|
||||
args.push(isWin ? "/as" : "-nest");
|
||||
}
|
||||
|
||||
const password = options.cscInfo == null ? null : options.cscInfo.password;
|
||||
|
||||
if (password) {
|
||||
args.push(isWin ? "/p" : "-pass", password);
|
||||
}
|
||||
|
||||
if (options.options.additionalCertificateFile) {
|
||||
args.push(isWin ? "/ac" : "-ac", vm.toVmFile(options.options.additionalCertificateFile));
|
||||
}
|
||||
|
||||
const httpsProxyFromEnv = process.env.HTTPS_PROXY;
|
||||
|
||||
if (!isWin && httpsProxyFromEnv != null && httpsProxyFromEnv.length) {
|
||||
args.push("-p", httpsProxyFromEnv);
|
||||
}
|
||||
|
||||
if (isWin) {
|
||||
// https://github.com/electron-userland/electron-builder/issues/2875#issuecomment-387233610
|
||||
args.push("/debug"); // must be last argument
|
||||
|
||||
args.push(inputFile);
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
function getOutputPath(inputPath, hash) {
|
||||
const extension = path.extname(inputPath);
|
||||
return path.join(path.dirname(inputPath), `${path.basename(inputPath, extension)}-signed-${hash}${extension}`);
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
function isOldWin6() {
|
||||
const winVersion = os().release();
|
||||
return winVersion.startsWith("6.") && !winVersion.startsWith("6.3");
|
||||
}
|
||||
|
||||
function getWinSignTool(vendorPath) {
|
||||
// use modern signtool on Windows Server 2012 R2 to be able to sign AppX
|
||||
if (isOldWin6()) {
|
||||
return path.join(vendorPath, "windows-6", "signtool.exe");
|
||||
} else {
|
||||
return path.join(vendorPath, "windows-10", process.arch, "signtool.exe");
|
||||
}
|
||||
}
|
||||
|
||||
async function getToolPath() {
|
||||
if ((0, _flags().isUseSystemSigncode)()) {
|
||||
return {
|
||||
path: "osslsigncode"
|
||||
};
|
||||
}
|
||||
|
||||
const result = process.env.SIGNTOOL_PATH;
|
||||
|
||||
if (result) {
|
||||
return {
|
||||
path: result
|
||||
};
|
||||
}
|
||||
|
||||
const vendorPath = await getSignVendorPath();
|
||||
|
||||
if (process.platform === "win32") {
|
||||
// use modern signtool on Windows Server 2012 R2 to be able to sign AppX
|
||||
return {
|
||||
path: getWinSignTool(vendorPath)
|
||||
};
|
||||
} else if (process.platform === "darwin") {
|
||||
const toolDirPath = path.join(vendorPath, process.platform, "10.12");
|
||||
return {
|
||||
path: path.join(toolDirPath, "osslsigncode"),
|
||||
env: (0, _bundledTool().computeToolEnv)([path.join(toolDirPath, "lib")])
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
path: path.join(vendorPath, process.platform, "osslsigncode")
|
||||
};
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=windowsCodeSign.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/codeSign/windowsCodeSign.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/codeSign/windowsCodeSign.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
235
buildfiles/node_modules/app-builder-lib/out/configuration.d.ts
generated
vendored
Normal file
235
buildfiles/node_modules/app-builder-lib/out/configuration.d.ts
generated
vendored
Normal file
@ -0,0 +1,235 @@
|
||||
import { Arch } from "builder-util";
|
||||
import { BeforeBuildContext, Target } from "./core";
|
||||
import { ElectronDownloadOptions } from "./electron/ElectronFramework";
|
||||
import { AppXOptions } from "./options/AppXOptions";
|
||||
import { AppImageOptions, DebOptions, LinuxConfiguration, LinuxTargetSpecificOptions } from "./options/linuxOptions";
|
||||
import { DmgOptions, MacConfiguration, MasConfiguration } from "./options/macOptions";
|
||||
import { MsiOptions } from "./options/MsiOptions";
|
||||
import { PkgOptions } from "./options/pkgOptions";
|
||||
import { PlatformSpecificBuildOptions } from "./options/PlatformSpecificBuildOptions";
|
||||
import { SnapOptions } from "./options/SnapOptions";
|
||||
import { SquirrelWindowsOptions } from "./options/SquirrelWindowsOptions";
|
||||
import { WindowsConfiguration } from "./options/winOptions";
|
||||
import { BuildResult } from "./packager";
|
||||
import { ArtifactBuildStarted, ArtifactCreated } from "./packagerApi";
|
||||
import { PlatformPackager } from "./platformPackager";
|
||||
import { NsisOptions, NsisWebOptions, PortableOptions } from "./targets/nsis/nsisOptions";
|
||||
/**
|
||||
* Configuration Options
|
||||
*/
|
||||
export interface Configuration extends PlatformSpecificBuildOptions {
|
||||
/**
|
||||
* The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as
|
||||
* [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.
|
||||
* @default com.electron.${name}
|
||||
*/
|
||||
readonly appId?: string | null;
|
||||
/**
|
||||
* As [name](#Metadata-name), but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the [name property](https://docs.npmjs.com/files/package.json#name).
|
||||
*/
|
||||
readonly productName?: string | null;
|
||||
/**
|
||||
* The human-readable copyright line for the app.
|
||||
* @default Copyright © year ${author}
|
||||
*/
|
||||
readonly copyright?: string | null;
|
||||
readonly directories?: MetadataDirectories | null;
|
||||
/**
|
||||
* Options related to how build macOS targets.
|
||||
*/
|
||||
readonly mac?: MacConfiguration | null;
|
||||
/**
|
||||
* MAS (Mac Application Store) options.
|
||||
*/
|
||||
readonly mas?: MasConfiguration | null;
|
||||
/**
|
||||
* MAS (Mac Application Store) development options (`mas-dev` target).
|
||||
*/
|
||||
readonly masDev?: MasConfiguration | null;
|
||||
/**
|
||||
* macOS DMG options.
|
||||
*/
|
||||
readonly dmg?: DmgOptions | null;
|
||||
/**
|
||||
* macOS PKG options.
|
||||
*/
|
||||
readonly pkg?: PkgOptions | null;
|
||||
/**
|
||||
* Options related to how build Windows targets.
|
||||
*/
|
||||
readonly win?: WindowsConfiguration | null;
|
||||
readonly nsis?: NsisOptions | null;
|
||||
readonly nsisWeb?: NsisWebOptions | null;
|
||||
readonly portable?: PortableOptions | null;
|
||||
readonly appx?: AppXOptions | null;
|
||||
/** @private */
|
||||
readonly msi?: MsiOptions | null;
|
||||
readonly squirrelWindows?: SquirrelWindowsOptions | null;
|
||||
/**
|
||||
* Options related to how build Linux targets.
|
||||
*/
|
||||
readonly linux?: LinuxConfiguration | null;
|
||||
/**
|
||||
* Debian package options.
|
||||
*/
|
||||
readonly deb?: DebOptions | null;
|
||||
/**
|
||||
* Snap options.
|
||||
*/
|
||||
readonly snap?: SnapOptions | null;
|
||||
/**
|
||||
* AppImage options.
|
||||
*/
|
||||
readonly appImage?: AppImageOptions | null;
|
||||
readonly pacman?: LinuxTargetSpecificOptions | null;
|
||||
readonly rpm?: LinuxTargetSpecificOptions | null;
|
||||
readonly freebsd?: LinuxTargetSpecificOptions | null;
|
||||
readonly p5p?: LinuxTargetSpecificOptions | null;
|
||||
readonly apk?: LinuxTargetSpecificOptions | null;
|
||||
/**
|
||||
* Whether to build the application native dependencies from source.
|
||||
* @default false
|
||||
*/
|
||||
buildDependenciesFromSource?: boolean;
|
||||
/**
|
||||
* Whether to execute `node-gyp rebuild` before starting to package the app.
|
||||
*
|
||||
* Don't [use](https://github.com/electron-userland/electron-builder/issues/683#issuecomment-241214075) [npm](http://electron.atom.io/docs/tutorial/using-native-node-modules/#using-npm) (neither `.npmrc`) for configuring electron headers. Use `electron-builder node-gyp-rebuild` instead.
|
||||
* @default false
|
||||
*/
|
||||
readonly nodeGypRebuild?: boolean;
|
||||
/**
|
||||
* Additional command line arguments to use when installing app native deps.
|
||||
*/
|
||||
readonly npmArgs?: Array<string> | string | null;
|
||||
/**
|
||||
* Whether to [rebuild](https://docs.npmjs.com/cli/rebuild) native dependencies before starting to package the app.
|
||||
* @default true
|
||||
*/
|
||||
readonly npmRebuild?: boolean;
|
||||
/**
|
||||
* The build version. Maps to the `CFBundleVersion` on macOS, and `FileVersion` metadata property on Windows. Defaults to the `version`.
|
||||
* If `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_NUMBER` or `bamboo.buildNumber` or `CI_PIPELINE_IID` env defined, it will be used as a build version (`version.build_number`).
|
||||
*/
|
||||
readonly buildVersion?: string | null;
|
||||
/**
|
||||
* Whether to use [electron-compile](http://github.com/electron/electron-compile) to compile app. Defaults to `true` if `electron-compile` in the dependencies. And `false` if in the `devDependencies` or doesn't specified.
|
||||
*/
|
||||
readonly electronCompile?: boolean;
|
||||
/**
|
||||
* The path to custom Electron build (e.g. `~/electron/out/R`).
|
||||
*/
|
||||
readonly electronDist?: string;
|
||||
/**
|
||||
* The [electron-download](https://github.com/electron-userland/electron-download#usage) options.
|
||||
*/
|
||||
readonly electronDownload?: ElectronDownloadOptions;
|
||||
/**
|
||||
* The version of electron you are packaging for. Defaults to version of `electron`, `electron-prebuilt` or `electron-prebuilt-compile` dependency.
|
||||
*/
|
||||
electronVersion?: string | null;
|
||||
/**
|
||||
* The name of a built-in configuration preset or path to config file (relative to project dir). Currently, only `react-cra` is supported.
|
||||
*
|
||||
* If `react-scripts` in the app dependencies, `react-cra` will be set automatically. Set to `null` to disable automatic detection.
|
||||
*/
|
||||
extends?: string | null;
|
||||
/**
|
||||
* Inject properties to `package.json`.
|
||||
*/
|
||||
readonly extraMetadata?: any;
|
||||
/**
|
||||
* Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).
|
||||
* @default false
|
||||
*/
|
||||
readonly forceCodeSigning?: boolean;
|
||||
/**
|
||||
* *libui-based frameworks only* The version of NodeJS you are packaging for.
|
||||
* You can set it to `current` to set the Node.js version that you use to run.
|
||||
*/
|
||||
readonly nodeVersion?: string | null;
|
||||
/**
|
||||
* *libui-based frameworks only* The version of LaunchUI you are packaging for. Applicable for Windows only. Defaults to version suitable for used framework version.
|
||||
*/
|
||||
readonly launchUiVersion?: boolean | string | null;
|
||||
/**
|
||||
* The framework name. One of `electron`, `proton`, `libui`. Defaults to `electron`.
|
||||
*/
|
||||
readonly framework?: string | null;
|
||||
/**
|
||||
* The function (or path to file or module id) to be [run after pack](#afterpack) (but before pack into distributable format and sign).
|
||||
*/
|
||||
readonly afterPack?: ((context: AfterPackContext) => Promise<any> | any) | string | null;
|
||||
/**
|
||||
* The function (or path to file or module id) to be [run after pack and sign](#aftersign) (but before pack into distributable format).
|
||||
*/
|
||||
readonly afterSign?: ((context: AfterPackContext) => Promise<any> | any) | string | null;
|
||||
/**
|
||||
* The function (or path to file or module id) to be run on artifact build start.
|
||||
*/
|
||||
readonly artifactBuildStarted?: ((context: ArtifactBuildStarted) => Promise<any> | any) | string | null;
|
||||
/**
|
||||
* The function (or path to file or module id) to be run on artifact build completed.
|
||||
*/
|
||||
readonly artifactBuildCompleted?: ((context: ArtifactCreated) => Promise<any> | any) | string | null;
|
||||
/**
|
||||
* The function (or path to file or module id) to be [run after all artifacts are build](#afterAllArtifactBuild).
|
||||
*/
|
||||
readonly afterAllArtifactBuild?: ((context: BuildResult) => Promise<Array<string>> | Array<string>) | string | null;
|
||||
/**
|
||||
* Appx manifest created on disk - not packed into .appx package yet.
|
||||
*/
|
||||
readonly appxManifestCreated?: ((path: string) => Promise<any> | any) | string | null;
|
||||
/**
|
||||
* The function (or path to file or module id) to be [run on each node module](#onnodemodulefile) file.
|
||||
*/
|
||||
readonly onNodeModuleFile?: ((file: string) => void) | string | null;
|
||||
/**
|
||||
* The function (or path to file or module id) to be run before dependencies are installed or rebuilt. Works when `npmRebuild` is set to `true`. Resolving to `false` will skip dependencies install or rebuild.
|
||||
*
|
||||
* If provided and `node_modules` are missing, it will not invoke production dependencies check.
|
||||
*/
|
||||
readonly beforeBuild?: ((context: BeforeBuildContext) => Promise<any>) | string | null;
|
||||
/**
|
||||
* Whether to build using Electron Build Service if target not supported on current OS.
|
||||
* @default true
|
||||
*/
|
||||
readonly remoteBuild?: boolean;
|
||||
/**
|
||||
* Whether to include PDB files.
|
||||
* @default false
|
||||
*/
|
||||
readonly includePdb?: boolean;
|
||||
/**
|
||||
* Whether to remove `scripts` field from `package.json` files.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly removePackageScripts?: boolean;
|
||||
}
|
||||
export interface AfterPackContext {
|
||||
readonly outDir: string;
|
||||
readonly appOutDir: string;
|
||||
readonly packager: PlatformPackager<any>;
|
||||
readonly electronPlatformName: string;
|
||||
readonly arch: Arch;
|
||||
readonly targets: Array<Target>;
|
||||
}
|
||||
export interface MetadataDirectories {
|
||||
/**
|
||||
* The path to build resources.
|
||||
*
|
||||
* Please note — build resources are not packed into the app. If you need to use some files, e.g. as tray icon, please include required files explicitly: `"files": ["**\/*", "build/icon.*"]`
|
||||
* @default build
|
||||
*/
|
||||
readonly buildResources?: string | null;
|
||||
/**
|
||||
* The output directory. [File macros](/file-patterns#file-macros) are supported.
|
||||
* @default dist
|
||||
*/
|
||||
readonly output?: string | null;
|
||||
/**
|
||||
* The application directory (containing the application package.json), defaults to `app`, `www` or working directory.
|
||||
*/
|
||||
readonly app?: string | null;
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/configuration.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/configuration.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=configuration.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/configuration.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/configuration.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
60
buildfiles/node_modules/app-builder-lib/out/core.d.ts
generated
vendored
Normal file
60
buildfiles/node_modules/app-builder-lib/out/core.d.ts
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
import { Arch, ArchType } from "builder-util";
|
||||
import { AllPublishOptions } from "builder-util-runtime";
|
||||
import { SnapStoreOptions } from "./publish/SnapStorePublisher";
|
||||
export declare type Publish = AllPublishOptions | SnapStoreOptions | Array<AllPublishOptions | SnapStoreOptions> | null;
|
||||
export declare type TargetConfigType = Array<string | TargetConfiguration> | string | TargetConfiguration | null;
|
||||
export interface TargetConfiguration {
|
||||
/**
|
||||
* The target name. e.g. `snap`.
|
||||
*/
|
||||
readonly target: string;
|
||||
/**
|
||||
* The arch or list of archs.
|
||||
*/
|
||||
readonly arch?: Array<ArchType> | ArchType;
|
||||
}
|
||||
export declare class Platform {
|
||||
name: string;
|
||||
buildConfigurationKey: string;
|
||||
nodeName: NodeJS.Platform;
|
||||
static MAC: Platform;
|
||||
static LINUX: Platform;
|
||||
static WINDOWS: Platform;
|
||||
constructor(name: string, buildConfigurationKey: string, nodeName: NodeJS.Platform);
|
||||
toString(): string;
|
||||
createTarget(type?: string | Array<string> | null, ...archs: Array<Arch>): Map<Platform, Map<Arch, Array<string>>>;
|
||||
static current(): Platform;
|
||||
static fromString(name: string): Platform;
|
||||
}
|
||||
export declare abstract class Target {
|
||||
readonly name: string;
|
||||
readonly isAsyncSupported: boolean;
|
||||
abstract readonly outDir: string;
|
||||
abstract readonly options: TargetSpecificOptions | null | undefined;
|
||||
protected constructor(name: string, isAsyncSupported?: boolean);
|
||||
checkOptions(): Promise<any>;
|
||||
abstract build(appOutDir: string, arch: Arch): Promise<any>;
|
||||
finishBuild(): Promise<any>;
|
||||
}
|
||||
export interface TargetSpecificOptions {
|
||||
/**
|
||||
The [artifact file name template](/configuration/configuration#artifact-file-name-template).
|
||||
*/
|
||||
readonly artifactName?: string | null;
|
||||
publish?: Publish;
|
||||
}
|
||||
export declare const DEFAULT_TARGET = "default";
|
||||
export declare const DIR_TARGET = "dir";
|
||||
export declare type CompressionLevel = "store" | "normal" | "maximum";
|
||||
export interface BeforeBuildContext {
|
||||
readonly appDir: string;
|
||||
readonly electronVersion: string;
|
||||
readonly platform: Platform;
|
||||
readonly arch: string;
|
||||
}
|
||||
export interface SourceRepositoryInfo {
|
||||
type?: string;
|
||||
domain?: string;
|
||||
user: string;
|
||||
project: string;
|
||||
}
|
99
buildfiles/node_modules/app-builder-lib/out/core.js
generated
vendored
Normal file
99
buildfiles/node_modules/app-builder-lib/out/core.js
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.DIR_TARGET = exports.DEFAULT_TARGET = exports.Target = exports.Platform = void 0;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
class Platform {
|
||||
constructor(name, buildConfigurationKey, nodeName) {
|
||||
this.name = name;
|
||||
this.buildConfigurationKey = buildConfigurationKey;
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
createTarget(type, ...archs) {
|
||||
if (type == null && (archs == null || archs.length === 0)) {
|
||||
return new Map([[this, new Map()]]);
|
||||
}
|
||||
|
||||
const archToType = new Map();
|
||||
|
||||
if (this === Platform.MAC) {
|
||||
archs = [_builderUtil().Arch.x64];
|
||||
}
|
||||
|
||||
for (const arch of archs == null || archs.length === 0 ? [(0, _builderUtil().archFromString)(process.arch)] : archs) {
|
||||
archToType.set(arch, type == null ? [] : Array.isArray(type) ? type : [type]);
|
||||
}
|
||||
|
||||
return new Map([[this, archToType]]);
|
||||
}
|
||||
|
||||
static current() {
|
||||
return Platform.fromString(process.platform);
|
||||
}
|
||||
|
||||
static fromString(name) {
|
||||
name = name.toLowerCase();
|
||||
|
||||
switch (name) {
|
||||
case Platform.MAC.nodeName:
|
||||
case Platform.MAC.name:
|
||||
return Platform.MAC;
|
||||
|
||||
case Platform.WINDOWS.nodeName:
|
||||
case Platform.WINDOWS.name:
|
||||
case Platform.WINDOWS.buildConfigurationKey:
|
||||
return Platform.WINDOWS;
|
||||
|
||||
case Platform.LINUX.nodeName:
|
||||
return Platform.LINUX;
|
||||
|
||||
default:
|
||||
throw new Error(`Unknown platform: ${name}`);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.Platform = Platform;
|
||||
Platform.MAC = new Platform("mac", "mac", "darwin");
|
||||
Platform.LINUX = new Platform("linux", "linux", "linux");
|
||||
Platform.WINDOWS = new Platform("windows", "win", "win32");
|
||||
|
||||
class Target {
|
||||
constructor(name, isAsyncSupported = true) {
|
||||
this.name = name;
|
||||
this.isAsyncSupported = isAsyncSupported;
|
||||
}
|
||||
|
||||
async checkOptions() {// ignore
|
||||
}
|
||||
|
||||
finishBuild() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.Target = Target;
|
||||
const DEFAULT_TARGET = "default";
|
||||
exports.DEFAULT_TARGET = DEFAULT_TARGET;
|
||||
const DIR_TARGET = "dir"; exports.DIR_TARGET = DIR_TARGET;
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=core.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/core.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/core.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
24
buildfiles/node_modules/app-builder-lib/out/electron/ElectronFramework.d.ts
generated
vendored
Normal file
24
buildfiles/node_modules/app-builder-lib/out/electron/ElectronFramework.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import { Configuration } from "../configuration";
|
||||
import { Framework } from "../Framework";
|
||||
import { Packager } from "../index";
|
||||
export declare type ElectronPlatformName = "darwin" | "linux" | "win32" | "mas";
|
||||
export interface ElectronDownloadOptions {
|
||||
version?: string;
|
||||
/**
|
||||
* The [cache location](https://github.com/electron-userland/electron-download#cache-location).
|
||||
*/
|
||||
cache?: string | null;
|
||||
/**
|
||||
* The mirror.
|
||||
*/
|
||||
mirror?: string | null;
|
||||
/** @private */
|
||||
customDir?: string | null;
|
||||
/** @private */
|
||||
customFilename?: string | null;
|
||||
strictSSL?: boolean;
|
||||
isVerifyChecksum?: boolean;
|
||||
platform?: ElectronPlatformName;
|
||||
arch?: string;
|
||||
}
|
||||
export declare function createElectronFrameworkSupport(configuration: Configuration, packager: Packager): Promise<Framework>;
|
271
buildfiles/node_modules/app-builder-lib/out/electron/ElectronFramework.js
generated
vendored
Normal file
271
buildfiles/node_modules/app-builder-lib/out/electron/ElectronFramework.js
generated
vendored
Normal file
@ -0,0 +1,271 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createElectronFrameworkSupport = createElectronFrameworkSupport;
|
||||
|
||||
function _bluebirdLst() {
|
||||
const data = _interopRequireDefault(require("bluebird-lst"));
|
||||
|
||||
_bluebirdLst = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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 _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 _index() {
|
||||
const data = require("../index");
|
||||
|
||||
_index = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _platformPackager() {
|
||||
const data = require("../platformPackager");
|
||||
|
||||
_platformPackager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _pathManager() {
|
||||
const data = require("../util/pathManager");
|
||||
|
||||
_pathManager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _electronMac() {
|
||||
const data = require("./electronMac");
|
||||
|
||||
_electronMac = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _electronVersion() {
|
||||
const data = require("./electronVersion");
|
||||
|
||||
_electronVersion = 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 }; }
|
||||
|
||||
function createDownloadOpts(opts, platform, arch, electronVersion) {
|
||||
return {
|
||||
platform,
|
||||
arch,
|
||||
version: electronVersion,
|
||||
...opts.electronDownload
|
||||
};
|
||||
}
|
||||
|
||||
async function beforeCopyExtraFiles(options) {
|
||||
const packager = options.packager;
|
||||
const appOutDir = options.appOutDir;
|
||||
|
||||
if (packager.platform === _index().Platform.LINUX) {
|
||||
if (!(0, _platformPackager().isSafeToUnpackElectronOnRemoteBuildServer)(packager)) {
|
||||
const linuxPackager = packager;
|
||||
const executable = path.join(appOutDir, linuxPackager.executableName);
|
||||
await (0, _fsExtra().rename)(path.join(appOutDir, "electron"), executable);
|
||||
}
|
||||
} else if (packager.platform === _index().Platform.WINDOWS) {
|
||||
const executable = path.join(appOutDir, `${packager.appInfo.productFilename}.exe`);
|
||||
await (0, _fsExtra().rename)(path.join(appOutDir, "electron.exe"), executable);
|
||||
} else {
|
||||
await (0, _electronMac().createMacApp)(packager, appOutDir, options.asarIntegrity, options.platformName === "mas");
|
||||
const wantedLanguages = (0, _builderUtil().asArray)(packager.platformSpecificBuildOptions.electronLanguages);
|
||||
|
||||
if (wantedLanguages.length === 0) {
|
||||
return;
|
||||
} // noinspection SpellCheckingInspection
|
||||
|
||||
|
||||
const langFileExt = ".lproj";
|
||||
const resourcesDir = packager.getResourcesDir(appOutDir);
|
||||
await _bluebirdLst().default.map((0, _fsExtra().readdir)(resourcesDir), file => {
|
||||
if (!file.endsWith(langFileExt)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const language = file.substring(0, file.length - langFileExt.length);
|
||||
|
||||
if (!wantedLanguages.includes(language)) {
|
||||
return (0, _fsExtra().remove)(path.join(resourcesDir, file));
|
||||
}
|
||||
|
||||
return;
|
||||
}, _fs().CONCURRENCY);
|
||||
}
|
||||
}
|
||||
|
||||
class ElectronFramework {
|
||||
constructor(name, version, distMacOsAppName) {
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
this.distMacOsAppName = distMacOsAppName; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.macOsDefaultTargets = ["zip", "dmg"]; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.defaultAppIdPrefix = "com.electron."; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.isCopyElevateHelper = true; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.isNpmRebuildRequired = true;
|
||||
}
|
||||
|
||||
getDefaultIcon(platform) {
|
||||
if (platform === _index().Platform.LINUX) {
|
||||
return path.join((0, _pathManager().getTemplatePath)("icons"), "electron-linux");
|
||||
} else {
|
||||
// default icon is embedded into app skeleton
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
prepareApplicationStageDirectory(options) {
|
||||
return unpack(options, createDownloadOpts(options.packager.config, options.platformName, options.arch, this.version), this.distMacOsAppName);
|
||||
}
|
||||
|
||||
beforeCopyExtraFiles(options) {
|
||||
return beforeCopyExtraFiles(options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function createElectronFrameworkSupport(configuration, packager) {
|
||||
let version = configuration.electronVersion;
|
||||
|
||||
if (version == null) {
|
||||
// for prepacked app asar no dev deps in the app.asar
|
||||
if (packager.isPrepackedAppAsar) {
|
||||
version = await (0, _electronVersion().getElectronVersionFromInstalled)(packager.projectDir);
|
||||
|
||||
if (version == null) {
|
||||
throw new Error(`Cannot compute electron version for prepacked asar`);
|
||||
}
|
||||
} else {
|
||||
version = await (0, _electronVersion().computeElectronVersion)(packager.projectDir, new (_lazyVal().Lazy)(() => Promise.resolve(packager.metadata)));
|
||||
}
|
||||
|
||||
configuration.electronVersion = version;
|
||||
}
|
||||
|
||||
return new ElectronFramework("electron", version, "Electron.app");
|
||||
}
|
||||
|
||||
async function unpack(prepareOptions, options, distMacOsAppName) {
|
||||
const packager = prepareOptions.packager;
|
||||
const out = prepareOptions.appOutDir;
|
||||
let dist = packager.config.electronDist;
|
||||
|
||||
if (dist != null) {
|
||||
const zipFile = `electron-v${options.version}-${prepareOptions.platformName}-${options.arch}.zip`;
|
||||
const resolvedDist = path.resolve(packager.projectDir, dist);
|
||||
|
||||
if ((await (0, _fs().statOrNull)(path.join(resolvedDist, zipFile))) != null) {
|
||||
options.cache = resolvedDist;
|
||||
dist = null;
|
||||
}
|
||||
}
|
||||
|
||||
let isFullCleanup = false;
|
||||
|
||||
if (dist == null) {
|
||||
if ((0, _platformPackager().isSafeToUnpackElectronOnRemoteBuildServer)(packager)) {
|
||||
return;
|
||||
}
|
||||
|
||||
await (0, _builderUtil().executeAppBuilder)(["unpack-electron", "--configuration", JSON.stringify([options]), "--output", out, "--distMacOsAppName", distMacOsAppName]);
|
||||
} else {
|
||||
isFullCleanup = true;
|
||||
const source = packager.getElectronSrcDir(dist);
|
||||
const destination = packager.getElectronDestinationDir(out);
|
||||
|
||||
_builderUtil().log.info({
|
||||
source,
|
||||
destination
|
||||
}, "copying Electron");
|
||||
|
||||
await (0, _fsExtra().emptyDir)(out);
|
||||
await (0, _fs().copyDir)(source, destination, {
|
||||
isUseHardLink: _fs().DO_NOT_USE_HARD_LINKS
|
||||
});
|
||||
}
|
||||
|
||||
await cleanupAfterUnpack(prepareOptions, distMacOsAppName, isFullCleanup);
|
||||
}
|
||||
|
||||
function cleanupAfterUnpack(prepareOptions, distMacOsAppName, isFullCleanup) {
|
||||
const out = prepareOptions.appOutDir;
|
||||
|
||||
const isMac = prepareOptions.packager.platform === _index().Platform.MAC;
|
||||
|
||||
const resourcesPath = isMac ? path.join(out, distMacOsAppName, "Contents", "Resources") : path.join(out, "resources");
|
||||
return Promise.all([isFullCleanup ? (0, _fs().unlinkIfExists)(path.join(resourcesPath, "default_app.asar")) : Promise.resolve(), isFullCleanup ? (0, _fs().unlinkIfExists)(path.join(out, "version")) : Promise.resolve(), isMac ? Promise.resolve() : (0, _fsExtra().rename)(path.join(out, "LICENSE"), path.join(out, "LICENSE.electron.txt")).catch(() => {})]);
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=ElectronFramework.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/electron/ElectronFramework.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/electron/ElectronFramework.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
buildfiles/node_modules/app-builder-lib/out/electron/electronMac.d.ts
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/electron/electronMac.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
356
buildfiles/node_modules/app-builder-lib/out/electron/electronMac.js
generated
vendored
Normal file
356
buildfiles/node_modules/app-builder-lib/out/electron/electronMac.js
generated
vendored
Normal file
@ -0,0 +1,356 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createMacApp = createMacApp;
|
||||
|
||||
function _bluebirdLst() {
|
||||
const data = _interopRequireDefault(require("bluebird-lst"));
|
||||
|
||||
_bluebirdLst = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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 _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _appInfo() {
|
||||
const data = require("../appInfo");
|
||||
|
||||
_appInfo = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _platformPackager() {
|
||||
const data = require("../platformPackager");
|
||||
|
||||
_platformPackager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _appBuilder() {
|
||||
const data = require("../util/appBuilder");
|
||||
|
||||
_appBuilder = 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 }; }
|
||||
|
||||
function doRename(basePath, oldName, newName) {
|
||||
return (0, _fsExtra().rename)(path.join(basePath, oldName), path.join(basePath, newName));
|
||||
}
|
||||
|
||||
function moveHelpers(helperSuffixes, frameworksPath, appName, prefix) {
|
||||
return _bluebirdLst().default.map(helperSuffixes, suffix => {
|
||||
const executableBasePath = path.join(frameworksPath, `${prefix}${suffix}.app`, "Contents", "MacOS");
|
||||
return doRename(executableBasePath, `${prefix}${suffix}`, appName + suffix).then(() => doRename(frameworksPath, `${prefix}${suffix}.app`, `${appName}${suffix}.app`));
|
||||
});
|
||||
}
|
||||
|
||||
function getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist) {
|
||||
const result = [" Helper"];
|
||||
|
||||
if (helperEHPlist != null) {
|
||||
result.push(" Helper EH");
|
||||
}
|
||||
|
||||
if (helperNPPlist != null) {
|
||||
result.push(" Helper NP");
|
||||
}
|
||||
|
||||
if (helperRendererPlist != null) {
|
||||
result.push(" Helper (Renderer)");
|
||||
}
|
||||
|
||||
if (helperPluginPlist != null) {
|
||||
result.push(" Helper (Plugin)");
|
||||
}
|
||||
|
||||
if (helperGPUPlist != null) {
|
||||
result.push(" Helper (GPU)");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
async function createMacApp(packager, appOutDir, asarIntegrity, isMas) {
|
||||
const appInfo = packager.appInfo;
|
||||
const appFilename = appInfo.productFilename;
|
||||
const contentsPath = path.join(appOutDir, packager.info.framework.distMacOsAppName, "Contents");
|
||||
const frameworksPath = path.join(contentsPath, "Frameworks");
|
||||
const loginItemPath = path.join(contentsPath, "Library", "LoginItems");
|
||||
const appPlistFilename = path.join(contentsPath, "Info.plist");
|
||||
const helperPlistFilename = path.join(frameworksPath, "Electron Helper.app", "Contents", "Info.plist");
|
||||
const helperEHPlistFilename = path.join(frameworksPath, "Electron Helper EH.app", "Contents", "Info.plist");
|
||||
const helperNPPlistFilename = path.join(frameworksPath, "Electron Helper NP.app", "Contents", "Info.plist");
|
||||
const helperRendererPlistFilename = path.join(frameworksPath, "Electron Helper (Renderer).app", "Contents", "Info.plist");
|
||||
const helperPluginPlistFilename = path.join(frameworksPath, "Electron Helper (Plugin).app", "Contents", "Info.plist");
|
||||
const helperGPUPlistFilename = path.join(frameworksPath, "Electron Helper (GPU).app", "Contents", "Info.plist");
|
||||
const helperLoginPlistFilename = path.join(loginItemPath, "Electron Login Helper.app", "Contents", "Info.plist");
|
||||
const plistContent = await (0, _appBuilder().executeAppBuilderAsJson)(["decode-plist", "-f", appPlistFilename, "-f", helperPlistFilename, "-f", helperEHPlistFilename, "-f", helperNPPlistFilename, "-f", helperRendererPlistFilename, "-f", helperPluginPlistFilename, "-f", helperGPUPlistFilename, "-f", helperLoginPlistFilename]);
|
||||
|
||||
if (plistContent[0] == null) {
|
||||
throw new Error("corrupted Electron dist");
|
||||
}
|
||||
|
||||
const appPlist = plistContent[0];
|
||||
const helperPlist = plistContent[1];
|
||||
const helperEHPlist = plistContent[2];
|
||||
const helperNPPlist = plistContent[3];
|
||||
const helperRendererPlist = plistContent[4];
|
||||
const helperPluginPlist = plistContent[5];
|
||||
const helperGPUPlist = plistContent[6];
|
||||
const helperLoginPlist = plistContent[7]; // if an extend-info file was supplied, copy its contents in first
|
||||
|
||||
if (plistContent[8] != null) {
|
||||
Object.assign(appPlist, plistContent[8]);
|
||||
}
|
||||
|
||||
const buildMetadata = packager.config;
|
||||
/**
|
||||
* Configure bundleIdentifier for the generic Electron Helper process
|
||||
*
|
||||
* This was the only Helper in Electron 5 and before. Allow users to configure
|
||||
* the bundleIdentifier for continuity.
|
||||
*/
|
||||
|
||||
const oldHelperBundleId = buildMetadata["helper-bundle-id"];
|
||||
|
||||
if (oldHelperBundleId != null) {
|
||||
_builderUtil().log.warn("build.helper-bundle-id is deprecated, please set as build.mac.helperBundleId");
|
||||
}
|
||||
|
||||
const helperBundleIdentifier = (0, _appInfo().filterCFBundleIdentifier)(packager.platformSpecificBuildOptions.helperBundleId || oldHelperBundleId || `${appInfo.macBundleIdentifier}.helper`);
|
||||
await packager.applyCommonInfo(appPlist, contentsPath); // required for electron-updater proxy
|
||||
|
||||
if (!isMas) {
|
||||
configureLocalhostAts(appPlist);
|
||||
}
|
||||
|
||||
helperPlist.CFBundleExecutable = `${appFilename} Helper`;
|
||||
helperPlist.CFBundleDisplayName = `${appInfo.productName} Helper`;
|
||||
helperPlist.CFBundleIdentifier = helperBundleIdentifier;
|
||||
helperPlist.CFBundleVersion = appPlist.CFBundleVersion;
|
||||
/**
|
||||
* Configure bundleIdentifier for Electron 5+ Helper processes
|
||||
*
|
||||
* In Electron 6, parts of the generic Electron Helper process were split into
|
||||
* individual helper processes. Allow users to configure the bundleIdentifiers
|
||||
* for continuity, specifically because macOS keychain access relies on
|
||||
* bundleIdentifiers not changing (i.e. across versions of Electron).
|
||||
*/
|
||||
|
||||
function configureHelper(helper, postfix, userProvidedBundleIdentifier) {
|
||||
helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`;
|
||||
helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`;
|
||||
helper.CFBundleIdentifier = userProvidedBundleIdentifier ? (0, _appInfo().filterCFBundleIdentifier)(userProvidedBundleIdentifier) : `${helperBundleIdentifier}.${postfix.replace(/[^a-z0-9]/gim, "")}`;
|
||||
helper.CFBundleVersion = appPlist.CFBundleVersion;
|
||||
}
|
||||
|
||||
if (helperRendererPlist != null) {
|
||||
configureHelper(helperRendererPlist, "(Renderer)", packager.platformSpecificBuildOptions.helperRendererBundleId);
|
||||
}
|
||||
|
||||
if (helperPluginPlist != null) {
|
||||
configureHelper(helperPluginPlist, "(Plugin)", packager.platformSpecificBuildOptions.helperPluginBundleId);
|
||||
}
|
||||
|
||||
if (helperGPUPlist != null) {
|
||||
configureHelper(helperGPUPlist, "(GPU)", packager.platformSpecificBuildOptions.helperGPUBundleId);
|
||||
}
|
||||
|
||||
if (helperEHPlist != null) {
|
||||
configureHelper(helperEHPlist, "EH", packager.platformSpecificBuildOptions.helperEHBundleId);
|
||||
}
|
||||
|
||||
if (helperNPPlist != null) {
|
||||
configureHelper(helperNPPlist, "NP", packager.platformSpecificBuildOptions.helperNPBundleId);
|
||||
}
|
||||
|
||||
if (helperLoginPlist != null) {
|
||||
helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`;
|
||||
helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`; // noinspection SpellCheckingInspection
|
||||
|
||||
helperLoginPlist.CFBundleIdentifier = `${appInfo.macBundleIdentifier}.loginhelper`;
|
||||
helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion;
|
||||
}
|
||||
|
||||
const protocols = (0, _builderUtil().asArray)(buildMetadata.protocols).concat((0, _builderUtil().asArray)(packager.platformSpecificBuildOptions.protocols));
|
||||
|
||||
if (protocols.length > 0) {
|
||||
appPlist.CFBundleURLTypes = protocols.map(protocol => {
|
||||
const schemes = (0, _builderUtil().asArray)(protocol.schemes);
|
||||
|
||||
if (schemes.length === 0) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`Protocol "${protocol.name}": must be at least one scheme specified`);
|
||||
}
|
||||
|
||||
return {
|
||||
CFBundleURLName: protocol.name,
|
||||
CFBundleTypeRole: protocol.role || "Editor",
|
||||
CFBundleURLSchemes: schemes.slice()
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
const fileAssociations = packager.fileAssociations;
|
||||
|
||||
if (fileAssociations.length > 0) {
|
||||
appPlist.CFBundleDocumentTypes = await _bluebirdLst().default.map(fileAssociations, async fileAssociation => {
|
||||
const extensions = (0, _builderUtil().asArray)(fileAssociation.ext).map(_platformPackager().normalizeExt);
|
||||
const customIcon = await packager.getResource((0, _builderUtil().getPlatformIconFileName)(fileAssociation.icon, true), `${extensions[0]}.icns`);
|
||||
let iconFile = appPlist.CFBundleIconFile;
|
||||
|
||||
if (customIcon != null) {
|
||||
iconFile = path.basename(customIcon);
|
||||
await (0, _fs().copyOrLinkFile)(customIcon, path.join(path.join(contentsPath, "Resources"), iconFile));
|
||||
}
|
||||
|
||||
const result = {
|
||||
CFBundleTypeExtensions: extensions,
|
||||
CFBundleTypeName: fileAssociation.name || extensions[0],
|
||||
CFBundleTypeRole: fileAssociation.role || "Editor",
|
||||
LSHandlerRank: fileAssociation.rank || "Default",
|
||||
CFBundleTypeIconFile: iconFile
|
||||
};
|
||||
|
||||
if (fileAssociation.isPackage) {
|
||||
result.LSTypeIsPackage = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
if (asarIntegrity != null) {
|
||||
appPlist.AsarIntegrity = JSON.stringify(asarIntegrity);
|
||||
}
|
||||
|
||||
const plistDataToWrite = {
|
||||
[appPlistFilename]: appPlist,
|
||||
[helperPlistFilename]: helperPlist
|
||||
};
|
||||
|
||||
if (helperEHPlist != null) {
|
||||
plistDataToWrite[helperEHPlistFilename] = helperEHPlist;
|
||||
}
|
||||
|
||||
if (helperNPPlist != null) {
|
||||
plistDataToWrite[helperNPPlistFilename] = helperNPPlist;
|
||||
}
|
||||
|
||||
if (helperRendererPlist != null) {
|
||||
plistDataToWrite[helperRendererPlistFilename] = helperRendererPlist;
|
||||
}
|
||||
|
||||
if (helperPluginPlist != null) {
|
||||
plistDataToWrite[helperPluginPlistFilename] = helperPluginPlist;
|
||||
}
|
||||
|
||||
if (helperGPUPlist != null) {
|
||||
plistDataToWrite[helperGPUPlistFilename] = helperGPUPlist;
|
||||
}
|
||||
|
||||
if (helperLoginPlist != null) {
|
||||
plistDataToWrite[helperLoginPlistFilename] = helperLoginPlist;
|
||||
}
|
||||
|
||||
await Promise.all([(0, _appBuilder().executeAppBuilderAndWriteJson)(["encode-plist"], plistDataToWrite), doRename(path.join(contentsPath, "MacOS"), "Electron", appPlist.CFBundleExecutable), (0, _fs().unlinkIfExists)(path.join(appOutDir, "LICENSE")), (0, _fs().unlinkIfExists)(path.join(appOutDir, "LICENSES.chromium.html"))]);
|
||||
await moveHelpers(getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist), frameworksPath, appFilename, "Electron");
|
||||
|
||||
if (helperLoginPlist != null) {
|
||||
const prefix = "Electron";
|
||||
const suffix = " Login Helper";
|
||||
const executableBasePath = path.join(loginItemPath, `${prefix}${suffix}.app`, "Contents", "MacOS");
|
||||
await doRename(executableBasePath, `${prefix}${suffix}`, appFilename + suffix).then(() => doRename(loginItemPath, `${prefix}${suffix}.app`, `${appFilename}${suffix}.app`));
|
||||
}
|
||||
|
||||
const appPath = path.join(appOutDir, `${appFilename}.app`);
|
||||
await (0, _fsExtra().rename)(path.dirname(contentsPath), appPath); // https://github.com/electron-userland/electron-builder/issues/840
|
||||
|
||||
const now = Date.now() / 1000;
|
||||
await (0, _fsExtra().utimes)(appPath, now, now);
|
||||
}
|
||||
|
||||
function configureLocalhostAts(appPlist) {
|
||||
// https://bencoding.com/2015/07/20/app-transport-security-and-localhost/
|
||||
let ats = appPlist.NSAppTransportSecurity;
|
||||
|
||||
if (ats == null) {
|
||||
ats = {};
|
||||
appPlist.NSAppTransportSecurity = ats;
|
||||
}
|
||||
|
||||
ats.NSAllowsLocalNetworking = true; // https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814
|
||||
|
||||
ats.NSAllowsArbitraryLoads = true;
|
||||
let exceptionDomains = ats.NSExceptionDomains;
|
||||
|
||||
if (exceptionDomains == null) {
|
||||
exceptionDomains = {};
|
||||
ats.NSExceptionDomains = exceptionDomains;
|
||||
}
|
||||
|
||||
if (exceptionDomains.localhost == null) {
|
||||
const allowHttp = {
|
||||
NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,
|
||||
NSIncludesSubdomains: false,
|
||||
NSTemporaryExceptionAllowsInsecureHTTPLoads: true,
|
||||
NSTemporaryExceptionMinimumTLSVersion: "1.0",
|
||||
NSTemporaryExceptionRequiresForwardSecrecy: false
|
||||
};
|
||||
exceptionDomains.localhost = allowHttp;
|
||||
exceptionDomains["127.0.0.1"] = allowHttp;
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=electronMac.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/electron/electronMac.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/electron/electronMac.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
buildfiles/node_modules/app-builder-lib/out/electron/electronVersion.d.ts
generated
vendored
Normal file
8
buildfiles/node_modules/app-builder-lib/out/electron/electronVersion.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import { Lazy } from "lazy-val";
|
||||
import { Configuration } from "../configuration";
|
||||
export declare type MetadataValue = Lazy<{
|
||||
[key: string]: any;
|
||||
} | null>;
|
||||
export declare function getElectronVersion(projectDir: string, config?: Configuration, projectMetadata?: MetadataValue): Promise<string>;
|
||||
export declare function getElectronVersionFromInstalled(projectDir: string): Promise<any>;
|
||||
export declare function getElectronPackage(projectDir: string): Promise<any>;
|
226
buildfiles/node_modules/app-builder-lib/out/electron/electronVersion.js
generated
vendored
Normal file
226
buildfiles/node_modules/app-builder-lib/out/electron/electronVersion.js
generated
vendored
Normal file
@ -0,0 +1,226 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getElectronVersion = getElectronVersion;
|
||||
exports.getElectronVersionFromInstalled = getElectronVersionFromInstalled;
|
||||
exports.getElectronPackage = getElectronPackage;
|
||||
exports.computeElectronVersion = computeElectronVersion;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _builderUtilRuntime() {
|
||||
const data = require("builder-util-runtime");
|
||||
|
||||
_builderUtilRuntime = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _nodeHttpExecutor() {
|
||||
const data = require("builder-util/out/nodeHttpExecutor");
|
||||
|
||||
_nodeHttpExecutor = 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 semver() {
|
||||
const data = _interopRequireWildcard(require("semver"));
|
||||
|
||||
semver = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _config() {
|
||||
const data = require("../util/config");
|
||||
|
||||
_config = 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; }
|
||||
|
||||
const electronPackages = ["electron", "electron-prebuilt", "electron-prebuilt-compile", "electron-nightly"];
|
||||
|
||||
async function getElectronVersion(projectDir, config, projectMetadata = new (_lazyVal().Lazy)(() => (0, _readConfigFile().orNullIfFileNotExist)((0, _fsExtra().readJson)(path.join(projectDir, "package.json"))))) {
|
||||
if (config == null) {
|
||||
config = await (0, _config().getConfig)(projectDir, null, null);
|
||||
}
|
||||
|
||||
if (config.electronVersion != null) {
|
||||
return config.electronVersion;
|
||||
}
|
||||
|
||||
return await computeElectronVersion(projectDir, projectMetadata);
|
||||
}
|
||||
|
||||
async function getElectronVersionFromInstalled(projectDir) {
|
||||
for (const name of electronPackages) {
|
||||
try {
|
||||
return (await (0, _fsExtra().readJson)(path.join(projectDir, "node_modules", name, "package.json"))).version;
|
||||
} catch (e) {
|
||||
if (e.code !== "ENOENT") {
|
||||
_builderUtil().log.warn({
|
||||
name,
|
||||
error: e
|
||||
}, `cannot read electron version package.json`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async function getElectronPackage(projectDir) {
|
||||
for (const name of electronPackages) {
|
||||
try {
|
||||
return await (0, _fsExtra().readJson)(path.join(projectDir, "node_modules", name, "package.json"));
|
||||
} catch (e) {
|
||||
if (e.code !== "ENOENT") {
|
||||
_builderUtil().log.warn({
|
||||
name,
|
||||
error: e
|
||||
}, `cannot find electron in package.json`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
async function computeElectronVersion(projectDir, projectMetadata) {
|
||||
const result = await getElectronVersionFromInstalled(projectDir);
|
||||
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
const dependency = findFromPackageMetadata(await projectMetadata.value);
|
||||
|
||||
if ((dependency === null || dependency === void 0 ? void 0 : dependency.name) === "electron-nightly") {
|
||||
_builderUtil().log.info("You are using a nightly version of electron, be warned that those builds are highly unstable.");
|
||||
|
||||
const feedXml = await _nodeHttpExecutor().httpExecutor.request({
|
||||
hostname: "github.com",
|
||||
path: `/electron/nightlies/releases.atom`,
|
||||
headers: {
|
||||
accept: "application/xml, application/atom+xml, text/xml, */*"
|
||||
}
|
||||
});
|
||||
const feed = (0, _builderUtilRuntime().parseXml)(feedXml);
|
||||
const latestRelease = feed.element("entry", false, `No published versions on GitHub`);
|
||||
const v = latestRelease.element("link").attribute("href").match(/\/tag\/v?([^/]+)$/)[1];
|
||||
return v.startsWith("v") ? v.substring(1) : v;
|
||||
} else if ((dependency === null || dependency === void 0 ? void 0 : dependency.version) === "latest") {
|
||||
_builderUtil().log.warn("Electron version is set to \"latest\", but it is recommended to set it to some more restricted version range.");
|
||||
|
||||
try {
|
||||
const releaseInfo = JSON.parse(await _nodeHttpExecutor().httpExecutor.request({
|
||||
hostname: "github.com",
|
||||
path: `/electron/${dependency.name === "electron-nightly" ? "nightlies" : "electron"}/releases/latest`,
|
||||
headers: {
|
||||
accept: "application/json"
|
||||
}
|
||||
}));
|
||||
const version = releaseInfo.tag_name.startsWith("v") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name;
|
||||
|
||||
_builderUtil().log.info({
|
||||
version
|
||||
}, `resolve ${dependency.name}@${dependency.version}`);
|
||||
|
||||
return version;
|
||||
} catch (e) {
|
||||
_builderUtil().log.warn(e);
|
||||
}
|
||||
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`Cannot find electron dependency to get electron version in the '${path.join(projectDir, "package.json")}'`);
|
||||
}
|
||||
|
||||
const version = dependency === null || dependency === void 0 ? void 0 : dependency.version;
|
||||
|
||||
if (version == null || !/^\d/.test(version)) {
|
||||
const versionMessage = version == null ? "" : ` and version ("${version}") is not fixed in project`;
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`Cannot compute electron version from installed node modules - none of the possible electron modules are installed${versionMessage}.\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`);
|
||||
}
|
||||
|
||||
return semver().coerce(version).toString();
|
||||
}
|
||||
|
||||
function findFromPackageMetadata(packageData) {
|
||||
for (const name of electronPackages) {
|
||||
const devDependencies = packageData.devDependencies;
|
||||
let dep = devDependencies == null ? null : devDependencies[name];
|
||||
|
||||
if (dep == null) {
|
||||
const dependencies = packageData.dependencies;
|
||||
dep = dependencies == null ? null : dependencies[name];
|
||||
}
|
||||
|
||||
if (dep != null) {
|
||||
return {
|
||||
name,
|
||||
version: dep
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=electronVersion.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/electron/electronVersion.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/electron/electronVersion.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
buildfiles/node_modules/app-builder-lib/out/errorMessages.d.ts
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/errorMessages.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare const authorEmailIsMissed = "Please specify author 'email' in the application package.json\n\nSee https://docs.npmjs.com/files/package.json#people-fields-author-contributors\n\nIt is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.\n(see https://www.electron.build/configuration/linux).\n";
|
15
buildfiles/node_modules/app-builder-lib/out/errorMessages.js
generated
vendored
Normal file
15
buildfiles/node_modules/app-builder-lib/out/errorMessages.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.authorEmailIsMissed = void 0;
|
||||
const authorEmailIsMissed = `Please specify author 'email' in the application package.json
|
||||
|
||||
See https://docs.npmjs.com/files/package.json#people-fields-author-contributors
|
||||
|
||||
It is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.
|
||||
(see https://www.electron.build/configuration/linux).
|
||||
`; exports.authorEmailIsMissed = authorEmailIsMissed;
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=errorMessages.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/errorMessages.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/errorMessages.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/errorMessages.ts"],"names":[],"mappings":";;;;;;AAAO,MAAM,mBAAmB,GAAG;;;;;;CAA5B,C","sourcesContent":["export const authorEmailIsMissed = `Please specify author 'email' in the application package.json\n\nSee https://docs.npmjs.com/files/package.json#people-fields-author-contributors\n\nIt is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.\n(see https://www.electron.build/configuration/linux).\n`"],"sourceRoot":""}
|
9
buildfiles/node_modules/app-builder-lib/out/fileMatcher.d.ts
generated
vendored
Normal file
9
buildfiles/node_modules/app-builder-lib/out/fileMatcher.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { PlatformSpecificBuildOptions } from "./index";
|
||||
export declare const excludedNames: string;
|
||||
export declare const excludedExts = "iml,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,suo,xproj,cc,d.ts";
|
||||
export interface GetFileMatchersOptions {
|
||||
readonly macroExpander: (pattern: string) => string;
|
||||
readonly customBuildOptions: PlatformSpecificBuildOptions;
|
||||
readonly globalOutDir: string;
|
||||
readonly defaultSrc: string;
|
||||
}
|
413
buildfiles/node_modules/app-builder-lib/out/fileMatcher.js
generated
vendored
Normal file
413
buildfiles/node_modules/app-builder-lib/out/fileMatcher.js
generated
vendored
Normal file
@ -0,0 +1,413 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getMainFileMatchers = getMainFileMatchers;
|
||||
exports.getNodeModuleFileMatcher = getNodeModuleFileMatcher;
|
||||
exports.getFileMatchers = getFileMatchers;
|
||||
exports.copyFiles = copyFiles;
|
||||
exports.FileMatcher = exports.excludedExts = exports.excludedNames = void 0;
|
||||
|
||||
function _bluebirdLst() {
|
||||
const data = _interopRequireDefault(require("bluebird-lst"));
|
||||
|
||||
_bluebirdLst = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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 _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _minimatch() {
|
||||
const data = require("minimatch");
|
||||
|
||||
_minimatch = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _filter() {
|
||||
const data = require("./util/filter");
|
||||
|
||||
_filter = 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 }; }
|
||||
|
||||
// https://github.com/electron-userland/electron-builder/issues/733
|
||||
const minimatchOptions = {
|
||||
dot: true
|
||||
}; // noinspection SpellCheckingInspection
|
||||
|
||||
const excludedNames = ".git,.hg,.svn,CVS,RCS,SCCS," + "__pycache__,.DS_Store,thumbs.db,.gitignore,.gitkeep,.gitattributes,.npmignore," + ".idea,.vs,.flowconfig,.jshintrc,.eslintrc,.circleci," + ".yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,package-lock.json,npm-debug.log," + "appveyor.yml,.travis.yml,circle.yml,.nyc_output";
|
||||
exports.excludedNames = excludedNames;
|
||||
const excludedExts = "iml,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,suo,xproj,cc,d.ts";
|
||||
exports.excludedExts = excludedExts;
|
||||
|
||||
function ensureNoEndSlash(file) {
|
||||
if (path.sep !== "/") {
|
||||
file = file.replace(/\//g, path.sep);
|
||||
}
|
||||
|
||||
if (path.sep !== "\\") {
|
||||
file = file.replace(/\\/g, path.sep);
|
||||
}
|
||||
|
||||
if (file.endsWith(path.sep)) {
|
||||
return file.substring(0, file.length - 1);
|
||||
} else {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
class FileMatcher {
|
||||
constructor(from, to, macroExpander, patterns) {
|
||||
this.macroExpander = macroExpander;
|
||||
this.excludePatterns = null;
|
||||
this.from = ensureNoEndSlash(macroExpander(from));
|
||||
this.to = ensureNoEndSlash(macroExpander(to));
|
||||
this.patterns = (0, _builderUtil().asArray)(patterns).map(it => this.normalizePattern(it));
|
||||
this.isSpecifiedAsEmptyArray = Array.isArray(patterns) && patterns.length === 0;
|
||||
}
|
||||
|
||||
normalizePattern(pattern) {
|
||||
if (pattern.startsWith("./")) {
|
||||
pattern = pattern.substring("./".length);
|
||||
}
|
||||
|
||||
return path.posix.normalize(this.macroExpander(pattern.replace(/\\/g, "/")));
|
||||
}
|
||||
|
||||
addPattern(pattern) {
|
||||
this.patterns.push(this.normalizePattern(pattern));
|
||||
}
|
||||
|
||||
prependPattern(pattern) {
|
||||
this.patterns.unshift(this.normalizePattern(pattern));
|
||||
}
|
||||
|
||||
isEmpty() {
|
||||
return this.patterns.length === 0;
|
||||
}
|
||||
|
||||
containsOnlyIgnore() {
|
||||
return !this.isEmpty() && this.patterns.find(it => !it.startsWith("!")) == null;
|
||||
}
|
||||
|
||||
computeParsedPatterns(result, fromDir) {
|
||||
const relativeFrom = fromDir == null ? null : path.relative(fromDir, this.from);
|
||||
|
||||
if (this.patterns.length === 0 && relativeFrom != null) {
|
||||
// file mappings, from here is a file
|
||||
result.push(new (_minimatch().Minimatch)(relativeFrom, minimatchOptions));
|
||||
return;
|
||||
}
|
||||
|
||||
for (let pattern of this.patterns) {
|
||||
if (relativeFrom != null) {
|
||||
pattern = path.join(relativeFrom, pattern);
|
||||
}
|
||||
|
||||
const parsedPattern = new (_minimatch().Minimatch)(pattern, minimatchOptions);
|
||||
result.push(parsedPattern); // do not add if contains dot (possibly file if has extension)
|
||||
|
||||
if (!pattern.includes(".") && !(0, _filter().hasMagic)(parsedPattern)) {
|
||||
// https://github.com/electron-userland/electron-builder/issues/545
|
||||
// add **/*
|
||||
result.push(new (_minimatch().Minimatch)(`${pattern}/**/*`, minimatchOptions));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
createFilter() {
|
||||
const parsedPatterns = [];
|
||||
this.computeParsedPatterns(parsedPatterns);
|
||||
return (0, _filter().createFilter)(this.from, parsedPatterns, this.excludePatterns);
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `from: ${this.from}, to: ${this.to}, patterns: ${this.patterns.join(", ")}`;
|
||||
}
|
||||
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
exports.FileMatcher = FileMatcher;
|
||||
|
||||
function getMainFileMatchers(appDir, destination, macroExpander, platformSpecificBuildOptions, platformPackager, outDir, isElectronCompile) {
|
||||
const packager = platformPackager.info;
|
||||
const buildResourceDir = path.resolve(packager.projectDir, packager.buildResourcesDir);
|
||||
let matchers = packager.isPrepackedAppAsar ? null : getFileMatchers(packager.config, "files", destination, {
|
||||
macroExpander,
|
||||
customBuildOptions: platformSpecificBuildOptions,
|
||||
globalOutDir: outDir,
|
||||
defaultSrc: appDir
|
||||
});
|
||||
|
||||
if (matchers == null) {
|
||||
matchers = [new FileMatcher(appDir, destination, macroExpander)];
|
||||
}
|
||||
|
||||
const matcher = matchers[0]; // add default patterns, but only if from equals to app dir
|
||||
|
||||
if (matcher.from !== appDir) {
|
||||
return matchers;
|
||||
} // https://github.com/electron-userland/electron-builder/issues/1741#issuecomment-311111418 so, do not use inclusive patterns
|
||||
|
||||
|
||||
const patterns = matcher.patterns;
|
||||
const customFirstPatterns = []; // electron-webpack - we need to copy only package.json and node_modules from root dir (and these files are added by default), so, explicit empty array is specified
|
||||
|
||||
if (!matcher.isSpecifiedAsEmptyArray && (matcher.isEmpty() || matcher.containsOnlyIgnore())) {
|
||||
customFirstPatterns.push("**/*");
|
||||
} else if (!patterns.includes("package.json")) {
|
||||
patterns.push("package.json");
|
||||
} // https://github.com/electron-userland/electron-builder/issues/1482
|
||||
|
||||
|
||||
const relativeBuildResourceDir = path.relative(matcher.from, buildResourceDir);
|
||||
|
||||
if (relativeBuildResourceDir.length !== 0 && !relativeBuildResourceDir.startsWith(".")) {
|
||||
customFirstPatterns.push(`!${relativeBuildResourceDir}{,/**/*}`);
|
||||
}
|
||||
|
||||
const relativeOutDir = matcher.normalizePattern(path.relative(packager.projectDir, outDir));
|
||||
|
||||
if (!relativeOutDir.startsWith(".")) {
|
||||
customFirstPatterns.push(`!${relativeOutDir}{,/**/*}`);
|
||||
} // add our default exclusions after last user possibly defined "all"/permissive pattern
|
||||
|
||||
|
||||
let insertIndex = 0;
|
||||
|
||||
for (let i = patterns.length - 1; i >= 0; i--) {
|
||||
if (patterns[i].startsWith("**/")) {
|
||||
insertIndex = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
patterns.splice(insertIndex, 0, ...customFirstPatterns);
|
||||
patterns.push(`!**/*.{${excludedExts}${packager.config.includePdb === true ? "" : ",pdb"}`);
|
||||
patterns.push("!**/._*");
|
||||
patterns.push("!**/electron-builder.{yaml,yml,json,json5,toml}");
|
||||
patterns.push(`!**/{${excludedNames}}`);
|
||||
|
||||
if (isElectronCompile) {
|
||||
patterns.push("!.cache{,/**/*}");
|
||||
}
|
||||
|
||||
patterns.push("!.yarn{,/**/*}"); // https://github.com/electron-userland/electron-builder/issues/1969
|
||||
// exclude ony for app root, use .yarnclean to clean node_modules
|
||||
|
||||
patterns.push("!.editorconfig");
|
||||
patterns.push("!.yarnrc.yml");
|
||||
const debugLogger = packager.debugLogger;
|
||||
|
||||
if (debugLogger.isEnabled) {
|
||||
//tslint:disable-next-line:no-invalid-template-strings
|
||||
debugLogger.add(`${macroExpander("${arch}")}.firstOrDefaultFilePatterns`, patterns);
|
||||
}
|
||||
|
||||
return matchers;
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
function getNodeModuleFileMatcher(appDir, destination, macroExpander, platformSpecificBuildOptions, packager) {
|
||||
// https://github.com/electron-userland/electron-builder/pull/2948#issuecomment-392241632
|
||||
// grab only excludes
|
||||
const matcher = new FileMatcher(appDir, destination, macroExpander);
|
||||
|
||||
function addPatterns(patterns) {
|
||||
if (patterns == null) {
|
||||
return;
|
||||
} else if (!Array.isArray(patterns)) {
|
||||
if (typeof patterns === "string" && patterns.startsWith("!")) {
|
||||
matcher.addPattern(patterns);
|
||||
return;
|
||||
} // ignore object form
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (const pattern of patterns) {
|
||||
if (typeof pattern === "string") {
|
||||
if (pattern.startsWith("!")) {
|
||||
matcher.addPattern(pattern);
|
||||
}
|
||||
} else {
|
||||
const fileSet = pattern;
|
||||
|
||||
if (fileSet.from == null || fileSet.from === ".") {
|
||||
for (const p of (0, _builderUtil().asArray)(fileSet.filter)) {
|
||||
matcher.addPattern(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addPatterns(packager.config.files);
|
||||
addPatterns(platformSpecificBuildOptions.files);
|
||||
|
||||
if (!matcher.isEmpty()) {
|
||||
matcher.prependPattern("**/*");
|
||||
}
|
||||
|
||||
const debugLogger = packager.debugLogger;
|
||||
|
||||
if (debugLogger.isEnabled) {
|
||||
//tslint:disable-next-line:no-invalid-template-strings
|
||||
debugLogger.add(`${macroExpander("${arch}")}.nodeModuleFilePatterns`, matcher.patterns);
|
||||
}
|
||||
|
||||
return matcher;
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
function getFileMatchers(config, name, defaultDestination, options) {
|
||||
const defaultMatcher = new FileMatcher(options.defaultSrc, defaultDestination, options.macroExpander);
|
||||
const fileMatchers = [];
|
||||
|
||||
function addPatterns(patterns) {
|
||||
if (patterns == null) {
|
||||
return;
|
||||
} else if (!Array.isArray(patterns)) {
|
||||
if (typeof patterns === "string") {
|
||||
defaultMatcher.addPattern(patterns);
|
||||
return;
|
||||
}
|
||||
|
||||
patterns = [patterns];
|
||||
}
|
||||
|
||||
for (const pattern of patterns) {
|
||||
if (typeof pattern === "string") {
|
||||
// use normalize to transform ./foo to foo
|
||||
defaultMatcher.addPattern(pattern);
|
||||
} else if (name === "asarUnpack") {
|
||||
throw new Error(`Advanced file copying not supported for "${name}"`);
|
||||
} else {
|
||||
const from = pattern.from == null ? options.defaultSrc : path.resolve(options.defaultSrc, pattern.from);
|
||||
const to = pattern.to == null ? defaultDestination : path.resolve(defaultDestination, pattern.to);
|
||||
fileMatchers.push(new FileMatcher(from, to, options.macroExpander, pattern.filter));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (name !== "extraDistFiles") {
|
||||
addPatterns(config[name]);
|
||||
}
|
||||
|
||||
addPatterns(options.customBuildOptions[name]);
|
||||
|
||||
if (!defaultMatcher.isEmpty()) {
|
||||
// default matcher should be first in the array
|
||||
fileMatchers.unshift(defaultMatcher);
|
||||
} // we cannot exclude the whole out dir, because sometimes users want to use some file in the out dir in the patterns
|
||||
|
||||
|
||||
const relativeOutDir = defaultMatcher.normalizePattern(path.relative(options.defaultSrc, options.globalOutDir));
|
||||
|
||||
if (!relativeOutDir.startsWith(".")) {
|
||||
defaultMatcher.addPattern(`!${relativeOutDir}/*-unpacked{,/**/*}`);
|
||||
}
|
||||
|
||||
return fileMatchers.length === 0 ? null : fileMatchers;
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
function copyFiles(matchers, transformer, isUseHardLink) {
|
||||
if (matchers == null || matchers.length === 0) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return _bluebirdLst().default.map(matchers, async matcher => {
|
||||
const fromStat = await (0, _fs().statOrNull)(matcher.from);
|
||||
|
||||
if (fromStat == null) {
|
||||
_builderUtil().log.warn({
|
||||
from: matcher.from
|
||||
}, `file source doesn't exist`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (fromStat.isFile()) {
|
||||
const toStat = await (0, _fs().statOrNull)(matcher.to); // https://github.com/electron-userland/electron-builder/issues/1245
|
||||
|
||||
if (toStat != null && toStat.isDirectory()) {
|
||||
return await (0, _fs().copyOrLinkFile)(matcher.from, path.join(matcher.to, path.basename(matcher.from)), fromStat, isUseHardLink);
|
||||
}
|
||||
|
||||
await (0, _fsExtra().ensureDir)(path.dirname(matcher.to));
|
||||
return await (0, _fs().copyOrLinkFile)(matcher.from, matcher.to, fromStat);
|
||||
}
|
||||
|
||||
if (matcher.isEmpty() || matcher.containsOnlyIgnore()) {
|
||||
matcher.prependPattern("**/*");
|
||||
}
|
||||
|
||||
_builderUtil().log.debug({
|
||||
matcher
|
||||
}, "copying files using pattern");
|
||||
|
||||
return await (0, _fs().copyDir)(matcher.from, matcher.to, {
|
||||
filter: matcher.createFilter(),
|
||||
transformer,
|
||||
isUseHardLink: isUseHardLink ? _fs().USE_HARD_LINKS : null
|
||||
});
|
||||
});
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=fileMatcher.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/fileMatcher.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/fileMatcher.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
buildfiles/node_modules/app-builder-lib/out/fileTransformer.d.ts
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/fileTransformer.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
141
buildfiles/node_modules/app-builder-lib/out/fileTransformer.js
generated
vendored
Normal file
141
buildfiles/node_modules/app-builder-lib/out/fileTransformer.js
generated
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isElectronCompileUsed = isElectronCompileUsed;
|
||||
exports.hasDep = hasDep;
|
||||
exports.createTransformer = createTransformer;
|
||||
exports.createElectronCompilerHost = createElectronCompilerHost;
|
||||
exports.NODE_MODULES_PATTERN = void 0;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
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 */
|
||||
const NODE_MODULES_PATTERN = `${path.sep}node_modules${path.sep}`;
|
||||
/** @internal */
|
||||
|
||||
exports.NODE_MODULES_PATTERN = NODE_MODULES_PATTERN;
|
||||
|
||||
function isElectronCompileUsed(info) {
|
||||
if (info.config.electronCompile != null) {
|
||||
return info.config.electronCompile;
|
||||
} // if in devDependencies - it means that babel is used for precompilation or for some reason user decided to not use electron-compile for production
|
||||
|
||||
|
||||
return hasDep("electron-compile", info);
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
function hasDep(name, info) {
|
||||
const deps = info.metadata.dependencies;
|
||||
return deps != null && name in deps;
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
function createTransformer(srcDir, configuration, extraMetadata, extraTransformer) {
|
||||
const mainPackageJson = path.join(srcDir, "package.json");
|
||||
const isRemovePackageScripts = configuration.removePackageScripts !== false;
|
||||
const packageJson = path.sep + "package.json";
|
||||
return file => {
|
||||
if (file === mainPackageJson) {
|
||||
return modifyMainPackageJson(file, extraMetadata, isRemovePackageScripts);
|
||||
}
|
||||
|
||||
if (file.endsWith(packageJson) && file.includes(NODE_MODULES_PATTERN)) {
|
||||
return (0, _fsExtra().readFile)(file, "utf-8").then(it => cleanupPackageJson(JSON.parse(it), {
|
||||
isMain: false,
|
||||
isRemovePackageScripts
|
||||
})).catch(e => _builderUtil().log.warn(e));
|
||||
} else if (extraTransformer != null) {
|
||||
return extraTransformer(file);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
function createElectronCompilerHost(projectDir, cacheDir) {
|
||||
const electronCompilePath = path.join(projectDir, "node_modules", "electron-compile", "lib");
|
||||
return require(path.join(electronCompilePath, "config-parser")).createCompilerHostFromProjectRoot(projectDir, cacheDir);
|
||||
}
|
||||
|
||||
const ignoredPackageMetadataProperties = new Set(["dist", "gitHead", "keywords", "build", "jspm", "ava", "xo", "nyc", "eslintConfig", "contributors", "bundleDependencies", "tags"]);
|
||||
|
||||
function cleanupPackageJson(data, options) {
|
||||
const deps = data.dependencies; // https://github.com/electron-userland/electron-builder/issues/507#issuecomment-312772099
|
||||
|
||||
const isRemoveBabel = deps != null && typeof deps === "object" && !Object.getOwnPropertyNames(deps).some(it => it.startsWith("babel"));
|
||||
|
||||
try {
|
||||
let changed = false;
|
||||
|
||||
for (const prop of Object.getOwnPropertyNames(data)) {
|
||||
// removing devDependencies from package.json breaks levelup in electron, so, remove it only from main package.json
|
||||
if (prop[0] === "_" || ignoredPackageMetadataProperties.has(prop) || options.isRemovePackageScripts && prop === "scripts" || options.isMain && prop === "devDependencies" || !options.isMain && prop === "bugs" || isRemoveBabel && prop === "babel") {
|
||||
delete data[prop];
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
return JSON.stringify(data, null, 2);
|
||||
}
|
||||
} catch (e) {
|
||||
(0, _builderUtil().debug)(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async function modifyMainPackageJson(file, extraMetadata, isRemovePackageScripts) {
|
||||
const mainPackageData = JSON.parse(await (0, _fsExtra().readFile)(file, "utf-8"));
|
||||
|
||||
if (extraMetadata != null) {
|
||||
(0, _builderUtil().deepAssign)(mainPackageData, extraMetadata);
|
||||
} // https://github.com/electron-userland/electron-builder/issues/1212
|
||||
|
||||
|
||||
const serializedDataIfChanged = cleanupPackageJson(mainPackageData, {
|
||||
isMain: true,
|
||||
isRemovePackageScripts
|
||||
});
|
||||
|
||||
if (serializedDataIfChanged != null) {
|
||||
return serializedDataIfChanged;
|
||||
} else if (extraMetadata != null) {
|
||||
return JSON.stringify(mainPackageData, null, 2);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=fileTransformer.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/fileTransformer.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/fileTransformer.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
buildfiles/node_modules/app-builder-lib/out/forge-maker.d.ts
generated
vendored
Normal file
5
buildfiles/node_modules/app-builder-lib/out/forge-maker.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { PackagerOptions } from "./packagerApi";
|
||||
export interface ForgeOptions {
|
||||
readonly dir: string;
|
||||
}
|
||||
export declare function buildForge(forgeOptions: ForgeOptions, options: PackagerOptions): Promise<string[]>;
|
38
buildfiles/node_modules/app-builder-lib/out/forge-maker.js
generated
vendored
Normal file
38
buildfiles/node_modules/app-builder-lib/out/forge-maker.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.buildForge = buildForge;
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _index() {
|
||||
const data = require("./index");
|
||||
|
||||
_index = 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 buildForge(forgeOptions, options) {
|
||||
const appDir = forgeOptions.dir;
|
||||
return (0, _index().build)({
|
||||
prepackaged: appDir,
|
||||
config: {
|
||||
directories: {
|
||||
// https://github.com/electron-userland/electron-forge/blob/master/src/makers/generic/zip.js
|
||||
output: path.resolve(appDir, "..", "make")
|
||||
}
|
||||
},
|
||||
...options
|
||||
});
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=forge-maker.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/forge-maker.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/forge-maker.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/forge-maker.ts"],"names":[],"mappings":";;;;;;;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;AAOM,SAAU,UAAV,CAAqB,YAArB,EAAiD,OAAjD,EAAyE;AAC7E,QAAM,MAAM,GAAG,YAAY,CAAC,GAA5B;AACA,SAAO,oBAAM;AACX,IAAA,WAAW,EAAE,MADF;AAEX,IAAA,MAAM,EAAE;AACN,MAAA,WAAW,EAAE;AACX;AACA,QAAA,MAAM,EAAE,IAAI,CAAC,OAAL,CAAa,MAAb,EAAqB,IAArB,EAA2B,MAA3B;AAFG;AADP,KAFG;AAQX,OAAG;AARQ,GAAN,CAAP;AAUD,C","sourcesContent":["import * as path from \"path\"\nimport { build } from \"./index\"\nimport { PackagerOptions } from \"./packagerApi\"\n\nexport interface ForgeOptions {\n readonly dir: string\n}\n\nexport function buildForge(forgeOptions: ForgeOptions, options: PackagerOptions) {\n const appDir = forgeOptions.dir\n return build({\n prepackaged: appDir,\n config: {\n directories: {\n // https://github.com/electron-userland/electron-forge/blob/master/src/makers/generic/zip.js\n output: path.resolve(appDir, \"..\", \"make\"),\n },\n },\n ...options\n })\n}"],"sourceRoot":""}
|
21
buildfiles/node_modules/app-builder-lib/out/frameworks/LibUiFramework.d.ts
generated
vendored
Normal file
21
buildfiles/node_modules/app-builder-lib/out/frameworks/LibUiFramework.d.ts
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import { AfterPackContext } from "../configuration";
|
||||
import { Platform } from "../core";
|
||||
import { Framework, PrepareApplicationStageDirectoryOptions } from "../Framework";
|
||||
export declare class LibUiFramework implements Framework {
|
||||
readonly version: string;
|
||||
readonly distMacOsAppName: string;
|
||||
protected readonly isUseLaunchUi: boolean;
|
||||
readonly name: string;
|
||||
readonly macOsDefaultTargets: string[];
|
||||
readonly defaultAppIdPrefix: string;
|
||||
readonly isCopyElevateHelper = false;
|
||||
readonly isNpmRebuildRequired = false;
|
||||
constructor(version: string, distMacOsAppName: string, isUseLaunchUi: boolean);
|
||||
prepareApplicationStageDirectory(options: PrepareApplicationStageDirectoryOptions): Promise<void>;
|
||||
private prepareMacosApplicationStageDirectory;
|
||||
private prepareLinuxApplicationStageDirectory;
|
||||
afterPack(context: AfterPackContext): Promise<void>;
|
||||
getMainFile(platform: Platform): string | null;
|
||||
private isUseLaunchUiForPlatform;
|
||||
getExcludedDependencies(platform: Platform): Array<string> | null;
|
||||
}
|
156
buildfiles/node_modules/app-builder-lib/out/frameworks/LibUiFramework.js
generated
vendored
Normal file
156
buildfiles/node_modules/app-builder-lib/out/frameworks/LibUiFramework.js
generated
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.LibUiFramework = void 0;
|
||||
|
||||
function _fsExtra() {
|
||||
const data = require("fs-extra");
|
||||
|
||||
_fsExtra = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var path = _interopRequireWildcard(require("path"));
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require("../core");
|
||||
|
||||
_core = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _appBuilder() {
|
||||
const data = require("../util/appBuilder");
|
||||
|
||||
_appBuilder = 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; }
|
||||
|
||||
class LibUiFramework {
|
||||
constructor(version, distMacOsAppName, isUseLaunchUi) {
|
||||
this.version = version;
|
||||
this.distMacOsAppName = distMacOsAppName;
|
||||
this.isUseLaunchUi = isUseLaunchUi;
|
||||
this.name = "libui"; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.macOsDefaultTargets = ["dmg"];
|
||||
this.defaultAppIdPrefix = "com.libui."; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.isCopyElevateHelper = false; // noinspection JSUnusedGlobalSymbols
|
||||
|
||||
this.isNpmRebuildRequired = false;
|
||||
}
|
||||
|
||||
async prepareApplicationStageDirectory(options) {
|
||||
await (0, _fsExtra().emptyDir)(options.appOutDir);
|
||||
const packager = options.packager;
|
||||
const platform = packager.platform;
|
||||
|
||||
if (this.isUseLaunchUiForPlatform(platform)) {
|
||||
const appOutDir = options.appOutDir;
|
||||
await (0, _builderUtil().executeAppBuilder)(["proton-native", "--node-version", this.version, "--use-launch-ui", "--platform", platform.nodeName, "--arch", options.arch, "--stage", appOutDir, "--executable", `${packager.appInfo.productFilename}${platform === _core().Platform.WINDOWS ? ".exe" : ""}`]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (platform === _core().Platform.MAC) {
|
||||
await this.prepareMacosApplicationStageDirectory(packager, options);
|
||||
} else if (platform === _core().Platform.LINUX) {
|
||||
await this.prepareLinuxApplicationStageDirectory(options);
|
||||
}
|
||||
}
|
||||
|
||||
async prepareMacosApplicationStageDirectory(packager, options) {
|
||||
const appContentsDir = path.join(options.appOutDir, this.distMacOsAppName, "Contents");
|
||||
await (0, _fsExtra().ensureDir)(path.join(appContentsDir, "Resources"));
|
||||
await (0, _fsExtra().ensureDir)(path.join(appContentsDir, "MacOS"));
|
||||
await (0, _builderUtil().executeAppBuilder)(["proton-native", "--node-version", this.version, "--platform", "darwin", "--stage", path.join(appContentsDir, "MacOS")]);
|
||||
const appPlist = {
|
||||
// https://github.com/albe-rosado/create-proton-app/issues/13
|
||||
NSHighResolutionCapable: true
|
||||
};
|
||||
await packager.applyCommonInfo(appPlist, appContentsDir);
|
||||
await Promise.all([(0, _appBuilder().executeAppBuilderAndWriteJson)(["encode-plist"], {
|
||||
[path.join(appContentsDir, "Info.plist")]: appPlist
|
||||
}), writeExecutableMain(path.join(appContentsDir, "MacOS", appPlist.CFBundleExecutable), `#!/bin/sh
|
||||
DIR=$(dirname "$0")
|
||||
"$DIR/node" "$DIR/../Resources/app/${options.packager.info.metadata.main || "index.js"}"
|
||||
`)]);
|
||||
}
|
||||
|
||||
async prepareLinuxApplicationStageDirectory(options) {
|
||||
const appOutDir = options.appOutDir;
|
||||
await (0, _builderUtil().executeAppBuilder)(["proton-native", "--node-version", this.version, "--platform", "linux", "--arch", options.arch, "--stage", appOutDir]);
|
||||
const mainPath = path.join(appOutDir, options.packager.executableName);
|
||||
await writeExecutableMain(mainPath, `#!/bin/sh
|
||||
DIR=$(dirname "$0")
|
||||
"$DIR/node" "$DIR/app/${options.packager.info.metadata.main || "index.js"}"
|
||||
`);
|
||||
}
|
||||
|
||||
async afterPack(context) {
|
||||
const packager = context.packager;
|
||||
|
||||
if (!this.isUseLaunchUiForPlatform(packager.platform)) {
|
||||
return;
|
||||
} // LaunchUI requires main.js, rename if need
|
||||
|
||||
|
||||
const userMain = packager.info.metadata.main || "index.js";
|
||||
|
||||
if (userMain === "main.js") {
|
||||
return;
|
||||
}
|
||||
|
||||
await (0, _fsExtra().rename)(path.join(context.appOutDir, "app", userMain), path.join(context.appOutDir, "app", "main.js"));
|
||||
}
|
||||
|
||||
getMainFile(platform) {
|
||||
return this.isUseLaunchUiForPlatform(platform) ? "main.js" : null;
|
||||
}
|
||||
|
||||
isUseLaunchUiForPlatform(platform) {
|
||||
return platform === _core().Platform.WINDOWS || this.isUseLaunchUi && platform === _core().Platform.LINUX;
|
||||
}
|
||||
|
||||
getExcludedDependencies(platform) {
|
||||
// part of launchui
|
||||
return this.isUseLaunchUiForPlatform(platform) ? ["libui-node"] : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.LibUiFramework = LibUiFramework;
|
||||
|
||||
async function writeExecutableMain(file, content) {
|
||||
await (0, _fsExtra().writeFile)(file, content, {
|
||||
mode: 0o755
|
||||
});
|
||||
await (0, _fsExtra().chmod)(file, 0o755);
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=LibUiFramework.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/frameworks/LibUiFramework.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/frameworks/LibUiFramework.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
33
buildfiles/node_modules/app-builder-lib/out/index.d.ts
generated
vendored
Normal file
33
buildfiles/node_modules/app-builder-lib/out/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
import { PublishOptions } from "electron-publish/out/publisher";
|
||||
import { Packager } from "./packager";
|
||||
import { PackagerOptions } from "./packagerApi";
|
||||
export { Packager, BuildResult } from "./packager";
|
||||
export { PackagerOptions, ArtifactCreated, ArtifactBuildStarted } from "./packagerApi";
|
||||
export { TargetConfiguration, Platform, Target, DIR_TARGET, BeforeBuildContext, SourceRepositoryInfo, TargetSpecificOptions, TargetConfigType, DEFAULT_TARGET, CompressionLevel } from "./core";
|
||||
export { getArchSuffix, Arch, archFromString } from "builder-util";
|
||||
export { Configuration, AfterPackContext, MetadataDirectories } from "./configuration";
|
||||
export { ElectronDownloadOptions, ElectronPlatformName } from "./electron/ElectronFramework";
|
||||
export { PlatformSpecificBuildOptions, AsarOptions, FileSet, Protocol, ReleaseInfo } from "./options/PlatformSpecificBuildOptions";
|
||||
export { FileAssociation } from "./options/FileAssociation";
|
||||
export { MacConfiguration, DmgOptions, MasConfiguration, MacOsTargetName, DmgContent, DmgWindow } from "./options/macOptions";
|
||||
export { PkgOptions, PkgBackgroundOptions, BackgroundAlignment, BackgroundScaling } from "./options/pkgOptions";
|
||||
export { WindowsConfiguration } from "./options/winOptions";
|
||||
export { AppXOptions } from "./options/AppXOptions";
|
||||
export { MsiOptions } from "./options/MsiOptions";
|
||||
export { CommonWindowsInstallerConfiguration } from "./options/CommonWindowsInstallerConfiguration";
|
||||
export { NsisOptions, NsisWebOptions, PortableOptions, CommonNsisOptions } from "./targets/nsis/nsisOptions";
|
||||
export { LinuxConfiguration, DebOptions, CommonLinuxOptions, LinuxTargetSpecificOptions, AppImageOptions } from "./options/linuxOptions";
|
||||
export { SnapOptions } from "./options/SnapOptions";
|
||||
export { Metadata, AuthorMetadata, RepositoryInfo } from "./options/metadata";
|
||||
export { AppInfo } from "./appInfo";
|
||||
export { SquirrelWindowsOptions } from "./options/SquirrelWindowsOptions";
|
||||
export { WindowsSignOptions, CustomWindowsSignTaskConfiguration, WindowsSignTaskConfiguration, CustomWindowsSign, FileCodeSigningInfo, CertificateFromStoreInfo } from "./codeSign/windowsCodeSign";
|
||||
export { CancellationToken, ProgressInfo } from "builder-util-runtime";
|
||||
export { PublishOptions, UploadTask } from "electron-publish";
|
||||
export { PublishManager } from "./publish/PublishManager";
|
||||
export { PlatformPackager } from "./platformPackager";
|
||||
export { Framework, PrepareApplicationStageDirectoryOptions } from "./Framework";
|
||||
export { buildForge, ForgeOptions } from "./forge-maker";
|
||||
export { SnapStoreOptions } from "./publish/SnapStorePublisher";
|
||||
export declare function checkBuildRequestOptions(options: PackagerOptions & PublishOptions): void;
|
||||
export declare function build(options: PackagerOptions & PublishOptions, packager?: Packager): Promise<Array<string>>;
|
243
buildfiles/node_modules/app-builder-lib/out/index.js
generated
vendored
Normal file
243
buildfiles/node_modules/app-builder-lib/out/index.js
generated
vendored
Normal file
@ -0,0 +1,243 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.checkBuildRequestOptions = checkBuildRequestOptions;
|
||||
exports.build = build;
|
||||
Object.defineProperty(exports, "getArchSuffix", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _builderUtil().getArchSuffix;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "Arch", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _builderUtil().Arch;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "archFromString", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _builderUtil().archFromString;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "CancellationToken", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _builderUtilRuntime().CancellationToken;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "Packager", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _packager().Packager;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "PlatformPackager", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _platformPackager().PlatformPackager;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "PublishManager", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _PublishManager().PublishManager;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "Platform", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _core().Platform;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "Target", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _core().Target;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "DIR_TARGET", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _core().DIR_TARGET;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "DEFAULT_TARGET", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _core().DEFAULT_TARGET;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "AppInfo", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _appInfo().AppInfo;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "buildForge", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _forgeMaker().buildForge;
|
||||
}
|
||||
});
|
||||
|
||||
function _promise() {
|
||||
const data = require("builder-util/out/promise");
|
||||
|
||||
_promise = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _builderUtilRuntime() {
|
||||
const data = require("builder-util-runtime");
|
||||
|
||||
_builderUtilRuntime = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _packager() {
|
||||
const data = require("./packager");
|
||||
|
||||
_packager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _platformPackager() {
|
||||
const data = require("./platformPackager");
|
||||
|
||||
_platformPackager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _PublishManager() {
|
||||
const data = require("./publish/PublishManager");
|
||||
|
||||
_PublishManager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require("./core");
|
||||
|
||||
_core = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _appInfo() {
|
||||
const data = require("./appInfo");
|
||||
|
||||
_appInfo = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _forgeMaker() {
|
||||
const data = require("./forge-maker");
|
||||
|
||||
_forgeMaker = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
const expectedOptions = new Set(["publish", "targets", "mac", "win", "linux", "projectDir", "platformPackagerFactory", "config", "effectiveOptionComputed", "prepackaged"]);
|
||||
|
||||
function checkBuildRequestOptions(options) {
|
||||
for (const optionName of Object.keys(options)) {
|
||||
if (!expectedOptions.has(optionName) && options[optionName] !== undefined) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`Unknown option "${optionName}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function build(options, packager = new (_packager().Packager)(options)) {
|
||||
checkBuildRequestOptions(options);
|
||||
const publishManager = new (_PublishManager().PublishManager)(packager, options);
|
||||
|
||||
const sigIntHandler = () => {
|
||||
_builderUtil().log.warn("cancelled by SIGINT");
|
||||
|
||||
packager.cancellationToken.cancel();
|
||||
publishManager.cancelTasks();
|
||||
};
|
||||
|
||||
process.once("SIGINT", sigIntHandler);
|
||||
const promise = packager.build().then(async buildResult => {
|
||||
const afterAllArtifactBuild = (0, _platformPackager().resolveFunction)(buildResult.configuration.afterAllArtifactBuild, "afterAllArtifactBuild");
|
||||
|
||||
if (afterAllArtifactBuild != null) {
|
||||
const newArtifacts = (0, _builderUtilRuntime().asArray)(await Promise.resolve(afterAllArtifactBuild(buildResult)));
|
||||
|
||||
if (newArtifacts.length === 0 || !publishManager.isPublish) {
|
||||
return buildResult.artifactPaths;
|
||||
}
|
||||
|
||||
const publishConfigurations = await publishManager.getGlobalPublishConfigurations();
|
||||
|
||||
if (publishConfigurations == null || publishConfigurations.length === 0) {
|
||||
return buildResult.artifactPaths;
|
||||
}
|
||||
|
||||
for (const newArtifact of newArtifacts) {
|
||||
buildResult.artifactPaths.push(newArtifact);
|
||||
|
||||
for (const publishConfiguration of publishConfigurations) {
|
||||
publishManager.scheduleUpload(publishConfiguration, {
|
||||
file: newArtifact,
|
||||
arch: null
|
||||
}, packager.appInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return buildResult.artifactPaths;
|
||||
});
|
||||
return (0, _promise().executeFinally)(promise, isErrorOccurred => {
|
||||
let promise;
|
||||
|
||||
if (isErrorOccurred) {
|
||||
publishManager.cancelTasks();
|
||||
promise = Promise.resolve(null);
|
||||
} else {
|
||||
promise = publishManager.awaitTasks();
|
||||
}
|
||||
|
||||
return promise.then(() => process.removeListener("SIGINT", sigIntHandler));
|
||||
});
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=index.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/index.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
buildfiles/node_modules/app-builder-lib/out/linuxPackager.d.ts
generated
vendored
Normal file
12
buildfiles/node_modules/app-builder-lib/out/linuxPackager.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import { Arch } from "builder-util";
|
||||
import { Target } from "./core";
|
||||
import { LinuxConfiguration } from "./options/linuxOptions";
|
||||
import { Packager } from "./packager";
|
||||
import { PlatformPackager } from "./platformPackager";
|
||||
export declare class LinuxPackager extends PlatformPackager<LinuxConfiguration> {
|
||||
readonly executableName: string;
|
||||
constructor(info: Packager);
|
||||
get defaultTarget(): Array<string>;
|
||||
createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void;
|
||||
}
|
||||
export declare function toAppImageOrSnapArch(arch: Arch): string;
|
217
buildfiles/node_modules/app-builder-lib/out/linuxPackager.js
generated
vendored
Normal file
217
buildfiles/node_modules/app-builder-lib/out/linuxPackager.js
generated
vendored
Normal file
@ -0,0 +1,217 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.toAppImageOrSnapArch = toAppImageOrSnapArch;
|
||||
exports.LinuxPackager = void 0;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _sanitizeFilename() {
|
||||
const data = _interopRequireDefault(require("sanitize-filename"));
|
||||
|
||||
_sanitizeFilename = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require("./core");
|
||||
|
||||
_core = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _platformPackager() {
|
||||
const data = require("./platformPackager");
|
||||
|
||||
_platformPackager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _RemoteBuilder() {
|
||||
const data = require("./remoteBuilder/RemoteBuilder");
|
||||
|
||||
_RemoteBuilder = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _LinuxTargetHelper() {
|
||||
const data = require("./targets/LinuxTargetHelper");
|
||||
|
||||
_LinuxTargetHelper = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _targetFactory() {
|
||||
const data = require("./targets/targetFactory");
|
||||
|
||||
_targetFactory = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
class LinuxPackager extends _platformPackager().PlatformPackager {
|
||||
constructor(info) {
|
||||
super(info, _core().Platform.LINUX);
|
||||
const executableName = this.platformSpecificBuildOptions.executableName;
|
||||
this.executableName = executableName == null ? this.appInfo.sanitizedName.toLowerCase() : (0, _sanitizeFilename().default)(executableName);
|
||||
}
|
||||
|
||||
get defaultTarget() {
|
||||
return ["snap", "appimage"];
|
||||
}
|
||||
|
||||
createTargets(targets, mapper) {
|
||||
let helper;
|
||||
|
||||
const getHelper = () => {
|
||||
if (helper == null) {
|
||||
helper = new (_LinuxTargetHelper().LinuxTargetHelper)(this);
|
||||
}
|
||||
|
||||
return helper;
|
||||
};
|
||||
|
||||
let remoteBuilder = null;
|
||||
|
||||
for (const name of targets) {
|
||||
if (name === _core().DIR_TARGET) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const targetClass = (() => {
|
||||
switch (name) {
|
||||
case "appimage":
|
||||
return require("./targets/AppImageTarget").default;
|
||||
|
||||
case "snap":
|
||||
return require("./targets/snap").default;
|
||||
|
||||
case "deb":
|
||||
case "rpm":
|
||||
case "sh":
|
||||
case "freebsd":
|
||||
case "pacman":
|
||||
case "apk":
|
||||
case "p5p":
|
||||
return require("./targets/fpm").default;
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
})();
|
||||
|
||||
mapper(name, outDir => {
|
||||
if (targetClass === null) {
|
||||
return (0, _targetFactory().createCommonTarget)(name, outDir, this);
|
||||
}
|
||||
|
||||
const target = new targetClass(name, this, getHelper(), outDir);
|
||||
|
||||
if (process.platform === "win32" || process.env._REMOTE_BUILD) {
|
||||
if (remoteBuilder == null) {
|
||||
remoteBuilder = new (_RemoteBuilder().RemoteBuilder)(this);
|
||||
} // return remoteBuilder.buildTarget(this, arch, appOutDir, this.packager)
|
||||
|
||||
|
||||
return new RemoteTarget(target, remoteBuilder);
|
||||
}
|
||||
|
||||
return target;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.LinuxPackager = LinuxPackager;
|
||||
|
||||
class RemoteTarget extends _core().Target {
|
||||
constructor(target, remoteBuilder) {
|
||||
super(target.name, true
|
||||
/* all must be scheduled in time (so, on finishBuild RemoteBuilder will have all targets added - so, we must set isAsyncSupported to true (resolved promise is returned)) */
|
||||
);
|
||||
this.target = target;
|
||||
this.remoteBuilder = remoteBuilder;
|
||||
this.buildTaskManager = new (_builderUtil().AsyncTaskManager)(this.remoteBuilder.packager.info.cancellationToken);
|
||||
}
|
||||
|
||||
get options() {
|
||||
return this.target.options;
|
||||
}
|
||||
|
||||
get outDir() {
|
||||
return this.target.outDir;
|
||||
}
|
||||
|
||||
async finishBuild() {
|
||||
await this.buildTaskManager.awaitTasks();
|
||||
await this.remoteBuilder.build();
|
||||
}
|
||||
|
||||
build(appOutDir, arch) {
|
||||
const promise = this.doBuild(appOutDir, arch);
|
||||
this.buildTaskManager.addTask(promise);
|
||||
return promise;
|
||||
}
|
||||
|
||||
async doBuild(appOutDir, arch) {
|
||||
_builderUtil().log.info({
|
||||
target: this.target.name,
|
||||
arch: _builderUtil().Arch[arch]
|
||||
}, "scheduling remote build");
|
||||
|
||||
await this.target.checkOptions();
|
||||
this.remoteBuilder.scheduleBuild(this.target, arch, appOutDir);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function toAppImageOrSnapArch(arch) {
|
||||
switch (arch) {
|
||||
case _builderUtil().Arch.x64:
|
||||
return "x86_64";
|
||||
|
||||
case _builderUtil().Arch.ia32:
|
||||
return "i386";
|
||||
|
||||
case _builderUtil().Arch.armv7l:
|
||||
return "arm";
|
||||
|
||||
case _builderUtil().Arch.arm64:
|
||||
return "arm_aarch64";
|
||||
|
||||
default:
|
||||
throw new Error(`Unsupported arch ${arch}`);
|
||||
}
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=linuxPackager.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/linuxPackager.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/linuxPackager.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
28
buildfiles/node_modules/app-builder-lib/out/macPackager.d.ts
generated
vendored
Normal file
28
buildfiles/node_modules/app-builder-lib/out/macPackager.d.ts
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import { Arch, AsyncTaskManager } from "builder-util";
|
||||
import { SignOptions } from "../electron-osx-sign";
|
||||
import { Lazy } from "lazy-val";
|
||||
import { AppInfo } from "./appInfo";
|
||||
import { CodeSigningInfo, Identity } from "./codeSign/macCodeSign";
|
||||
import { Target } from "./core";
|
||||
import { AfterPackContext } from "./index";
|
||||
import { MacConfiguration } from "./options/macOptions";
|
||||
import { Packager } from "./packager";
|
||||
import { PlatformPackager } from "./platformPackager";
|
||||
export default class MacPackager extends PlatformPackager<MacConfiguration> {
|
||||
readonly codeSigningInfo: Lazy<CodeSigningInfo>;
|
||||
private _iconPath;
|
||||
constructor(info: Packager);
|
||||
get defaultTarget(): Array<string>;
|
||||
protected prepareAppInfo(appInfo: AppInfo): AppInfo;
|
||||
getIconPath(): Promise<string | null>;
|
||||
createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void;
|
||||
pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<any>;
|
||||
private sign;
|
||||
private adjustSignOptions;
|
||||
protected doSign(opts: SignOptions): Promise<any>;
|
||||
protected doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | null | undefined): Promise<any>;
|
||||
getElectronSrcDir(dist: string): string;
|
||||
getElectronDestinationDir(appOutDir: string): string;
|
||||
applyCommonInfo(appPlist: any, contentsPath: string): Promise<void>;
|
||||
protected signApp(packContext: AfterPackContext, isAsar: boolean): Promise<any>;
|
||||
}
|
553
buildfiles/node_modules/app-builder-lib/out/macPackager.js
generated
vendored
Normal file
553
buildfiles/node_modules/app-builder-lib/out/macPackager.js
generated
vendored
Normal file
@ -0,0 +1,553 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _bluebirdLst() {
|
||||
const data = _interopRequireDefault(require("bluebird-lst"));
|
||||
|
||||
_bluebirdLst = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _electronOsxSign() {
|
||||
const data = require("../electron-osx-sign");
|
||||
|
||||
_electronOsxSign = 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 _fs() {
|
||||
const data = require("builder-util/out/fs");
|
||||
|
||||
_fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _promise() {
|
||||
const data = require("builder-util/out/promise");
|
||||
|
||||
_promise = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _appInfo() {
|
||||
const data = require("./appInfo");
|
||||
|
||||
_appInfo = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _macCodeSign() {
|
||||
const data = require("./codeSign/macCodeSign");
|
||||
|
||||
_macCodeSign = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require("./core");
|
||||
|
||||
_core = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _platformPackager() {
|
||||
const data = require("./platformPackager");
|
||||
|
||||
_platformPackager = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _ArchiveTarget() {
|
||||
const data = require("./targets/ArchiveTarget");
|
||||
|
||||
_ArchiveTarget = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _pkg() {
|
||||
const data = require("./targets/pkg");
|
||||
|
||||
_pkg = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _targetFactory() {
|
||||
const data = require("./targets/targetFactory");
|
||||
|
||||
_targetFactory = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _macosVersion() {
|
||||
const data = require("./util/macosVersion");
|
||||
|
||||
_macosVersion = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _pathManager() {
|
||||
const data = require("./util/pathManager");
|
||||
|
||||
_pathManager = 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 }; }
|
||||
|
||||
class MacPackager extends _platformPackager().PlatformPackager {
|
||||
constructor(info) {
|
||||
super(info, _core().Platform.MAC);
|
||||
this.codeSigningInfo = new (_lazyVal().Lazy)(() => {
|
||||
const cscLink = this.getCscLink();
|
||||
|
||||
if (cscLink == null || process.platform !== "darwin") {
|
||||
return Promise.resolve({
|
||||
keychainFile: process.env.CSC_KEYCHAIN || null
|
||||
});
|
||||
}
|
||||
|
||||
return (0, _macCodeSign().createKeychain)({
|
||||
tmpDir: this.info.tempDirManager,
|
||||
cscLink,
|
||||
cscKeyPassword: this.getCscPassword(),
|
||||
cscILink: (0, _platformPackager().chooseNotNull)(this.platformSpecificBuildOptions.cscInstallerLink, process.env.CSC_INSTALLER_LINK),
|
||||
cscIKeyPassword: (0, _platformPackager().chooseNotNull)(this.platformSpecificBuildOptions.cscInstallerKeyPassword, process.env.CSC_INSTALLER_KEY_PASSWORD),
|
||||
currentDir: this.projectDir
|
||||
}).then(result => {
|
||||
const keychainFile = result.keychainFile;
|
||||
|
||||
if (keychainFile != null) {
|
||||
this.info.disposeOnBuildFinish(() => (0, _macCodeSign().removeKeychain)(keychainFile));
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
});
|
||||
this._iconPath = new (_lazyVal().Lazy)(() => this.getOrConvertIcon("icns"));
|
||||
}
|
||||
|
||||
get defaultTarget() {
|
||||
return this.info.framework.macOsDefaultTargets;
|
||||
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
||||
|
||||
prepareAppInfo(appInfo) {
|
||||
return new (_appInfo().AppInfo)(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions);
|
||||
}
|
||||
|
||||
async getIconPath() {
|
||||
return this._iconPath.value;
|
||||
}
|
||||
|
||||
createTargets(targets, mapper) {
|
||||
for (const name of targets) {
|
||||
switch (name) {
|
||||
case _core().DIR_TARGET:
|
||||
break;
|
||||
|
||||
case "dmg":
|
||||
{
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const {
|
||||
DmgTarget
|
||||
} = require("dmg-builder");
|
||||
|
||||
mapper(name, outDir => new DmgTarget(this, outDir));
|
||||
break;
|
||||
}
|
||||
|
||||
case "zip":
|
||||
// https://github.com/electron-userland/electron-builder/issues/2313
|
||||
mapper(name, outDir => new (_ArchiveTarget().ArchiveTarget)(name, outDir, this, true));
|
||||
break;
|
||||
|
||||
case "pkg":
|
||||
mapper(name, outDir => new (_pkg().PkgTarget)(this, outDir));
|
||||
break;
|
||||
|
||||
default:
|
||||
mapper(name, outDir => name === "mas" || name === "mas-dev" ? new (_targetFactory().NoOpTarget)(name) : (0, _targetFactory().createCommonTarget)(name, outDir, this));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async pack(outDir, arch, targets, taskManager) {
|
||||
let nonMasPromise = null;
|
||||
const hasMas = targets.length !== 0 && targets.some(it => it.name === "mas" || it.name === "mas-dev");
|
||||
const prepackaged = this.packagerOptions.prepackaged;
|
||||
|
||||
if (!hasMas || targets.length > 1) {
|
||||
const appPath = prepackaged == null ? path.join(this.computeAppOutDir(outDir, arch), `${this.appInfo.productFilename}.app`) : prepackaged;
|
||||
nonMasPromise = (prepackaged ? Promise.resolve() : this.doPack(outDir, path.dirname(appPath), this.platform.nodeName, arch, this.platformSpecificBuildOptions, targets)).then(() => this.packageInDistributableFormat(appPath, _builderUtil().Arch.x64, targets, taskManager));
|
||||
}
|
||||
|
||||
for (const target of targets) {
|
||||
const targetName = target.name;
|
||||
|
||||
if (!(targetName === "mas" || targetName === "mas-dev")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const masBuildOptions = (0, _builderUtil().deepAssign)({}, this.platformSpecificBuildOptions, this.config.mas);
|
||||
|
||||
if (targetName === "mas-dev") {
|
||||
(0, _builderUtil().deepAssign)(masBuildOptions, this.config.masDev, {
|
||||
type: "development"
|
||||
});
|
||||
}
|
||||
|
||||
const targetOutDir = path.join(outDir, targetName);
|
||||
|
||||
if (prepackaged == null) {
|
||||
await this.doPack(outDir, targetOutDir, "mas", arch, masBuildOptions, [target]);
|
||||
await this.sign(path.join(targetOutDir, `${this.appInfo.productFilename}.app`), targetOutDir, masBuildOptions);
|
||||
} else {
|
||||
await this.sign(prepackaged, targetOutDir, masBuildOptions);
|
||||
}
|
||||
}
|
||||
|
||||
if (nonMasPromise != null) {
|
||||
await nonMasPromise;
|
||||
}
|
||||
}
|
||||
|
||||
async sign(appPath, outDir, masOptions) {
|
||||
if (!(0, _macCodeSign().isSignAllowed)()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const isMas = masOptions != null;
|
||||
const options = masOptions == null ? this.platformSpecificBuildOptions : masOptions;
|
||||
const qualifier = options.identity;
|
||||
|
||||
if (!isMas && qualifier === null) {
|
||||
if (this.forceCodeSigning) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)("identity explicitly is set to null, but forceCodeSigning is set to true");
|
||||
}
|
||||
|
||||
_builderUtil().log.info({
|
||||
reason: "identity explicitly is set to null"
|
||||
}, "skipped macOS code signing");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const keychainFile = (await this.codeSigningInfo.value).keychainFile;
|
||||
const explicitType = options.type;
|
||||
const type = explicitType || "distribution";
|
||||
const isDevelopment = type === "development";
|
||||
const certificateType = getCertificateType(isMas, isDevelopment);
|
||||
let identity = await (0, _macCodeSign().findIdentity)(certificateType, qualifier, keychainFile);
|
||||
|
||||
if (identity == null) {
|
||||
if (!isMas && !isDevelopment && explicitType !== "distribution") {
|
||||
identity = await (0, _macCodeSign().findIdentity)("Mac Developer", qualifier, keychainFile);
|
||||
|
||||
if (identity != null) {
|
||||
_builderUtil().log.warn("Mac Developer is used to sign app — it is only for development and testing, not for production");
|
||||
}
|
||||
}
|
||||
|
||||
if (identity == null) {
|
||||
await (0, _macCodeSign().reportError)(isMas, certificateType, qualifier, keychainFile, this.forceCodeSigning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(0, _macosVersion().isMacOsHighSierra)()) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)("macOS High Sierra 10.13.6 is required to sign");
|
||||
}
|
||||
|
||||
let filter = options.signIgnore;
|
||||
|
||||
if (Array.isArray(filter)) {
|
||||
if (filter.length == 0) {
|
||||
filter = null;
|
||||
}
|
||||
} else if (filter != null) {
|
||||
filter = filter.length === 0 ? null : [filter];
|
||||
}
|
||||
|
||||
const filterRe = filter == null ? null : filter.map(it => new RegExp(it));
|
||||
const signOptions = {
|
||||
"identity-validation": false,
|
||||
// https://github.com/electron-userland/electron-builder/issues/1699
|
||||
// kext are signed by the chipset manufacturers. You need a special certificate (only available on request) from Apple to be able to sign kext.
|
||||
ignore: file => {
|
||||
if (filterRe != null) {
|
||||
for (const regExp of filterRe) {
|
||||
if (regExp.test(file)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return file.endsWith(".kext") || file.startsWith("/Contents/PlugIns", appPath.length) || file.includes("/node_modules/puppeteer/.local-chromium");
|
||||
/* https://github.com/electron-userland/electron-builder/issues/2010 */
|
||||
},
|
||||
identity: identity,
|
||||
type,
|
||||
platform: isMas ? "mas" : "darwin",
|
||||
version: this.config.electronVersion,
|
||||
app: appPath,
|
||||
keychain: keychainFile || undefined,
|
||||
binaries: options.binaries || undefined,
|
||||
requirements: isMas || this.platformSpecificBuildOptions.requirements == null ? undefined : await this.getResource(this.platformSpecificBuildOptions.requirements),
|
||||
// https://github.com/electron-userland/electron-osx-sign/issues/196
|
||||
// will fail on 10.14.5+ because a signed but unnotarized app is also rejected.
|
||||
"gatekeeper-assess": options.gatekeeperAssess === true,
|
||||
// https://github.com/electron-userland/electron-builder/issues/1480
|
||||
"strict-verify": options.strictVerify,
|
||||
hardenedRuntime: isMas ? masOptions && masOptions.hardenedRuntime === true : options.hardenedRuntime !== false
|
||||
};
|
||||
await this.adjustSignOptions(signOptions, masOptions);
|
||||
|
||||
_builderUtil().log.info({
|
||||
file: _builderUtil().log.filePath(appPath),
|
||||
identityName: identity.name,
|
||||
identityHash: identity.hash,
|
||||
provisioningProfile: signOptions["provisioning-profile"] || "none"
|
||||
}, "signing");
|
||||
|
||||
await this.doSign(signOptions); // https://github.com/electron-userland/electron-builder/issues/1196#issuecomment-312310209
|
||||
|
||||
if (masOptions != null && !isDevelopment) {
|
||||
const certType = isDevelopment ? "Mac Developer" : "3rd Party Mac Developer Installer";
|
||||
const masInstallerIdentity = await (0, _macCodeSign().findIdentity)(certType, masOptions.identity, keychainFile);
|
||||
|
||||
if (masInstallerIdentity == null) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`Cannot find valid "${certType}" identity to sign MAS installer, please see https://electron.build/code-signing`);
|
||||
} // mas uploaded to AppStore, so, use "-" instead of space for name
|
||||
|
||||
|
||||
const artifactName = this.expandArtifactNamePattern(masOptions, "pkg");
|
||||
const artifactPath = path.join(outDir, artifactName);
|
||||
await this.doFlat(appPath, artifactPath, masInstallerIdentity, keychainFile);
|
||||
await this.dispatchArtifactCreated(artifactPath, null, _builderUtil().Arch.x64, this.computeSafeArtifactName(artifactName, "pkg"));
|
||||
}
|
||||
}
|
||||
|
||||
async adjustSignOptions(signOptions, masOptions) {
|
||||
const resourceList = await this.resourceList;
|
||||
const customSignOptions = masOptions || this.platformSpecificBuildOptions;
|
||||
const entitlementsSuffix = masOptions == null ? "mac" : "mas";
|
||||
let entitlements = customSignOptions.entitlements;
|
||||
|
||||
if (entitlements == null) {
|
||||
const p = `entitlements.${entitlementsSuffix}.plist`;
|
||||
|
||||
if (resourceList.includes(p)) {
|
||||
entitlements = path.join(this.info.buildResourcesDir, p);
|
||||
} else {
|
||||
entitlements = (0, _pathManager().getTemplatePath)("entitlements.mac.plist");
|
||||
}
|
||||
}
|
||||
|
||||
signOptions.entitlements = entitlements;
|
||||
let entitlementsInherit = customSignOptions.entitlementsInherit;
|
||||
|
||||
if (entitlementsInherit == null) {
|
||||
const p = `entitlements.${entitlementsSuffix}.inherit.plist`;
|
||||
|
||||
if (resourceList.includes(p)) {
|
||||
entitlementsInherit = path.join(this.info.buildResourcesDir, p);
|
||||
} else {
|
||||
entitlementsInherit = (0, _pathManager().getTemplatePath)("entitlements.mac.plist");
|
||||
}
|
||||
}
|
||||
|
||||
signOptions["entitlements-inherit"] = entitlementsInherit;
|
||||
|
||||
if (customSignOptions.provisioningProfile != null) {
|
||||
signOptions["provisioning-profile"] = customSignOptions.provisioningProfile;
|
||||
}
|
||||
|
||||
signOptions['entitlements-loginhelper'] = customSignOptions.entitlementsLoginHelper;
|
||||
} //noinspection JSMethodCanBeStatic
|
||||
|
||||
|
||||
async doSign(opts) {
|
||||
return (0, _electronOsxSign().signAsync)(opts);
|
||||
} //noinspection JSMethodCanBeStatic
|
||||
|
||||
|
||||
async doFlat(appPath, outFile, identity, keychain) {
|
||||
// productbuild doesn't created directory for out file
|
||||
await (0, _fsExtra().mkdirs)(path.dirname(outFile));
|
||||
const args = (0, _pkg().prepareProductBuildArgs)(identity, keychain);
|
||||
args.push("--component", appPath, "/Applications");
|
||||
args.push(outFile);
|
||||
return await (0, _builderUtil().exec)("productbuild", args);
|
||||
}
|
||||
|
||||
getElectronSrcDir(dist) {
|
||||
return path.resolve(this.projectDir, dist, this.info.framework.distMacOsAppName);
|
||||
}
|
||||
|
||||
getElectronDestinationDir(appOutDir) {
|
||||
return path.join(appOutDir, this.info.framework.distMacOsAppName);
|
||||
} // todo fileAssociations
|
||||
|
||||
|
||||
async applyCommonInfo(appPlist, contentsPath) {
|
||||
const appInfo = this.appInfo;
|
||||
const appFilename = appInfo.productFilename; // https://github.com/electron-userland/electron-builder/issues/1278
|
||||
|
||||
appPlist.CFBundleExecutable = appFilename.endsWith(" Helper") ? appFilename.substring(0, appFilename.length - " Helper".length) : appFilename;
|
||||
const icon = await this.getIconPath();
|
||||
|
||||
if (icon != null) {
|
||||
const oldIcon = appPlist.CFBundleIconFile;
|
||||
const resourcesPath = path.join(contentsPath, "Resources");
|
||||
|
||||
if (oldIcon != null) {
|
||||
await (0, _fs().unlinkIfExists)(path.join(resourcesPath, oldIcon));
|
||||
}
|
||||
|
||||
const iconFileName = `${appFilename}.icns`;
|
||||
appPlist.CFBundleIconFile = iconFileName;
|
||||
await (0, _fs().copyFile)(icon, path.join(resourcesPath, iconFileName));
|
||||
}
|
||||
|
||||
appPlist.CFBundleName = appInfo.productName;
|
||||
appPlist.CFBundleDisplayName = appInfo.productName;
|
||||
const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion;
|
||||
|
||||
if (minimumSystemVersion != null) {
|
||||
appPlist.LSMinimumSystemVersion = minimumSystemVersion;
|
||||
}
|
||||
|
||||
appPlist.CFBundleIdentifier = appInfo.macBundleIdentifier;
|
||||
appPlist.CFBundleShortVersionString = this.platformSpecificBuildOptions.bundleShortVersion || appInfo.version;
|
||||
appPlist.CFBundleVersion = appInfo.buildVersion;
|
||||
(0, _builderUtil().use)(this.platformSpecificBuildOptions.category || this.config.category, it => appPlist.LSApplicationCategoryType = it);
|
||||
appPlist.NSHumanReadableCopyright = appInfo.copyright;
|
||||
|
||||
if (this.platformSpecificBuildOptions.darkModeSupport) {
|
||||
appPlist.NSRequiresAquaSystemAppearance = false;
|
||||
}
|
||||
|
||||
const extendInfo = this.platformSpecificBuildOptions.extendInfo;
|
||||
|
||||
if (extendInfo != null) {
|
||||
Object.assign(appPlist, extendInfo);
|
||||
}
|
||||
}
|
||||
|
||||
async signApp(packContext, isAsar) {
|
||||
const appFileName = `${this.appInfo.productFilename}.app`;
|
||||
await _bluebirdLst().default.map((0, _fsExtra().readdir)(packContext.appOutDir), file => {
|
||||
if (file === appFileName) {
|
||||
return this.sign(path.join(packContext.appOutDir, file), null, null);
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
if (!isAsar) {
|
||||
return;
|
||||
}
|
||||
|
||||
const outResourcesDir = path.join(packContext.appOutDir, "resources", "app.asar.unpacked");
|
||||
await _bluebirdLst().default.map((0, _promise().orIfFileNotExist)((0, _fsExtra().readdir)(outResourcesDir), []), file => {
|
||||
if (file.endsWith(".app")) {
|
||||
return this.sign(path.join(outResourcesDir, file), null, null);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.default = MacPackager;
|
||||
|
||||
function getCertificateType(isMas, isDevelopment) {
|
||||
if (isDevelopment) {
|
||||
return "Mac Developer";
|
||||
}
|
||||
|
||||
return isMas ? "3rd Party Mac Developer Application" : "Developer ID Application";
|
||||
}
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=macPackager.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/macPackager.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/macPackager.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
61
buildfiles/node_modules/app-builder-lib/out/options/AppXOptions.d.ts
generated
vendored
Normal file
61
buildfiles/node_modules/app-builder-lib/out/options/AppXOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
import { TargetSpecificOptions } from "../core";
|
||||
export interface AppXOptions extends TargetSpecificOptions {
|
||||
/**
|
||||
* The application id. Defaults to `identityName`. Can’t start with numbers.
|
||||
*/
|
||||
readonly applicationId?: string;
|
||||
/**
|
||||
* The background color of the app tile. See [Visual Elements](https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx).
|
||||
* @default #464646
|
||||
*/
|
||||
readonly backgroundColor?: string | null;
|
||||
/**
|
||||
* A friendly name that can be displayed to users. Corresponds to [Properties.DisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx).
|
||||
* Defaults to the application product name.
|
||||
*/
|
||||
readonly displayName?: string | null;
|
||||
/**
|
||||
* The name. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). Defaults to the [application name](/configuration/configuration#Metadata-name).
|
||||
*/
|
||||
readonly identityName?: string | null;
|
||||
/**
|
||||
* The Windows Store publisher. Not used if AppX is build for testing. See [AppX Package Code Signing](#appx-package-code-signing) below.
|
||||
*/
|
||||
readonly publisher?: string | null;
|
||||
/**
|
||||
* A friendly name for the publisher that can be displayed to users. Corresponds to [Properties.PublisherDisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211460.aspx).
|
||||
* Defaults to company name from the application metadata.
|
||||
*/
|
||||
readonly publisherDisplayName?: string | null;
|
||||
/**
|
||||
* The list of [supported languages](https://docs.microsoft.com/en-us/windows/uwp/globalizing/manage-language-and-region#specify-the-supported-languages-in-the-apps-manifest) that will be listed in the Windows Store.
|
||||
* The first entry (index 0) will be the default language.
|
||||
* Defaults to en-US if omitted.
|
||||
*/
|
||||
readonly languages?: Array<string> | string | null;
|
||||
/**
|
||||
* Whether to add auto launch extension. Defaults to `true` if [electron-winstore-auto-launch](https://github.com/felixrieseberg/electron-winstore-auto-launch) in the dependencies.
|
||||
*/
|
||||
readonly addAutoLaunchExtension?: boolean;
|
||||
/**
|
||||
* Relative path to custom extensions xml to be included in an `appmanifest.xml`.
|
||||
*/
|
||||
readonly customExtensionsPath?: string;
|
||||
/**
|
||||
* Whether to overlay the app's name on top of tile images on the Start screen. Defaults to `false`. (https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-shownameontiles) in the dependencies.
|
||||
* @default false
|
||||
*/
|
||||
readonly showNameOnTiles?: boolean;
|
||||
/**
|
||||
* @private
|
||||
* @default false
|
||||
*/
|
||||
readonly electronUpdaterAware?: boolean;
|
||||
/**
|
||||
* Whether to set build number. See https://github.com/electron-userland/electron-builder/issues/3875
|
||||
* @default false
|
||||
*/
|
||||
readonly setBuildNumber?: boolean;
|
||||
/** @private */
|
||||
readonly makeappxArgs?: Array<string> | null;
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/options/AppXOptions.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/options/AppXOptions.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=AppXOptions.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/AppXOptions.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/AppXOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
47
buildfiles/node_modules/app-builder-lib/out/options/CommonWindowsInstallerConfiguration.d.ts
generated
vendored
Normal file
47
buildfiles/node_modules/app-builder-lib/out/options/CommonWindowsInstallerConfiguration.d.ts
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
import { WinPackager } from "../winPackager";
|
||||
export interface CommonWindowsInstallerConfiguration {
|
||||
readonly oneClick?: boolean;
|
||||
/**
|
||||
* Whether to install per all users (per-machine).
|
||||
* @default false
|
||||
*/
|
||||
readonly perMachine?: boolean;
|
||||
/**
|
||||
* Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.
|
||||
* @default true
|
||||
*/
|
||||
readonly runAfterFinish?: boolean;
|
||||
/**
|
||||
* Whether to create desktop shortcut. Set to `always` if to recreate also on reinstall (even if removed by user).
|
||||
* @default true
|
||||
*/
|
||||
readonly createDesktopShortcut?: boolean | "always";
|
||||
/**
|
||||
* Whether to create start menu shortcut.
|
||||
* @default true
|
||||
*/
|
||||
readonly createStartMenuShortcut?: boolean;
|
||||
/**
|
||||
* Whether to create submenu for start menu shortcut and program files directory. If `true`, company name will be used. Or string value.
|
||||
* @default false
|
||||
*/
|
||||
readonly menuCategory?: boolean | string;
|
||||
/**
|
||||
* The name that will be used for all shortcuts. Defaults to the application name.
|
||||
*/
|
||||
readonly shortcutName?: string | null;
|
||||
}
|
||||
export interface FinalCommonWindowsInstallerOptions {
|
||||
isAssisted: boolean;
|
||||
isPerMachine: boolean;
|
||||
shortcutName: string;
|
||||
menuCategory: string | null;
|
||||
isCreateDesktopShortcut: DesktopShortcutCreationPolicy;
|
||||
isCreateStartMenuShortcut: boolean;
|
||||
}
|
||||
export declare function getEffectiveOptions(options: CommonWindowsInstallerConfiguration, packager: WinPackager): FinalCommonWindowsInstallerOptions;
|
||||
export declare enum DesktopShortcutCreationPolicy {
|
||||
FRESH_INSTALL = 0,
|
||||
ALWAYS = 1,
|
||||
NEVER = 2
|
||||
}
|
78
buildfiles/node_modules/app-builder-lib/out/options/CommonWindowsInstallerConfiguration.js
generated
vendored
Normal file
78
buildfiles/node_modules/app-builder-lib/out/options/CommonWindowsInstallerConfiguration.js
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.getEffectiveOptions = getEffectiveOptions;
|
||||
exports.DesktopShortcutCreationPolicy = void 0;
|
||||
|
||||
function _builderUtil() {
|
||||
const data = require("builder-util");
|
||||
|
||||
_builderUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _sanitizeFilename() {
|
||||
const data = _interopRequireDefault(require("sanitize-filename"));
|
||||
|
||||
_sanitizeFilename = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function getEffectiveOptions(options, packager) {
|
||||
const appInfo = packager.appInfo;
|
||||
let menuCategory = null;
|
||||
|
||||
if (options.menuCategory != null && options.menuCategory !== false) {
|
||||
if (options.menuCategory === true) {
|
||||
const companyName = packager.appInfo.companyName;
|
||||
|
||||
if (companyName == null) {
|
||||
throw new (_builderUtil().InvalidConfigurationError)(`Please specify "author" in the application package.json — it is required because "menuCategory" is set to true.`);
|
||||
}
|
||||
|
||||
menuCategory = (0, _sanitizeFilename().default)(companyName);
|
||||
} else {
|
||||
menuCategory = options.menuCategory.split(/[/\\]/).map(it => (0, _sanitizeFilename().default)(it)).join("\\");
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
isPerMachine: options.perMachine === true,
|
||||
isAssisted: options.oneClick === false,
|
||||
shortcutName: (0, _builderUtil().isEmptyOrSpaces)(options.shortcutName) ? appInfo.productFilename : packager.expandMacro(options.shortcutName),
|
||||
isCreateDesktopShortcut: convertToDesktopShortcutCreationPolicy(options.createDesktopShortcut),
|
||||
isCreateStartMenuShortcut: options.createStartMenuShortcut !== false,
|
||||
menuCategory
|
||||
};
|
||||
}
|
||||
|
||||
function convertToDesktopShortcutCreationPolicy(value) {
|
||||
if (value === false) {
|
||||
return DesktopShortcutCreationPolicy.NEVER;
|
||||
} else if (value === "always") {
|
||||
return DesktopShortcutCreationPolicy.ALWAYS;
|
||||
} else {
|
||||
return DesktopShortcutCreationPolicy.FRESH_INSTALL;
|
||||
}
|
||||
}
|
||||
|
||||
var DesktopShortcutCreationPolicy;
|
||||
exports.DesktopShortcutCreationPolicy = DesktopShortcutCreationPolicy;
|
||||
|
||||
(function (DesktopShortcutCreationPolicy) {
|
||||
DesktopShortcutCreationPolicy[DesktopShortcutCreationPolicy["FRESH_INSTALL"] = 0] = "FRESH_INSTALL";
|
||||
DesktopShortcutCreationPolicy[DesktopShortcutCreationPolicy["ALWAYS"] = 1] = "ALWAYS";
|
||||
DesktopShortcutCreationPolicy[DesktopShortcutCreationPolicy["NEVER"] = 2] = "NEVER";
|
||||
})(DesktopShortcutCreationPolicy || (exports.DesktopShortcutCreationPolicy = DesktopShortcutCreationPolicy = {}));
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=CommonWindowsInstallerConfiguration.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/CommonWindowsInstallerConfiguration.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/CommonWindowsInstallerConfiguration.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/options/CommonWindowsInstallerConfiguration.ts"],"names":[],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAqDM,SAAU,mBAAV,CAA8B,OAA9B,EAA4E,QAA5E,EAAiG;AACrG,QAAM,OAAO,GAAG,QAAQ,CAAC,OAAzB;AAEA,MAAI,YAAY,GAAkB,IAAlC;;AACA,MAAI,OAAO,CAAC,YAAR,IAAwB,IAAxB,IAAgC,OAAO,CAAC,YAAR,KAAyB,KAA7D,EAAoE;AAClE,QAAI,OAAO,CAAC,YAAR,KAAyB,IAA7B,EAAmC;AACjC,YAAM,WAAW,GAAG,QAAQ,CAAC,OAAT,CAAiB,WAArC;;AACA,UAAI,WAAW,IAAI,IAAnB,EAAyB;AACvB,cAAM,KAAI,wCAAJ,EAA8B,iHAA9B,CAAN;AACD;;AACD,MAAA,YAAY,GAAG,iCAAiB,WAAjB,CAAf;AACD,KAND,MAOK;AACH,MAAA,YAAY,GAAI,OAAO,CAAC,YAAR,CAAgC,KAAhC,CAAsC,OAAtC,EAA+C,GAA/C,CAAmD,EAAE,IAAI,iCAAiB,EAAjB,CAAzD,EAA+E,IAA/E,CAAoF,IAApF,CAAhB;AACD;AACF;;AAED,SAAO;AACL,IAAA,YAAY,EAAE,OAAO,CAAC,UAAR,KAAuB,IADhC;AAEL,IAAA,UAAU,EAAE,OAAO,CAAC,QAAR,KAAqB,KAF5B;AAIL,IAAA,YAAY,EAAE,oCAAgB,OAAO,CAAC,YAAxB,IAAwC,OAAO,CAAC,eAAhD,GAAkE,QAAQ,CAAC,WAAT,CAAqB,OAAO,CAAC,YAA7B,CAJ3E;AAKL,IAAA,uBAAuB,EAAE,sCAAsC,CAAC,OAAO,CAAC,qBAAT,CAL1D;AAML,IAAA,yBAAyB,EAAE,OAAO,CAAC,uBAAR,KAAoC,KAN1D;AAOL,IAAA;AAPK,GAAP;AASD;;AAED,SAAS,sCAAT,CAAgD,KAAhD,EAAmF;AACjF,MAAI,KAAK,KAAK,KAAd,EAAqB;AACnB,WAAO,6BAA6B,CAAC,KAArC;AACD,GAFD,MAGK,IAAI,KAAK,KAAK,QAAd,EAAwB;AAC3B,WAAO,6BAA6B,CAAC,MAArC;AACD,GAFI,MAGA;AACH,WAAO,6BAA6B,CAAC,aAArC;AACD;AACF;;AAED,IAAY,6BAAZ;;;AAAA,CAAA,UAAY,6BAAZ,EAAyC;AACvC,EAAA,6BAAA,CAAA,6BAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,GAAA,eAAA;AAAe,EAAA,6BAAA,CAAA,6BAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA;AAAQ,EAAA,6BAAA,CAAA,6BAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA;AACxB,CAFD,EAAY,6BAA6B,6CAA7B,6BAA6B,GAAA,EAAA,CAAzC,E","sourcesContent":["import { InvalidConfigurationError, isEmptyOrSpaces } from \"builder-util\"\nimport sanitizeFileName from \"sanitize-filename\"\nimport { WinPackager } from \"../winPackager\"\n\nexport interface CommonWindowsInstallerConfiguration {\n readonly oneClick?: boolean\n\n /**\n * Whether to install per all users (per-machine).\n * @default false\n */\n readonly perMachine?: boolean\n\n /**\n * Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.\n * @default true\n */\n readonly runAfterFinish?: boolean\n\n /**\n * Whether to create desktop shortcut. Set to `always` if to recreate also on reinstall (even if removed by user).\n * @default true\n */\n readonly createDesktopShortcut?: boolean | \"always\"\n\n /**\n * Whether to create start menu shortcut.\n * @default true\n */\n readonly createStartMenuShortcut?: boolean\n\n /**\n * Whether to create submenu for start menu shortcut and program files directory. If `true`, company name will be used. Or string value.\n * @default false\n */\n readonly menuCategory?: boolean | string\n\n /**\n * The name that will be used for all shortcuts. Defaults to the application name.\n */\n readonly shortcutName?: string | null\n}\n\nexport interface FinalCommonWindowsInstallerOptions {\n isAssisted: boolean\n isPerMachine: boolean\n\n shortcutName: string\n menuCategory: string | null\n\n isCreateDesktopShortcut: DesktopShortcutCreationPolicy\n isCreateStartMenuShortcut: boolean\n}\n\nexport function getEffectiveOptions(options: CommonWindowsInstallerConfiguration, packager: WinPackager): FinalCommonWindowsInstallerOptions {\n const appInfo = packager.appInfo\n\n let menuCategory: string | null = null\n if (options.menuCategory != null && options.menuCategory !== false) {\n if (options.menuCategory === true) {\n const companyName = packager.appInfo.companyName\n if (companyName == null) {\n throw new InvalidConfigurationError(`Please specify \"author\" in the application package.json — it is required because \"menuCategory\" is set to true.`)\n }\n menuCategory = sanitizeFileName(companyName)\n }\n else {\n menuCategory = (options.menuCategory as string).split(/[/\\\\]/).map(it => sanitizeFileName(it)).join(\"\\\\\")\n }\n }\n\n return {\n isPerMachine: options.perMachine === true,\n isAssisted: options.oneClick === false,\n\n shortcutName: isEmptyOrSpaces(options.shortcutName) ? appInfo.productFilename : packager.expandMacro(options.shortcutName!!),\n isCreateDesktopShortcut: convertToDesktopShortcutCreationPolicy(options.createDesktopShortcut),\n isCreateStartMenuShortcut: options.createStartMenuShortcut !== false,\n menuCategory,\n }\n}\n\nfunction convertToDesktopShortcutCreationPolicy(value: boolean | undefined | string): DesktopShortcutCreationPolicy {\n if (value === false) {\n return DesktopShortcutCreationPolicy.NEVER\n }\n else if (value === \"always\") {\n return DesktopShortcutCreationPolicy.ALWAYS\n }\n else {\n return DesktopShortcutCreationPolicy.FRESH_INSTALL\n }\n}\n\nexport enum DesktopShortcutCreationPolicy {\n FRESH_INSTALL, ALWAYS, NEVER\n}"],"sourceRoot":""}
|
45
buildfiles/node_modules/app-builder-lib/out/options/FileAssociation.d.ts
generated
vendored
Normal file
45
buildfiles/node_modules/app-builder-lib/out/options/FileAssociation.d.ts
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
/**
|
||||
* File associations.
|
||||
*
|
||||
* macOS (corresponds to [CFBundleDocumentTypes](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685)) and NSIS only.
|
||||
*
|
||||
* On Windows works only if [nsis.perMachine](https://electron.build/configuration/configuration#NsisOptions-perMachine) is set to `true`.
|
||||
*/
|
||||
export interface FileAssociation {
|
||||
/**
|
||||
* The extension (minus the leading period). e.g. `png`.
|
||||
*/
|
||||
readonly ext: string | Array<string>;
|
||||
/**
|
||||
* The name. e.g. `PNG`. Defaults to `ext`.
|
||||
*/
|
||||
readonly name?: string | null;
|
||||
/**
|
||||
* *windows-only.* The description.
|
||||
*/
|
||||
readonly description?: string | null;
|
||||
/**
|
||||
* *linux-only.* The mime-type.
|
||||
*/
|
||||
readonly mimeType?: string | null;
|
||||
/**
|
||||
* The path to icon (`.icns` for MacOS and `.ico` for Windows), relative to `build` (build resources directory). Defaults to `${firstExt}.icns`/`${firstExt}.ico` (if several extensions specified, first is used) or to application icon.
|
||||
*
|
||||
* Not supported on Linux, file issue if need (default icon will be `x-office-document`).
|
||||
*/
|
||||
readonly icon?: string | null;
|
||||
/**
|
||||
* *macOS-only* The app’s role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.
|
||||
* @default Editor
|
||||
*/
|
||||
readonly role?: string;
|
||||
/**
|
||||
* *macOS-only* Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to `LSTypeIsPackage`.
|
||||
*/
|
||||
readonly isPackage?: boolean;
|
||||
/**
|
||||
* *macOS-only* The app’s rank with respect to the type. The value can be `Owner`, `Default`, `Alternate`, or `None`. Corresponds to `LSHandlerRank`.
|
||||
* @default Default
|
||||
*/
|
||||
readonly rank?: string;
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/options/FileAssociation.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/options/FileAssociation.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=FileAssociation.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/FileAssociation.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/FileAssociation.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
18
buildfiles/node_modules/app-builder-lib/out/options/MsiOptions.d.ts
generated
vendored
Normal file
18
buildfiles/node_modules/app-builder-lib/out/options/MsiOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import { TargetSpecificOptions } from "../core";
|
||||
import { CommonWindowsInstallerConfiguration } from "./CommonWindowsInstallerConfiguration";
|
||||
export interface MsiOptions extends CommonWindowsInstallerConfiguration, TargetSpecificOptions {
|
||||
/**
|
||||
* One-click installation.
|
||||
* @default true
|
||||
*/
|
||||
readonly oneClick?: boolean;
|
||||
/**
|
||||
* The [upgrade code](https://msdn.microsoft.com/en-us/library/windows/desktop/aa372375(v=vs.85).aspx). Optional, by default generated using app id.
|
||||
*/
|
||||
readonly upgradeCode?: string | null;
|
||||
/**
|
||||
* If `warningsAsErrors` is `true` (default): treat warnings as errors. If `warningsAsErrors` is `false`: allow warnings.
|
||||
* @default true
|
||||
*/
|
||||
readonly warningsAsErrors?: boolean;
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/options/MsiOptions.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/options/MsiOptions.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=MsiOptions.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/MsiOptions.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/MsiOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
136
buildfiles/node_modules/app-builder-lib/out/options/PlatformSpecificBuildOptions.d.ts
generated
vendored
Normal file
136
buildfiles/node_modules/app-builder-lib/out/options/PlatformSpecificBuildOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
import { AsarIntegrityOptions } from "../asar/integrity";
|
||||
import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from "../core";
|
||||
import { FileAssociation } from "./FileAssociation";
|
||||
export interface FileSet {
|
||||
/**
|
||||
* The source path relative to the project directory.
|
||||
*/
|
||||
from?: string;
|
||||
/**
|
||||
* The destination path relative to the app's content directory for `extraFiles` and the app's resource directory for `extraResources`.
|
||||
*/
|
||||
to?: string;
|
||||
/**
|
||||
* The [glob patterns](/file-patterns).
|
||||
*/
|
||||
filter?: Array<string> | string;
|
||||
}
|
||||
export interface AsarOptions extends AsarIntegrityOptions {
|
||||
/**
|
||||
* Whether to automatically unpack executables files.
|
||||
* @default true
|
||||
*/
|
||||
smartUnpack?: boolean;
|
||||
ordering?: string | null;
|
||||
}
|
||||
export interface PlatformSpecificBuildOptions extends TargetSpecificOptions {
|
||||
/**
|
||||
* The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as
|
||||
* [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.
|
||||
* @default com.electron.${name}
|
||||
*/
|
||||
readonly appId?: string | null;
|
||||
/**
|
||||
* The [artifact file name template](/configuration/configuration#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).
|
||||
*/
|
||||
readonly artifactName?: string | null;
|
||||
/**
|
||||
* The compression level. If you want to rapidly test build, `store` can reduce build time significantly. `maximum` doesn't lead to noticeable size difference, but increase build time.
|
||||
* @default normal
|
||||
*/
|
||||
readonly compression?: CompressionLevel | null;
|
||||
files?: Array<FileSet | string> | FileSet | string | null;
|
||||
extraResources?: Array<FileSet | string> | FileSet | string | null;
|
||||
extraFiles?: Array<FileSet | string> | FileSet | string | null;
|
||||
/**
|
||||
* Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/).
|
||||
*
|
||||
* Node modules, that must be unpacked, will be detected automatically, you don't need to explicitly set [asarUnpack](#configuration-asarUnpack) - please file an issue if this doesn't work.
|
||||
* @default true
|
||||
*/
|
||||
readonly asar?: AsarOptions | boolean | null;
|
||||
/**
|
||||
* A [glob patterns](/file-patterns) relative to the [app directory](#MetadataDirectories-app), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive.
|
||||
*/
|
||||
readonly asarUnpack?: Array<string> | string | null;
|
||||
/** @private */
|
||||
readonly icon?: string | null;
|
||||
/**
|
||||
* The file associations.
|
||||
*/
|
||||
readonly fileAssociations?: Array<FileAssociation> | FileAssociation;
|
||||
/**
|
||||
* The URL protocol schemes.
|
||||
*/
|
||||
readonly protocols?: Array<Protocol> | Protocol;
|
||||
/**
|
||||
* Whether to fail if app will be not code signed.
|
||||
*/
|
||||
readonly forceCodeSigning?: boolean;
|
||||
/**
|
||||
* The [electron-updater compatibility](/auto-update#compatibility) semver range.
|
||||
*/
|
||||
readonly electronUpdaterCompatibility?: string | null;
|
||||
publish?: Publish;
|
||||
/**
|
||||
* Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.
|
||||
* @default true
|
||||
*/
|
||||
readonly detectUpdateChannel?: boolean;
|
||||
/**
|
||||
* Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).
|
||||
* @default false
|
||||
*/
|
||||
readonly generateUpdatesFilesForAllChannels?: boolean;
|
||||
/**
|
||||
* The release info. Intended for command line usage:
|
||||
*
|
||||
* ```
|
||||
* -c.releaseInfo.releaseNotes="new features"
|
||||
* ```
|
||||
*/
|
||||
readonly releaseInfo?: ReleaseInfo;
|
||||
readonly target?: Array<string | TargetConfiguration> | string | TargetConfiguration | null;
|
||||
/** @private */
|
||||
cscLink?: string | null;
|
||||
/** @private */
|
||||
cscKeyPassword?: string | null;
|
||||
}
|
||||
export interface ReleaseInfo {
|
||||
/**
|
||||
* The release name.
|
||||
*/
|
||||
releaseName?: string | null;
|
||||
/**
|
||||
* The release notes.
|
||||
*/
|
||||
releaseNotes?: string | null;
|
||||
/**
|
||||
* The path to release notes file. Defaults to `release-notes-${platform}.md` (where `platform` it is current platform — `mac`, `linux` or `windows`) or `release-notes.md` in the [build resources](#MetadataDirectories-buildResources).
|
||||
*/
|
||||
releaseNotesFile?: string | null;
|
||||
/**
|
||||
* The release date.
|
||||
*/
|
||||
releaseDate?: string;
|
||||
}
|
||||
/**
|
||||
* URL Protocol Schemes. Protocols to associate the app with. macOS only.
|
||||
*
|
||||
* Please note — on macOS [you need to register an `open-url` event handler](http://electron.atom.io/docs/api/app/#event-open-url-macos).
|
||||
*/
|
||||
export interface Protocol {
|
||||
/**
|
||||
* The name. e.g. `IRC server URL`.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* The schemes. e.g. `["irc", "ircs"]`.
|
||||
*/
|
||||
readonly schemes: Array<string>;
|
||||
/**
|
||||
* *macOS-only* The app’s role with respect to the type.
|
||||
* @default Editor
|
||||
*/
|
||||
readonly role?: "Editor" | "Viewer" | "Shell" | "None";
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/options/PlatformSpecificBuildOptions.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/options/PlatformSpecificBuildOptions.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=PlatformSpecificBuildOptions.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/PlatformSpecificBuildOptions.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/PlatformSpecificBuildOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
103
buildfiles/node_modules/app-builder-lib/out/options/SnapOptions.d.ts
generated
vendored
Normal file
103
buildfiles/node_modules/app-builder-lib/out/options/SnapOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
import { TargetSpecificOptions } from "../core";
|
||||
import { CommonLinuxOptions } from "./linuxOptions";
|
||||
export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
|
||||
/**
|
||||
* The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.
|
||||
* @default strict
|
||||
*/
|
||||
readonly confinement?: "devmode" | "strict" | "classic" | null;
|
||||
/**
|
||||
* The custom environment. Defaults to `{"TMPDIR: "$XDG_RUNTIME_DIR"}`. If you set custom, it will be merged with default.
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
} | null;
|
||||
/**
|
||||
* The 78 character long summary. Defaults to [productName](/configuration/configuration#Configuration-productName).
|
||||
*/
|
||||
readonly summary?: string | null;
|
||||
/**
|
||||
* The quality grade of the snap. It can be either `devel` (i.e. a development version of the snap, so not to be published to the “stable” or “candidate” channels) or “stable” (i.e. a stable release or release candidate, which can be released to all channels).
|
||||
* @default stable
|
||||
*/
|
||||
readonly grade?: "devel" | "stable" | null;
|
||||
/**
|
||||
* The list of features that must be supported by the core in order for this snap to install.
|
||||
*/
|
||||
readonly assumes?: Array<string> | string | null;
|
||||
/**
|
||||
* The list of debian packages needs to be installed for building this snap.
|
||||
*/
|
||||
readonly buildPackages?: Array<string> | null;
|
||||
/**
|
||||
* The list of Ubuntu packages to use that are needed to support the `app` part creation. Like `depends` for `deb`.
|
||||
* Defaults to `["libasound2", "libgconf2-4", "libnotify4", "libnspr4", "libnss3", "libpcre3", "libpulse0", "libxss1", "libxtst6"]`.
|
||||
*
|
||||
* If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom package `foo` in addition to defaults.
|
||||
*/
|
||||
readonly stagePackages?: Array<string> | null;
|
||||
/**
|
||||
* The [hooks](https://docs.snapcraft.io/build-snaps/hooks) directory, relative to `build` (build resources directory).
|
||||
* @default build/snap-hooks
|
||||
*/
|
||||
readonly hooks?: string | null;
|
||||
/**
|
||||
* The list of [plugs](https://snapcraft.io/docs/reference/interfaces).
|
||||
* Defaults to `["desktop", "desktop-legacy", "home", "x11", "unity7", "browser-support", "network", "gsettings", "audio-playback", "pulseaudio", "opengl"]`.
|
||||
*
|
||||
* If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom plug `foo` in addition to defaults.
|
||||
*
|
||||
* Additional attributes can be specified using object instead of just name of plug:
|
||||
* ```
|
||||
*[
|
||||
* {
|
||||
* "browser-sandbox": {
|
||||
* "interface": "browser-support",
|
||||
* "allow-sandbox": true
|
||||
* },
|
||||
* },
|
||||
* "another-simple-plug-name"
|
||||
*]
|
||||
* ```
|
||||
*/
|
||||
readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null;
|
||||
/**
|
||||
* The list of [slots](https://snapcraft.io/docs/reference/interfaces).
|
||||
*/
|
||||
readonly slots?: Array<string> | null;
|
||||
/**
|
||||
* Specifies any [parts](https://snapcraft.io/docs/reference/parts) that should be built before this part.
|
||||
* Defaults to `["desktop-gtk2""]`.
|
||||
*
|
||||
* If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom parts `foo` in addition to defaults.
|
||||
*/
|
||||
readonly after?: Array<string> | null;
|
||||
/**
|
||||
* Whether to use template snap. Defaults to `true` if `stagePackages` not specified.
|
||||
*/
|
||||
readonly useTemplateApp?: boolean;
|
||||
/**
|
||||
* Whether or not the snap should automatically start on login.
|
||||
* @default false
|
||||
*/
|
||||
readonly autoStart?: boolean;
|
||||
/**
|
||||
* Specifies any files to make accessible from locations such as `/usr`, `/var`, and `/etc`. See [snap layouts](https://snapcraft.io/docs/snap-layouts) to learn more.
|
||||
*/
|
||||
readonly layout?: {
|
||||
[key: string]: {
|
||||
[key: string]: string;
|
||||
};
|
||||
} | null;
|
||||
/**
|
||||
* Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets) to learn more about the format.
|
||||
*
|
||||
* The defaults can be found in [snap.ts](https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/snap/snapcraft.yaml#L29).
|
||||
*/
|
||||
readonly appPartStage?: Array<string> | null;
|
||||
}
|
||||
export interface PlugDescriptor {
|
||||
[key: string]: {
|
||||
[key: string]: any;
|
||||
} | null;
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/options/SnapOptions.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/options/SnapOptions.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=SnapOptions.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/SnapOptions.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/SnapOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
41
buildfiles/node_modules/app-builder-lib/out/options/SquirrelWindowsOptions.d.ts
generated
vendored
Normal file
41
buildfiles/node_modules/app-builder-lib/out/options/SquirrelWindowsOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Squirrel.Windows options.
|
||||
*/
|
||||
import { TargetSpecificOptions } from "../core";
|
||||
export interface SquirrelWindowsOptions extends TargetSpecificOptions {
|
||||
/**
|
||||
* A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Electron icon.
|
||||
*
|
||||
* Please note — [local icon file url is not accepted](https://github.com/atom/grunt-electron-installer/issues/73), must be https/http.
|
||||
*
|
||||
* If you don't plan to build windows installer, you can omit it.
|
||||
* If your project repository is public on GitHub, it will be `https://github.com/${u}/${p}/blob/master/build/icon.ico?raw=true` by default.
|
||||
*/
|
||||
readonly iconUrl?: string | null;
|
||||
/**
|
||||
* The path to a .gif file to display during install. `build/install-spinner.gif` will be used if exists (it is a recommended way to set)
|
||||
* (otherwise [default](https://github.com/electron/windows-installer/blob/master/resources/install-spinner.gif)).
|
||||
*/
|
||||
readonly loadingGif?: string | null;
|
||||
/**
|
||||
* Whether to create an MSI installer. Defaults to `false` (MSI is not created).
|
||||
*/
|
||||
readonly msi?: boolean;
|
||||
/**
|
||||
* A URL to your existing updates. Or `true` to automatically set to your GitHub repository. If given, these will be downloaded to create delta updates.
|
||||
*/
|
||||
readonly remoteReleases?: string | boolean | null;
|
||||
/**
|
||||
* Authentication token for remote updates
|
||||
*/
|
||||
readonly remoteToken?: string | null;
|
||||
/**
|
||||
* Use `appId` to identify package instead of `name`.
|
||||
*/
|
||||
readonly useAppIdAsId?: boolean;
|
||||
/**
|
||||
* https://github.com/electron-userland/electron-builder/issues/1743
|
||||
* @private
|
||||
*/
|
||||
readonly name?: string;
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/options/SquirrelWindowsOptions.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/options/SquirrelWindowsOptions.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=SquirrelWindowsOptions.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/SquirrelWindowsOptions.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/SquirrelWindowsOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
107
buildfiles/node_modules/app-builder-lib/out/options/linuxOptions.d.ts
generated
vendored
Normal file
107
buildfiles/node_modules/app-builder-lib/out/options/linuxOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from "../index";
|
||||
export interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {
|
||||
/**
|
||||
* Target package type: list of `AppImage`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
|
||||
*
|
||||
* electron-builder [docker image](/multi-platform-build#docker) can be used to build Linux targets on any platform.
|
||||
*
|
||||
* Please [do not put an AppImage into another archive](https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages#common-mistake) like a .zip or .tar.gz.
|
||||
* @default AppImage
|
||||
*/
|
||||
readonly target?: TargetConfigType;
|
||||
/**
|
||||
* The maintainer. Defaults to [author](/configuration/configuration#Metadata-author).
|
||||
*/
|
||||
readonly maintainer?: string | null;
|
||||
/**
|
||||
* The vendor. Defaults to [author](/configuration/configuration#Metadata-author).
|
||||
*/
|
||||
readonly vendor?: string | null;
|
||||
/**
|
||||
* The executable name. Defaults to `productName`.
|
||||
* Cannot be specified per target, allowed only in the `linux`.
|
||||
*/
|
||||
readonly executableName?: string | null;
|
||||
/**
|
||||
* The path to icon set directory or one png file, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.
|
||||
* By default will be generated automatically based on the macOS icns file.
|
||||
*/
|
||||
readonly icon?: string;
|
||||
/**
|
||||
* backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place
|
||||
* @private
|
||||
*/
|
||||
readonly packageCategory?: string | null;
|
||||
}
|
||||
export interface CommonLinuxOptions {
|
||||
/**
|
||||
* The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).
|
||||
*/
|
||||
readonly synopsis?: string | null;
|
||||
/**
|
||||
* As [description](/configuration/configuration#Metadata-description) from application package.json, but allows you to specify different for Linux.
|
||||
*/
|
||||
readonly description?: string | null;
|
||||
/**
|
||||
* The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).
|
||||
*/
|
||||
readonly category?: string | null;
|
||||
/**
|
||||
* The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing.
|
||||
*/
|
||||
readonly mimeTypes?: Array<string> | null;
|
||||
/**
|
||||
* The [Desktop file](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) entries (name to value).
|
||||
*/
|
||||
readonly desktop?: any | null;
|
||||
/**
|
||||
* The executable parameters. Pass to executableName
|
||||
*/
|
||||
readonly executableArgs?: Array<string> | null;
|
||||
}
|
||||
export interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {
|
||||
/**
|
||||
* Package dependencies.
|
||||
*/
|
||||
readonly depends?: Array<string> | null;
|
||||
/**
|
||||
* The compression type.
|
||||
* @default xz
|
||||
*/
|
||||
readonly compression?: "gz" | "bzip2" | "xz" | null;
|
||||
readonly icon?: string;
|
||||
/**
|
||||
* The package category.
|
||||
*/
|
||||
readonly packageCategory?: string | null;
|
||||
readonly vendor?: string | null;
|
||||
readonly maintainer?: string | null;
|
||||
readonly afterInstall?: string | null;
|
||||
readonly afterRemove?: string | null;
|
||||
/**
|
||||
* *Advanced only* The [fpm](https://github.com/jordansissel/fpm/wiki#usage) options.
|
||||
*
|
||||
* Example: `["--before-install=build/deb-preinstall.sh", "--after-upgrade=build/deb-postinstall.sh"]`
|
||||
*/
|
||||
readonly fpm?: Array<string> | null;
|
||||
}
|
||||
export interface DebOptions extends LinuxTargetSpecificOptions {
|
||||
/**
|
||||
* Package dependencies. Defaults to `["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]`.
|
||||
*/
|
||||
readonly depends?: Array<string> | null;
|
||||
/**
|
||||
* The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).
|
||||
*/
|
||||
readonly packageCategory?: string | null;
|
||||
/**
|
||||
* The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.
|
||||
*/
|
||||
readonly priority?: string | null;
|
||||
}
|
||||
export interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {
|
||||
/**
|
||||
* The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.
|
||||
*/
|
||||
readonly license?: string | null;
|
||||
}
|
7
buildfiles/node_modules/app-builder-lib/out/options/linuxOptions.js
generated
vendored
Normal file
7
buildfiles/node_modules/app-builder-lib/out/options/linuxOptions.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
// __ts-babel@6.0.4
|
||||
//# sourceMappingURL=linuxOptions.js.map
|
1
buildfiles/node_modules/app-builder-lib/out/options/linuxOptions.js.map
generated
vendored
Normal file
1
buildfiles/node_modules/app-builder-lib/out/options/linuxOptions.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
263
buildfiles/node_modules/app-builder-lib/out/options/macOptions.d.ts
generated
vendored
Normal file
263
buildfiles/node_modules/app-builder-lib/out/options/macOptions.d.ts
generated
vendored
Normal file
@ -0,0 +1,263 @@
|
||||
import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from "../index";
|
||||
export declare type MacOsTargetName = "default" | "dmg" | "mas" | "mas-dev" | "pkg" | "7z" | "zip" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "dir";
|
||||
export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
||||
/**
|
||||
* The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.
|
||||
*
|
||||
* For example, `"category": "public.app-category.developer-tools"` will set the application category to *Developer Tools*.
|
||||
*
|
||||
* Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).
|
||||
*/
|
||||
readonly category?: string | null;
|
||||
/**
|
||||
* The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).
|
||||
*/
|
||||
readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null;
|
||||
/**
|
||||
* The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](/code-signing) instead of specifying this option.
|
||||
* MAS installer identity is specified in the [mas](/configuration/mas).
|
||||
*/
|
||||
readonly identity?: string | null;
|
||||
/**
|
||||
* The path to application icon.
|
||||
* @default build/icon.icns
|
||||
*/
|
||||
readonly icon?: string | null;
|
||||
/**
|
||||
* The path to entitlements file for signing the app. `build/entitlements.mac.plist` will be used if exists (it is a recommended way to set).
|
||||
* MAS entitlements is specified in the [mas](/configuration/mas).
|
||||
*/
|
||||
readonly entitlements?: string | null;
|
||||
/**
|
||||
* The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mac.inherit.plist` will be used if exists (it is a recommended way to set).
|
||||
* Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist).
|
||||
*
|
||||
* This option only applies when signing with `entitlements` provided.
|
||||
*/
|
||||
readonly entitlementsInherit?: string | null;
|
||||
/**
|
||||
* Path to login helper entitlement file.
|
||||
* When using App Sandbox, the the `com.apple.security.inherit` key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.
|
||||
* Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.
|
||||
*/
|
||||
readonly entitlementsLoginHelper?: string | null;
|
||||
/**
|
||||
* The path to the provisioning profile to use when signing, absolute or relative to the app root.
|
||||
*/
|
||||
readonly provisioningProfile?: string | null;
|
||||
/**
|
||||
* The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).
|
||||
*/
|
||||
readonly bundleVersion?: string | null;
|
||||
/**
|
||||
* The `CFBundleShortVersionString`. Do not use it unless you need to.
|
||||
*/
|
||||
readonly bundleShortVersion?: string | null;
|
||||
/**
|
||||
* Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.
|
||||
* @default false
|
||||
*/
|
||||
readonly darkModeSupport?: boolean;
|
||||
/**
|
||||
* The bundle identifier to use in the application helper's plist.
|
||||
* @default ${appBundleIdentifier}.helper
|
||||
*/
|
||||
readonly helperBundleId?: string | null;
|
||||
/**
|
||||
* The bundle identifier to use in the Renderer helper's plist.
|
||||
* @default ${appBundleIdentifier}.helper.Renderer
|
||||
*/
|
||||
readonly helperRendererBundleId?: string | null;
|
||||
/**
|
||||
* The bundle identifier to use in the Plugin helper's plist.
|
||||
* @default ${appBundleIdentifier}.helper.Plugin
|
||||
*/
|
||||
readonly helperPluginBundleId?: string | null;
|
||||
/**
|
||||
* The bundle identifier to use in the GPU helper's plist.
|
||||
* @default ${appBundleIdentifier}.helper.GPU
|
||||
*/
|
||||
readonly helperGPUBundleId?: string | null;
|
||||
/**
|
||||
* The bundle identifier to use in the EH helper's plist.
|
||||
* @default ${appBundleIdentifier}.helper.EH
|
||||
*/
|
||||
readonly helperEHBundleId?: string | null;
|
||||
/**
|
||||
* The bundle identifier to use in the NP helper's plist.
|
||||
* @default ${appBundleIdentifier}.helper.NP
|
||||
*/
|
||||
readonly helperNPBundleId?: string | null;
|
||||
/**
|
||||
* Whether to sign app for development or for distribution.
|
||||
* @default distribution
|
||||
*/
|
||||
readonly type?: "distribution" | "development" | null;
|
||||
/**
|
||||
* The extra entries for `Info.plist`.
|
||||
*/
|
||||
readonly extendInfo?: any;
|
||||
/**
|
||||
* Paths of any extra binaries that need to be signed.
|
||||
*/
|
||||
readonly binaries?: Array<string> | null;
|
||||
/**
|
||||
* The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.
|
||||
*/
|
||||
readonly minimumSystemVersion?: string | null;
|
||||
/**
|
||||
* Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.
|
||||
*/
|
||||
readonly requirements?: string | null;
|
||||
/**
|
||||
* The electron locales. By default Electron locales used as is.
|
||||
*/
|
||||
readonly electronLanguages?: Array<string> | string;
|
||||
/** @private */
|
||||
readonly cscInstallerLink?: string | null;
|
||||
/** @private */
|
||||
readonly cscInstallerKeyPassword?: string | null;
|
||||
/**
|
||||
* Extra files to put in archive. Not applicable for `tar.*`.
|
||||
*/
|
||||
readonly extraDistFiles?: Array<string> | string | null;
|
||||
/**
|
||||
* Whether your app has to be signed with hardened runtime.
|
||||
* @default true
|
||||
*/
|
||||
readonly hardenedRuntime?: boolean;
|
||||
/**
|
||||
* Whether to let electron-osx-sign validate the signing or not.
|
||||
* @default false
|
||||
*/
|
||||
readonly gatekeeperAssess?: boolean;
|
||||
/**
|
||||
* Whether to let electron-osx-sign verify the contents or not.
|
||||
* @default true
|
||||
*/
|
||||
readonly strictVerify?: Array<string> | string | boolean;
|
||||
/**
|
||||
* Regex or an array of regex's that signal skipping signing a file.
|
||||
*/
|
||||
readonly signIgnore?: Array<string> | string | null;
|
||||
}
|
||||
export interface DmgOptions extends TargetSpecificOptions {
|
||||
/**
|
||||
* The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.
|
||||
* If background is not specified, use `window.size`. Default locations expected background size to be 540x380.
|
||||
* @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).
|
||||
*/
|
||||
background?: string | null;
|
||||
/**
|
||||
* The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.
|
||||
*/
|
||||
backgroundColor?: string | null;
|
||||
/**
|
||||
* The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
|
||||
* Defaults to the application icon (`build/icon.icns`).
|
||||
*/
|
||||
icon?: string | null;
|
||||
/**
|
||||
* The size of all the icons inside the DMG.
|
||||
* @default 80
|
||||
*/
|
||||
readonly iconSize?: number | null;
|
||||
/**
|
||||
* The size of all the icon texts inside the DMG.
|
||||
* @default 12
|
||||
*/
|
||||
readonly iconTextSize?: number | null;
|
||||
/**
|
||||
* The title of the produced DMG, which will be shown when mounted (volume name).
|
||||
*
|
||||
* Macro `${productName}`, `${version}` and `${name}` are supported.
|
||||
* @default ${productName} ${version}
|
||||
*/
|
||||
readonly title?: string | null;
|
||||
/**
|
||||
* The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.
|
||||
*/
|
||||
contents?: Array<DmgContent>;
|
||||
/**
|
||||
* The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).
|
||||
* @default UDZO
|
||||
*/
|
||||
format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO";
|
||||
/**
|
||||
* The DMG window position and size. With y co-ordinates running from bottom to top.
|
||||
*
|
||||
* The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `"x": 0, "y": 100000` as the x, y co-ordinates.
|
||||
* It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.
|
||||
*/
|
||||
window?: DmgWindow;
|
||||
/**
|
||||
* Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).
|
||||
* @default false
|
||||
*/
|
||||
readonly internetEnabled?: boolean;
|
||||
/**
|
||||
* Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.
|
||||
* @default false
|
||||
*/
|
||||
readonly sign?: boolean;
|
||||
/**
|
||||
* @private
|
||||
* @default true
|
||||
*/
|
||||
writeUpdateInfo?: boolean;
|
||||
}
|
||||
export interface DmgWindow {
|
||||
/**
|
||||
* The X position relative to left of the screen.
|
||||
* @default 400
|
||||
*/
|
||||
x?: number;
|
||||
/**
|
||||
* The Y position relative to bottom of the screen.
|
||||
* @default 100
|
||||
*/
|
||||
y?: number;
|
||||
/**
|
||||
* The width. Defaults to background image width or 540.
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The height. Defaults to background image height or 380.
|
||||
*/
|
||||
height?: number;
|
||||
}
|
||||
export interface DmgContent {
|
||||
/**
|
||||
* The device-independent pixel offset from the left of the window to the **center** of the icon.
|
||||
*/
|
||||
x: number;
|
||||
/**
|
||||
* The device-independent pixel offset from the top of the window to the **center** of the icon.
|
||||
*/
|
||||
y: number;
|
||||
type?: "link" | "file" | "dir";
|
||||
/**
|
||||
* The name of the file within the DMG. Defaults to basename of `path`.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The path of the file within the DMG.
|
||||
*/
|
||||
path?: string;
|
||||
}
|
||||
export interface MasConfiguration extends MacConfiguration {
|
||||
/**
|
||||
* The path to entitlements file for signing the app. `build/entitlements.mas.plist` will be used if exists (it is a recommended way to set).
|
||||
* Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist).
|
||||
*/
|
||||
readonly entitlements?: string | null;
|
||||
/**
|
||||
* The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mas.inherit.plist` will be used if exists (it is a recommended way to set).
|
||||
* Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist).
|
||||
*/
|
||||
readonly entitlementsInherit?: string | null;
|
||||
/**
|
||||
* Paths of any extra binaries that need to be signed.
|
||||
*/
|
||||
readonly binaries?: Array<string> | null;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user