src/installer.js
/**
   * Get the hash of default options for the installer. Some come from the info
   * read from `package.json`, and some are hardcoded.
   */
Get the hash of default options for the installer. Some come from the info
read from `package.json`, and some are hardcoded.
Get the hash of default options for the installer . Some come from the info read from ` package . json ` and some are hardcoded .
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 [ 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 }
Get the hash of default options for the installer.
Get the hash of default options for the installer .