Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async generateDefaults () {
const [pkg, size, electronVersion] = await Promise.all([
(async () => (await common.readMetadata(this.userSupplied)) || {})(),
fsize(this.userSupplied.src),
common.readElectronVersion(this.userSupplied.src)
])
this.defaults = Object.assign(common.getDefaultsFromPackageJSON(pkg), {
version: transformVersion(pkg.version || '0.0.0'),
section: 'utils',
priority: 'optional',
size: Math.ceil((size || 0) / 1024),
maintainer: this.getMaintainer(pkg.author),
icon: path.resolve(__dirname, '../resources/icon.png'),
lintianOverrides: []
}, debianDependencies.forElectron(electronVersion))
return this.defaults
}
async generateDefaults () {
const electronVersion = await common.readElectronVersion(this.userSupplied.src)
const [pkg, requires] = await Promise.all([
(async () => (await common.readMetadata(this.userSupplied)) || {})(),
redhatDependencies.forElectron(electronVersion, this.userSupplied.logger)
])
this.defaults = {
...common.getDefaultsFromPackageJSON(pkg, { revision: 1 }),
version: pkg.version || '0.0.0',
license: pkg.license,
compressionLevel: 2,
icon: path.resolve(__dirname, '../resources/icon.png'),
pre: undefined,
post: undefined,
preun: undefined,
postun: undefined,
...requires
}
return this.defaults
}
async generateDefaults () {
const pkg = (await common.readMetadata(this.userSupplied)) || {}
const authors = pkg.author ? [typeof pkg.author === 'string' ? parseAuthor(pkg.author).name : pkg.author.name] : undefined
this.defaults = Object.assign(common.getDefaultsFromPackageJSON(pkg), {
version: pkg.version || '0.0.0',
copyright: pkg.copyright || (authors && `Copyright \u00A9 ${new Date().getFullYear()} ${authors.join(', ')}`),
authors: authors,
owners: authors,
exe: pkg.name ? `${pkg.name}.exe` : 'electron.exe',
icon: path.resolve(__dirname, '../resources/icon.ico'),
animation: path.resolve(__dirname, '../resources/animation.gif'),
iconUrl: undefined,
tags: [],
certificateFile: undefined,
certificatePassword: undefined,