flush()

in electron-installer/pack.js [72:125]


        flush(callback) {
            config = config || Object.create(null);
            config.macOS = config.macOS || Object.create(null);

            const options = {
                overwrite: true,
                platform: toPackagerPlatform(buildTarget.platform),
                arch: toPackagerArch(buildTarget.arch),
                out: buildInfos.paths.intermediateDir,
                tmpdir: buildInfos.paths.intermediateDir,
                dir: tempDir,

                // Configurable
                asar: config.asar,
                icon: config.icon,
                appCopyright: buildInfos.copyright,
                appVersion: buildInfos.buildNumber,
                executableName: buildInfos.executableName,
                name: buildInfos.productName,

                // macOS
                appBundleId: config.macOS.appBundleId,
                appCategoryType: config.macOS.appCategoryType,
                helperBundleId: config.macOS.helperBundleId,

                // Windows
                win32metadata: {
                    CompanyName: packageJson.author,
                    ProductName: buildInfos.productName,
                    OriginalFilename: buildInfos.executableName,
                    FileDescription: packageJson.description,
                    InternalName: packageJson.name
                }
            };

            packager(options).then(
                /** @param {Array.<string>} packagePaths */
                (packagePaths) => {
                    for (const packagePath of packagePaths) {
                        if (config.output === "files") {
                            glob.sync(path.join(packagePath, "**", "*"), { dot: true, stats: false, onlyFiles: false })
                                .forEach(
                                    /** @param {string} filePath */
                                    (filePath) => this.push(vinyl(filePath, packagePath)));

                        } else {
                            this.push(vinyl(packagePath));
                        }
                    }

                    callback();
                },
                (reason) => callback(reason));
        },