Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await this.ensureDirectory(outPath);
const winstallerConfig: ElectronWinstallerOptions = {
name: packageJSON.name,
title: appName,
noMsi: true,
exe: `${appName}.exe`,
setupExe: `${appName}-${packageJSON.version} Setup.exe`,
...this.config,
appDirectory: dir,
outputDirectory: outPath,
};
await createWindowsInstaller(winstallerConfig);
const nupkgVersion = convertVersion(packageJSON.version);
const artifacts = [
path.resolve(outPath, 'RELEASES'),
path.resolve(outPath, winstallerConfig.setupExe || `${appName}Setup.exe`),
path.resolve(outPath, `${winstallerConfig.name}-${nupkgVersion}-full.nupkg`),
];
const deltaPath = path.resolve(outPath, `${winstallerConfig.name}-${nupkgVersion}-delta.nupkg`);
if (winstallerConfig.remoteReleases || await fs.pathExists(deltaPath)) {
artifacts.push(deltaPath);
}
const msiPath = path.resolve(outPath, winstallerConfig.setupMsi || `${appName}Setup.msi`);
if (!winstallerConfig.noMsi && await fs.pathExists(msiPath)) {
artifacts.push(msiPath);
}
return artifacts;
}