Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const appInfo = packager.appInfo
const projectUrl = await appInfo.computePackageUrl()
const appName = this.appName
const options: SquirrelOptions = {
name: appName,
productName: this.options.name || appInfo.productName,
appId: this.options.useAppIdAsId ? appInfo.id : appName,
version: appInfo.version,
description: appInfo.description,
// better to explicitly set to empty string, to avoid any nugget errors
authors: appInfo.companyName || "",
iconUrl,
extraMetadataSpecs: projectUrl == null ? null : `\n ${projectUrl}`,
copyright: appInfo.copyright,
packageCompressionLevel: parseInt((process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL || packager.compression === "store" ? 0 : 9) as any, 10),
vendorPath: await getBinFromUrl("Squirrel.Windows", "1.9.0", "zJHk4CMATM7jHJ2ojRH1n3LkOnaIezDk5FAzJmlSEQSiEdRuB4GGLCegLDtsRCakfHIVfKh3ysJHLjynPkXwhQ=="),
...this.options as any,
}
if (isEmptyOrSpaces(options.description)) {
options.description = options.productName
}
if (options.remoteToken == null) {
options.remoteToken = process.env.GH_TOKEN || process.env.GITHUB_TOKEN
}
if (!("loadingGif" in options)) {
const resourceList = await packager.resourceList
if (resourceList.includes("install-spinner.gif")) {
options.loadingGif = path.join(packager.buildResourcesDir, "install-spinner.gif")
}