thedesk/app/node_modules/app-builder-lib/out/platformPackager.js.map
2019-09-12 23:38:13 +09:00

2 lines
48 KiB
Plaintext

{"version":3,"sources":["../src/platformPackager.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;AAEM,MAAgB,gBAAhB,CAAgC;AA2BpC,EAAA,WAAA,CAA+B,IAA/B,EAAwD,QAAxD,EAA0E;AAA3C,SAAA,IAAA,GAAA,IAAA;AAAyB,SAAA,QAAA,GAAA,QAAA;AAJvC,SAAA,aAAA,GAAgB,KAAI,eAAJ,EAAwB,MAAM,iCAAiB,wBAAQ,KAAK,IAAL,CAAU,iBAAlB,CAAjB,EAAuD,EAAvD,CAA9B,CAAhB;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C,IAAhC,IAAwC,QAAQ,CAAC,MAAT,CAAgB,gBAAhB,IAAoC,IAAnF;AACD;;AACD,SAAO,KAAP;AACD,C","sourcesContent":["import BluebirdPromise from \"bluebird-lst\"\nimport { Arch, asArray, AsyncTaskManager, debug, DebugLogger, deepAssign, getArchSuffix, InvalidConfigurationError, isEmptyOrSpaces, log, isEnvTrue } from \"builder-util\"\nimport { getArtifactArchName } from \"builder-util/out/arch\"\nimport { FileTransformer, statOrNull } from \"builder-util/out/fs\"\nimport { orIfFileNotExist } from \"builder-util/out/promise\"\nimport { readdir } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport { Minimatch } from \"minimatch\"\nimport * as path from \"path\"\nimport { AppInfo } from \"./appInfo\"\nimport { checkFileInArchive } from \"./asar/asarFileChecker\"\nimport { AsarPackager } from \"./asar/asarUtil\"\nimport { computeData } from \"./asar/integrity\"\nimport { copyFiles, FileMatcher, getFileMatchers, GetFileMatchersOptions, getMainFileMatchers, getNodeModuleFileMatcher } from \"./fileMatcher\"\nimport { createTransformer, isElectronCompileUsed } from \"./fileTransformer\"\nimport { Framework, isElectronBased } from \"./Framework\"\nimport { AfterPackContext, AsarOptions, CompressionLevel, Configuration, ElectronPlatformName, FileAssociation, Packager, PackagerOptions, Platform, PlatformSpecificBuildOptions, Target, TargetSpecificOptions } from \"./index\"\nimport { executeAppBuilderAsJson } from \"./util/appBuilder\"\nimport { computeFileSets, computeNodeModuleFileSets, copyAppFiles, ELECTRON_COMPILE_SHIM_FILENAME, transformFiles } from \"./util/appFileCopier\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander\"\n\nexport abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions> {\n get packagerOptions(): PackagerOptions {\n return this.info.options\n }\n\n get buildResourcesDir(): string {\n return this.info.buildResourcesDir\n }\n\n get projectDir(): string {\n return this.info.projectDir\n }\n\n get config(): Configuration {\n return this.info.config\n }\n\n readonly platformSpecificBuildOptions: DC\n\n get resourceList(): Promise<Array<string>> {\n return this._resourceList.value\n }\n\n private readonly _resourceList = new Lazy<Array<string>>(() => orIfFileNotExist(readdir(this.info.buildResourcesDir), []))\n\n readonly appInfo: AppInfo\n\n protected constructor(readonly info: Packager, readonly platform: Platform) {\n this.platformSpecificBuildOptions = PlatformPackager.normalizePlatformSpecificBuildOptions((this.config as any)[platform.buildConfigurationKey])\n this.appInfo = this.prepareAppInfo(info.appInfo)\n }\n\n get compression(): CompressionLevel {\n const compression = this.platformSpecificBuildOptions.compression\n // explicitly set to null - request to use default value instead of parent (in the config)\n if (compression === null) {\n return \"normal\"\n }\n return compression || this.config.compression || \"normal\"\n }\n\n get debugLogger(): DebugLogger {\n return this.info.debugLogger\n }\n\n abstract get defaultTarget(): Array<string>\n\n protected prepareAppInfo(appInfo: AppInfo) {\n return new AppInfo(this.info, null, this.platformSpecificBuildOptions)\n }\n\n private static normalizePlatformSpecificBuildOptions(options: any | null | undefined): any {\n return options == null ? Object.create(null) : options\n }\n\n abstract createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void\n\n protected getCscPassword(): string {\n const password = this.doGetCscPassword()\n if (isEmptyOrSpaces(password)) {\n log.info({reason: \"CSC_KEY_PASSWORD is not defined\"}, \"empty password will be used for code signing\")\n return \"\"\n }\n else {\n return password!.trim()\n }\n }\n\n protected getCscLink(extraEnvName?: string | null): string | null | undefined {\n // allow to specify as empty string\n const envValue = chooseNotNull(extraEnvName == null ? null : process.env[extraEnvName], process.env.CSC_LINK)\n return chooseNotNull(chooseNotNull(this.info.config.cscLink, this.platformSpecificBuildOptions.cscLink), envValue)\n }\n\n protected doGetCscPassword(): string | null | undefined {\n // allow to specify as empty string\n return chooseNotNull(chooseNotNull(this.info.config.cscKeyPassword, this.platformSpecificBuildOptions.cscKeyPassword), process.env.CSC_KEY_PASSWORD)\n }\n\n protected computeAppOutDir(outDir: string, arch: Arch): string {\n return this.packagerOptions.prepackaged || path.join(outDir, `${this.platform.buildConfigurationKey}${getArchSuffix(arch)}${this.platform === Platform.MAC ? \"\" : \"-unpacked\"}`)\n }\n\n dispatchArtifactCreated(file: string, target: Target | null, arch: Arch | null, safeArtifactName?: string | null): Promise<void> {\n return this.info.callArtifactBuildCompleted({\n file, safeArtifactName, target, arch,\n packager: this,\n })\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<any> {\n const appOutDir = this.computeAppOutDir(outDir, arch)\n await this.doPack(outDir, appOutDir, this.platform.nodeName as ElectronPlatformName, arch, this.platformSpecificBuildOptions, targets)\n this.packageInDistributableFormat(appOutDir, arch, targets, taskManager)\n }\n\n protected packageInDistributableFormat(appOutDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): void {\n if (targets.find(it => !it.isAsyncSupported) == null) {\n PlatformPackager.buildAsyncTargets(targets, taskManager, appOutDir, arch)\n return\n }\n\n taskManager.add(async () => {\n // BluebirdPromise.map doesn't invoke target.build immediately, but for RemoteTarget it is very critical to call build() before finishBuild()\n const subTaskManager = new AsyncTaskManager(this.info.cancellationToken)\n PlatformPackager.buildAsyncTargets(targets, subTaskManager, appOutDir, arch)\n await subTaskManager.awaitTasks()\n\n for (const target of targets) {\n if (!target.isAsyncSupported) {\n await target.build(appOutDir, arch)\n }\n }\n })\n }\n\n private static buildAsyncTargets(targets: Array<Target>, taskManager: AsyncTaskManager, appOutDir: string, arch: Arch) {\n for (const target of targets) {\n if (target.isAsyncSupported) {\n taskManager.addTask(target.build(appOutDir, arch))\n }\n }\n }\n\n private getExtraFileMatchers(isResources: boolean, appOutDir: string, options: GetFileMatchersOptions): Array<FileMatcher> | null {\n const base = isResources ? this.getResourcesDir(appOutDir) : (this.platform === Platform.MAC ? path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\") : appOutDir)\n return getFileMatchers(this.config, isResources ? \"extraResources\" : \"extraFiles\", base, options)\n }\n\n createGetFileMatchersOptions(outDir: string, arch: Arch, customBuildOptions: PlatformSpecificBuildOptions): GetFileMatchersOptions {\n return {\n macroExpander: it => this.expandMacro(it, arch == null ? null : Arch[arch], {\"/*\": \"{,/**/*}\"}),\n customBuildOptions,\n globalOutDir: outDir,\n defaultSrc: this.projectDir,\n }\n }\n\n protected async doPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>) {\n if (this.packagerOptions.prepackaged != null) {\n return\n }\n\n const framework = this.info.framework\n log.info({\n platform: platformName,\n arch: Arch[arch],\n [`${framework.name}`]: framework.version,\n appOutDir: log.filePath(appOutDir),\n }, `packaging`)\n\n await framework.prepareApplicationStageDirectory({\n packager: this,\n appOutDir,\n platformName,\n arch: Arch[arch],\n version: framework.version,\n })\n\n const excludePatterns: Array<Minimatch> = []\n\n const computeParsedPatterns = (patterns: Array<FileMatcher> | null) => {\n if (patterns != null) {\n for (const pattern of patterns) {\n pattern.computeParsedPatterns(excludePatterns, this.info.projectDir)\n }\n }\n }\n\n const getFileMatchersOptions = this.createGetFileMatchersOptions(outDir, arch, platformSpecificBuildOptions)\n const macroExpander = getFileMatchersOptions.macroExpander\n const extraResourceMatchers = this.getExtraFileMatchers(true, appOutDir, getFileMatchersOptions)\n computeParsedPatterns(extraResourceMatchers)\n const extraFileMatchers = this.getExtraFileMatchers(false, appOutDir, getFileMatchersOptions)\n computeParsedPatterns(extraFileMatchers)\n\n const packContext: AfterPackContext = {\n appOutDir, outDir, arch, targets,\n packager: this,\n electronPlatformName: platformName,\n }\n\n const asarOptions = await this.computeAsarOptions(platformSpecificBuildOptions)\n const resourcesPath = this.platform === Platform.MAC ? path.join(appOutDir, framework.distMacOsAppName, \"Contents\", \"Resources\") : (isElectronBased(framework) ? path.join(appOutDir, \"resources\") : appOutDir)\n const taskManager = new AsyncTaskManager(this.info.cancellationToken)\n this.copyAppFiles(taskManager, asarOptions, resourcesPath, path.join(resourcesPath, \"app\"), packContext, platformSpecificBuildOptions, excludePatterns, macroExpander)\n await taskManager.awaitTasks()\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n if (framework.beforeCopyExtraFiles != null) {\n await framework.beforeCopyExtraFiles({\n packager: this,\n appOutDir,\n asarIntegrity: asarOptions == null ? null : await computeData(resourcesPath, asarOptions.externalAllowed ? {externalAllowed: true} : null),\n platformName,\n })\n }\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const transformerForExtraFiles = this.createTransformerForExtraFiles(packContext)\n await copyFiles(extraResourceMatchers, transformerForExtraFiles)\n await copyFiles(extraFileMatchers, transformerForExtraFiles)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n await this.info.afterPack(packContext)\n\n if (framework.afterPack != null) {\n await framework.afterPack(packContext)\n }\n\n const isAsar = asarOptions != null\n await this.sanityCheckPackage(appOutDir, isAsar, framework)\n await this.signApp(packContext, isAsar)\n\n const afterSign = resolveFunction(this.config.afterSign, \"afterSign\")\n if (afterSign != null) {\n await Promise.resolve(afterSign(packContext))\n }\n }\n\n protected createTransformerForExtraFiles(packContext: AfterPackContext): FileTransformer | null {\n return null\n }\n\n private copyAppFiles(taskManager: AsyncTaskManager, asarOptions: AsarOptions | null, resourcePath: string, defaultDestination: string, packContext: AfterPackContext, platformSpecificBuildOptions: DC, excludePatterns: Array<Minimatch>, macroExpander: ((it: string) => string)) {\n const appDir = this.info.appDir\n const config = this.config\n const isElectronCompile = asarOptions != null && isElectronCompileUsed(this.info)\n\n const mainMatchers = getMainFileMatchers(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this, packContext.outDir, isElectronCompile)\n if (excludePatterns.length > 0) {\n for (const matcher of mainMatchers) {\n matcher.excludePatterns = excludePatterns\n }\n }\n\n const framework = this.info.framework\n const transformer = createTransformer(appDir, config, isElectronCompile ? {\n originalMain: this.info.metadata.main,\n main: ELECTRON_COMPILE_SHIM_FILENAME,\n ...config.extraMetadata\n } : config.extraMetadata, framework.createTransformer == null ? null : framework.createTransformer())\n\n const _computeFileSets = (matchers: Array<FileMatcher>) => {\n return computeFileSets(matchers, this.info.isPrepackedAppAsar ? null : transformer, this, isElectronCompile)\n .then(async result => {\n if (!this.info.isPrepackedAppAsar && !this.info.areNodeModulesHandledExternally) {\n const moduleFileMatcher = getNodeModuleFileMatcher(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this.info)\n result = result.concat(await computeNodeModuleFileSets(this, moduleFileMatcher))\n }\n return result.filter(it => it.files.length > 0)\n })\n }\n\n if (this.info.isPrepackedAppAsar) {\n taskManager.addTask(BluebirdPromise.each(_computeFileSets([new FileMatcher(appDir, resourcePath, macroExpander)]), it => copyAppFiles(it, this.info, transformer)))\n }\n else if (asarOptions == null) {\n // for ASAR all asar unpacked files will be extra transformed (e.g. sign of EXE and DLL) later,\n // for prepackaged asar extra transformation not supported yet,\n // so, extra transform if asar is disabled\n const transformerForExtraFiles = this.createTransformerForExtraFiles(packContext)\n const combinedTransformer: FileTransformer = file => {\n if (transformerForExtraFiles != null) {\n const result = transformerForExtraFiles(file)\n if (result != null) {\n return result\n }\n }\n return transformer(file)\n }\n\n taskManager.addTask(BluebirdPromise.each(_computeFileSets(mainMatchers), it => copyAppFiles(it, this.info, combinedTransformer)))\n }\n else {\n const unpackPattern = getFileMatchers(config, \"asarUnpack\", defaultDestination, {\n macroExpander,\n customBuildOptions: platformSpecificBuildOptions,\n globalOutDir: packContext.outDir,\n defaultSrc: appDir,\n })\n const fileMatcher = unpackPattern == null ? null : unpackPattern[0]\n taskManager.addTask(_computeFileSets(mainMatchers)\n .then(async fileSets => {\n for (const fileSet of fileSets) {\n await transformFiles(transformer, fileSet)\n }\n\n await new AsarPackager(appDir, resourcePath, asarOptions, fileMatcher == null ? null : fileMatcher.createFilter())\n .pack(fileSets, this)\n }))\n }\n }\n\n protected signApp(packContext: AfterPackContext, isAsar: boolean): Promise<any> {\n return Promise.resolve()\n }\n\n async getIconPath(): Promise<string | null> {\n return null\n }\n\n private async computeAsarOptions(customBuildOptions: DC): Promise<AsarOptions | null> {\n if (!isElectronBased(this.info.framework)) {\n return null\n }\n\n function errorMessage(name: string) {\n return `${name} is deprecated is deprecated and not supported — please use asarUnpack`\n }\n\n const buildMetadata = this.config as any\n if (buildMetadata[\"asar-unpack\"] != null) {\n throw new Error(errorMessage(\"asar-unpack\"))\n }\n if (buildMetadata[\"asar-unpack-dir\"] != null) {\n throw new Error(errorMessage(\"asar-unpack-dir\"))\n }\n\n const platformSpecific = customBuildOptions.asar\n const result = platformSpecific == null ? this.config.asar : platformSpecific\n if (result === false) {\n const appAsarStat = await statOrNull(path.join(this.info.appDir, \"app.asar\"))\n //noinspection ES6MissingAwait\n if (appAsarStat == null || !appAsarStat.isFile()) {\n log.warn({\n solution: \"enable asar and use asarUnpack to unpack files that must be externally available\",\n }, \"asar using is disabled — it is strongly not recommended\")\n }\n return null\n }\n\n if (result == null || result === true) {\n return {}\n }\n\n for (const name of [\"unpackDir\", \"unpack\"]) {\n if ((result as any)[name] != null) {\n throw new Error(errorMessage(`asar.${name}`))\n }\n }\n return deepAssign({}, result)\n }\n\n public getElectronSrcDir(dist: string): string {\n return path.resolve(this.projectDir, dist)\n }\n\n public getElectronDestinationDir(appOutDir: string): string {\n return appOutDir\n }\n\n getResourcesDir(appOutDir: string): string {\n if (this.platform === Platform.MAC) {\n return this.getMacOsResourcesDir(appOutDir)\n }\n else if (isElectronBased(this.info.framework)) {\n return path.join(appOutDir, \"resources\")\n }\n else {\n return appOutDir\n }\n }\n\n public getMacOsResourcesDir(appOutDir: string): string {\n return path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\", \"Resources\")\n }\n\n private async checkFileInPackage(resourcesDir: string, file: string, messagePrefix: string, isAsar: boolean) {\n const relativeFile = path.relative(this.info.appDir, path.resolve(this.info.appDir, file))\n if (isAsar) {\n await checkFileInArchive(path.join(resourcesDir, \"app.asar\"), relativeFile, messagePrefix)\n return\n }\n\n const pathParsed = path.parse(file)\n // Even when packaging to asar is disabled, it does not imply that the main file can not be inside an .asar archive.\n // This may occur when the packaging is done manually before processing with electron-builder.\n if (pathParsed.dir.includes(\".asar\")) {\n // The path needs to be split to the part with an asar archive which acts like a directory and the part with\n // the path to main file itself. (e.g. path/arch.asar/dir/index.js -> path/arch.asar, dir/index.js)\n // noinspection TypeScriptValidateJSTypes\n const pathSplit: Array<string> = pathParsed.dir.split(path.sep)\n let partWithAsarIndex = 0\n pathSplit.some((pathPart: string, index: number) => {\n partWithAsarIndex = index\n return pathPart.endsWith(\".asar\")\n })\n const asarPath = path.join.apply(path, pathSplit.slice(0, partWithAsarIndex + 1))\n let mainPath = pathSplit.length > (partWithAsarIndex + 1) ? path.join.apply(pathSplit.slice(partWithAsarIndex + 1)) : \"\"\n mainPath += path.join(mainPath, pathParsed.base)\n await checkFileInArchive(path.join(resourcesDir, \"app\", asarPath), mainPath, messagePrefix)\n }\n else {\n const fullPath = path.join(resourcesDir, \"app\", relativeFile)\n const outStat = await statOrNull(fullPath)\n if (outStat == null) {\n throw new Error(`${messagePrefix} \"${fullPath}\" does not exist. Seems like a wrong configuration.`)\n }\n else {\n //noinspection ES6MissingAwait\n if (!outStat.isFile()) {\n throw new Error(`${messagePrefix} \"${fullPath}\" is not a file. Seems like a wrong configuration.`)\n }\n }\n }\n }\n\n private async sanityCheckPackage(appOutDir: string, isAsar: boolean, framework: Framework): Promise<any> {\n const outStat = await statOrNull(appOutDir)\n if (outStat == null) {\n throw new Error(`Output directory \"${appOutDir}\" does not exist. Seems like a wrong configuration.`)\n }\n else {\n //noinspection ES6MissingAwait\n if (!outStat.isDirectory()) {\n throw new Error(`Output directory \"${appOutDir}\" is not a directory. Seems like a wrong configuration.`)\n }\n }\n\n const resourcesDir = this.getResourcesDir(appOutDir)\n const mainFile = (framework.getMainFile == null ? null : framework.getMainFile(this.platform)) || this.info.metadata.main || \"index.js\"\n await this.checkFileInPackage(resourcesDir, mainFile, \"Application entry file\", isAsar)\n await this.checkFileInPackage(resourcesDir, \"package.json\", \"Application\", isAsar)\n }\n\n // tslint:disable-next-line:no-invalid-template-strings\n computeSafeArtifactName(suggestedName: string | null, ext: string, arch?: Arch | null, skipArchIfX64 = true, safePattern: string = \"${name}-${version}-${arch}.${ext}\"): string | null {\n return computeSafeArtifactNameIfNeeded(suggestedName, () => this.computeArtifactName(safePattern, ext, skipArchIfX64 && arch === Arch.x64 ? null : arch))\n }\n\n expandArtifactNamePattern(targetSpecificOptions: TargetSpecificOptions | null | undefined, ext: string, arch?: Arch | null, defaultPattern?: string, skipArchIfX64 = true): string {\n let pattern = targetSpecificOptions == null ? null : targetSpecificOptions.artifactName\n if (pattern == null) {\n pattern = this.platformSpecificBuildOptions.artifactName || this.config.artifactName\n }\n\n if (pattern == null) {\n // tslint:disable-next-line:no-invalid-template-strings\n pattern = defaultPattern || \"${productName}-${version}-${arch}.${ext}\"\n }\n else {\n // https://github.com/electron-userland/electron-builder/issues/3510\n // always respect arch in user custom artifact pattern\n skipArchIfX64 = false\n }\n return this.computeArtifactName(pattern, ext, skipArchIfX64 && arch === Arch.x64 ? null : arch)\n }\n\n expandArtifactBeautyNamePattern(targetSpecificOptions: TargetSpecificOptions | null | undefined, ext: string, arch?: Arch | null): string {\n // tslint:disable-next-line:no-invalid-template-strings\n return this.expandArtifactNamePattern(targetSpecificOptions, ext, arch, \"${productName} ${version} ${arch}.${ext}\", true)\n }\n\n private computeArtifactName(pattern: any, ext: string, arch: Arch | null | undefined): string {\n const archName = arch == null ? null : getArtifactArchName(arch, ext)\n return this.expandMacro(pattern, this.platform === Platform.MAC ? null : archName, {\n ext\n })\n }\n\n expandMacro(pattern: string, arch?: string | null, extra: any = {}, isProductNameSanitized = true): string {\n return doExpandMacro(pattern, arch, this.appInfo, {os: this.platform.buildConfigurationKey, ...extra}, isProductNameSanitized)\n }\n\n generateName2(ext: string | null, classifier: string | null | undefined, deployment: boolean): string {\n const dotExt = ext == null ? \"\" : `.${ext}`\n const separator = ext === \"deb\" ? \"_\" : \"-\"\n return `${deployment ? this.appInfo.name : this.appInfo.productFilename}${separator}${this.appInfo.version}${classifier == null ? \"\" : `${separator}${classifier}`}${dotExt}`\n }\n\n getTempFile(suffix: string): Promise<string> {\n return this.info.tempDirManager.getTempFile({suffix})\n }\n\n get fileAssociations(): Array<FileAssociation> {\n return asArray(this.config.fileAssociations).concat(asArray(this.platformSpecificBuildOptions.fileAssociations))\n }\n\n async getResource(custom: string | null | undefined, ...names: Array<string>): Promise<string | null> {\n const resourcesDir = this.info.buildResourcesDir\n if (custom === undefined) {\n const resourceList = await this.resourceList\n for (const name of names) {\n if (resourceList.includes(name)) {\n return path.join(resourcesDir, name)\n }\n }\n }\n else if (custom != null && !isEmptyOrSpaces(custom)) {\n const resourceList = await this.resourceList\n if (resourceList.includes(custom)) {\n return path.join(resourcesDir, custom)\n }\n\n let p = path.resolve(resourcesDir, custom)\n if (await statOrNull(p) == null) {\n p = path.resolve(this.projectDir, custom)\n if (await statOrNull(p) == null) {\n throw new InvalidConfigurationError(`cannot find specified resource \"${custom}\", nor relative to \"${resourcesDir}\", neither relative to project dir (\"${this.projectDir}\")`)\n }\n }\n return p\n }\n return null\n }\n\n get forceCodeSigning(): boolean {\n const forceCodeSigningPlatform = this.platformSpecificBuildOptions.forceCodeSigning\n return (forceCodeSigningPlatform == null ? this.config.forceCodeSigning : forceCodeSigningPlatform) || false\n }\n\n protected async getOrConvertIcon(format: IconFormat): Promise<string | null> {\n const result = await this.resolveIcon(asArray(this.platformSpecificBuildOptions.icon || this.config.icon), [], format)\n if (result.length === 0) {\n const framework = this.info.framework\n if (framework.getDefaultIcon != null) {\n return framework.getDefaultIcon(this.platform)\n }\n\n log.warn({reason: \"application icon is not set\"}, `default ${capitalizeFirstLetter(framework.name)} icon is used`)\n return this.getDefaultFrameworkIcon()\n }\n else {\n return result[0].file\n }\n }\n\n getDefaultFrameworkIcon(): string | null {\n const framework = this.info.framework\n return framework.getDefaultIcon == null ? null : framework.getDefaultIcon(this.platform)\n }\n\n // convert if need, validate size (it is a reason why tool is called even if file has target extension (already specified as foo.icns for example))\n async resolveIcon(sources: Array<string>, fallbackSources: Array<string>, outputFormat: IconFormat): Promise<Array<IconInfo>> {\n const args = [\n \"icon\",\n \"--format\", outputFormat,\n \"--root\", this.buildResourcesDir,\n \"--root\", this.projectDir,\n \"--out\", path.resolve(this.projectDir, this.config.directories!!.output!!, `.icon-${outputFormat}`),\n ]\n for (const source of sources) {\n args.push(\"--input\", source)\n }\n for (const source of fallbackSources) {\n args.push(\"--fallback-input\", source)\n }\n\n const result: IconConvertResult = await executeAppBuilderAsJson(args)\n const errorMessage = result.error\n if (errorMessage != null) {\n throw new InvalidConfigurationError(errorMessage, result.errorCode)\n }\n\n if (result.isFallback) {\n log.warn({reason: \"application icon is not set\"}, `default ${capitalizeFirstLetter(this.info.framework.name)} icon is used`)\n }\n\n return result.icons || []\n }\n}\n\nexport interface IconInfo {\n file: string\n size: number\n}\n\ninterface IconConvertResult {\n icons?: Array<IconInfo>\n\n error?: string\n errorCode?: string\n isFallback?: boolean\n}\n\nexport type IconFormat = \"icns\" | \"ico\" | \"set\"\n\nexport function isSafeGithubName(name: string) {\n return /^[0-9A-Za-z._-]+$/.test(name)\n}\n\nexport function computeSafeArtifactNameIfNeeded(suggestedName: string | null, safeNameProducer: () => string): string | null {\n // GitHub only allows the listed characters in file names.\n if (suggestedName != null) {\n if (isSafeGithubName(suggestedName)) {\n return null\n }\n\n // prefer to use suggested name - so, if space is the only problem, just replace only space to dash\n suggestedName = suggestedName.replace(/ /g, \"-\")\n if (isSafeGithubName(suggestedName)) {\n return suggestedName\n }\n }\n\n return safeNameProducer()\n}\n\n// remove leading dot\nexport function normalizeExt(ext: string) {\n return ext.startsWith(\".\") ? ext.substring(1) : ext\n}\n\nexport function resolveFunction<T>(executor: T | string, name: string): T {\n if (executor == null || typeof executor !== \"string\") {\n return executor\n }\n\n let p = executor as string\n if (p.startsWith(\".\")) {\n p = path.resolve(p)\n }\n\n try {\n p = require.resolve(p)\n }\n catch (e) {\n debug(e)\n p = path.resolve(p)\n }\n\n const m = require(p)\n const namedExport = m[name]\n if (namedExport == null) {\n return m.default || m\n }\n else {\n return namedExport\n }\n}\n\nexport function chooseNotNull(v1: string | null | undefined, v2: string | null | undefined): string | null | undefined {\n return v1 == null ? v2 : v1\n}\n\nfunction capitalizeFirstLetter(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1)\n}\n\nexport function isSafeToUnpackElectronOnRemoteBuildServer(packager: PlatformPackager<any>) {\n if (packager.platform !== Platform.LINUX || packager.config.remoteBuild === false) {\n return false\n }\n\n if (process.platform === \"win32\" || isEnvTrue(process.env._REMOTE_BUILD)) {\n return packager.config.electronDist == null && packager.config.electronDownload == null\n }\n return false\n}"],"sourceRoot":""}