Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function packageAppAsync(signed) {
await checkNativeModulesVersionAsync();
let [xdeVersion, electronVersion] = await Promise.all([
JsonFile.getAsync(path.join(XDE_ROOT, 'package.json'), 'version'),
getElectronVersionAsync(),
]);
let iconPath = path.join(XDE_ROOT, 'dev/xde.icns');
let appPath = await electronPackager.promise({
dir: path.resolve(__dirname, '..'),
name: APP_NAME,
platform: PLATFORM,
arch: ARCH,
version: electronVersion,
'app-bundle-id': APP_BUNDLE_ID,
'app-copyright': `Copyright (c) ${new Date().getFullYear()} Exponent`,
'build-version': xdeVersion,
icon: iconPath,
ignore: [/^\/src(\/|$)/, /^\/\.babelrc$/],
overwrite: true,
prune: true,
'osx-sign': signed ? { identity: CODE_SIGNING_IDENTITY } : null,
// sign: signed ? CODE_SIGNING_IDENTITY : null,
});