From e154cc507ec336ef9874fd3e2c03fc8872c7ace9 Mon Sep 17 00:00:00 2001 From: M_Viper Date: Thu, 22 Oct 2026 09:13:46 +0000 Subject: [PATCH] Delete 100 files via Git Manager GUI --- .../osx-sign/bin/electron-osx-sign.js | 46 --- .../@electron/osx-sign/dist/cjs/flat.d.ts | 15 - .../@electron/osx-sign/dist/cjs/flat.js | 179 --------- .../@electron/osx-sign/dist/cjs/flat.js.map | 1 - .../@electron/osx-sign/dist/cjs/index.d.ts | 5 - .../@electron/osx-sign/dist/cjs/index.js | 39 -- .../@electron/osx-sign/dist/cjs/index.js.map | 1 - .../@electron/osx-sign/dist/cjs/sign.d.ts | 15 - .../@electron/osx-sign/dist/cjs/sign.js | 377 ------------------ .../@electron/osx-sign/dist/cjs/sign.js.map | 1 - .../@electron/osx-sign/dist/cjs/types.d.ts | 258 ------------ .../@electron/osx-sign/dist/cjs/types.js | 3 - .../@electron/osx-sign/dist/cjs/types.js.map | 1 - .../osx-sign/dist/cjs/util-entitlements.d.ts | 17 - .../osx-sign/dist/cjs/util-entitlements.js | 133 ------ .../dist/cjs/util-entitlements.js.map | 1 - .../osx-sign/dist/cjs/util-identities.d.ts | 6 - .../osx-sign/dist/cjs/util-identities.js | 35 -- .../osx-sign/dist/cjs/util-identities.js.map | 1 - .../dist/cjs/util-provisioning-profiles.d.ts | 25 -- .../dist/cjs/util-provisioning-profiles.js | 148 ------- .../cjs/util-provisioning-profiles.js.map | 1 - .../@electron/osx-sign/dist/cjs/util.d.ts | 36 -- .../@electron/osx-sign/dist/cjs/util.js | 183 --------- .../@electron/osx-sign/dist/cjs/util.js.map | 1 - .../@electron/osx-sign/dist/esm/flat.d.ts | 15 - .../@electron/osx-sign/dist/esm/flat.js | 151 ------- .../@electron/osx-sign/dist/esm/flat.js.map | 1 - .../@electron/osx-sign/dist/esm/index.d.ts | 5 - .../@electron/osx-sign/dist/esm/index.js | 16 - .../@electron/osx-sign/dist/esm/index.js.map | 1 - .../@electron/osx-sign/dist/esm/sign.d.ts | 15 - .../@electron/osx-sign/dist/esm/sign.js | 346 ---------------- .../@electron/osx-sign/dist/esm/sign.js.map | 1 - .../@electron/osx-sign/dist/esm/types.d.ts | 258 ------------ .../@electron/osx-sign/dist/esm/types.js | 2 - .../@electron/osx-sign/dist/esm/types.js.map | 1 - .../osx-sign/dist/esm/util-entitlements.d.ts | 17 - .../osx-sign/dist/esm/util-entitlements.js | 106 ----- .../dist/esm/util-entitlements.js.map | 1 - .../osx-sign/dist/esm/util-identities.d.ts | 6 - .../osx-sign/dist/esm/util-identities.js | 30 -- .../osx-sign/dist/esm/util-identities.js.map | 1 - .../dist/esm/util-provisioning-profiles.d.ts | 25 -- .../dist/esm/util-provisioning-profiles.js | 115 ------ .../esm/util-provisioning-profiles.js.map | 1 - .../@electron/osx-sign/dist/esm/util.d.ts | 36 -- .../@electron/osx-sign/dist/esm/util.js | 146 ------- .../@electron/osx-sign/dist/esm/util.js.map | 1 - .../entitlements/default.darwin.gpu.plist | 8 - .../entitlements/default.darwin.plist | 20 - .../entitlements/default.darwin.plugin.plist | 10 - .../default.darwin.renderer.plist | 8 - .../entitlements/default.mas.child.plist | 10 - .../osx-sign/entitlements/default.mas.plist | 22 - node_modules/@electron/osx-sign/package.json | 80 ---- node_modules/@electron/rebuild/LICENSE | 21 - node_modules/@electron/rebuild/README.md | 202 ---------- node_modules/@electron/rebuild/lib/arch.d.ts | 16 - node_modules/@electron/rebuild/lib/arch.js | 29 -- .../@electron/rebuild/lib/arch.js.map | 1 - node_modules/@electron/rebuild/lib/cache.d.ts | 14 - node_modules/@electron/rebuild/lib/cache.js | 153 ------- .../@electron/rebuild/lib/cache.js.map | 1 - .../@electron/rebuild/lib/clang-fetcher.d.ts | 4 - .../@electron/rebuild/lib/clang-fetcher.js | 105 ----- .../rebuild/lib/clang-fetcher.js.map | 1 - node_modules/@electron/rebuild/lib/cli.d.ts | 2 - node_modules/@electron/rebuild/lib/cli.js | 198 --------- node_modules/@electron/rebuild/lib/cli.js.map | 1 - .../@electron/rebuild/lib/constants.d.ts | 1 - .../@electron/rebuild/lib/constants.js | 4 - .../@electron/rebuild/lib/constants.js.map | 1 - .../@electron/rebuild/lib/detect-libc.d.ts | 8 - .../@electron/rebuild/lib/detect-libc.js | 24 -- .../@electron/rebuild/lib/detect-libc.js.map | 1 - .../rebuild/lib/electron-locator.d.ts | 1 - .../@electron/rebuild/lib/electron-locator.js | 31 -- .../rebuild/lib/electron-locator.js.map | 1 - .../@electron/rebuild/lib/fetcher.d.ts | 1 - node_modules/@electron/rebuild/lib/fetcher.js | 27 -- .../@electron/rebuild/lib/fetcher.js.map | 1 - node_modules/@electron/rebuild/lib/main.d.ts | 2 - node_modules/@electron/rebuild/lib/main.js | 3 - .../@electron/rebuild/lib/main.js.map | 1 - .../rebuild/lib/module-rebuilder.d.ts | 34 -- .../@electron/rebuild/lib/module-rebuilder.js | 132 ------ .../rebuild/lib/module-rebuilder.js.map | 1 - .../rebuild/lib/module-type/index.d.ts | 22 - .../rebuild/lib/module-type/index.js | 68 ---- .../rebuild/lib/module-type/index.js.map | 1 - .../lib/module-type/node-gyp/node-gyp.d.ts | 6 - .../lib/module-type/node-gyp/node-gyp.js | 125 ------ .../lib/module-type/node-gyp/node-gyp.js.map | 1 - .../lib/module-type/node-gyp/worker.d.ts | 1 - .../lib/module-type/node-gyp/worker.js | 32 -- .../lib/module-type/node-gyp/worker.js.map | 1 - .../rebuild/lib/module-type/node-pre-gyp.d.ts | 10 - .../rebuild/lib/module-type/node-pre-gyp.js | 110 ----- .../lib/module-type/node-pre-gyp.js.map | 1 - 100 files changed, 4383 deletions(-) delete mode 100644 node_modules/@electron/osx-sign/bin/electron-osx-sign.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/flat.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/flat.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/flat.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/index.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/index.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/index.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/sign.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/sign.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/sign.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/types.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/types.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/types.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-entitlements.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-entitlements.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-entitlements.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-identities.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-identities.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-identities.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util.js delete mode 100644 node_modules/@electron/osx-sign/dist/cjs/util.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/flat.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/flat.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/flat.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/index.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/index.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/index.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/sign.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/sign.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/sign.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/types.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/types.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/types.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-entitlements.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-entitlements.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-entitlements.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-identities.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-identities.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-identities.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js.map delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util.d.ts delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util.js delete mode 100644 node_modules/@electron/osx-sign/dist/esm/util.js.map delete mode 100644 node_modules/@electron/osx-sign/entitlements/default.darwin.gpu.plist delete mode 100644 node_modules/@electron/osx-sign/entitlements/default.darwin.plist delete mode 100644 node_modules/@electron/osx-sign/entitlements/default.darwin.plugin.plist delete mode 100644 node_modules/@electron/osx-sign/entitlements/default.darwin.renderer.plist delete mode 100644 node_modules/@electron/osx-sign/entitlements/default.mas.child.plist delete mode 100644 node_modules/@electron/osx-sign/entitlements/default.mas.plist delete mode 100644 node_modules/@electron/osx-sign/package.json delete mode 100644 node_modules/@electron/rebuild/LICENSE delete mode 100644 node_modules/@electron/rebuild/README.md delete mode 100644 node_modules/@electron/rebuild/lib/arch.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/arch.js delete mode 100644 node_modules/@electron/rebuild/lib/arch.js.map delete mode 100644 node_modules/@electron/rebuild/lib/cache.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/cache.js delete mode 100644 node_modules/@electron/rebuild/lib/cache.js.map delete mode 100644 node_modules/@electron/rebuild/lib/clang-fetcher.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/clang-fetcher.js delete mode 100644 node_modules/@electron/rebuild/lib/clang-fetcher.js.map delete mode 100644 node_modules/@electron/rebuild/lib/cli.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/cli.js delete mode 100644 node_modules/@electron/rebuild/lib/cli.js.map delete mode 100644 node_modules/@electron/rebuild/lib/constants.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/constants.js delete mode 100644 node_modules/@electron/rebuild/lib/constants.js.map delete mode 100644 node_modules/@electron/rebuild/lib/detect-libc.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/detect-libc.js delete mode 100644 node_modules/@electron/rebuild/lib/detect-libc.js.map delete mode 100644 node_modules/@electron/rebuild/lib/electron-locator.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/electron-locator.js delete mode 100644 node_modules/@electron/rebuild/lib/electron-locator.js.map delete mode 100644 node_modules/@electron/rebuild/lib/fetcher.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/fetcher.js delete mode 100644 node_modules/@electron/rebuild/lib/fetcher.js.map delete mode 100644 node_modules/@electron/rebuild/lib/main.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/main.js delete mode 100644 node_modules/@electron/rebuild/lib/main.js.map delete mode 100644 node_modules/@electron/rebuild/lib/module-rebuilder.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/module-rebuilder.js delete mode 100644 node_modules/@electron/rebuild/lib/module-rebuilder.js.map delete mode 100644 node_modules/@electron/rebuild/lib/module-type/index.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/module-type/index.js delete mode 100644 node_modules/@electron/rebuild/lib/module-type/index.js.map delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js.map delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js.map delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.d.ts delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js delete mode 100644 node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js.map diff --git a/node_modules/@electron/osx-sign/bin/electron-osx-sign.js b/node_modules/@electron/osx-sign/bin/electron-osx-sign.js deleted file mode 100644 index 95234db..0000000 --- a/node_modules/@electron/osx-sign/bin/electron-osx-sign.js +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs'); -const path = require('path'); -const args = require('minimist')(process.argv.slice(2), { - string: [ - 'signature-flags' - ], - boolean: [ - 'help', - 'pre-auto-entitlements', - 'pre-embed-provisioning-profile', - 'hardened-runtime', - 'restrict' - ], - default: { - 'pre-auto-entitlements': true, - 'pre-embed-provisioning-profile': true - } -}); -const usage = fs.readFileSync(path.join(__dirname, 'electron-osx-sign-usage.txt')).toString(); -const sign = require('../').sign; - -args.app = args._.shift(); -args.binaries = args._; - -if (!args.app || args.help) { - console.log(usage); - process.exit(0); -} - -// Remove excess arguments -delete args._; -delete args.help; - -sign(args, function done (err) { - if (err) { - console.error('Sign failed:'); - if (err.message) console.error(err.message); - else if (err.stack) console.error(err.stack); - else console.log(err); - process.exit(1); - } - console.log('Application signed:', args.app); - process.exit(0); -}); diff --git a/node_modules/@electron/osx-sign/dist/cjs/flat.d.ts b/node_modules/@electron/osx-sign/dist/cjs/flat.d.ts deleted file mode 100644 index 1736e46..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/flat.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { FlatOptions } from './types'; -/** - * Generates a flat `.pkg` installer for a packaged Electron `.app` bundle. - * @returns A void Promise once the flattening operation is complete. - * - * @category Flat - */ -export declare function buildPkg(_opts: FlatOptions): Promise; -/** - * This function is exported with normal callback implementation. - * - * @deprecated Please use the Promise-based {@link flatAsync} method instead. - * @category Flat - */ -export declare const flat: (opts: FlatOptions, cb?: ((error?: Error) => void) | undefined) => void; diff --git a/node_modules/@electron/osx-sign/dist/cjs/flat.js b/node_modules/@electron/osx-sign/dist/cjs/flat.js deleted file mode 100644 index cd53b25..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/flat.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.flat = exports.buildPkg = void 0; -const path = __importStar(require("path")); -const util_1 = require("./util"); -const util_identities_1 = require("./util-identities"); -const pkgVersion = require('../../package.json').version; -/** - * This function returns a promise validating all options passed in opts. - * @function - * @param {Object} opts - Options. - * @returns {Promise} Promise. - */ -async function validateFlatOpts(opts) { - await (0, util_1.validateOptsApp)(opts); - let pkg = opts.pkg; - if (pkg) { - if (typeof pkg !== 'string') - throw new Error('`pkg` must be a string.'); - if (path.extname(pkg) !== '.pkg') { - throw new Error('Extension of output package must be `.pkg`.'); - } - } - else { - (0, util_1.debugWarn)('No `pkg` passed in arguments, will fallback to default inferred from the given application.'); - pkg = path.join(path.dirname(opts.app), path.basename(opts.app, '.app') + '.pkg'); - } - let install = opts.install; - if (install) { - if (typeof install !== 'string') { - return Promise.reject(new Error('`install` must be a string.')); - } - } - else { - (0, util_1.debugWarn)('No `install` passed in arguments, will fallback to default `/Applications`.'); - install = '/Applications'; - } - if (typeof opts.scripts === 'string' && opts.platform === 'mas') { - (0, util_1.debugWarn)('Mac App Store packages cannot have `scripts`, ignoring option.'); - } - return Object.assign(Object.assign({}, opts), { pkg, - install, platform: await (0, util_1.validateOptsPlatform)(opts) }); -} -/** - * This function returns a promise flattening the application. - * @param opts - Options for building the .pkg archive - */ -async function buildApplicationPkg(opts, identity) { - if (opts.platform === 'mas') { - const args = ['--component', opts.app, opts.install, '--sign', identity.name, opts.pkg]; - if (opts.keychain) { - args.unshift('--keychain', opts.keychain); - } - (0, util_1.debugLog)('Flattening Mac App Store package... ' + opts.app); - await (0, util_1.execFileAsync)('productbuild', args); - } - else { - const componentPkgPath = path.join(path.dirname(opts.app), path.basename(opts.app, '.app') + '-component.pkg'); - const pkgbuildArgs = [ - '--install-location', - opts.install, - '--component', - opts.app, - componentPkgPath - ]; - if (opts.scripts) { - pkgbuildArgs.unshift('--scripts', opts.scripts); - } - (0, util_1.debugLog)('Building component package... ' + opts.app); - await (0, util_1.execFileAsync)('pkgbuild', pkgbuildArgs); - const args = ['--package', componentPkgPath, opts.install, '--sign', identity.name, opts.pkg]; - if (opts.keychain) { - args.unshift('--keychain', opts.keychain); - } - (0, util_1.debugLog)('Flattening OS X Installer package... ' + opts.app); - await (0, util_1.execFileAsync)('productbuild', args); - await (0, util_1.execFileAsync)('rm', [componentPkgPath]); - } -} -/** - * Generates a flat `.pkg` installer for a packaged Electron `.app` bundle. - * @returns A void Promise once the flattening operation is complete. - * - * @category Flat - */ -async function buildPkg(_opts) { - (0, util_1.debugLog)('@electron/osx-sign@%s', pkgVersion); - const validatedOptions = await validateFlatOpts(_opts); - let identities = []; - let identityInUse = null; - if (validatedOptions.identity) { - (0, util_1.debugLog)('`identity` passed in arguments.'); - if (validatedOptions.identityValidation === false) { - // Do nothing - } - else { - identities = await (0, util_identities_1.findIdentities)(validatedOptions.keychain || null, validatedOptions.identity); - } - } - else { - (0, util_1.debugWarn)('No `identity` passed in arguments...'); - if (validatedOptions.platform === 'mas') { - (0, util_1.debugLog)('Finding `3rd Party Mac Developer Installer` certificate for flattening app distribution in the Mac App Store...'); - identities = await (0, util_identities_1.findIdentities)(validatedOptions.keychain || null, '3rd Party Mac Developer Installer:'); - } - else { - (0, util_1.debugLog)('Finding `Developer ID Application` certificate for distribution outside the Mac App Store...'); - identities = await (0, util_identities_1.findIdentities)(validatedOptions.keychain || null, 'Developer ID Installer:'); - } - } - if (identities.length > 0) { - // Provisioning profile(s) found - if (identities.length > 1) { - (0, util_1.debugWarn)('Multiple identities found, will use the first discovered.'); - } - else { - (0, util_1.debugLog)('Found 1 identity.'); - } - identityInUse = identities[0]; - } - else { - // No identity found - throw new Error('No identity found for signing.'); - } - (0, util_1.debugLog)('Flattening application...', '\n', '> Application:', validatedOptions.app, '\n', '> Package output:', validatedOptions.pkg, '\n', '> Install path:', validatedOptions.install, '\n', '> Identity:', validatedOptions.identity, '\n', '> Scripts:', validatedOptions.scripts); - await buildApplicationPkg(validatedOptions, identityInUse); - (0, util_1.debugLog)('Application flattened.'); -} -exports.buildPkg = buildPkg; -/** - * This function is exported with normal callback implementation. - * - * @deprecated Please use the Promise-based {@link flatAsync} method instead. - * @category Flat - */ -const flat = (opts, cb) => { - buildPkg(opts) - .then(() => { - (0, util_1.debugLog)('Application flattened, saved to: ' + opts.app); - if (cb) - cb(); - }) - .catch((err) => { - (0, util_1.debugLog)('Flat failed:'); - if (err.message) - (0, util_1.debugLog)(err.message); - else if (err.stack) - (0, util_1.debugLog)(err.stack); - else - (0, util_1.debugLog)(err); - if (cb) - cb(err); - }); -}; -exports.flat = flat; -//# sourceMappingURL=flat.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/flat.js.map b/node_modules/@electron/osx-sign/dist/cjs/flat.js.map deleted file mode 100644 index 0aa5e04..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/flat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flat.js","sourceRoot":"","sources":["../../src/flat.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,iCAAmG;AAEnG,uDAA6D;AAI7D,MAAM,UAAU,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC;AAEnE;;;;;GAKG;AACH,KAAK,UAAU,gBAAgB,CAAE,IAAiB;IAChD,MAAM,IAAA,sBAAe,EAAC,IAAI,CAAC,CAAC;IAE5B,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACnB,IAAI,GAAG,EAAE;QACP,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACxE,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;SAChE;KACF;SAAM;QACL,IAAA,gBAAS,EACP,6FAA6F,CAC9F,CAAC;QACF,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;KACnF;IAED,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC3B,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC/B,OAAO,OAAO,CAAC,MAAM,CA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AAwB,CAAC,CAAC;AACrC,CAAC;AApED,4BAoEC;AAED;;;;;GAKG;AACI,MAAM,IAAI,GAAG,CAAC,IAAiB,EAAE,EAA4B,EAAE,EAAE;IACtE,QAAQ,CAAC,IAAI,CAAC;SACX,IAAI,CAAC,GAAG,EAAE;QACT,IAAA,eAAQ,EAAC,mCAAmC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACzD,IAAI,EAAE;YAAE,EAAE,EAAE,CAAC;IACf,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,IAAA,eAAQ,EAAC,cAAc,CAAC,CAAC;QACzB,IAAI,GAAG,CAAC,OAAO;YAAE,IAAA,eAAQ,EAAC,GAAG,CAAC,OAAO,CAAC,CAAC;aAClC,IAAI,GAAG,CAAC,KAAK;YAAE,IAAA,eAAQ,EAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;YACnC,IAAA,eAAQ,EAAC,GAAG,CAAC,CAAC;QACnB,IAAI,EAAE;YAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAbW,QAAA,IAAI,QAaf"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/index.d.ts b/node_modules/@electron/osx-sign/dist/cjs/index.d.ts deleted file mode 100644 index e5d4365..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { sign, signApp } from './sign'; -import { flat, buildPkg } from './flat'; -import { walkAsync } from './util'; -export { sign, flat, signApp as signAsync, signApp, buildPkg as flatAsync, buildPkg, walkAsync }; -export * from './types'; diff --git a/node_modules/@electron/osx-sign/dist/cjs/index.js b/node_modules/@electron/osx-sign/dist/cjs/index.js deleted file mode 100644 index add9c2f..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/index.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.walkAsync = exports.buildPkg = exports.flatAsync = exports.signApp = exports.signAsync = exports.flat = exports.sign = void 0; -const sign_1 = require("./sign"); -Object.defineProperty(exports, "sign", { enumerable: true, get: function () { return sign_1.sign; } }); -Object.defineProperty(exports, "signAsync", { enumerable: true, get: function () { return sign_1.signApp; } }); -Object.defineProperty(exports, "signApp", { enumerable: true, get: function () { return sign_1.signApp; } }); -const flat_1 = require("./flat"); -Object.defineProperty(exports, "flat", { enumerable: true, get: function () { return flat_1.flat; } }); -Object.defineProperty(exports, "flatAsync", { enumerable: true, get: function () { return flat_1.buildPkg; } }); -Object.defineProperty(exports, "buildPkg", { enumerable: true, get: function () { return flat_1.buildPkg; } }); -const util_1 = require("./util"); -Object.defineProperty(exports, "walkAsync", { enumerable: true, get: function () { return util_1.walkAsync; } }); -// TODO: Remove and leave only proper named exports, but for non-breaking change reasons -// we need to keep this weirdness for now -module.exports = sign_1.sign; -module.exports.sign = sign_1.sign; -module.exports.signAsync = sign_1.signApp; -module.exports.signApp = sign_1.signApp; -module.exports.flat = flat_1.flat; -module.exports.flatAsync = flat_1.buildPkg; -module.exports.buildPkg = flat_1.buildPkg; -module.exports.walkAsync = util_1.walkAsync; -__exportStar(require("./types"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/index.js.map b/node_modules/@electron/osx-sign/dist/cjs/index.js.map deleted file mode 100644 index a18b1ef..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iCAAuC;AAe9B,qFAfA,WAAI,OAeA;AAAmB,0FAfjB,cAAO,OAemB;AAAE,wFAf5B,cAAO,OAe4B;AAdlD,iCAAwC;AAczB,qFAdN,WAAI,OAcM;AAA6C,0FAdjD,eAAQ,OAckD;AAAE,yFAd5D,eAAQ,OAc4D;AAbnF,iCAAmC;AAakD,0FAb5E,gBAAS,OAa4E;AAX9F,wFAAwF;AACxF,yCAAyC;AACzC,MAAM,CAAC,OAAO,GAAG,WAAI,CAAC;AACtB,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,WAAI,CAAC;AAC3B,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,cAAO,CAAC;AACnC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,cAAO,CAAC;AACjC,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,WAAI,CAAC;AAC3B,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,eAAQ,CAAC;AACpC,MAAM,CAAC,OAAO,CAAC,QAAQ,GAAG,eAAQ,CAAC;AACnC,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,gBAAS,CAAC;AAGrC,0CAAwB"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/sign.d.ts b/node_modules/@electron/osx-sign/dist/cjs/sign.d.ts deleted file mode 100644 index dfcfbf8..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/sign.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { SignOptions } from './types'; -/** - * Signs a macOS application. - * @returns A void Promise once the signing operation is complete. - * - * @category Codesign - */ -export declare function signApp(_opts: SignOptions): Promise; -/** - * This function is a legacy callback implementation. - * - * @deprecated Please use the Promise-based {@link signAsync} method instead. - * @category Codesign - */ -export declare const sign: (opts: SignOptions, cb?: ((error?: Error) => void) | undefined) => void; diff --git a/node_modules/@electron/osx-sign/dist/cjs/sign.js b/node_modules/@electron/osx-sign/dist/cjs/sign.js deleted file mode 100644 index 080036e..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/sign.js +++ /dev/null @@ -1,377 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sign = exports.signApp = void 0; -const fs = __importStar(require("fs-extra")); -const os = __importStar(require("os")); -const path = __importStar(require("path")); -const plist = __importStar(require("plist")); -const compare_version_1 = __importDefault(require("compare-version")); -const util_1 = require("./util"); -const util_identities_1 = require("./util-identities"); -const util_provisioning_profiles_1 = require("./util-provisioning-profiles"); -const util_entitlements_1 = require("./util-entitlements"); -const pkgVersion = require('../../package.json').version; -const osRelease = os.release(); -/** - * This function returns a promise validating opts.binaries, the additional binaries to be signed along with the discovered enclosed components. - */ -async function validateOptsBinaries(opts) { - if (opts.binaries) { - if (!Array.isArray(opts.binaries)) { - throw new Error('Additional binaries should be an Array.'); - } - // TODO: Presence check for binary files, reject if any does not exist - } -} -function validateOptsIgnore(ignore) { - if (ignore && !(ignore instanceof Array)) { - return [ignore]; - } -} -/** - * This function returns a promise validating all options passed in opts. - */ -async function validateSignOpts(opts) { - await validateOptsBinaries(opts); - await (0, util_1.validateOptsApp)(opts); - if (opts.provisioningProfile && typeof opts.provisioningProfile !== 'string') { - throw new Error('Path to provisioning profile should be a string.'); - } - if (opts.type && opts.type !== 'development' && opts.type !== 'distribution') { - throw new Error('Type must be either `development` or `distribution`.'); - } - const platform = await (0, util_1.validateOptsPlatform)(opts); - const cloned = Object.assign(Object.assign({}, opts), { ignore: validateOptsIgnore(opts.ignore), type: opts.type || 'distribution', platform }); - return cloned; -} -/** - * This function returns a promise verifying the code sign of application bundle. - */ -async function verifySignApplication(opts) { - // Verify with codesign - (0, util_1.debugLog)('Verifying application bundle with codesign...'); - const strictVerify = opts.strictVerify !== undefined ? opts.strictVerify : true; - await (0, util_1.execFileAsync)('codesign', ['--verify', '--deep'].concat(strictVerify !== false && (0, compare_version_1.default)(osRelease, '15.0.0') >= 0 // Strict flag since darwin 15.0.0 --> OS X 10.11.0 El Capitan - ? [ - '--strict' + - (strictVerify !== true ? '=' + strictVerify : '') - ] - : [], ['--verbose=2', opts.app])); -} -function defaultOptionsForFile(filePath, platform) { - const entitlementsFolder = path.resolve(__dirname, '..', '..', 'entitlements'); - let entitlementsFile; - if (platform === 'darwin') { - // Default Entitlements - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/app-entitlements.plist - // Also include JIT for main process V8 - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.plist'); - // Plugin helper - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/helper-plugin-entitlements.plist - if (filePath.includes('(Plugin).app')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.plugin.plist'); - // GPU Helper - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/helper-gpu-entitlements.plist - } - else if (filePath.includes('(GPU).app')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.gpu.plist'); - // Renderer Helper - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/helper-renderer-entitlements.plist - } - else if (filePath.includes('(Renderer).app')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.renderer.plist'); - } - } - else { - // Default entitlements - // TODO: Can these be more scoped like the non-mas variant? - entitlementsFile = path.resolve(entitlementsFolder, 'default.mas.plist'); - // If it is not the top level app bundle, we sign with inherit - if (filePath.includes('.app/')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.mas.child.plist'); - } - } - return { - entitlements: entitlementsFile, - hardenedRuntime: true, - requirements: undefined, - signatureFlags: undefined, - timestamp: undefined, - additionalArguments: [] - }; -} -async function mergeOptionsForFile(opts, defaults) { - const mergedPerFileOptions = Object.assign({}, defaults); - if (opts) { - if (opts.entitlements !== undefined) { - if (Array.isArray(opts.entitlements)) { - const entitlements = opts.entitlements.reduce((dict, entitlementKey) => (Object.assign(Object.assign({}, dict), { [entitlementKey]: true })), {}); - const dir = await fs.mkdtemp(path.resolve(os.tmpdir(), 'tmp-entitlements-')); - const entitlementsPath = path.join(dir, 'entitlements.plist'); - await fs.writeFile(entitlementsPath, plist.build(entitlements), 'utf8'); - opts.entitlements = entitlementsPath; - } - mergedPerFileOptions.entitlements = opts.entitlements; - } - if (opts.hardenedRuntime !== undefined) { - mergedPerFileOptions.hardenedRuntime = opts.hardenedRuntime; - } - if (opts.requirements !== undefined) - mergedPerFileOptions.requirements = opts.requirements; - if (opts.signatureFlags !== undefined) { - mergedPerFileOptions.signatureFlags = opts.signatureFlags; - } - if (opts.timestamp !== undefined) - mergedPerFileOptions.timestamp = opts.timestamp; - if (opts.additionalArguments !== undefined) - mergedPerFileOptions.additionalArguments = opts.additionalArguments; - } - return mergedPerFileOptions; -} -/** - * This function returns a promise codesigning only. - */ -async function signApplication(opts, identity) { - function shouldIgnoreFilePath(filePath) { - if (opts.ignore) { - return opts.ignore.some(function (ignore) { - if (typeof ignore === 'function') { - return ignore(filePath); - } - return filePath.match(ignore); - }); - } - return false; - } - const children = await (0, util_1.walkAsync)((0, util_1.getAppContentsPath)(opts)); - if (opts.binaries) - children.push(...opts.binaries); - const args = ['--sign', identity.hash || identity.name, '--force']; - if (opts.keychain) { - args.push('--keychain', opts.keychain); - } - /** - * Sort the child paths by how deep they are in the file tree. Some arcane apple - * logic expects the deeper files to be signed first otherwise strange errors get - * thrown our way - */ - children.sort((a, b) => { - const aDepth = a.split(path.sep).length; - const bDepth = b.split(path.sep).length; - return bDepth - aDepth; - }); - for (const filePath of [...children, opts.app]) { - if (shouldIgnoreFilePath(filePath)) { - (0, util_1.debugLog)('Skipped... ' + filePath); - continue; - } - const perFileOptions = await mergeOptionsForFile(opts.optionsForFile ? opts.optionsForFile(filePath) : null, defaultOptionsForFile(filePath, opts.platform)); - // preAutoEntitlements should only be applied to the top level app bundle. - // Applying it other files will cause the app to crash and be rejected by Apple. - if (!filePath.includes('.app/')) { - if (opts.preAutoEntitlements === false) { - (0, util_1.debugWarn)('Pre-sign operation disabled for entitlements automation.'); - } - else { - (0, util_1.debugLog)('Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`:', '\n', '* Disable by setting `pre-auto-entitlements` to `false`.'); - if (!opts.version || (0, compare_version_1.default)(opts.version, '1.1.1') >= 0) { - // Enable Mac App Store sandboxing without using temporary-exception, introduced in Electron v1.1.1. Relates to electron#5601 - const newEntitlements = await (0, util_entitlements_1.preAutoEntitlements)(opts, perFileOptions, { - identity, - provisioningProfile: opts.provisioningProfile - ? await (0, util_provisioning_profiles_1.getProvisioningProfile)(opts.provisioningProfile, opts.keychain) - : undefined - }); - // preAutoEntitlements may provide us new entitlements, if so we update our options - // and ensure that entitlements-loginhelper has a correct default value - if (newEntitlements) { - perFileOptions.entitlements = newEntitlements; - } - } - } - } - (0, util_1.debugLog)('Signing... ' + filePath); - const perFileArgs = [...args]; - if (perFileOptions.requirements) { - if (perFileOptions.requirements.charAt(0) === '=') { - perFileArgs.push(`-r${perFileOptions.requirements}`); - } - else { - perFileArgs.push('--requirements', perFileOptions.requirements); - } - } - if (perFileOptions.timestamp) { - perFileArgs.push('--timestamp=' + perFileOptions.timestamp); - } - else { - perFileArgs.push('--timestamp'); - } - let optionsArguments = []; - if (perFileOptions.signatureFlags) { - if (Array.isArray(perFileOptions.signatureFlags)) { - optionsArguments.push(...perFileOptions.signatureFlags); - } - else { - const flags = perFileOptions.signatureFlags.split(',').map(function (flag) { - return flag.trim(); - }); - optionsArguments.push(...flags); - } - } - if (perFileOptions.hardenedRuntime || optionsArguments.includes('runtime')) { - // Hardened runtime since darwin 17.7.0 --> macOS 10.13.6 - if ((0, compare_version_1.default)(osRelease, '17.7.0') >= 0) { - optionsArguments.push('runtime'); - } - else { - // Remove runtime if passed in with --signature-flags - (0, util_1.debugLog)('Not enabling hardened runtime, current macOS version too low, requires 10.13.6 and higher'); - optionsArguments = optionsArguments.filter((arg) => { - return arg !== 'runtime'; - }); - } - } - if (optionsArguments.length) { - perFileArgs.push('--options', [...new Set(optionsArguments)].join(',')); - } - if (perFileOptions.additionalArguments) { - perFileArgs.push(...perFileOptions.additionalArguments); - } - await (0, util_1.execFileAsync)('codesign', perFileArgs.concat('--entitlements', perFileOptions.entitlements, filePath)); - } - // Verify code sign - (0, util_1.debugLog)('Verifying...'); - await verifySignApplication(opts); - (0, util_1.debugLog)('Verified.'); - // Check entitlements if applicable - (0, util_1.debugLog)('Displaying entitlements...'); - const result = await (0, util_1.execFileAsync)('codesign', [ - '--display', - '--entitlements', - ':-', - opts.app - ]); - (0, util_1.debugLog)('Entitlements:', '\n', result); -} -/** - * Signs a macOS application. - * @returns A void Promise once the signing operation is complete. - * - * @category Codesign - */ -async function signApp(_opts) { - (0, util_1.debugLog)('electron-osx-sign@%s', pkgVersion); - const validatedOpts = await validateSignOpts(_opts); - let identities = []; - let identityInUse = null; - // Determine identity for signing - if (validatedOpts.identity) { - (0, util_1.debugLog)('`identity` passed in arguments.'); - if (validatedOpts.identityValidation === false) { - identityInUse = new util_identities_1.Identity(validatedOpts.identity); - } - else { - identities = await (0, util_identities_1.findIdentities)(validatedOpts.keychain || null, validatedOpts.identity); - } - } - else { - (0, util_1.debugWarn)('No `identity` passed in arguments...'); - if (validatedOpts.platform === 'mas') { - if (validatedOpts.type === 'distribution') { - (0, util_1.debugLog)('Finding `3rd Party Mac Developer Application` certificate for signing app distribution in the Mac App Store...'); - identities = await (0, util_identities_1.findIdentities)(validatedOpts.keychain || null, '3rd Party Mac Developer Application:'); - } - else { - (0, util_1.debugLog)('Finding `Mac Developer` certificate for signing app in development for the Mac App Store signing...'); - identities = await (0, util_identities_1.findIdentities)(validatedOpts.keychain || null, 'Mac Developer:'); - } - } - else { - (0, util_1.debugLog)('Finding `Developer ID Application` certificate for distribution outside the Mac App Store...'); - identities = await (0, util_identities_1.findIdentities)(validatedOpts.keychain || null, 'Developer ID Application:'); - } - } - if (!identityInUse) { - if (identities.length > 0) { - // Identity(/ies) found - if (identities.length > 1) { - (0, util_1.debugWarn)('Multiple identities found, will use the first discovered.'); - } - else { - (0, util_1.debugLog)('Found 1 identity.'); - } - identityInUse = identities[0]; - } - else { - // No identity found - throw new Error('No identity found for signing.'); - } - } - // Pre-sign operations - if (validatedOpts.preEmbedProvisioningProfile === false) { - (0, util_1.debugWarn)('Pre-sign operation disabled for provisioning profile embedding:', '\n', '* Enable by setting `pre-embed-provisioning-profile` to `true`.'); - } - else { - (0, util_1.debugLog)('Pre-sign operation enabled for provisioning profile:', '\n', '* Disable by setting `pre-embed-provisioning-profile` to `false`.'); - await (0, util_provisioning_profiles_1.preEmbedProvisioningProfile)(validatedOpts, validatedOpts.provisioningProfile - ? await (0, util_provisioning_profiles_1.getProvisioningProfile)(validatedOpts.provisioningProfile, validatedOpts.keychain) - : null); - } - (0, util_1.debugLog)('Signing application...', '\n', '> Application:', validatedOpts.app, '\n', '> Platform:', validatedOpts.platform, '\n', '> Additional binaries:', validatedOpts.binaries, '\n', '> Identity:', validatedOpts.identity); - await signApplication(validatedOpts, identityInUse); - // Post-sign operations - (0, util_1.debugLog)('Application signed.'); -} -exports.signApp = signApp; -/** - * This function is a legacy callback implementation. - * - * @deprecated Please use the Promise-based {@link signAsync} method instead. - * @category Codesign - */ -const sign = (opts, cb) => { - signApp(opts) - .then(() => { - (0, util_1.debugLog)('Application signed: ' + opts.app); - if (cb) - cb(); - }) - .catch((err) => { - if (err.message) - (0, util_1.debugLog)(err.message); - else if (err.stack) - (0, util_1.debugLog)(err.stack); - else - (0, util_1.debugLog)(err); - if (cb) - cb(err); - }); -}; -exports.sign = sign; -//# sourceMappingURL=sign.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/sign.js.map b/node_modules/@electron/osx-sign/dist/cjs/sign.js.map deleted file mode 100644 index a0153b0..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/sign.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/sign.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,uCAAyB;AACzB,2CAA6B;AAC7B,6CAA+B;AAC/B,sEAA6C;AAE7C,iCAQgB;AAChB,uDAA6D;AAC7D,6EAAmG;AACnG,2DAA0D;AAG1D,MAAM,UAAU,GAAW,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAEjE,MAAM,SAAS,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE/B;;GAEG;AACH,KAAK,UAAU,oBAAoB,CAAE,IAAiB;IACpD,IAAI,IAAI,CAAC,QAAQ,EAAE;QACjB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC5D;QACD,sEAAsE;KACvE;AACH,CAAC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EACJ,gBAAgB,EAChB,aAAa,CAAC,GAAG,EACjB,IAAI,EACJ,aAAa,EACb,aAAa,CAAC,QAAQ,EACtB,IAAI,EACJ,wBAAwB,EACxB,aAAa,CAAC,QAAQ,EACtB,IAAI,EACJ,aAAa,EACb,aAAa,CAAC,QAAQ,CACvB,CAAC;IACF,MAAM,eAAe,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAEpD,uBAAuB;IACvB,IAAA,eAAQ,EAAC,qBAAqB,CAAC,CAAC;AAClC,CAAC;AAjGD,0BAiGC;AAED;;;;;GAKG;AACI,MAAM,IAAI,GAAG,CAAC,IAAiB,EAAE,EAA4B,EAAE,EAAE;IACtE,OAAO,CAAC,IAAI,CAAC;SACV,IAAI,CAAC,GAAG,EAAE;QACT,IAAA,eAAQ,EAAC,sBAAsB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,EAAE;YAAE,EAAE,EAAE,CAAC;IACf,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,IAAI,GAAG,CAAC,OAAO;YAAE,IAAA,eAAQ,EAAC,GAAG,CAAC,OAAO,CAAC,CAAC;aAClC,IAAI,GAAG,CAAC,KAAK;YAAE,IAAA,eAAQ,EAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;YACnC,IAAA,eAAQ,EAAC,GAAG,CAAC,CAAC;QACnB,IAAI,EAAE;YAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAZW,QAAA,IAAI,QAYf"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/types.d.ts b/node_modules/@electron/osx-sign/dist/cjs/types.d.ts deleted file mode 100644 index 398a934..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/types.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -/** - * macOS applications can be distributed via the Mac App Store (MAS) or directly - * downloaded from the developer's website. @electron/osx-sign distinguishes between - * MAS apps (`mas`) or non-MAS apps (`darwin`). - * @category Utility - */ -export type ElectronMacPlatform = 'darwin' | 'mas'; -/** - * MAS apps can be signed using Development or Distribution certificates. - - * See [Apple Documentation](https://developer.apple.com/help/account/create-certificates/certificates-overview/) for more info. - * @category Utility - */ -export type SigningDistributionType = 'development' | 'distribution'; -/** - * @interface - * @internal - */ -export type BaseSignOptions = Readonly<{ - /** - * Path to the application package. - * Needs to end with the file extension `.app`. - */ - app: string; - /** - * The keychain name. - * - * @defaultValue `login` - */ - keychain?: string; - /** - * Build platform of your Electron app. - * Allowed values: `darwin` (Direct Download App), `mas` (Mac App Store). - * - * @defaultValue Determined by presence of `Squirrel.framework` within the application bundle, - * which is used for non-MAS apps. - */ - platform?: ElectronMacPlatform; - /** - * Name of the certificate to use when signing. - * - * @defaultValue Selected with respect to {@link SignOptions.provisioningProfile | provisioningProfile} - * and {@link SignOptions.platform | platform} from the selected {@link SignOptions.keychain | keychain}. - * * `mas` will look for `3rd Party Mac Developer Application: * (*)` - * * `darwin` will look for `Developer ID Application: * (*)` by default. - */ - identity?: string; -}>; -type OnlyValidatedBaseSignOptions = { - platform: ElectronMacPlatform; -}; -/** - * A set of signing options that can be overriden on a per-file basis. - * Any missing options will use the default values, and providing a partial structure - * will shallow merge with the default values. - * @interface - * @category Codesign - */ -export type PerFileSignOptions = { - /** - * String specifying the path to an `entitlements.plist` file. - * Can also be an array of entitlement keys that osx-sign will write to an entitlements file for you. - * - * @defaultValue `@electron/osx-sign`'s built-in entitlements files. - */ - entitlements?: string | string[]; - /** - * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime) - * for this file. - * - * Note: Hardened Runtime is a pre-requisite for notarization, which is mandatory for apps running on macOS 10.15 and above. - * - * @defaultValue `true` - */ - hardenedRuntime?: boolean; - /** - * Either a string beginning with `=` which specifies in plain text the - * [signing requirements](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) - * that you recommend to be used to evaluate the code signature, or a string specifying a path to a text or - * properly encoded `.rqset` file which contains those requirements. - */ - requirements?: string; - /** - * When signing, a set of option flags can be specified to change the behavior of the system when using the signed code. - * Accepts an array of strings or a comma-separated string. - * - * See --options of the `codesign` command. - * - * https://keith.github.io/xcode-man-pages/codesign.1.html#OPTION_FLAGS - */ - signatureFlags?: string | string[]; - /** - * String specifying the URL of the timestamp authority server. - * Please note that this default server may not support signatures not furnished by Apple. - * Disable the timestamp service with `none`. - * - * @defaultValue Uses the Apple-provided timestamp server. - */ - timestamp?: string; - /** - * Additional raw arguments to pass to the `codesign` command. - * - * These can be things like `--deep` for instance when code signing specific resources that may - * require such arguments. - * - * https://keith.github.io/xcode-man-pages/codesign.1.html#OPTIONS - */ - additionalArguments?: string[]; -}; -/** - * @interface - * @internal - */ -export type OnlySignOptions = { - /** - * Array of paths to additional binaries that will be signed along with built-ins of Electron. - * - * @defaultValue `undefined` - */ - binaries?: string[]; - /** - * Function that receives the path to a file and can return the entitlements to use for that file to override the default behavior. The - * object this function returns can include any of the following optional keys. Any properties that are returned **override** the default - * values that `@electron/osx-sign` generates. Any properties not returned use the default value. - * - * @param filePath Path to file - * @returns Override signing options - */ - optionsForFile?: (filePath: string) => PerFileSignOptions; - /** - * Flag to enable/disable validation for the signing identity. - * If enabled, the {@link SignOptions.identity | identity} provided - * will be validated in the {@link BaseSignOptions.keychain | keychain} specified. - * - * @defaultValue `true` - */ - identityValidation?: boolean; - /** - * Defines files that will be skipped during the code signing process. - * This property accepts a regex, function or an array of regexes and functions. - * Elements of other types are treated as `RegExp`. - * - * File paths matching a regex or returning a `true` value from a function will be ignored. - * - * @defaultValue `undefined` - */ - ignore?: string | string[] | ((file: string) => boolean); - /** - * Flag to enable/disable entitlements automation tasks necessary for code signing most Electron apps. - * * Adds [`com.apple.security.application-groups`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups) to the entitlements file - * * Fills in the `ElectronTeamID` property in `Info.plist` with the provisioning profile's Team Identifier or by parsing the identity name. - * - * @defaultValue `true` - */ - preAutoEntitlements?: boolean; - /** - * Flag to enable/disable the embedding of a provisioning profile into the app's `Contents` folder. - * Will use the profile from {@link OnlySignOptions.provisioningProfile} if provided. Otherwise, it - * searches for a `.provisionprofile` file in the current working directory. - * - * @defaultValue `true` - */ - preEmbedProvisioningProfile?: boolean; - /** - * Path to a provisioning profile, which can be used to grant restricted entitlements to your app. - * - * See [Apple Documentation](https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles) for more details. - */ - provisioningProfile?: string; - /** - * Flag to enable/disable the `--strict` flag when verifying the signed application bundle. - * Also supports string values to specify which strict restrictions to use, see codesign man page for supported values. - * - * @defaultValue `true` - */ - strictVerify?: boolean | string; - /** - * Type of certificate to use when signing a MAS app. - * @defaultValue `"distribution"` - */ - type?: SigningDistributionType; - /** - * Build version of Electron. Values may be like: `1.1.1`, `1.2.0`. For use for signing legacy versions - * of Electron to ensure backwards compatibility. - */ - version?: string; -}; -type OnlyValidatedSignOptions = { - ignore?: (string | ((file: string) => boolean))[]; - type: SigningDistributionType; -}; -type OnlyFlatOptions = { - /** - * Flag to enable/disable validation for the signing identity. - * If enabled, the {@link BaseSignOptions.identity | identity} provided - * will be validated in the {@link BaseSignOptions.keychain | keychain} specified. - * - * @defaultValue `true` - */ - identityValidation?: boolean; - /** - * Path to install the bundle. - * @defaultValue `"/Applications"` - */ - install?: string; - /** - * Output path for the flattened installer package. - * Needs file extension `.pkg`. - * - * @defaultValue Inferred from the app name passed into `opts.app`. - */ - pkg?: string; - /** - * Path to a directory containing `preinstall.sh` or `postinstall.sh` scripts. - * These must be executable and will run on pre/postinstall depending on the file - * name. - * - * This option is only valid if {@link FlatOptions.platform} is set to `darwin`. - */ - scripts?: string; -}; -type OnlyValidatedFlatOptions = { - install: string; - pkg: string; -}; -/** - * Utility type that represents an `UnValidated` type after validation, - * replacing any properties in the unvalidated type that also exist in the - * `Validated` type with the validated versions. - * - * @template UnValidated - The type representing the unvalidated form. - * @template Validated - The type representing the validated form. - */ -type ValidatedForm = Omit & Validated; -type ValidatedBaseSignOptions = Readonly>; -type _SignOptions = Readonly; -/** - * Options for codesigning a packaged `.app` bundle. - * @category Codesign - */ -export interface SignOptions extends _SignOptions { -} -/** - * @internal - */ -export type ValidatedSignOptions = Readonly & ValidatedBaseSignOptions>; -type _FlatOptions = Readonly; -/** - * Options for creating a flat `.pkg` installer. - * @category Flat - */ -export interface FlatOptions extends _FlatOptions { -} -/** - * @internal - */ -export type ValidatedFlatOptions = Readonly & ValidatedBaseSignOptions>; -export {}; diff --git a/node_modules/@electron/osx-sign/dist/cjs/types.js b/node_modules/@electron/osx-sign/dist/cjs/types.js deleted file mode 100644 index 11e638d..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/types.js.map b/node_modules/@electron/osx-sign/dist/cjs/types.js.map deleted file mode 100644 index 7b5fff8..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.d.ts b/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.d.ts deleted file mode 100644 index 0c4ff73..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { PerFileSignOptions, ValidatedSignOptions } from './types'; -import { Identity } from './util-identities'; -import { ProvisioningProfile } from './util-provisioning-profiles'; -type ComputedOptions = { - identity: Identity; - provisioningProfile?: ProvisioningProfile; -}; -/** - * This function returns a promise completing the entitlements automation: The - * process includes checking in `Info.plist` for `ElectronTeamID` or setting - * parsed value from identity, and checking in entitlements file for - * `com.apple.security.application-groups` or inserting new into array. A - * temporary entitlements file may be created to replace the input for any - * changes introduced. - */ -export declare function preAutoEntitlements(opts: ValidatedSignOptions, perFileOpts: PerFileSignOptions, computed: ComputedOptions): Promise; -export {}; diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.js b/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.js deleted file mode 100644 index aed4bce..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.preAutoEntitlements = void 0; -const fs = __importStar(require("fs-extra")); -const os = __importStar(require("os")); -const path = __importStar(require("path")); -const plist = __importStar(require("plist")); -const util_1 = require("./util"); -const preAuthMemo = new Map(); -/** - * This function returns a promise completing the entitlements automation: The - * process includes checking in `Info.plist` for `ElectronTeamID` or setting - * parsed value from identity, and checking in entitlements file for - * `com.apple.security.application-groups` or inserting new into array. A - * temporary entitlements file may be created to replace the input for any - * changes introduced. - */ -async function preAutoEntitlements(opts, perFileOpts, computed) { - var _a; - if (!perFileOpts.entitlements) - return; - const memoKey = [opts.app, perFileOpts.entitlements].join('---'); - if (preAuthMemo.has(memoKey)) - return preAuthMemo.get(memoKey); - // If entitlements file not provided, default will be used. Fixes #41 - const appInfoPath = path.join((0, util_1.getAppContentsPath)(opts), 'Info.plist'); - (0, util_1.debugLog)('Automating entitlement app group...', '\n', '> Info.plist:', appInfoPath, '\n'); - let entitlements; - if (typeof perFileOpts.entitlements === 'string') { - const entitlementsContents = await fs.readFile(perFileOpts.entitlements, 'utf8'); - entitlements = plist.parse(entitlementsContents); - } - else { - entitlements = perFileOpts.entitlements.reduce((dict, entitlementKey) => (Object.assign(Object.assign({}, dict), { [entitlementKey]: true })), {}); - } - if (!entitlements['com.apple.security.app-sandbox']) { - // Only automate when app sandbox enabled by user - return; - } - const appInfoContents = await fs.readFile(appInfoPath, 'utf8'); - const appInfo = plist.parse(appInfoContents); - // Use ElectronTeamID in Info.plist if already specified - if (appInfo.ElectronTeamID) { - (0, util_1.debugLog)('`ElectronTeamID` found in `Info.plist`: ' + appInfo.ElectronTeamID); - } - else { - // The team identifier in signing identity should not be trusted - if (computed.provisioningProfile) { - appInfo.ElectronTeamID = - computed.provisioningProfile.message.Entitlements['com.apple.developer.team-identifier']; - (0, util_1.debugLog)('`ElectronTeamID` not found in `Info.plist`, use parsed from provisioning profile: ' + - appInfo.ElectronTeamID); - } - else { - const teamID = (_a = /^.+\((.+?)\)$/g.exec(computed.identity.name)) === null || _a === void 0 ? void 0 : _a[1]; - if (!teamID) { - throw new Error(`Could not automatically determine ElectronTeamID from identity: ${computed.identity.name}`); - } - appInfo.ElectronTeamID = teamID; - (0, util_1.debugLog)('`ElectronTeamID` not found in `Info.plist`, use parsed from signing identity: ' + - appInfo.ElectronTeamID); - } - await fs.writeFile(appInfoPath, plist.build(appInfo), 'utf8'); - (0, util_1.debugLog)('`Info.plist` updated:', '\n', '> Info.plist:', appInfoPath); - } - const appIdentifier = appInfo.ElectronTeamID + '.' + appInfo.CFBundleIdentifier; - // Insert application identifier if not exists - if (entitlements['com.apple.application-identifier']) { - (0, util_1.debugLog)('`com.apple.application-identifier` found in entitlements file: ' + - entitlements['com.apple.application-identifier']); - } - else { - (0, util_1.debugLog)('`com.apple.application-identifier` not found in entitlements file, new inserted: ' + - appIdentifier); - entitlements['com.apple.application-identifier'] = appIdentifier; - } - // Insert developer team identifier if not exists - if (entitlements['com.apple.developer.team-identifier']) { - (0, util_1.debugLog)('`com.apple.developer.team-identifier` found in entitlements file: ' + - entitlements['com.apple.developer.team-identifier']); - } - else { - (0, util_1.debugLog)('`com.apple.developer.team-identifier` not found in entitlements file, new inserted: ' + - appInfo.ElectronTeamID); - entitlements['com.apple.developer.team-identifier'] = appInfo.ElectronTeamID; - } - // Init entitlements app group key to array if not exists - if (!entitlements['com.apple.security.application-groups']) { - entitlements['com.apple.security.application-groups'] = []; - } - // Insert app group if not exists - if (Array.isArray(entitlements['com.apple.security.application-groups']) && - entitlements['com.apple.security.application-groups'].indexOf(appIdentifier) === -1) { - (0, util_1.debugLog)('`com.apple.security.application-groups` not found in entitlements file, new inserted: ' + - appIdentifier); - entitlements['com.apple.security.application-groups'].push(appIdentifier); - } - else { - (0, util_1.debugLog)('`com.apple.security.application-groups` found in entitlements file: ' + appIdentifier); - } - // Create temporary entitlements file - const dir = await fs.mkdtemp(path.resolve(os.tmpdir(), 'tmp-entitlements-')); - const entitlementsPath = path.join(dir, 'entitlements.plist'); - await fs.writeFile(entitlementsPath, plist.build(entitlements), 'utf8'); - (0, util_1.debugLog)('Entitlements file updated:', '\n', '> Entitlements:', entitlementsPath); - preAuthMemo.set(memoKey, entitlementsPath); - return entitlementsPath; -} -exports.preAutoEntitlements = preAutoEntitlements; -//# sourceMappingURL=util-entitlements.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.js.map b/node_modules/@electron/osx-sign/dist/cjs/util-entitlements.js.map deleted file mode 100644 index 5e125c0..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-entit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AM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,CAAC,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IACxE,IAAA,eAAQ,EAAC,4BAA4B,EAAE,IAAI,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IAElF,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAC3C,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAvHD,kDAuHC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-identities.d.ts b/node_modules/@electron/osx-sign/dist/cjs/util-identities.d.ts deleted file mode 100644 index fe56cdb..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-identities.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class Identity { - name: string; - hash?: string | undefined; - constructor(name: string, hash?: string | undefined); -} -export declare function findIdentities(keychain: string | null, identity: string): Promise; diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-identities.js b/node_modules/@electron/osx-sign/dist/cjs/util-identities.js deleted file mode 100644 index bf5c128..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-identities.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.findIdentities = exports.Identity = void 0; -const util_1 = require("./util"); -class Identity { - constructor(name, hash) { - this.name = name; - this.hash = hash; - } -} -exports.Identity = Identity; -async function findIdentities(keychain, identity) { - // Only to look for valid identities, excluding those flagged with - // CSSMERR_TP_CERT_EXPIRED or CSSMERR_TP_NOT_TRUSTED. Fixes #9 - const args = [ - 'find-identity', - '-v' - ]; - if (keychain) { - args.push(keychain); - } - const result = await (0, util_1.execFileAsync)('security', args); - const identities = result.split('\n').map(function (line) { - if (line.indexOf(identity) >= 0) { - const identityFound = line.substring(line.indexOf('"') + 1, line.lastIndexOf('"')); - const identityHashFound = line.substring(line.indexOf(')') + 2, line.indexOf('"') - 1); - (0, util_1.debugLog)('Identity:', '\n', '> Name:', identityFound, '\n', '> Hash:', identityHashFound); - return new Identity(identityFound, identityHashFound); - } - return null; - }); - return (0, util_1.compactFlattenedList)(identities); -} -exports.findIdentities = findIdentities; -//# sourceMappingURL=util-identities.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-identities.js.map b/node_modules/@electron/osx-sign/dist/cjs/util-identities.js.map deleted file mode 100644 index 257ef88..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-identities.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util-identities.js","sourceRoot":"","sources":["../../src/util-identities.ts"],"names":[],"mappings":";;;AAAA,iCAAuE;AAEvE,MAAa,QAAQ;IACnB,YAAoB,IAAY,EAAS,IAAa;QAAlC,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAS;IAAG,CAAC;CAC3D;AAFD,4BAEC;AAEM,KAAK,UAAU,cAAc,CAAE,QAAuB,EAAE,QAAgB;IAC7E,kEAAkE;IAClE,8DAA8D;IAE9D,MAAM,IAAI,GAAG;QACX,eAAe;QACf,IAAI;KACL,CAAC;IACF,IAAI,QAAQ,EAAE;QACZ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACrB;IAED,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAa,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,IAAI;QACtD,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YACnF,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACvF,IAAA,eAAQ,EAAC,WAAW,EAAE,IAAI,EACxB,SAAS,EAAE,aAAa,EAAE,IAAI,EAC9B,SAAS,EAAE,iBAAiB,CAAC,CAAC;YAChC,OAAO,IAAI,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;SACvD;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,2BAAoB,EAAC,UAAU,CAAC,CAAC;AAC1C,CAAC;AA3BD,wCA2BC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.d.ts b/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.d.ts deleted file mode 100644 index 7c9d9c3..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ElectronMacPlatform, ValidatedSignOptions } from './types'; -export declare class ProvisioningProfile { - filePath: string; - message: any; - constructor(filePath: string, message: any); - get name(): string; - get platforms(): ElectronMacPlatform[]; - get type(): "development" | "distribution"; -} -/** - * Returns a promise resolving to a ProvisioningProfile instance based on file. - * @function - * @param {string} filePath - Path to provisioning profile. - * @param {string} keychain - Keychain to use when unlocking provisioning profile. - * @returns {Promise} Promise. - */ -export declare function getProvisioningProfile(filePath: string, keychain?: string | null): Promise; -/** - * Returns a promise resolving to a list of suitable provisioning profile within the current working directory. - */ -export declare function findProvisioningProfiles(opts: ValidatedSignOptions): Promise; -/** - * Returns a promise embedding the provisioning profile in the app Contents folder. - */ -export declare function preEmbedProvisioningProfile(opts: ValidatedSignOptions, profile: ProvisioningProfile | null): Promise; diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js b/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js deleted file mode 100644 index 2c1b7e5..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.preEmbedProvisioningProfile = exports.findProvisioningProfiles = exports.getProvisioningProfile = exports.ProvisioningProfile = void 0; -const fs = __importStar(require("fs-extra")); -const path = __importStar(require("path")); -const plist_1 = __importDefault(require("plist")); -const util_1 = require("./util"); -class ProvisioningProfile { - constructor(filePath, message) { - this.filePath = filePath; - this.message = message; - } - get name() { - return this.message.Name; - } - get platforms() { - if ('ProvisionsAllDevices' in this.message) - return ['darwin']; - // Developer ID - else if (this.type === 'distribution') - return ['mas']; - // Mac App Store - else - return ['darwin', 'mas']; // Mac App Development - } - get type() { - if ('ProvisionedDevices' in this.message) - return 'development'; - // Mac App Development - else - return 'distribution'; // Developer ID or Mac App Store - } -} -exports.ProvisioningProfile = ProvisioningProfile; -/** - * Returns a promise resolving to a ProvisioningProfile instance based on file. - * @function - * @param {string} filePath - Path to provisioning profile. - * @param {string} keychain - Keychain to use when unlocking provisioning profile. - * @returns {Promise} Promise. - */ -async function getProvisioningProfile(filePath, keychain = null) { - const securityArgs = [ - 'cms', - '-D', - '-i', - filePath // Use infile as source of data - ]; - if (keychain) { - securityArgs.push('-k', keychain); - } - const result = await (0, util_1.execFileAsync)('security', securityArgs); - const provisioningProfile = new ProvisioningProfile(filePath, plist_1.default.parse(result)); - (0, util_1.debugLog)('Provisioning profile:', '\n', '> Name:', provisioningProfile.name, '\n', '> Platforms:', provisioningProfile.platforms, '\n', '> Type:', provisioningProfile.type, '\n', '> Path:', provisioningProfile.filePath, '\n', '> Message:', provisioningProfile.message); - return provisioningProfile; -} -exports.getProvisioningProfile = getProvisioningProfile; -/** - * Returns a promise resolving to a list of suitable provisioning profile within the current working directory. - */ -async function findProvisioningProfiles(opts) { - const cwd = process.cwd(); - const children = await fs.readdir(cwd); - const foundProfiles = (0, util_1.compactFlattenedList)(await Promise.all(children.map(async (child) => { - const filePath = path.resolve(cwd, child); - const stat = await fs.stat(filePath); - if (stat.isFile() && path.extname(filePath) === '.provisionprofile') { - return filePath; - } - return null; - }))); - return (0, util_1.compactFlattenedList)(await Promise.all(foundProfiles.map(async (filePath) => { - const profile = await getProvisioningProfile(filePath); - if (profile.platforms.indexOf(opts.platform) >= 0 && profile.type === opts.type) { - return profile; - } - (0, util_1.debugWarn)('Provisioning profile above ignored, not for ' + opts.platform + ' ' + opts.type + '.'); - return null; - }))); -} -exports.findProvisioningProfiles = findProvisioningProfiles; -/** - * Returns a promise embedding the provisioning profile in the app Contents folder. - */ -async function preEmbedProvisioningProfile(opts, profile) { - async function embedProvisioningProfile(profile) { - (0, util_1.debugLog)('Looking for existing provisioning profile...'); - const embeddedFilePath = path.join((0, util_1.getAppContentsPath)(opts), 'embedded.provisionprofile'); - if (await fs.pathExists(embeddedFilePath)) { - (0, util_1.debugLog)('Found embedded provisioning profile:', '\n', '* Please manually remove the existing file if not wanted.', '\n', '* Current file at:', embeddedFilePath); - } - else { - (0, util_1.debugLog)('Embedding provisioning profile...'); - await fs.copy(profile.filePath, embeddedFilePath); - } - } - if (profile) { - // User input provisioning profile - return await embedProvisioningProfile(profile); - } - else { - // Discover provisioning profile - (0, util_1.debugLog)('No `provisioning-profile` passed in arguments, will find in current working directory and in user library...'); - const profiles = await findProvisioningProfiles(opts); - if (profiles.length > 0) { - // Provisioning profile(s) found - if (profiles.length > 1) { - (0, util_1.debugLog)('Multiple provisioning profiles found, will use the first discovered.'); - } - else { - (0, util_1.debugLog)('Found 1 provisioning profile.'); - } - await embedProvisioningProfile(profiles[0]); - } - else { - // No provisioning profile found - (0, util_1.debugLog)('No provisioning profile found, will not embed profile in app contents.'); - } - } -} -exports.preEmbedProvisioningProfile = preEmbedProvisioningProfile; -//# sourceMappingURL=util-provisioning-profiles.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js.map b/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js.map deleted file mode 100644 index bc555ff..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util-provisioning-profiles.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util-provisioning-profiles.js","sourceRoot":"","sources":["../../src/util-provisioning-profiles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAC7B,kDAA0B;AAG1B,iCAAsG;AAEtG,MAAa,mBAAmB;IAC9B,YAAoB,QAAgB,EAAS,OAAY;QAArC,aAAQ,GAAR,QAAQ,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAK;IAAG,CAAC;IAE7D,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACX,I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b/node_modules/@electron/osx-sign/dist/cjs/util.d.ts deleted file mode 100644 index e1ef5b7..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/// -import * as child from 'child_process'; -import debug from 'debug'; -import { BaseSignOptions, ElectronMacPlatform } from './types'; -export declare const debugLog: debug.Debugger; -export declare const debugWarn: debug.Debugger; -export declare function execFileAsync(file: string, args: string[], options?: child.ExecFileOptions): Promise; -type DeepListItem = null | T | DeepListItem[]; -type DeepList = DeepListItem[]; -export declare function compactFlattenedList(list: DeepList): T[]; -/** - * Returns the path to the "Contents" folder inside the application bundle - */ -export declare function getAppContentsPath(opts: BaseSignOptions): string; -/** - * Returns the path to app "Frameworks" within contents. - */ -export declare function getAppFrameworksPath(opts: BaseSignOptions): string; -export declare function detectElectronPlatform(opts: BaseSignOptions): Promise; -/** - * This function returns a promise validating opts.app, the application to be signed or flattened. - */ -export declare function validateOptsApp(opts: BaseSignOptions): Promise; -/** - * This function returns a promise validating opts.platform, the platform of Electron build. It allows auto-discovery if no opts.platform is specified. - */ -export declare function validateOptsPlatform(opts: BaseSignOptions): Promise; -/** - * This function returns a promise resolving all child paths within the directory specified. - * @function - * @param {string} dirPath - Path to directory. - * @returns {Promise} Promise resolving child paths needing signing in order. - * @internal - */ -export declare function walkAsync(dirPath: string): Promise; -export {}; diff --git a/node_modules/@electron/osx-sign/dist/cjs/util.js b/node_modules/@electron/osx-sign/dist/cjs/util.js deleted file mode 100644 index 77e64b5..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.walkAsync = exports.validateOptsPlatform = exports.validateOptsApp = exports.detectElectronPlatform = exports.getAppFrameworksPath = exports.getAppContentsPath = exports.compactFlattenedList = exports.execFileAsync = exports.debugWarn = exports.debugLog = void 0; -const child = __importStar(require("child_process")); -const fs = __importStar(require("fs-extra")); -const isbinaryfile_1 = require("isbinaryfile"); -const path = __importStar(require("path")); -const debug_1 = __importDefault(require("debug")); -exports.debugLog = (0, debug_1.default)('electron-osx-sign'); -exports.debugLog.log = console.log.bind(console); -exports.debugWarn = (0, debug_1.default)('electron-osx-sign:warn'); -exports.debugWarn.log = console.warn.bind(console); -const removePassword = function (input) { - return input.replace(/(-P |pass:|\/p|-pass )([^ ]+)/, function (_, p1) { - return `${p1}***`; - }); -}; -async function execFileAsync(file, args, options = {}) { - if (exports.debugLog.enabled) { - (0, exports.debugLog)('Executing...', file, args && Array.isArray(args) ? removePassword(args.join(' ')) : ''); - } - return new Promise(function (resolve, reject) { - child.execFile(file, args, options, function (err, stdout, stderr) { - if (err) { - (0, exports.debugLog)('Error executing file:', '\n', '> Stdout:', stdout, '\n', '> Stderr:', stderr); - reject(err); - return; - } - resolve(stdout); - }); - }); -} -exports.execFileAsync = execFileAsync; -function compactFlattenedList(list) { - const result = []; - function populateResult(list) { - if (!Array.isArray(list)) { - if (list) - result.push(list); - } - else if (list.length > 0) { - for (const item of list) - if (item) - populateResult(item); - } - } - populateResult(list); - return result; -} -exports.compactFlattenedList = compactFlattenedList; -/** - * Returns the path to the "Contents" folder inside the application bundle - */ -function getAppContentsPath(opts) { - return path.join(opts.app, 'Contents'); -} -exports.getAppContentsPath = getAppContentsPath; -/** - * Returns the path to app "Frameworks" within contents. - */ -function getAppFrameworksPath(opts) { - return path.join(getAppContentsPath(opts), 'Frameworks'); -} -exports.getAppFrameworksPath = getAppFrameworksPath; -async function detectElectronPlatform(opts) { - const appFrameworksPath = getAppFrameworksPath(opts); - if (await fs.pathExists(path.resolve(appFrameworksPath, 'Squirrel.framework'))) { - return 'darwin'; - } - else { - return 'mas'; - } -} -exports.detectElectronPlatform = detectElectronPlatform; -/** - * This function returns a promise resolving the file path if file binary. - */ -async function getFilePathIfBinary(filePath) { - if (await (0, isbinaryfile_1.isBinaryFile)(filePath)) { - return filePath; - } - return null; -} -/** - * This function returns a promise validating opts.app, the application to be signed or flattened. - */ -async function validateOptsApp(opts) { - if (!opts.app) { - throw new Error('Path to application must be specified.'); - } - if (path.extname(opts.app) !== '.app') { - throw new Error('Extension of application must be `.app`.'); - } - if (!(await fs.pathExists(opts.app))) { - throw new Error(`Application at path "${opts.app}" could not be found`); - } -} -exports.validateOptsApp = validateOptsApp; -/** - * This function returns a promise validating opts.platform, the platform of Electron build. It allows auto-discovery if no opts.platform is specified. - */ -async function validateOptsPlatform(opts) { - if (opts.platform) { - if (opts.platform === 'mas' || opts.platform === 'darwin') { - return opts.platform; - } - else { - (0, exports.debugWarn)('`platform` passed in arguments not supported, checking Electron platform...'); - } - } - else { - (0, exports.debugWarn)('No `platform` passed in arguments, checking Electron platform...'); - } - return await detectElectronPlatform(opts); -} -exports.validateOptsPlatform = validateOptsPlatform; -/** - * This function returns a promise resolving all child paths within the directory specified. - * @function - * @param {string} dirPath - Path to directory. - * @returns {Promise} Promise resolving child paths needing signing in order. - * @internal - */ -async function walkAsync(dirPath) { - (0, exports.debugLog)('Walking... ' + dirPath); - async function _walkAsync(dirPath) { - const children = await fs.readdir(dirPath); - return await Promise.all(children.map(async (child) => { - const filePath = path.resolve(dirPath, child); - const stat = await fs.stat(filePath); - if (stat.isFile()) { - switch (path.extname(filePath)) { - case '.cstemp': // Temporary file generated from past codesign - (0, exports.debugLog)('Removing... ' + filePath); - await fs.remove(filePath); - return null; - default: - return await getFilePathIfBinary(filePath); - } - } - else if (stat.isDirectory() && !stat.isSymbolicLink()) { - const walkResult = await _walkAsync(filePath); - switch (path.extname(filePath)) { - case '.app': // Application - case '.framework': // Framework - walkResult.push(filePath); - } - return walkResult; - } - return null; - })); - } - const allPaths = await _walkAsync(dirPath); - return compactFlattenedList(allPaths); -} -exports.walkAsync = walkAsync; -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/cjs/util.js.map b/node_modules/@electron/osx-sign/dist/cjs/util.js.map deleted file mode 100644 index 1496539..0000000 --- a/node_modules/@electron/osx-sign/dist/cjs/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AACvC,6CAA+B;AAC/B,+CAA4C;AAC5C,2CAA6B;AAE7B,kDAA0B;AAGb,QAAA,QAAQ,GAAG,IAAA,eAAK,EAAC,mBAAmB,CAAC,CAAC;AACnD,gBAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE5B,QAAA,SAAS,GAAG,IAAA,eAAK,EAAC,wBAAwB,CAAC,CAAC;AACzD,iBAAS,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE3C,MAAM,cAAc,GAAG,UAAU,KAAa;IAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,+BAA+B,EAAE,UAAU,CAAC,EAAE,EAAE;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AE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC1B,OAAO,IAAI,CAAC;oBACd;wBACE,OAAO,MAAM,mBAAmB,CAAC,QAAQ,CAAC,CAAC;iBAC9C;aACF;iBAAM,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE;gBACvD,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;gBAC9C,QAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAC9B,KAAK,MAAM,CAAC,CAAC,cAAc;oBAC3B,KAAK,YAAY,EAAE,YAAY;wBAC7B,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC7B;gBACD,OAAO,UAAU,CAAC;aACnB;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC;AAnCD,8BAmCC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/flat.d.ts b/node_modules/@electron/osx-sign/dist/esm/flat.d.ts deleted file mode 100644 index 1736e46..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/flat.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { FlatOptions } from './types'; -/** - * Generates a flat `.pkg` installer for a packaged Electron `.app` bundle. - * @returns A void Promise once the flattening operation is complete. - * - * @category Flat - */ -export declare function buildPkg(_opts: FlatOptions): Promise; -/** - * This function is exported with normal callback implementation. - * - * @deprecated Please use the Promise-based {@link flatAsync} method instead. - * @category Flat - */ -export declare const flat: (opts: FlatOptions, cb?: ((error?: Error) => void) | undefined) => void; diff --git a/node_modules/@electron/osx-sign/dist/esm/flat.js b/node_modules/@electron/osx-sign/dist/esm/flat.js deleted file mode 100644 index 109b837..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/flat.js +++ /dev/null @@ -1,151 +0,0 @@ -import * as path from 'path'; -import { debugLog, debugWarn, execFileAsync, validateOptsApp, validateOptsPlatform } from './util'; -import { findIdentities } from './util-identities'; -const pkgVersion = require('../../package.json').version; -/** - * This function returns a promise validating all options passed in opts. - * @function - * @param {Object} opts - Options. - * @returns {Promise} Promise. - */ -async function validateFlatOpts(opts) { - await validateOptsApp(opts); - let pkg = opts.pkg; - if (pkg) { - if (typeof pkg !== 'string') - throw new Error('`pkg` must be a string.'); - if (path.extname(pkg) !== '.pkg') { - throw new Error('Extension of output package must be `.pkg`.'); - } - } - else { - debugWarn('No `pkg` passed in arguments, will fallback to default inferred from the given application.'); - pkg = path.join(path.dirname(opts.app), path.basename(opts.app, '.app') + '.pkg'); - } - let install = opts.install; - if (install) { - if (typeof install !== 'string') { - return Promise.reject(new Error('`install` must be a string.')); - } - } - else { - debugWarn('No `install` passed in arguments, will fallback to default `/Applications`.'); - install = '/Applications'; - } - if (typeof opts.scripts === 'string' && opts.platform === 'mas') { - debugWarn('Mac App Store packages cannot have `scripts`, ignoring option.'); - } - return Object.assign(Object.assign({}, opts), { pkg, - install, platform: await validateOptsPlatform(opts) }); -} -/** - * This function returns a promise flattening the application. - * @param opts - Options for building the .pkg archive - */ -async function buildApplicationPkg(opts, identity) { - if (opts.platform === 'mas') { - const args = ['--component', opts.app, opts.install, '--sign', identity.name, opts.pkg]; - if (opts.keychain) { - args.unshift('--keychain', opts.keychain); - } - debugLog('Flattening Mac App Store package... ' + opts.app); - await execFileAsync('productbuild', args); - } - else { - const componentPkgPath = path.join(path.dirname(opts.app), path.basename(opts.app, '.app') + '-component.pkg'); - const pkgbuildArgs = [ - '--install-location', - opts.install, - '--component', - opts.app, - componentPkgPath - ]; - if (opts.scripts) { - pkgbuildArgs.unshift('--scripts', opts.scripts); - } - debugLog('Building component package... ' + opts.app); - await execFileAsync('pkgbuild', pkgbuildArgs); - const args = ['--package', componentPkgPath, opts.install, '--sign', identity.name, opts.pkg]; - if (opts.keychain) { - args.unshift('--keychain', opts.keychain); - } - debugLog('Flattening OS X Installer package... ' + opts.app); - await execFileAsync('productbuild', args); - await execFileAsync('rm', [componentPkgPath]); - } -} -/** - * Generates a flat `.pkg` installer for a packaged Electron `.app` bundle. - * @returns A void Promise once the flattening operation is complete. - * - * @category Flat - */ -export async function buildPkg(_opts) { - debugLog('@electron/osx-sign@%s', pkgVersion); - const validatedOptions = await validateFlatOpts(_opts); - let identities = []; - let identityInUse = null; - if (validatedOptions.identity) { - debugLog('`identity` passed in arguments.'); - if (validatedOptions.identityValidation === false) { - // Do nothing - } - else { - identities = await findIdentities(validatedOptions.keychain || null, validatedOptions.identity); - } - } - else { - debugWarn('No `identity` passed in arguments...'); - if (validatedOptions.platform === 'mas') { - debugLog('Finding `3rd Party Mac Developer Installer` certificate for flattening app distribution in the Mac App Store...'); - identities = await findIdentities(validatedOptions.keychain || null, '3rd Party Mac Developer Installer:'); - } - else { - debugLog('Finding `Developer ID Application` certificate for distribution outside the Mac App Store...'); - identities = await findIdentities(validatedOptions.keychain || null, 'Developer ID Installer:'); - } - } - if (identities.length > 0) { - // Provisioning profile(s) found - if (identities.length > 1) { - debugWarn('Multiple identities found, will use the first discovered.'); - } - else { - debugLog('Found 1 identity.'); - } - identityInUse = identities[0]; - } - else { - // No identity found - throw new Error('No identity found for signing.'); - } - debugLog('Flattening application...', '\n', '> Application:', validatedOptions.app, '\n', '> Package output:', validatedOptions.pkg, '\n', '> Install path:', validatedOptions.install, '\n', '> Identity:', validatedOptions.identity, '\n', '> Scripts:', validatedOptions.scripts); - await buildApplicationPkg(validatedOptions, identityInUse); - debugLog('Application flattened.'); -} -/** - * This function is exported with normal callback implementation. - * - * @deprecated Please use the Promise-based {@link flatAsync} method instead. - * @category Flat - */ -export const flat = (opts, cb) => { - buildPkg(opts) - .then(() => { - debugLog('Application flattened, saved to: ' + opts.app); - if (cb) - cb(); - }) - .catch((err) => { - debugLog('Flat failed:'); - if (err.message) - debugLog(err.message); - else if (err.stack) - debugLog(err.stack); - else - debugLog(err); - if (cb) - cb(err); - }); -}; -//# sourceMappingURL=flat.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/flat.js.map b/node_modules/@electron/osx-sign/dist/esm/flat.js.map deleted file mode 100644 index 73c0ba6..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/flat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flat.js","sourceRoot":"","sources":["../../src/flat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAEnG,OAAO,EAAY,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,UAAU,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC;AAEnE;;;;;GAKG;AACH,KAAK,UAAU,gBAAgB,CAAE,IAAiB;IAChD,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC;IAE5B,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACnB,IAAI,GAAG,EAAE;QACP,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACxE,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;SAChE;KACF;SAAM;QACL,SAAS,CACP,6FAA6F,CAC9F,CAAC;QACF,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;KACnF;IAED,IAA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AC,wBAAwB,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,IAAiB,EAAE,EAA4B,EAAE,EAAE;IACtE,QAAQ,CAAC,IAAI,CAAC;SACX,IAAI,CAAC,GAAG,EAAE;QACT,QAAQ,CAAC,mCAAmC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACzD,IAAI,EAAE;YAAE,EAAE,EAAE,CAAC;IACf,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,QAAQ,CAAC,cAAc,CAAC,CAAC;QACzB,IAAI,GAAG,CAAC,OAAO;YAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;aAClC,IAAI,GAAG,CAAC,KAAK;YAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;YACnC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACnB,IAAI,EAAE;YAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/index.d.ts b/node_modules/@electron/osx-sign/dist/esm/index.d.ts deleted file mode 100644 index e5d4365..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { sign, signApp } from './sign'; -import { flat, buildPkg } from './flat'; -import { walkAsync } from './util'; -export { sign, flat, signApp as signAsync, signApp, buildPkg as flatAsync, buildPkg, walkAsync }; -export * from './types'; diff --git a/node_modules/@electron/osx-sign/dist/esm/index.js b/node_modules/@electron/osx-sign/dist/esm/index.js deleted file mode 100644 index eb0ea84..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import { sign, signApp } from './sign'; -import { flat, buildPkg } from './flat'; -import { walkAsync } from './util'; -// TODO: Remove and leave only proper named exports, but for non-breaking change reasons -// we need to keep this weirdness for now -module.exports = sign; -module.exports.sign = sign; -module.exports.signAsync = signApp; -module.exports.signApp = signApp; -module.exports.flat = flat; -module.exports.flatAsync = buildPkg; -module.exports.buildPkg = buildPkg; -module.exports.walkAsync = walkAsync; -export { sign, flat, signApp as signAsync, signApp, buildPkg as flatAsync, buildPkg, walkAsync }; -export * from './types'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/index.js.map b/node_modules/@electron/osx-sign/dist/esm/index.js.map deleted file mode 100644 index 0a1809e..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,wFAAwF;AACxF,yCAAyC;AACzC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AAC3B,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC;AACnC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AACjC,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AAC3B,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC;AACpC,MAAM,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnC,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,IAAI,SAAS,EAAE,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AACjG,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/sign.d.ts b/node_modules/@electron/osx-sign/dist/esm/sign.d.ts deleted file mode 100644 index dfcfbf8..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/sign.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { SignOptions } from './types'; -/** - * Signs a macOS application. - * @returns A void Promise once the signing operation is complete. - * - * @category Codesign - */ -export declare function signApp(_opts: SignOptions): Promise; -/** - * This function is a legacy callback implementation. - * - * @deprecated Please use the Promise-based {@link signAsync} method instead. - * @category Codesign - */ -export declare const sign: (opts: SignOptions, cb?: ((error?: Error) => void) | undefined) => void; diff --git a/node_modules/@electron/osx-sign/dist/esm/sign.js b/node_modules/@electron/osx-sign/dist/esm/sign.js deleted file mode 100644 index c161596..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/sign.js +++ /dev/null @@ -1,346 +0,0 @@ -import * as fs from 'fs-extra'; -import * as os from 'os'; -import * as path from 'path'; -import * as plist from 'plist'; -import compareVersion from 'compare-version'; -import { debugLog, debugWarn, getAppContentsPath, execFileAsync, validateOptsApp, validateOptsPlatform, walkAsync } from './util'; -import { Identity, findIdentities } from './util-identities'; -import { preEmbedProvisioningProfile, getProvisioningProfile } from './util-provisioning-profiles'; -import { preAutoEntitlements } from './util-entitlements'; -const pkgVersion = require('../../package.json').version; -const osRelease = os.release(); -/** - * This function returns a promise validating opts.binaries, the additional binaries to be signed along with the discovered enclosed components. - */ -async function validateOptsBinaries(opts) { - if (opts.binaries) { - if (!Array.isArray(opts.binaries)) { - throw new Error('Additional binaries should be an Array.'); - } - // TODO: Presence check for binary files, reject if any does not exist - } -} -function validateOptsIgnore(ignore) { - if (ignore && !(ignore instanceof Array)) { - return [ignore]; - } -} -/** - * This function returns a promise validating all options passed in opts. - */ -async function validateSignOpts(opts) { - await validateOptsBinaries(opts); - await validateOptsApp(opts); - if (opts.provisioningProfile && typeof opts.provisioningProfile !== 'string') { - throw new Error('Path to provisioning profile should be a string.'); - } - if (opts.type && opts.type !== 'development' && opts.type !== 'distribution') { - throw new Error('Type must be either `development` or `distribution`.'); - } - const platform = await validateOptsPlatform(opts); - const cloned = Object.assign(Object.assign({}, opts), { ignore: validateOptsIgnore(opts.ignore), type: opts.type || 'distribution', platform }); - return cloned; -} -/** - * This function returns a promise verifying the code sign of application bundle. - */ -async function verifySignApplication(opts) { - // Verify with codesign - debugLog('Verifying application bundle with codesign...'); - const strictVerify = opts.strictVerify !== undefined ? opts.strictVerify : true; - await execFileAsync('codesign', ['--verify', '--deep'].concat(strictVerify !== false && compareVersion(osRelease, '15.0.0') >= 0 // Strict flag since darwin 15.0.0 --> OS X 10.11.0 El Capitan - ? [ - '--strict' + - (strictVerify !== true ? '=' + strictVerify : '') - ] - : [], ['--verbose=2', opts.app])); -} -function defaultOptionsForFile(filePath, platform) { - const entitlementsFolder = path.resolve(__dirname, '..', '..', 'entitlements'); - let entitlementsFile; - if (platform === 'darwin') { - // Default Entitlements - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/app-entitlements.plist - // Also include JIT for main process V8 - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.plist'); - // Plugin helper - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/helper-plugin-entitlements.plist - if (filePath.includes('(Plugin).app')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.plugin.plist'); - // GPU Helper - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/helper-gpu-entitlements.plist - } - else if (filePath.includes('(GPU).app')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.gpu.plist'); - // Renderer Helper - // c.f. https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/helper-renderer-entitlements.plist - } - else if (filePath.includes('(Renderer).app')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.darwin.renderer.plist'); - } - } - else { - // Default entitlements - // TODO: Can these be more scoped like the non-mas variant? - entitlementsFile = path.resolve(entitlementsFolder, 'default.mas.plist'); - // If it is not the top level app bundle, we sign with inherit - if (filePath.includes('.app/')) { - entitlementsFile = path.resolve(entitlementsFolder, 'default.mas.child.plist'); - } - } - return { - entitlements: entitlementsFile, - hardenedRuntime: true, - requirements: undefined, - signatureFlags: undefined, - timestamp: undefined, - additionalArguments: [] - }; -} -async function mergeOptionsForFile(opts, defaults) { - const mergedPerFileOptions = Object.assign({}, defaults); - if (opts) { - if (opts.entitlements !== undefined) { - if (Array.isArray(opts.entitlements)) { - const entitlements = opts.entitlements.reduce((dict, entitlementKey) => (Object.assign(Object.assign({}, dict), { [entitlementKey]: true })), {}); - const dir = await fs.mkdtemp(path.resolve(os.tmpdir(), 'tmp-entitlements-')); - const entitlementsPath = path.join(dir, 'entitlements.plist'); - await fs.writeFile(entitlementsPath, plist.build(entitlements), 'utf8'); - opts.entitlements = entitlementsPath; - } - mergedPerFileOptions.entitlements = opts.entitlements; - } - if (opts.hardenedRuntime !== undefined) { - mergedPerFileOptions.hardenedRuntime = opts.hardenedRuntime; - } - if (opts.requirements !== undefined) - mergedPerFileOptions.requirements = opts.requirements; - if (opts.signatureFlags !== undefined) { - mergedPerFileOptions.signatureFlags = opts.signatureFlags; - } - if (opts.timestamp !== undefined) - mergedPerFileOptions.timestamp = opts.timestamp; - if (opts.additionalArguments !== undefined) - mergedPerFileOptions.additionalArguments = opts.additionalArguments; - } - return mergedPerFileOptions; -} -/** - * This function returns a promise codesigning only. - */ -async function signApplication(opts, identity) { - function shouldIgnoreFilePath(filePath) { - if (opts.ignore) { - return opts.ignore.some(function (ignore) { - if (typeof ignore === 'function') { - return ignore(filePath); - } - return filePath.match(ignore); - }); - } - return false; - } - const children = await walkAsync(getAppContentsPath(opts)); - if (opts.binaries) - children.push(...opts.binaries); - const args = ['--sign', identity.hash || identity.name, '--force']; - if (opts.keychain) { - args.push('--keychain', opts.keychain); - } - /** - * Sort the child paths by how deep they are in the file tree. Some arcane apple - * logic expects the deeper files to be signed first otherwise strange errors get - * thrown our way - */ - children.sort((a, b) => { - const aDepth = a.split(path.sep).length; - const bDepth = b.split(path.sep).length; - return bDepth - aDepth; - }); - for (const filePath of [...children, opts.app]) { - if (shouldIgnoreFilePath(filePath)) { - debugLog('Skipped... ' + filePath); - continue; - } - const perFileOptions = await mergeOptionsForFile(opts.optionsForFile ? opts.optionsForFile(filePath) : null, defaultOptionsForFile(filePath, opts.platform)); - // preAutoEntitlements should only be applied to the top level app bundle. - // Applying it other files will cause the app to crash and be rejected by Apple. - if (!filePath.includes('.app/')) { - if (opts.preAutoEntitlements === false) { - debugWarn('Pre-sign operation disabled for entitlements automation.'); - } - else { - debugLog('Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`:', '\n', '* Disable by setting `pre-auto-entitlements` to `false`.'); - if (!opts.version || compareVersion(opts.version, '1.1.1') >= 0) { - // Enable Mac App Store sandboxing without using temporary-exception, introduced in Electron v1.1.1. Relates to electron#5601 - const newEntitlements = await preAutoEntitlements(opts, perFileOptions, { - identity, - provisioningProfile: opts.provisioningProfile - ? await getProvisioningProfile(opts.provisioningProfile, opts.keychain) - : undefined - }); - // preAutoEntitlements may provide us new entitlements, if so we update our options - // and ensure that entitlements-loginhelper has a correct default value - if (newEntitlements) { - perFileOptions.entitlements = newEntitlements; - } - } - } - } - debugLog('Signing... ' + filePath); - const perFileArgs = [...args]; - if (perFileOptions.requirements) { - if (perFileOptions.requirements.charAt(0) === '=') { - perFileArgs.push(`-r${perFileOptions.requirements}`); - } - else { - perFileArgs.push('--requirements', perFileOptions.requirements); - } - } - if (perFileOptions.timestamp) { - perFileArgs.push('--timestamp=' + perFileOptions.timestamp); - } - else { - perFileArgs.push('--timestamp'); - } - let optionsArguments = []; - if (perFileOptions.signatureFlags) { - if (Array.isArray(perFileOptions.signatureFlags)) { - optionsArguments.push(...perFileOptions.signatureFlags); - } - else { - const flags = perFileOptions.signatureFlags.split(',').map(function (flag) { - return flag.trim(); - }); - optionsArguments.push(...flags); - } - } - if (perFileOptions.hardenedRuntime || optionsArguments.includes('runtime')) { - // Hardened runtime since darwin 17.7.0 --> macOS 10.13.6 - if (compareVersion(osRelease, '17.7.0') >= 0) { - optionsArguments.push('runtime'); - } - else { - // Remove runtime if passed in with --signature-flags - debugLog('Not enabling hardened runtime, current macOS version too low, requires 10.13.6 and higher'); - optionsArguments = optionsArguments.filter((arg) => { - return arg !== 'runtime'; - }); - } - } - if (optionsArguments.length) { - perFileArgs.push('--options', [...new Set(optionsArguments)].join(',')); - } - if (perFileOptions.additionalArguments) { - perFileArgs.push(...perFileOptions.additionalArguments); - } - await execFileAsync('codesign', perFileArgs.concat('--entitlements', perFileOptions.entitlements, filePath)); - } - // Verify code sign - debugLog('Verifying...'); - await verifySignApplication(opts); - debugLog('Verified.'); - // Check entitlements if applicable - debugLog('Displaying entitlements...'); - const result = await execFileAsync('codesign', [ - '--display', - '--entitlements', - ':-', - opts.app - ]); - debugLog('Entitlements:', '\n', result); -} -/** - * Signs a macOS application. - * @returns A void Promise once the signing operation is complete. - * - * @category Codesign - */ -export async function signApp(_opts) { - debugLog('electron-osx-sign@%s', pkgVersion); - const validatedOpts = await validateSignOpts(_opts); - let identities = []; - let identityInUse = null; - // Determine identity for signing - if (validatedOpts.identity) { - debugLog('`identity` passed in arguments.'); - if (validatedOpts.identityValidation === false) { - identityInUse = new Identity(validatedOpts.identity); - } - else { - identities = await findIdentities(validatedOpts.keychain || null, validatedOpts.identity); - } - } - else { - debugWarn('No `identity` passed in arguments...'); - if (validatedOpts.platform === 'mas') { - if (validatedOpts.type === 'distribution') { - debugLog('Finding `3rd Party Mac Developer Application` certificate for signing app distribution in the Mac App Store...'); - identities = await findIdentities(validatedOpts.keychain || null, '3rd Party Mac Developer Application:'); - } - else { - debugLog('Finding `Mac Developer` certificate for signing app in development for the Mac App Store signing...'); - identities = await findIdentities(validatedOpts.keychain || null, 'Mac Developer:'); - } - } - else { - debugLog('Finding `Developer ID Application` certificate for distribution outside the Mac App Store...'); - identities = await findIdentities(validatedOpts.keychain || null, 'Developer ID Application:'); - } - } - if (!identityInUse) { - if (identities.length > 0) { - // Identity(/ies) found - if (identities.length > 1) { - debugWarn('Multiple identities found, will use the first discovered.'); - } - else { - debugLog('Found 1 identity.'); - } - identityInUse = identities[0]; - } - else { - // No identity found - throw new Error('No identity found for signing.'); - } - } - // Pre-sign operations - if (validatedOpts.preEmbedProvisioningProfile === false) { - debugWarn('Pre-sign operation disabled for provisioning profile embedding:', '\n', '* Enable by setting `pre-embed-provisioning-profile` to `true`.'); - } - else { - debugLog('Pre-sign operation enabled for provisioning profile:', '\n', '* Disable by setting `pre-embed-provisioning-profile` to `false`.'); - await preEmbedProvisioningProfile(validatedOpts, validatedOpts.provisioningProfile - ? await getProvisioningProfile(validatedOpts.provisioningProfile, validatedOpts.keychain) - : null); - } - debugLog('Signing application...', '\n', '> Application:', validatedOpts.app, '\n', '> Platform:', validatedOpts.platform, '\n', '> Additional binaries:', validatedOpts.binaries, '\n', '> Identity:', validatedOpts.identity); - await signApplication(validatedOpts, identityInUse); - // Post-sign operations - debugLog('Application signed.'); -} -/** - * This function is a legacy callback implementation. - * - * @deprecated Please use the Promise-based {@link signAsync} method instead. - * @category Codesign - */ -export const sign = (opts, cb) => { - signApp(opts) - .then(() => { - debugLog('Application signed: ' + opts.app); - if (cb) - cb(); - }) - .catch((err) => { - if (err.message) - debugLog(err.message); - else if (err.stack) - debugLog(err.stack); - else - debugLog(err); - if (cb) - cb(err); - }); -}; -//# sourceMappingURL=sign.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/sign.js.map b/node_modules/@electron/osx-sign/dist/esm/sign.js.map deleted file mode 100644 index ec2fb66..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/sign.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/sign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK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AAG,CAAC,OAAO;YAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;aAClC,IAAI,GAAG,CAAC,KAAK;YAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;YACnC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACnB,IAAI,EAAE;YAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/types.d.ts b/node_modules/@electron/osx-sign/dist/esm/types.d.ts deleted file mode 100644 index 398a934..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/types.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -/** - * macOS applications can be distributed via the Mac App Store (MAS) or directly - * downloaded from the developer's website. @electron/osx-sign distinguishes between - * MAS apps (`mas`) or non-MAS apps (`darwin`). - * @category Utility - */ -export type ElectronMacPlatform = 'darwin' | 'mas'; -/** - * MAS apps can be signed using Development or Distribution certificates. - - * See [Apple Documentation](https://developer.apple.com/help/account/create-certificates/certificates-overview/) for more info. - * @category Utility - */ -export type SigningDistributionType = 'development' | 'distribution'; -/** - * @interface - * @internal - */ -export type BaseSignOptions = Readonly<{ - /** - * Path to the application package. - * Needs to end with the file extension `.app`. - */ - app: string; - /** - * The keychain name. - * - * @defaultValue `login` - */ - keychain?: string; - /** - * Build platform of your Electron app. - * Allowed values: `darwin` (Direct Download App), `mas` (Mac App Store). - * - * @defaultValue Determined by presence of `Squirrel.framework` within the application bundle, - * which is used for non-MAS apps. - */ - platform?: ElectronMacPlatform; - /** - * Name of the certificate to use when signing. - * - * @defaultValue Selected with respect to {@link SignOptions.provisioningProfile | provisioningProfile} - * and {@link SignOptions.platform | platform} from the selected {@link SignOptions.keychain | keychain}. - * * `mas` will look for `3rd Party Mac Developer Application: * (*)` - * * `darwin` will look for `Developer ID Application: * (*)` by default. - */ - identity?: string; -}>; -type OnlyValidatedBaseSignOptions = { - platform: ElectronMacPlatform; -}; -/** - * A set of signing options that can be overriden on a per-file basis. - * Any missing options will use the default values, and providing a partial structure - * will shallow merge with the default values. - * @interface - * @category Codesign - */ -export type PerFileSignOptions = { - /** - * String specifying the path to an `entitlements.plist` file. - * Can also be an array of entitlement keys that osx-sign will write to an entitlements file for you. - * - * @defaultValue `@electron/osx-sign`'s built-in entitlements files. - */ - entitlements?: string | string[]; - /** - * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime) - * for this file. - * - * Note: Hardened Runtime is a pre-requisite for notarization, which is mandatory for apps running on macOS 10.15 and above. - * - * @defaultValue `true` - */ - hardenedRuntime?: boolean; - /** - * Either a string beginning with `=` which specifies in plain text the - * [signing requirements](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) - * that you recommend to be used to evaluate the code signature, or a string specifying a path to a text or - * properly encoded `.rqset` file which contains those requirements. - */ - requirements?: string; - /** - * When signing, a set of option flags can be specified to change the behavior of the system when using the signed code. - * Accepts an array of strings or a comma-separated string. - * - * See --options of the `codesign` command. - * - * https://keith.github.io/xcode-man-pages/codesign.1.html#OPTION_FLAGS - */ - signatureFlags?: string | string[]; - /** - * String specifying the URL of the timestamp authority server. - * Please note that this default server may not support signatures not furnished by Apple. - * Disable the timestamp service with `none`. - * - * @defaultValue Uses the Apple-provided timestamp server. - */ - timestamp?: string; - /** - * Additional raw arguments to pass to the `codesign` command. - * - * These can be things like `--deep` for instance when code signing specific resources that may - * require such arguments. - * - * https://keith.github.io/xcode-man-pages/codesign.1.html#OPTIONS - */ - additionalArguments?: string[]; -}; -/** - * @interface - * @internal - */ -export type OnlySignOptions = { - /** - * Array of paths to additional binaries that will be signed along with built-ins of Electron. - * - * @defaultValue `undefined` - */ - binaries?: string[]; - /** - * Function that receives the path to a file and can return the entitlements to use for that file to override the default behavior. The - * object this function returns can include any of the following optional keys. Any properties that are returned **override** the default - * values that `@electron/osx-sign` generates. Any properties not returned use the default value. - * - * @param filePath Path to file - * @returns Override signing options - */ - optionsForFile?: (filePath: string) => PerFileSignOptions; - /** - * Flag to enable/disable validation for the signing identity. - * If enabled, the {@link SignOptions.identity | identity} provided - * will be validated in the {@link BaseSignOptions.keychain | keychain} specified. - * - * @defaultValue `true` - */ - identityValidation?: boolean; - /** - * Defines files that will be skipped during the code signing process. - * This property accepts a regex, function or an array of regexes and functions. - * Elements of other types are treated as `RegExp`. - * - * File paths matching a regex or returning a `true` value from a function will be ignored. - * - * @defaultValue `undefined` - */ - ignore?: string | string[] | ((file: string) => boolean); - /** - * Flag to enable/disable entitlements automation tasks necessary for code signing most Electron apps. - * * Adds [`com.apple.security.application-groups`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups) to the entitlements file - * * Fills in the `ElectronTeamID` property in `Info.plist` with the provisioning profile's Team Identifier or by parsing the identity name. - * - * @defaultValue `true` - */ - preAutoEntitlements?: boolean; - /** - * Flag to enable/disable the embedding of a provisioning profile into the app's `Contents` folder. - * Will use the profile from {@link OnlySignOptions.provisioningProfile} if provided. Otherwise, it - * searches for a `.provisionprofile` file in the current working directory. - * - * @defaultValue `true` - */ - preEmbedProvisioningProfile?: boolean; - /** - * Path to a provisioning profile, which can be used to grant restricted entitlements to your app. - * - * See [Apple Documentation](https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles) for more details. - */ - provisioningProfile?: string; - /** - * Flag to enable/disable the `--strict` flag when verifying the signed application bundle. - * Also supports string values to specify which strict restrictions to use, see codesign man page for supported values. - * - * @defaultValue `true` - */ - strictVerify?: boolean | string; - /** - * Type of certificate to use when signing a MAS app. - * @defaultValue `"distribution"` - */ - type?: SigningDistributionType; - /** - * Build version of Electron. Values may be like: `1.1.1`, `1.2.0`. For use for signing legacy versions - * of Electron to ensure backwards compatibility. - */ - version?: string; -}; -type OnlyValidatedSignOptions = { - ignore?: (string | ((file: string) => boolean))[]; - type: SigningDistributionType; -}; -type OnlyFlatOptions = { - /** - * Flag to enable/disable validation for the signing identity. - * If enabled, the {@link BaseSignOptions.identity | identity} provided - * will be validated in the {@link BaseSignOptions.keychain | keychain} specified. - * - * @defaultValue `true` - */ - identityValidation?: boolean; - /** - * Path to install the bundle. - * @defaultValue `"/Applications"` - */ - install?: string; - /** - * Output path for the flattened installer package. - * Needs file extension `.pkg`. - * - * @defaultValue Inferred from the app name passed into `opts.app`. - */ - pkg?: string; - /** - * Path to a directory containing `preinstall.sh` or `postinstall.sh` scripts. - * These must be executable and will run on pre/postinstall depending on the file - * name. - * - * This option is only valid if {@link FlatOptions.platform} is set to `darwin`. - */ - scripts?: string; -}; -type OnlyValidatedFlatOptions = { - install: string; - pkg: string; -}; -/** - * Utility type that represents an `UnValidated` type after validation, - * replacing any properties in the unvalidated type that also exist in the - * `Validated` type with the validated versions. - * - * @template UnValidated - The type representing the unvalidated form. - * @template Validated - The type representing the validated form. - */ -type ValidatedForm = Omit & Validated; -type ValidatedBaseSignOptions = Readonly>; -type _SignOptions = Readonly; -/** - * Options for codesigning a packaged `.app` bundle. - * @category Codesign - */ -export interface SignOptions extends _SignOptions { -} -/** - * @internal - */ -export type ValidatedSignOptions = Readonly & ValidatedBaseSignOptions>; -type _FlatOptions = Readonly; -/** - * Options for creating a flat `.pkg` installer. - * @category Flat - */ -export interface FlatOptions extends _FlatOptions { -} -/** - * @internal - */ -export type ValidatedFlatOptions = Readonly & ValidatedBaseSignOptions>; -export {}; diff --git a/node_modules/@electron/osx-sign/dist/esm/types.js b/node_modules/@electron/osx-sign/dist/esm/types.js deleted file mode 100644 index 718fd38..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/types.js.map b/node_modules/@electron/osx-sign/dist/esm/types.js.map deleted file mode 100644 index 7b5fff8..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/util-entitlements.d.ts b/node_modules/@electron/osx-sign/dist/esm/util-entitlements.d.ts deleted file mode 100644 index 0c4ff73..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-entitlements.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { PerFileSignOptions, ValidatedSignOptions } from './types'; -import { Identity } from './util-identities'; -import { ProvisioningProfile } from './util-provisioning-profiles'; -type ComputedOptions = { - identity: Identity; - provisioningProfile?: ProvisioningProfile; -}; -/** - * This function returns a promise completing the entitlements automation: The - * process includes checking in `Info.plist` for `ElectronTeamID` or setting - * parsed value from identity, and checking in entitlements file for - * `com.apple.security.application-groups` or inserting new into array. A - * temporary entitlements file may be created to replace the input for any - * changes introduced. - */ -export declare function preAutoEntitlements(opts: ValidatedSignOptions, perFileOpts: PerFileSignOptions, computed: ComputedOptions): Promise; -export {}; diff --git a/node_modules/@electron/osx-sign/dist/esm/util-entitlements.js b/node_modules/@electron/osx-sign/dist/esm/util-entitlements.js deleted file mode 100644 index 8d4455b..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-entitlements.js +++ /dev/null @@ -1,106 +0,0 @@ -import * as fs from 'fs-extra'; -import * as os from 'os'; -import * as path from 'path'; -import * as plist from 'plist'; -import { debugLog, getAppContentsPath } from './util'; -const preAuthMemo = new Map(); -/** - * This function returns a promise completing the entitlements automation: The - * process includes checking in `Info.plist` for `ElectronTeamID` or setting - * parsed value from identity, and checking in entitlements file for - * `com.apple.security.application-groups` or inserting new into array. A - * temporary entitlements file may be created to replace the input for any - * changes introduced. - */ -export async function preAutoEntitlements(opts, perFileOpts, computed) { - var _a; - if (!perFileOpts.entitlements) - return; - const memoKey = [opts.app, perFileOpts.entitlements].join('---'); - if (preAuthMemo.has(memoKey)) - return preAuthMemo.get(memoKey); - // If entitlements file not provided, default will be used. Fixes #41 - const appInfoPath = path.join(getAppContentsPath(opts), 'Info.plist'); - debugLog('Automating entitlement app group...', '\n', '> Info.plist:', appInfoPath, '\n'); - let entitlements; - if (typeof perFileOpts.entitlements === 'string') { - const entitlementsContents = await fs.readFile(perFileOpts.entitlements, 'utf8'); - entitlements = plist.parse(entitlementsContents); - } - else { - entitlements = perFileOpts.entitlements.reduce((dict, entitlementKey) => (Object.assign(Object.assign({}, dict), { [entitlementKey]: true })), {}); - } - if (!entitlements['com.apple.security.app-sandbox']) { - // Only automate when app sandbox enabled by user - return; - } - const appInfoContents = await fs.readFile(appInfoPath, 'utf8'); - const appInfo = plist.parse(appInfoContents); - // Use ElectronTeamID in Info.plist if already specified - if (appInfo.ElectronTeamID) { - debugLog('`ElectronTeamID` found in `Info.plist`: ' + appInfo.ElectronTeamID); - } - else { - // The team identifier in signing identity should not be trusted - if (computed.provisioningProfile) { - appInfo.ElectronTeamID = - computed.provisioningProfile.message.Entitlements['com.apple.developer.team-identifier']; - debugLog('`ElectronTeamID` not found in `Info.plist`, use parsed from provisioning profile: ' + - appInfo.ElectronTeamID); - } - else { - const teamID = (_a = /^.+\((.+?)\)$/g.exec(computed.identity.name)) === null || _a === void 0 ? void 0 : _a[1]; - if (!teamID) { - throw new Error(`Could not automatically determine ElectronTeamID from identity: ${computed.identity.name}`); - } - appInfo.ElectronTeamID = teamID; - debugLog('`ElectronTeamID` not found in `Info.plist`, use parsed from signing identity: ' + - appInfo.ElectronTeamID); - } - await fs.writeFile(appInfoPath, plist.build(appInfo), 'utf8'); - debugLog('`Info.plist` updated:', '\n', '> Info.plist:', appInfoPath); - } - const appIdentifier = appInfo.ElectronTeamID + '.' + appInfo.CFBundleIdentifier; - // Insert application identifier if not exists - if (entitlements['com.apple.application-identifier']) { - debugLog('`com.apple.application-identifier` found in entitlements file: ' + - entitlements['com.apple.application-identifier']); - } - else { - debugLog('`com.apple.application-identifier` not found in entitlements file, new inserted: ' + - appIdentifier); - entitlements['com.apple.application-identifier'] = appIdentifier; - } - // Insert developer team identifier if not exists - if (entitlements['com.apple.developer.team-identifier']) { - debugLog('`com.apple.developer.team-identifier` found in entitlements file: ' + - entitlements['com.apple.developer.team-identifier']); - } - else { - debugLog('`com.apple.developer.team-identifier` not found in entitlements file, new inserted: ' + - appInfo.ElectronTeamID); - entitlements['com.apple.developer.team-identifier'] = appInfo.ElectronTeamID; - } - // Init entitlements app group key to array if not exists - if (!entitlements['com.apple.security.application-groups']) { - entitlements['com.apple.security.application-groups'] = []; - } - // Insert app group if not exists - if (Array.isArray(entitlements['com.apple.security.application-groups']) && - entitlements['com.apple.security.application-groups'].indexOf(appIdentifier) === -1) { - debugLog('`com.apple.security.application-groups` not found in entitlements file, new inserted: ' + - appIdentifier); - entitlements['com.apple.security.application-groups'].push(appIdentifier); - } - else { - debugLog('`com.apple.security.application-groups` found in entitlements file: ' + appIdentifier); - } - // Create temporary entitlements file - const dir = await fs.mkdtemp(path.resolve(os.tmpdir(), 'tmp-entitlements-')); - const entitlementsPath = path.join(dir, 'entitlements.plist'); - await fs.writeFile(entitlementsPath, plist.build(entitlements), 'utf8'); - debugLog('Entitlements file updated:', '\n', '> Entitlements:', entitlementsPath); - preAuthMemo.set(memoKey, entitlementsPath); - return entitlementsPath; -} -//# sourceMappingURL=util-entitlements.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/util-entitlements.js.map b/node_modules/@electron/osx-sign/dist/esm/util-entitlements.js.map deleted file mode 100644 index 0b50559..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-entitlements.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util-entitlements.js","sourceRoot":"","sources":["../../src/util-entitlements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,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,CAAC,4BAA4B,EAAE,IAAI,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IAElF,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAC3C,OAAO,gBAAgB,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/util-identities.d.ts b/node_modules/@electron/osx-sign/dist/esm/util-identities.d.ts deleted file mode 100644 index fe56cdb..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-identities.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class Identity { - name: string; - hash?: string | undefined; - constructor(name: string, hash?: string | undefined); -} -export declare function findIdentities(keychain: string | null, identity: string): Promise; diff --git a/node_modules/@electron/osx-sign/dist/esm/util-identities.js b/node_modules/@electron/osx-sign/dist/esm/util-identities.js deleted file mode 100644 index 4fb273d..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-identities.js +++ /dev/null @@ -1,30 +0,0 @@ -import { debugLog, compactFlattenedList, execFileAsync } from './util'; -export class Identity { - constructor(name, hash) { - this.name = name; - this.hash = hash; - } -} -export async function findIdentities(keychain, identity) { - // Only to look for valid identities, excluding those flagged with - // CSSMERR_TP_CERT_EXPIRED or CSSMERR_TP_NOT_TRUSTED. Fixes #9 - const args = [ - 'find-identity', - '-v' - ]; - if (keychain) { - args.push(keychain); - } - const result = await execFileAsync('security', args); - const identities = result.split('\n').map(function (line) { - if (line.indexOf(identity) >= 0) { - const identityFound = line.substring(line.indexOf('"') + 1, line.lastIndexOf('"')); - const identityHashFound = line.substring(line.indexOf(')') + 2, line.indexOf('"') - 1); - debugLog('Identity:', '\n', '> Name:', identityFound, '\n', '> Hash:', identityHashFound); - return new Identity(identityFound, identityHashFound); - } - return null; - }); - return compactFlattenedList(identities); -} -//# sourceMappingURL=util-identities.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/util-identities.js.map b/node_modules/@electron/osx-sign/dist/esm/util-identities.js.map deleted file mode 100644 index 18e3c43..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-identities.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util-identities.js","sourceRoot":"","sources":["../../src/util-identities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvE,MAAM,OAAO,QAAQ;IACnB,YAAoB,IAAY,EAAS,IAAa;QAAlC,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAS;IAAG,CAAC;CAC3D;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAE,QAAuB,EAAE,QAAgB;IAC7E,kEAAkE;IAClE,8DAA8D;IAE9D,MAAM,IAAI,GAAG;QACX,eAAe;QACf,IAAI;KACL,CAAC;IACF,IAAI,QAAQ,EAAE;QACZ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACrB;IAED,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,IAAI;QACtD,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YACnF,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACvF,QAAQ,CAAC,WAAW,EAAE,IAAI,EACxB,SAAS,EAAE,aAAa,EAAE,IAAI,EAC9B,SAAS,EAAE,iBAAiB,CAAC,CAAC;YAChC,OAAO,IAAI,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;SACvD;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.d.ts b/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.d.ts deleted file mode 100644 index 7c9d9c3..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ElectronMacPlatform, ValidatedSignOptions } from './types'; -export declare class ProvisioningProfile { - filePath: string; - message: any; - constructor(filePath: string, message: any); - get name(): string; - get platforms(): ElectronMacPlatform[]; - get type(): "development" | "distribution"; -} -/** - * Returns a promise resolving to a ProvisioningProfile instance based on file. - * @function - * @param {string} filePath - Path to provisioning profile. - * @param {string} keychain - Keychain to use when unlocking provisioning profile. - * @returns {Promise} Promise. - */ -export declare function getProvisioningProfile(filePath: string, keychain?: string | null): Promise; -/** - * Returns a promise resolving to a list of suitable provisioning profile within the current working directory. - */ -export declare function findProvisioningProfiles(opts: ValidatedSignOptions): Promise; -/** - * Returns a promise embedding the provisioning profile in the app Contents folder. - */ -export declare function preEmbedProvisioningProfile(opts: ValidatedSignOptions, profile: ProvisioningProfile | null): Promise; diff --git a/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js b/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js deleted file mode 100644 index 62d0fea..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js +++ /dev/null @@ -1,115 +0,0 @@ -import * as fs from 'fs-extra'; -import * as path from 'path'; -import plist from 'plist'; -import { debugLog, debugWarn, getAppContentsPath, compactFlattenedList, execFileAsync } from './util'; -export class ProvisioningProfile { - constructor(filePath, message) { - this.filePath = filePath; - this.message = message; - } - get name() { - return this.message.Name; - } - get platforms() { - if ('ProvisionsAllDevices' in this.message) - return ['darwin']; - // Developer ID - else if (this.type === 'distribution') - return ['mas']; - // Mac App Store - else - return ['darwin', 'mas']; // Mac App Development - } - get type() { - if ('ProvisionedDevices' in this.message) - return 'development'; - // Mac App Development - else - return 'distribution'; // Developer ID or Mac App Store - } -} -/** - * Returns a promise resolving to a ProvisioningProfile instance based on file. - * @function - * @param {string} filePath - Path to provisioning profile. - * @param {string} keychain - Keychain to use when unlocking provisioning profile. - * @returns {Promise} Promise. - */ -export async function getProvisioningProfile(filePath, keychain = null) { - const securityArgs = [ - 'cms', - '-D', - '-i', - filePath // Use infile as source of data - ]; - if (keychain) { - securityArgs.push('-k', keychain); - } - const result = await execFileAsync('security', securityArgs); - const provisioningProfile = new ProvisioningProfile(filePath, plist.parse(result)); - debugLog('Provisioning profile:', '\n', '> Name:', provisioningProfile.name, '\n', '> Platforms:', provisioningProfile.platforms, '\n', '> Type:', provisioningProfile.type, '\n', '> Path:', provisioningProfile.filePath, '\n', '> Message:', provisioningProfile.message); - return provisioningProfile; -} -/** - * Returns a promise resolving to a list of suitable provisioning profile within the current working directory. - */ -export async function findProvisioningProfiles(opts) { - const cwd = process.cwd(); - const children = await fs.readdir(cwd); - const foundProfiles = compactFlattenedList(await Promise.all(children.map(async (child) => { - const filePath = path.resolve(cwd, child); - const stat = await fs.stat(filePath); - if (stat.isFile() && path.extname(filePath) === '.provisionprofile') { - return filePath; - } - return null; - }))); - return compactFlattenedList(await Promise.all(foundProfiles.map(async (filePath) => { - const profile = await getProvisioningProfile(filePath); - if (profile.platforms.indexOf(opts.platform) >= 0 && profile.type === opts.type) { - return profile; - } - debugWarn('Provisioning profile above ignored, not for ' + opts.platform + ' ' + opts.type + '.'); - return null; - }))); -} -/** - * Returns a promise embedding the provisioning profile in the app Contents folder. - */ -export async function preEmbedProvisioningProfile(opts, profile) { - async function embedProvisioningProfile(profile) { - debugLog('Looking for existing provisioning profile...'); - const embeddedFilePath = path.join(getAppContentsPath(opts), 'embedded.provisionprofile'); - if (await fs.pathExists(embeddedFilePath)) { - debugLog('Found embedded provisioning profile:', '\n', '* Please manually remove the existing file if not wanted.', '\n', '* Current file at:', embeddedFilePath); - } - else { - debugLog('Embedding provisioning profile...'); - await fs.copy(profile.filePath, embeddedFilePath); - } - } - if (profile) { - // User input provisioning profile - return await embedProvisioningProfile(profile); - } - else { - // Discover provisioning profile - debugLog('No `provisioning-profile` passed in arguments, will find in current working directory and in user library...'); - const profiles = await findProvisioningProfiles(opts); - if (profiles.length > 0) { - // Provisioning profile(s) found - if (profiles.length > 1) { - debugLog('Multiple provisioning profiles found, will use the first discovered.'); - } - else { - debugLog('Found 1 provisioning profile.'); - } - await embedProvisioningProfile(profiles[0]); - } - else { - // No provisioning profile found - debugLog('No provisioning profile found, will not embed profile in app contents.'); - } - } -} -//# sourceMappingURL=util-provisioning-profiles.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js.map b/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js.map deleted file mode 100644 index 6beb366..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util-provisioning-profiles.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util-provisioning-profiles.js","sourceRoot":"","sources":["../../src/util-provisioning-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEtG,MAAM,OAAO,mBAAmB;IAC9B,YAAoB,QAAgB,EAAS,OAAY;QAArC,aAAQ,GAAR,QAAQ,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAK;IAAG,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ts b/node_modules/@electron/osx-sign/dist/esm/util.d.ts deleted file mode 100644 index e1ef5b7..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/// -import * as child from 'child_process'; -import debug from 'debug'; -import { BaseSignOptions, ElectronMacPlatform } from './types'; -export declare const debugLog: debug.Debugger; -export declare const debugWarn: debug.Debugger; -export declare function execFileAsync(file: string, args: string[], options?: child.ExecFileOptions): Promise; -type DeepListItem = null | T | DeepListItem[]; -type DeepList = DeepListItem[]; -export declare function compactFlattenedList(list: DeepList): T[]; -/** - * Returns the path to the "Contents" folder inside the application bundle - */ -export declare function getAppContentsPath(opts: BaseSignOptions): string; -/** - * Returns the path to app "Frameworks" within contents. - */ -export declare function getAppFrameworksPath(opts: BaseSignOptions): string; -export declare function detectElectronPlatform(opts: BaseSignOptions): Promise; -/** - * This function returns a promise validating opts.app, the application to be signed or flattened. - */ -export declare function validateOptsApp(opts: BaseSignOptions): Promise; -/** - * This function returns a promise validating opts.platform, the platform of Electron build. It allows auto-discovery if no opts.platform is specified. - */ -export declare function validateOptsPlatform(opts: BaseSignOptions): Promise; -/** - * This function returns a promise resolving all child paths within the directory specified. - * @function - * @param {string} dirPath - Path to directory. - * @returns {Promise} Promise resolving child paths needing signing in order. - * @internal - */ -export declare function walkAsync(dirPath: string): Promise; -export {}; diff --git a/node_modules/@electron/osx-sign/dist/esm/util.js b/node_modules/@electron/osx-sign/dist/esm/util.js deleted file mode 100644 index d3f66d5..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util.js +++ /dev/null @@ -1,146 +0,0 @@ -import * as child from 'child_process'; -import * as fs from 'fs-extra'; -import { isBinaryFile } from 'isbinaryfile'; -import * as path from 'path'; -import debug from 'debug'; -export const debugLog = debug('electron-osx-sign'); -debugLog.log = console.log.bind(console); -export const debugWarn = debug('electron-osx-sign:warn'); -debugWarn.log = console.warn.bind(console); -const removePassword = function (input) { - return input.replace(/(-P |pass:|\/p|-pass )([^ ]+)/, function (_, p1) { - return `${p1}***`; - }); -}; -export async function execFileAsync(file, args, options = {}) { - if (debugLog.enabled) { - debugLog('Executing...', file, args && Array.isArray(args) ? removePassword(args.join(' ')) : ''); - } - return new Promise(function (resolve, reject) { - child.execFile(file, args, options, function (err, stdout, stderr) { - if (err) { - debugLog('Error executing file:', '\n', '> Stdout:', stdout, '\n', '> Stderr:', stderr); - reject(err); - return; - } - resolve(stdout); - }); - }); -} -export function compactFlattenedList(list) { - const result = []; - function populateResult(list) { - if (!Array.isArray(list)) { - if (list) - result.push(list); - } - else if (list.length > 0) { - for (const item of list) - if (item) - populateResult(item); - } - } - populateResult(list); - return result; -} -/** - * Returns the path to the "Contents" folder inside the application bundle - */ -export function getAppContentsPath(opts) { - return path.join(opts.app, 'Contents'); -} -/** - * Returns the path to app "Frameworks" within contents. - */ -export function getAppFrameworksPath(opts) { - return path.join(getAppContentsPath(opts), 'Frameworks'); -} -export async function detectElectronPlatform(opts) { - const appFrameworksPath = getAppFrameworksPath(opts); - if (await fs.pathExists(path.resolve(appFrameworksPath, 'Squirrel.framework'))) { - return 'darwin'; - } - else { - return 'mas'; - } -} -/** - * This function returns a promise resolving the file path if file binary. - */ -async function getFilePathIfBinary(filePath) { - if (await isBinaryFile(filePath)) { - return filePath; - } - return null; -} -/** - * This function returns a promise validating opts.app, the application to be signed or flattened. - */ -export async function validateOptsApp(opts) { - if (!opts.app) { - throw new Error('Path to application must be specified.'); - } - if (path.extname(opts.app) !== '.app') { - throw new Error('Extension of application must be `.app`.'); - } - if (!(await fs.pathExists(opts.app))) { - throw new Error(`Application at path "${opts.app}" could not be found`); - } -} -/** - * This function returns a promise validating opts.platform, the platform of Electron build. It allows auto-discovery if no opts.platform is specified. - */ -export async function validateOptsPlatform(opts) { - if (opts.platform) { - if (opts.platform === 'mas' || opts.platform === 'darwin') { - return opts.platform; - } - else { - debugWarn('`platform` passed in arguments not supported, checking Electron platform...'); - } - } - else { - debugWarn('No `platform` passed in arguments, checking Electron platform...'); - } - return await detectElectronPlatform(opts); -} -/** - * This function returns a promise resolving all child paths within the directory specified. - * @function - * @param {string} dirPath - Path to directory. - * @returns {Promise} Promise resolving child paths needing signing in order. - * @internal - */ -export async function walkAsync(dirPath) { - debugLog('Walking... ' + dirPath); - async function _walkAsync(dirPath) { - const children = await fs.readdir(dirPath); - return await Promise.all(children.map(async (child) => { - const filePath = path.resolve(dirPath, child); - const stat = await fs.stat(filePath); - if (stat.isFile()) { - switch (path.extname(filePath)) { - case '.cstemp': // Temporary file generated from past codesign - debugLog('Removing... ' + filePath); - await fs.remove(filePath); - return null; - default: - return await getFilePathIfBinary(filePath); - } - } - else if (stat.isDirectory() && !stat.isSymbolicLink()) { - const walkResult = await _walkAsync(filePath); - switch (path.extname(filePath)) { - case '.app': // Application - case '.framework': // Framework - walkResult.push(filePath); - } - return walkResult; - } - return null; - })); - } - const allPaths = await _walkAsync(dirPath); - return compactFlattenedList(allPaths); -} -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/dist/esm/util.js.map b/node_modules/@electron/osx-sign/dist/esm/util.js.map deleted file mode 100644 index b95a3ae..0000000 --- a/node_modules/@electron/osx-sign/dist/esm/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AACnD,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAEzC,MAAM,CAAC,MAA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AE,EAAE;gBACjB,QAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAC9B,KAAK,SAAS,EAAE,8CAA8C;wBAC5D,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,CAAC;wBACpC,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC1B,OAAO,IAAI,CAAC;oBACd;wBACE,OAAO,MAAM,mBAAmB,CAAC,QAAQ,CAAC,CAAC;iBAC9C;aACF;iBAAM,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE;gBACvD,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;gBAC9C,QAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAC9B,KAAK,MAAM,CAAC,CAAC,cAAc;oBAC3B,KAAK,YAAY,EAAE,YAAY;wBAC7B,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC7B;gBACD,OAAO,UAAU,CAAC;aACnB;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/osx-sign/entitlements/default.darwin.gpu.plist b/node_modules/@electron/osx-sign/entitlements/default.darwin.gpu.plist deleted file mode 100644 index 446fe17..0000000 --- a/node_modules/@electron/osx-sign/entitlements/default.darwin.gpu.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.cs.allow-jit - - - diff --git a/node_modules/@electron/osx-sign/entitlements/default.darwin.plist b/node_modules/@electron/osx-sign/entitlements/default.darwin.plist deleted file mode 100644 index c762cfb..0000000 --- a/node_modules/@electron/osx-sign/entitlements/default.darwin.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - com.apple.security.cs.allow-jit - - com.apple.security.device.audio-input - - com.apple.security.device.bluetooth - - com.apple.security.device.camera - - com.apple.security.device.print - - com.apple.security.device.usb - - com.apple.security.personal-information.location - - - diff --git a/node_modules/@electron/osx-sign/entitlements/default.darwin.plugin.plist b/node_modules/@electron/osx-sign/entitlements/default.darwin.plugin.plist deleted file mode 100644 index 67ebe4e..0000000 --- a/node_modules/@electron/osx-sign/entitlements/default.darwin.plugin.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.cs.allow-unsigned-executable-memory - - com.apple.security.cs.disable-library-validation - - - diff --git a/node_modules/@electron/osx-sign/entitlements/default.darwin.renderer.plist b/node_modules/@electron/osx-sign/entitlements/default.darwin.renderer.plist deleted file mode 100644 index 446fe17..0000000 --- a/node_modules/@electron/osx-sign/entitlements/default.darwin.renderer.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.cs.allow-jit - - - diff --git a/node_modules/@electron/osx-sign/entitlements/default.mas.child.plist b/node_modules/@electron/osx-sign/entitlements/default.mas.child.plist deleted file mode 100644 index d8dc69e..0000000 --- a/node_modules/@electron/osx-sign/entitlements/default.mas.child.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.inherit - - - diff --git a/node_modules/@electron/osx-sign/entitlements/default.mas.plist b/node_modules/@electron/osx-sign/entitlements/default.mas.plist deleted file mode 100644 index 025064d..0000000 --- a/node_modules/@electron/osx-sign/entitlements/default.mas.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.bookmarks.app-scope - - com.apple.security.network.client - - com.apple.security.print - - com.apple.security.device.camera - - com.apple.security.device.microphone - - com.apple.security.device.usb - - - diff --git a/node_modules/@electron/osx-sign/package.json b/node_modules/@electron/osx-sign/package.json deleted file mode 100644 index 2e8ce51..0000000 --- a/node_modules/@electron/osx-sign/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "@electron/osx-sign", - "version": "1.3.3", - "description": "Codesign Electron macOS apps", - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", - "files": [ - "dist", - "entitlements", - "README.md", - "LICENSE", - "bin" - ], - "bin": { - "electron-osx-flat": "bin/electron-osx-flat.js", - "electron-osx-sign": "bin/electron-osx-sign.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/electron/osx-sign.git" - }, - "author": "electron", - "license": "BSD-2-Clause", - "publishConfig": { - "provenance": true - }, - "bugs": { - "url": "https://github.com/electron/osx-sign/issues" - }, - "homepage": "https://github.com/electron/osx-sign", - "dependencies": { - "compare-version": "^0.1.2", - "debug": "^4.3.4", - "fs-extra": "^10.0.0", - "isbinaryfile": "^4.0.8", - "minimist": "^1.2.6", - "plist": "^3.0.5" - }, - "devDependencies": { - "@electron/get": "^2.0.2", - "@types/compare-version": "^0.1.31", - "@types/debug": "^4.1.7", - "@types/fs-extra": "^9.0.13", - "@types/node": "^16.11.6", - "@types/plist": "^3.0.2", - "@typescript-eslint/eslint-plugin": "^5.45.0", - "@typescript-eslint/parser": "^5.45.0", - "eslint": "^8.29.0", - "eslint-config-eslint": "^7.0.0", - "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.1.1", - "extract-zip": "^2.0.1", - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2", - "run-series": "^1.1.9", - "run-waterfall": "^1.1.7", - "standard": "^17.0.0", - "tape": "^4.7.1", - "typedoc": "~0.25.13", - "typescript": "^4.9.3" - }, - "scripts": { - "build": "tsc && tsc -p tsconfig.esm.json", - "docs:build": "npx typedoc", - "lint": "eslint --ext .ts,.js src bin test", - "pretest": "rimraf test/work", - "test": "yarn lint && tape test", - "prepublishOnly": "yarn build" - }, - "standard": { - "ignore": [ - "test/work" - ] - }, - "engines": { - "node": ">=12.0.0" - } -} diff --git a/node_modules/@electron/rebuild/LICENSE b/node_modules/@electron/rebuild/LICENSE deleted file mode 100644 index dc1402e..0000000 --- a/node_modules/@electron/rebuild/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Contributors to the Electron project - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@electron/rebuild/README.md b/node_modules/@electron/rebuild/README.md deleted file mode 100644 index 7eb2ed1..0000000 --- a/node_modules/@electron/rebuild/README.md +++ /dev/null @@ -1,202 +0,0 @@ -# @electron/rebuild - -[![Test](https://github.com/electron/rebuild/actions/workflows/test.yml/badge.svg)](https://github.com/electron/rebuild/actions/workflows/test.yml) -[![NPM](https://img.shields.io/npm/v/@electron/rebuild.svg?style=flat)](https://npm.im/@electron/rebuild) -[![Coverage Status](https://codecov.io/gh/electron/rebuild/branch/main/graph/badge.svg)](https://codecov.io/gh/electron/rebuild) -[![API docs](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40electron%2Frebuild%2Flatest&query=%24.version&logo=typescript&logoColor=white&label=API%20Docs)](https://packages.electronjs.org/rebuild) - -This executable rebuilds native Node.js modules against the version of Node.js -that your Electron project is using. This allows you to use native Node.js -modules in Electron apps without your system version of Node.js matching exactly -(which is often not the case, and sometimes not even possible). - -### How does it work? - -Install the package with `--save-dev`: - -```sh -npm install --save-dev @electron/rebuild -``` - -Then, whenever you install a new npm package, rerun electron-rebuild: - -```sh -$(npm bin)/electron-rebuild -``` - -Or if you're on Windows: - -```sh -.\node_modules\.bin\electron-rebuild.cmd -``` - -If you have a good node-gyp config but you see an error about a missing element on Windows like `Could not load the Visual C++ component "VCBuild.exe"`, try to launch `electron-rebuild` in an npm script: - -```json -"scripts": { - "rebuild": "electron-rebuild -f -w yourmodule" -} -``` - -and then - -```sh -npm run rebuild -``` - -### What are the requirements? - -Node v22.12.0 or higher is required. Building native modules from source uses -[`node-gyp`](https://github.com/nodejs/node-gyp#installation). Refer to the link for its -installation/runtime requirements. - -### CLI arguments - -``` -Usage: electron-rebuild --version [version] --module-dir [path] - -Options: - -v, --version The version of Electron to build against [string] - -f, --force Force rebuilding modules, even if we would skip - it otherwise [boolean] - -a, --arch Override the target architecture to something - other than your system's [string] - -m, --module-dir The path to the node_modules directory to rebuild - [string] - -w, --which-module A specific module to build, or comma separated - list of modules. Modules will only be rebuilt if - they also match the types of dependencies being - rebuilt (see --types). [string] - -o, --only Only build specified module, or comma separated - list of modules. All others are ignored. [string] - -e, --electron-prebuilt-dir The path to the prebuilt electron module [string] - -d, --dist-url Custom header tarball URL [string] - -t, --types The types of dependencies to rebuild. Comma - separated list of "prod", "dev" and "optional". - Default is "prod,optional" [string] - -p, --parallel Rebuild in parallel, this is enabled by default - on macOS and Linux [boolean] - -s, --sequential Rebuild modules sequentially, this is enabled by - default on Windows [boolean] - -b, --debug Build debug version of modules [boolean] - -j, --jobs Number of parallel compile jobs node-gyp should - run (passed as node-gyp --jobs). Defaults to - node-gyp's own default. [number] - --prebuild-tag-prefix GitHub tag prefix passed to prebuild-install. - Default is "v" [string] - --force-abi Override the ABI version for the version of - Electron you are targeting. Only use when - targeting Nightly releases. [number] - --use-electron-clang Use the clang executable that Electron used when - building its binary. This will guarantee compiler - compatibility [boolean] - --disable-pre-gyp-copy Disables the pre-gyp copy step [boolean] - --build-from-source Skips prebuild download and rebuilds module from - source. [boolean] - -h, --help Show help [boolean] -``` - -> [!NOTE] -> The `--dist-url` value can also be provided via the `ELECTRON_REBUILD_DIST_URL` -> environment variable. The `--dist-url` flag takes precedence when both are set. - -> [!NOTE] -> By default, only your `prod` and `optional` dependencies are rebuilt — -> `devDependencies` are **not** rebuilt. This is because the default value of -> `types` is `['prod', 'optional']`. If you have a native module in your -> `devDependencies` that you need rebuilt, you must explicitly include `dev` in -> the list of types: -> -> - CLI: `electron-rebuild --types prod,optional,dev` (or `-t prod,optional,dev`) -> - API: `rebuild({ ..., types: ['prod', 'optional', 'dev'] })` - -### How can I use this with [Electron Forge](https://github.com/electron/forge)? - -This package is automatically used with Electron Forge when packaging an Electron app. - -### How can I integrate this into [Electron Packager](https://github.com/electron/packager)? - -electron-rebuild provides a function compatible with the [`afterCopy` hook](https://packages.electronjs.org/packager/v19.0.5/interfaces/Options.html#aftercopy) -for Electron Packager. For example: - -```javascript -import { packager } from "@electron/packager"; -import { rebuild } from "@electron/rebuild"; - -packager({ - // … other options - afterCopy: [ - async ({ buildPath, electronVersion, arch }) => { - await rebuild({ buildPath, electronVersion, arch }); - }, - ], - // … other options -}); - -``` - -### How can I integrate this with [prebuild](https://github.com/prebuild/prebuild)? - -If your module uses [prebuild](https://github.com/prebuild/prebuild) for creating prebuilt binaries, -it also uses [prebuild-install](https://github.com/prebuild/prebuild-install) to download them. If -this is the case, then `electron-rebuild` will run `prebuild-install` to download the correct -binaries from the project's GitHub Releases instead of rebuilding them. - -### How can I integrate this into my build pipeline? - -electron-rebuild is also a library that you can require into your app or -build process. It has a very simple API: - -```javascript -import { rebuild } from '@electron/rebuild'; - -// Public: Rebuilds a node_modules directory with the given Electron version. -// -// options: Object with the following properties -// buildPath - An absolute path to your app's directory. (The directory that contains your node_modules) -// electronVersion - The version of Electron to rebuild for -// arch (optional) - Default: process.arch - The arch to rebuild for -// extraModules (optional) - Default: [] - An array of modules to rebuild as well as the detected modules -// onlyModules (optional) - Default: null - An array of modules to rebuild, ONLY these module names will be rebuilt. -// The "types" property will be ignored if this option is set. -// force (optional) - Default: false - Force a rebuild of modules regardless of their current build state -// headerURL (optional) - Default: https://www.electronjs.org/headers - The URL to download Electron header files from -// types (optional) - Default: ['prod', 'optional'] - The types of modules to rebuild -// mode (optional) - The rebuild mode, either 'sequential' or 'parallel' - Default varies per platform (probably shouldn't mess with this one) -// useElectronClang (optional) - Whether to use the clang executable that Electron used when building its binary. This will guarantee compiler compatibility - -// Returns a Promise indicating whether the operation succeeded or not -``` - -For full API usage, see the [API documentation](https://packages.electronjs.org/rebuild). - -A full build process might look something like: - -```javascript -// ESM -import { rebuild } from "@electron/rebuild"; - -rebuild({ - buildPath: import.meta.dirname, - electronVersion: "35.1.5", -}) - .then(() => console.info("Rebuild Successful")) - .catch((e) => { - console.error("Building modules didn't work!"); - console.error(e); - }); - -// CommonJS -const { rebuild } = require("@electron/rebuild"); - -rebuild({ - buildPath: __dirname, - electronVersion: "35.1.5", -}) - .then(() => console.info("Rebuild Successful")) - .catch((e) => { - console.error("Building modules didn't work!"); - console.error(e); - }); - -``` diff --git a/node_modules/@electron/rebuild/lib/arch.d.ts b/node_modules/@electron/rebuild/lib/arch.d.ts deleted file mode 100644 index 54db96e..0000000 --- a/node_modules/@electron/rebuild/lib/arch.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Runs the `uname` command and returns the trimmed output. - * - * Copied from `@electron/get`. - */ -export declare function uname(): string; -export type ConfigVariables = { - arm_version?: string; -}; -/** - * Generates an architecture name that would be used in an Electron or Node.js - * download file name. - * - * Copied from `@electron/get`. - */ -export declare function getNodeArch(arch: string, configVariables: ConfigVariables): string; diff --git a/node_modules/@electron/rebuild/lib/arch.js b/node_modules/@electron/rebuild/lib/arch.js deleted file mode 100644 index 95f15b1..0000000 --- a/node_modules/@electron/rebuild/lib/arch.js +++ /dev/null @@ -1,29 +0,0 @@ -import { execSync } from 'node:child_process'; -/** - * Runs the `uname` command and returns the trimmed output. - * - * Copied from `@electron/get`. - */ -export function uname() { - return execSync('uname -m').toString().trim(); -} -/** - * Generates an architecture name that would be used in an Electron or Node.js - * download file name. - * - * Copied from `@electron/get`. - */ -export function getNodeArch(arch, configVariables) { - if (arch === 'arm') { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - switch (configVariables.arm_version) { - case '6': - return uname(); - case '7': - default: - return 'armv7l'; - } - } - return arch; -} -//# sourceMappingURL=arch.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/arch.js.map b/node_modules/@electron/rebuild/lib/arch.js.map deleted file mode 100644 index efdab30..0000000 --- a/node_modules/@electron/rebuild/lib/arch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"arch.js","sourceRoot":"","sources":["../src/arch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,KAAK;IACnB,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;AAChD,CAAC;AAMD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,eAAgC;IACxE,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACnB,8DAA8D;QAC9D,QAAQ,eAAe,CAAC,WAAW,EAAE,CAAC;YACpC,KAAK,GAAG;gBACN,OAAO,KAAK,EAAE,CAAC;YACjB,KAAK,GAAG,CAAC;YACT;gBACE,OAAO,QAAQ,CAAC;QACpB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/cache.d.ts b/node_modules/@electron/rebuild/lib/cache.d.ts deleted file mode 100644 index d3bb67d..0000000 --- a/node_modules/@electron/rebuild/lib/cache.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -type CacheOptions = { - ABI: string; - arch: string; - platform: string; - debug: boolean; - electronVersion: string; - headerURL: string; - modulePath: string; -}; -export declare const cacheModuleState: (dir: string, cachePath: string, key: string) => Promise; -type ApplyDiffFunction = (dir: string) => Promise; -export declare const lookupModuleState: (cachePath: string, key: string) => Promise; -export declare function generateCacheKey(opts: CacheOptions): Promise; -export {}; diff --git a/node_modules/@electron/rebuild/lib/cache.js b/node_modules/@electron/rebuild/lib/cache.js deleted file mode 100644 index e6e83a5..0000000 --- a/node_modules/@electron/rebuild/lib/cache.js +++ /dev/null @@ -1,153 +0,0 @@ -import crypto from 'node:crypto'; -import debug from 'debug'; -import fs from 'node:fs'; -import path from 'node:path'; -import zlib from 'node:zlib'; -const d = debug('electron-rebuild'); -// Update this number if you change the caching logic to ensure no bad cache hits -const ELECTRON_REBUILD_CACHE_ID = 1; -class Snap { - hash; - data; - constructor(hash, data) { - this.hash = hash; - this.data = data; - } -} -const takeSnapshot = async (dir, relativeTo = dir) => { - const snap = {}; - await Promise.all((await fs.promises.readdir(dir)).map(async (child) => { - if (child === 'node_modules') - return; - const childPath = path.resolve(dir, child); - const relative = path.relative(relativeTo, childPath); - if ((await fs.promises.stat(childPath)).isDirectory()) { - snap[relative] = await takeSnapshot(childPath, relativeTo); - } - else { - const data = await fs.promises.readFile(childPath); - snap[relative] = new Snap(crypto.createHash('SHA256').update(data).digest('hex'), data); - } - })); - return snap; -}; -const writeSnapshot = async (diff, dir) => { - for (const key in diff) { - if (diff[key] instanceof Snap) { - await fs.promises.mkdir(path.dirname(path.resolve(dir, key)), { recursive: true }); - await fs.promises.writeFile(path.resolve(dir, key), diff[key].data); - } - else { - await fs.promises.mkdir(path.resolve(dir, key), { recursive: true }); - await writeSnapshot(diff[key], dir); - } - } -}; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const serialize = (snap) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const jsonReady = {}; - for (const key in snap) { - if (snap[key] instanceof Snap) { - const s = snap[key]; - jsonReady[key] = { - __isSnap: true, - hash: s.hash, - data: s.data.toString('base64'), - }; - } - else { - jsonReady[key] = serialize(snap[key]); - } - } - return jsonReady; -}; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const unserialize = (jsonReady) => { - const snap = {}; - for (const key in jsonReady) { - if (jsonReady[key].__isSnap) { - snap[key] = new Snap(jsonReady[key].hash, Buffer.from(jsonReady[key].data, 'base64')); - } - else { - snap[key] = unserialize(jsonReady[key]); - } - } - return snap; -}; -export const cacheModuleState = async (dir, cachePath, key) => { - const snap = await takeSnapshot(dir); - const moduleBuffer = Buffer.from(JSON.stringify(serialize(snap))); - const zipped = await new Promise((resolve) => zlib.gzip(moduleBuffer, (_, result) => resolve(result))); - await fs.promises.mkdir(cachePath, { recursive: true }); - await fs.promises.writeFile(path.resolve(cachePath, key), zipped); -}; -export const lookupModuleState = async (cachePath, key) => { - if (fs.existsSync(path.resolve(cachePath, key))) { - return async function applyDiff(dir) { - const zipped = await fs.promises.readFile(path.resolve(cachePath, key)); - const unzipped = await new Promise((resolve) => { - zlib.gunzip(zipped, (_, result) => resolve(result)); - }); - const diff = unserialize(JSON.parse(unzipped.toString())); - await writeSnapshot(diff, dir); - }; - } - return false; -}; -function dHashTree(tree, hash) { - for (const key of Object.keys(tree).sort()) { - hash.update(key); - if (typeof tree[key] === 'string') { - hash.update(tree[key]); - } - else { - dHashTree(tree[key], hash); - } - } -} -async function hashDirectory(dir, relativeTo) { - relativeTo ??= dir; - d('hashing dir', dir); - const dirTree = {}; - await Promise.all((await fs.promises.readdir(dir)).map(async (child) => { - d('found child', child, 'in dir', dir); - // Ignore output directories - if (dir === relativeTo && (child === 'build' || child === 'bin')) - return; - // Don't hash nested node_modules - if (child === 'node_modules') - return; - const childPath = path.resolve(dir, child); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const relative = path.relative(relativeTo, childPath); - if ((await fs.promises.stat(childPath)).isDirectory()) { - dirTree[relative] = await hashDirectory(childPath, relativeTo); - } - else { - dirTree[relative] = crypto - .createHash('SHA256') - .update(await fs.promises.readFile(childPath)) - .digest('hex'); - } - })); - return dirTree; -} -export async function generateCacheKey(opts) { - const tree = await hashDirectory(opts.modulePath); - const hasher = crypto - .createHash('SHA256') - .update(`${ELECTRON_REBUILD_CACHE_ID}`) - .update(path.basename(opts.modulePath)) - .update(opts.ABI) - .update(opts.arch) - .update(opts.platform) - .update(opts.debug ? 'debug' : 'not debug') - .update(opts.headerURL) - .update(opts.electronVersion); - dHashTree(tree, hasher); - const hash = hasher.digest('hex'); - d('calculated hash of', opts.modulePath, 'to be', hash); - return hash; -} -//# sourceMappingURL=cache.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/cache.js.map b/node_modules/@electron/rebuild/lib/cache.js.map deleted file mode 100644 index 447045f..0000000 --- a/node_modules/@electron/rebuild/lib/cache.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAEpC,iFAAiF;AACjF,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC,MAAM,IAAI;IAEC;IACA;IAFT,YACS,IAAY,EACZ,IAAY;QADZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;IAClB,CAAC;CACL;AAkBD,MAAM,YAAY,GAAG,KAAK,EAAE,GAAW,EAAE,UAAU,GAAG,GAAG,EAAqB,EAAE;IAC9E,MA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IAAkB;IACvD,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,MAAM;SAClB,UAAU,CAAC,QAAQ,CAAC;SACpB,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAC;SACtC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACtC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;SAChB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;SACjB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;SACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;SAC1C,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;SACtB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAChC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC,CAAC,oBAAoB,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/clang-fetcher.d.ts b/node_modules/@electron/rebuild/lib/clang-fetcher.d.ts deleted file mode 100644 index f15f7f3..0000000 --- a/node_modules/@electron/rebuild/lib/clang-fetcher.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare function getClangEnvironmentVars(electronVersion: string, targetArch: string): Promise<{ - env: Record; - args: string[]; -}>; diff --git a/node_modules/@electron/rebuild/lib/clang-fetcher.js b/node_modules/@electron/rebuild/lib/clang-fetcher.js deleted file mode 100644 index 02f1c57..0000000 --- a/node_modules/@electron/rebuild/lib/clang-fetcher.js +++ /dev/null @@ -1,105 +0,0 @@ -import cp from 'node:child_process'; -import debug from 'debug'; -import fs from 'node:fs'; -import path from 'node:path'; -import { ELECTRON_GYP_DIR } from './constants.js'; -import { fetchUrl } from './fetcher.js'; -import { downloadLinuxSysroot } from './sysroot-fetcher.js'; -import { spawn } from '@malept/cross-spawn-promise'; -const d = debug('electron-rebuild'); -const CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang'; -function getPlatformUrlPrefix(hostOS, hostArch) { - const prefixMap = { - linux: 'Linux_x64', - darwin: 'Mac', - win32: 'Win', - }; - let prefix = prefixMap[hostOS]; - if (prefix === 'Mac' && hostArch === 'arm64') { - prefix = 'Mac_arm64'; - } - return CDS_URL + '/' + prefix + '/'; -} -function getClangDownloadURL(packageFile, packageVersion, hostOS, hostArch) { - const cdsFile = `${packageFile}-${packageVersion}.tgz`; - return getPlatformUrlPrefix(hostOS, hostArch) + cdsFile; -} -function getSDKRoot() { - if (process.env.SDKROOT) - return process.env.SDKROOT; - const output = cp.execFileSync('xcrun', ['--sdk', 'macosx', '--show-sdk-path']); - return output.toString().trim(); -} -export async function getClangEnvironmentVars(electronVersion, targetArch) { - const clangDownloadDir = await downloadClangVersion(electronVersion); - const clangDir = path.resolve(clangDownloadDir, 'bin'); - const clangArgs = []; - if (process.platform === 'darwin') { - clangArgs.push('-isysroot', getSDKRoot()); - } - const gypArgs = []; - if (process.platform === 'win32') { - console.log(await fs.promises.readdir(clangDir)); - gypArgs.push(`/p:CLToolExe=clang-cl.exe`, `/p:CLToolPath=${clangDir}`); - } - if (process.platform === 'linux') { - const sysrootPath = await downloadLinuxSysroot(electronVersion, targetArch); - clangArgs.push('--sysroot', sysrootPath); - } - return { - env: { - CC: `"${path.resolve(clangDir, 'clang')}" ${clangArgs.join(' ')}`, - CXX: `"${path.resolve(clangDir, 'clang++')}" ${clangArgs.join(' ')}`, - }, - args: gypArgs, - }; -} -function clangVersionFromRevision(update) { - const regex = /CLANG_REVISION = '([^']+)'\nCLANG_SUB_REVISION = (\d+)\n/g; - const clangVersionMatch = regex.exec(update); - if (!clangVersionMatch) - return null; - const [, clangVersion, clangSubRevision] = clangVersionMatch; - return `${clangVersion}-${clangSubRevision}`; -} -function clangVersionFromSVN(update) { - const regex = /CLANG_REVISION = '([^']+)'\nCLANG_SVN_REVISION = '([^']+)'\nCLANG_SUB_REVISION = (\d+)\n/g; - const clangVersionMatch = regex.exec(update); - if (!clangVersionMatch) - return null; - const [, clangVersion, clangSvn, clangSubRevision] = clangVersionMatch; - return `${clangSvn}-${clangVersion.substr(0, 8)}-${clangSubRevision}`; -} -async function downloadClangVersion(electronVersion) { - d('fetching clang for Electron:', electronVersion); - const clangDirPath = path.resolve(ELECTRON_GYP_DIR, `${electronVersion}-clang`); - if (fs.existsSync(path.resolve(clangDirPath, 'bin', 'clang'))) - return clangDirPath; - await fs.promises.mkdir(ELECTRON_GYP_DIR, { recursive: true }); - const electronDeps = await fetchUrl(`https://raw.githubusercontent.com/electron/electron/v${electronVersion}/DEPS`, 'text'); - const chromiumRevisionExtractor = /'chromium_version':\n\s+'([^']+)/g; - const chromiumRevisionMatch = chromiumRevisionExtractor.exec(electronDeps); - if (!chromiumRevisionMatch) - throw new Error('Failed to determine Chromium revision for given Electron version'); - const chromiumRevision = chromiumRevisionMatch[1]; - d('fetching clang for Chromium:', chromiumRevision); - const base64ClangUpdate = await fetchUrl(`https://chromium.googlesource.com/chromium/src.git/+/${chromiumRevision}/tools/clang/scripts/update.py?format=TEXT`, 'text'); - const clangUpdate = Buffer.from(base64ClangUpdate, 'base64').toString('utf8'); - const clangVersionString = clangVersionFromRevision(clangUpdate) || clangVersionFromSVN(clangUpdate); - if (!clangVersionString) - throw new Error('Failed to determine Clang revision from Electron version'); - d('fetching clang:', clangVersionString); - const clangDownloadURL = getClangDownloadURL('clang', clangVersionString, process.platform, process.arch); - const contents = await fetchUrl(clangDownloadURL, 'buffer'); - const tarPath = path.resolve(ELECTRON_GYP_DIR, `${electronVersion}-clang.tgz`); - if (fs.existsSync(tarPath)) - await fs.promises.rm(tarPath, { recursive: true, force: true }); - await fs.promises.writeFile(tarPath, contents); - await fs.promises.mkdir(clangDirPath, { recursive: true }); - d('extracting clang'); - await spawn('tar', ['-xf', tarPath, '-C', clangDirPath], { stdio: 'ignore' }); - await fs.promises.rm(tarPath, { recursive: true, force: true }); - d('cleaning up clang tar file'); - return clangDirPath; -} -//# sourceMappingURL=clang-fetcher.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/clang-fetcher.js.map b/node_modules/@electron/rebuild/lib/clang-fetcher.js.map deleted file mode 100644 index a1a5e15..0000000 --- a/node_modules/@electron/rebuild/lib/clang-fetcher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clang-fetcher.js","sourceRoot":"","sources":["../src/clang-fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,MAAM,CAAC,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAEpC,MAAM,OAAO,GAAG,iEAAiE,CAAC;AAElF,SAAS,oBAAoB,CAAC,MAAc,EAAE,QAAgB;IAC5D,MAAM,SAAS,GAA2B;QACxC,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,KAAK;KACb,CAAC;IACF,IAAI,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,MAAM,KAAK,KAAK,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC7C,MAAM,GA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C,CAAC;IAC9E,CAAC,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IAEzC,MAAM,gBAAgB,GAAG,mBAAmB,CAC1C,OAAO,EACP,kBAAkB,EAClB,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,IAAI,CACb,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,eAAe,YAAY,CAAC,CAAC;IAC/E,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5F,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC/C,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACtB,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9E,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAChC,OAAO,YAAY,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/cli.d.ts b/node_modules/@electron/rebuild/lib/cli.d.ts deleted file mode 100644 index b798801..0000000 --- a/node_modules/@electron/rebuild/lib/cli.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/node_modules/@electron/rebuild/lib/cli.js b/node_modules/@electron/rebuild/lib/cli.js deleted file mode 100644 index d11f2e6..0000000 --- a/node_modules/@electron/rebuild/lib/cli.js +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env node -import fs from 'node:fs'; -import path from 'node:path'; -import { parseArgs, styleText } from 'node:util'; -import { pathToFileURL } from 'node:url'; -import { getProjectRootPath } from './search-module.js'; -import { locateElectronModule } from './electron-locator.js'; -import { rebuild } from './rebuild.js'; -const options = { - version: { short: 'v', type: 'string', description: 'The version of Electron to build against' }, - force: { - short: 'f', - type: 'boolean', - description: 'Force rebuilding modules, even if we would skip it otherwise', - }, - arch: { - short: 'a', - type: 'string', - description: "Override the target architecture to something other than your system's", - }, - platform: { - type: 'string', - description: "Override the target platform to something other than your system's", - }, - 'module-dir': { - short: 'm', - type: 'string', - description: 'The path to the node_modules directory to rebuild', - }, - 'which-module': { - short: 'w', - type: 'string', - description: 'A specific module to build, or comma separated list of modules. Modules will only be rebuilt if they also match the types of dependencies being rebuilt (see --types).', - }, - only: { - short: 'o', - type: 'string', - description: 'Only build specified module, or comma separated list of modules. All others are ignored.', - }, - 'electron-prebuilt-dir': { - short: 'e', - type: 'string', - description: 'The path to the prebuilt electron module', - }, - 'dist-url': { - short: 'd', - type: 'string', - description: 'Custom header tarball URL. Can also be set via the ELECTRON_REBUILD_DIST_URL environment variable.', - }, - types: { - short: 't', - type: 'string', - description: 'The types of dependencies to rebuild. Comma separated list of "prod", "dev" and "optional". Default is "prod,optional"', - }, - parallel: { - short: 'p', - type: 'boolean', - description: 'Rebuild in parallel, this is enabled by default on macOS and Linux', - }, - sequential: { - short: 's', - type: 'boolean', - description: 'Rebuild modules sequentially, this is enabled by default on Windows', - }, - debug: { short: 'b', type: 'boolean', description: 'Build debug version of modules' }, - jobs: { - short: 'j', - type: 'string', - description: "Number of parallel compile jobs node-gyp should run (passed as node-gyp --jobs). Defaults to node-gyp's own default.", - }, - 'prebuild-tag-prefix': { - type: 'string', - description: 'GitHub tag prefix passed to prebuild-install. Default is "v"', - }, - 'force-abi': { - type: 'string', - description: 'Override the ABI version for the version of Electron you are targeting. Only use when targeting Nightly releases.', - }, - 'use-electron-clang': { - type: 'boolean', - description: 'Use the clang executable that Electron used when building its binary. This will guarantee compiler compatibility', - }, - 'disable-pre-gyp-copy': { type: 'boolean', description: 'Disables the pre-gyp copy step' }, - 'build-from-source': { - type: 'boolean', - description: 'Skips prebuild download and rebuilds module from source.', - }, - help: { short: 'h', type: 'boolean', description: 'Show help' }, -}; -const { values: argv } = parseArgs({ options, allowPositionals: true }); -if (argv.help) { - console.log('Usage: electron-rebuild --version [version] --module-dir [path]\n\nOptions:'); - for (const [name, opt] of Object.entries(options)) { - const short = 'short' in opt ? `-${opt.short}, ` : ' '; - console.log(` ${short}--${name.padEnd(22)} ${opt.description}`); - } - process.exit(0); -} -if (process.argv.length === 3 && process.argv[2] === '--version') { - try { - console.log('Electron Rebuild Version:', (await import(pathToFileURL(path.resolve(import.meta.dirname, '../../package.json')).toString(), { with: { type: 'json' } })).default.version); - } - catch { - console.log('Electron Rebuild Version:', (await import(pathToFileURL(path.resolve(import.meta.dirname, '../package.json')).toString(), { with: { type: 'json' } })).default.version); - } - process.exit(0); -} -const handler = (err) => { - console.error(styleText('red', '\nAn unhandled error occurred inside electron-rebuild')); - console.error(styleText('red', `${err.message}\n\n${err.stack}`)); - process.exit(-1); -}; -process.on('uncaughtException', handler); -process.on('unhandledRejection', handler); -void (async () => { - const projectRootPath = await getProjectRootPath(process.cwd()); - const electronModulePath = argv['electron-prebuilt-dir'] - ? path.resolve(process.cwd(), argv['electron-prebuilt-dir']) - : await locateElectronModule(projectRootPath); - let electronModuleVersion = argv.version; - if (!electronModuleVersion) { - try { - if (!electronModulePath) - throw new Error('Prebuilt electron module not found'); - const pkgJson = await import(pathToFileURL(path.join(electronModulePath, 'package.json')).toString(), { with: { type: 'json' } }); - electronModuleVersion = pkgJson.default.version; - } - catch { - throw new Error(`Unable to find electron's version number, either install it or specify an explicit version`); - } - } - let rootDirectory = argv['module-dir']; - if (!rootDirectory) { - // NB: We assume here that we're going to rebuild the immediate parent's - // node modules, which might not always be the case but it's at least a - // good guess - rootDirectory = path.resolve(import.meta.dirname, '../../..'); - if (!fs.existsSync(rootDirectory) || - !fs.existsSync(path.resolve(rootDirectory, 'package.json'))) { - // Then we try the CWD - rootDirectory = process.cwd(); - if (!fs.existsSync(rootDirectory) || - !fs.existsSync(path.resolve(rootDirectory, 'package.json'))) { - throw new Error('Unable to find parent node_modules directory, specify it via --module-dir, E.g. "--module-dir ." for the current directory'); - } - } - } - else { - rootDirectory = path.resolve(process.cwd(), rootDirectory); - } - const forceAbi = argv['force-abi'] ? Number(argv['force-abi']) : undefined; - if (argv['force-abi'] && Number.isNaN(forceAbi)) { - throw new Error('force-abi must be a number'); - } - const jobs = argv.jobs ? Number(argv.jobs) : undefined; - if (argv.jobs && Number.isNaN(jobs)) { - throw new Error('jobs must be a number'); - } - console.error('Searching dependency tree'); - const rebuilder = rebuild({ - buildPath: rootDirectory, - electronVersion: electronModuleVersion, - arch: argv.arch || process.arch, - platform: argv.platform || process.platform, - extraModules: argv['which-module'] ? argv['which-module'].split(',') : [], - onlyModules: argv.only ? argv.only.split(',') : null, - force: argv.force, - headerURL: argv['dist-url'] || process.env.ELECTRON_REBUILD_DIST_URL, - types: argv.types ? argv.types.split(',') : ['prod', 'optional'], - mode: argv.parallel ? 'parallel' : argv.sequential ? 'sequential' : undefined, - debug: argv.debug, - prebuildTagPrefix: argv['prebuild-tag-prefix'] ?? 'v', - forceABI: forceAbi, - useElectronClang: !!argv['use-electron-clang'], - disablePreGypCopy: !!argv['disable-pre-gyp-copy'], - projectRootPath, - buildFromSource: !!argv['build-from-source'], - jobs, - }); - const lifecycle = rebuilder.lifecycle; - lifecycle.on('modules-found', (moduleNames) => { - if (moduleNames.length > 0) { - console.error(`Building modules: ${moduleNames.join(', ')}`); - } - else { - console.error('No native modules found'); - } - }); - try { - await rebuilder; - } - catch (err) { - console.error(styleText('red', '✖ Rebuild Failed')); - throw err; - } - console.error(styleText('green', '✔ Rebuild Complete')); -})(); -//# sourceMappingURL=cli.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/cli.js.map b/node_modules/@electron/rebuild/lib/cli.js.map deleted file mode 100644 index acff556..0000000 --- a/node_modules/@electron/rebuild/lib/cli.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE;IAChG,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,8DAA8D;KAC5E;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wEAAwE;KACtF;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,oEAAoE;KAClF;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mDAAmD;KACjE;IACD,cAAc,EAAE;QAC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AAC,CAAC,CAAC;AAC1D,CAAC,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/constants.d.ts b/node_modules/@electron/rebuild/lib/constants.d.ts deleted file mode 100644 index 028ecaf..0000000 --- a/node_modules/@electron/rebuild/lib/constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const ELECTRON_GYP_DIR: string; diff --git a/node_modules/@electron/rebuild/lib/constants.js b/node_modules/@electron/rebuild/lib/constants.js deleted file mode 100644 index 5203d9e..0000000 --- a/node_modules/@electron/rebuild/lib/constants.js +++ /dev/null @@ -1,4 +0,0 @@ -import os from 'node:os'; -import path from 'node:path'; -export const ELECTRON_GYP_DIR = path.resolve(os.homedir(), '.electron-gyp'); -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/constants.js.map b/node_modules/@electron/rebuild/lib/constants.js.map deleted file mode 100644 index 9eacfc3..0000000 --- a/node_modules/@electron/rebuild/lib/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,eAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/detect-libc.d.ts b/node_modules/@electron/rebuild/lib/detect-libc.d.ts deleted file mode 100644 index 93787ff..0000000 --- a/node_modules/@electron/rebuild/lib/detect-libc.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Detects the libc family on the current Linux host via `process.report`. - * - * Used to resolve the `{libc}` token in prebuilt binary path templates. - * - * @returns `'glibc'` | `'musl'` | `null` (non-Linux or unable to detect) - */ -export declare function detectLibcFamily(): string | null; diff --git a/node_modules/@electron/rebuild/lib/detect-libc.js b/node_modules/@electron/rebuild/lib/detect-libc.js deleted file mode 100644 index d7807a8..0000000 --- a/node_modules/@electron/rebuild/lib/detect-libc.js +++ /dev/null @@ -1,24 +0,0 @@ -let cached; -/** - * Detects the libc family on the current Linux host via `process.report`. - * - * Used to resolve the `{libc}` token in prebuilt binary path templates. - * - * @returns `'glibc'` | `'musl'` | `null` (non-Linux or unable to detect) - */ -export function detectLibcFamily() { - if (cached !== undefined) - return cached; - if (process.platform !== 'linux') - return (cached = null); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const report = process.report?.getReport(); - if (report?.header?.glibcVersionRuntime) - return (cached = 'glibc'); - if (Array.isArray(report?.sharedObjects) && - report.sharedObjects.some((s) => s.includes('libc.musl') || s.includes('ld-musl'))) { - return (cached = 'musl'); - } - return (cached = null); -} -//# sourceMappingURL=detect-libc.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/detect-libc.js.map b/node_modules/@electron/rebuild/lib/detect-libc.js.map deleted file mode 100644 index 3b40f93..0000000 --- a/node_modules/@electron/rebuild/lib/detect-libc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"detect-libc.js","sourceRoot":"","sources":["../src/detect-libc.ts"],"names":[],"mappings":"AAAA,IAAI,MAAiC,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEzD,8DAA8D;IAC9D,MAAM,MAAM,GAAQ,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC;IAChD,IAAI,MAAM,EAAE,MAAM,EAAE,mBAAmB;QAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;IACnE,IACE,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;QACpC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAC1F,CAAC;QACD,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/electron-locator.d.ts b/node_modules/@electron/rebuild/lib/electron-locator.d.ts deleted file mode 100644 index 002957a..0000000 --- a/node_modules/@electron/rebuild/lib/electron-locator.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function locateElectronModule(projectRootPath?: string | undefined, startDir?: string | undefined): Promise; diff --git a/node_modules/@electron/rebuild/lib/electron-locator.js b/node_modules/@electron/rebuild/lib/electron-locator.js deleted file mode 100644 index c8d8e84..0000000 --- a/node_modules/@electron/rebuild/lib/electron-locator.js +++ /dev/null @@ -1,31 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import { searchForModule } from './search-module.js'; -import { fileURLToPath } from 'node:url'; -const electronModuleNames = ['electron', 'electron-prebuilt-compile']; -async function locateModuleByImport() { - for (const moduleName of electronModuleNames) { - try { - const modulePath = path.resolve(fileURLToPath(import.meta.resolve(`${moduleName}/package.json`)), '..'); - if (fs.existsSync(path.join(modulePath, 'package.json'))) { - return modulePath; - } - } - catch { - // eslint-disable-line no-empty - } - } - return null; -} -export async function locateElectronModule(projectRootPath, startDir) { - startDir ??= process.cwd(); - for (const moduleName of electronModuleNames) { - const electronPaths = await searchForModule(startDir, moduleName, projectRootPath); - const electronPath = electronPaths.find((ePath) => fs.existsSync(path.join(ePath, 'package.json'))); - if (electronPath) { - return electronPath; - } - } - return locateModuleByImport(); -} -//# sourceMappingURL=electron-locator.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/electron-locator.js.map b/node_modules/@electron/rebuild/lib/electron-locator.js.map deleted file mode 100644 index 2446b15..0000000 --- a/node_modules/@electron/rebuild/lib/electron-locator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"electron-locator.js","sourceRoot":"","sources":["../src/electron-locator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,2BAA2B,CAAC,CAAC;AAEtE,KAAK,UAAU,oBAAoB;IACjC,KAAK,MAAM,UAAU,IAAI,mBAAmB,EAAE,CAAC;QAC7C,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAC7B,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,UAAU,eAAe,CAAC,CAAC,EAChE,IAAI,CACL,CAAC;YACF,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;gBACzD,OAAO,UAAU,CAAC;YACpB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,+BAA+B;QACjC,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,eAAoC,EACpC,QAA6B;IAE7B,QAAQ,KAAK,OAAO,CAAC,GAAG,EAAE,CAAC;IAE3B,KAAK,MAAM,UAAU,IAAI,mBAAmB,EAAE,CAAC;QAC7C,MAAM,aAAa,GAAG,MAAM,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;QACnF,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,KAAa,EAAE,EAAE,CACxD,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAChD,CAAC;QAEF,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/fetcher.d.ts b/node_modules/@electron/rebuild/lib/fetcher.d.ts deleted file mode 100644 index d0f9db3..0000000 --- a/node_modules/@electron/rebuild/lib/fetcher.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function fetchUrl(url: string, responseType: T, retries?: number): Promise; diff --git a/node_modules/@electron/rebuild/lib/fetcher.js b/node_modules/@electron/rebuild/lib/fetcher.js deleted file mode 100644 index e96191c..0000000 --- a/node_modules/@electron/rebuild/lib/fetcher.js +++ /dev/null @@ -1,27 +0,0 @@ -import debug from 'debug'; -import { setTimeout as sleep } from 'node:timers/promises'; -const d = debug('electron-rebuild'); -export async function fetchUrl(url, responseType, retries = 3) { - if (retries === 0) - throw new Error('Failed to fetch a clang resource, run with DEBUG=electron-rebuild for more information'); - d('downloading:', url); - try { - const response = await globalThis.fetch(url); - if (!response.ok) { - d('got bad status code:', response.status); - await sleep(2000); - return fetchUrl(url, responseType, retries - 1); - } - d('response came back OK'); - if (responseType === 'buffer') { - return Buffer.from(await response.arrayBuffer()); - } - return (await response.text()); - } - catch (err) { - d('request failed for some reason', err); - await sleep(2000); - return fetchUrl(url, responseType, retries - 1); - } -} -//# sourceMappingURL=fetcher.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/fetcher.js.map b/node_modules/@electron/rebuild/lib/fetcher.js.map deleted file mode 100644 index eb0f57c..0000000 --- a/node_modules/@electron/rebuild/lib/fetcher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetcher.js","sourceRoot":"","sources":["../src/fetcher.ts"],"names":[],"mappings":"AAAA,O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ron/rebuild/lib/main.d.ts deleted file mode 100644 index e1354ec..0000000 --- a/node_modules/@electron/rebuild/lib/main.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { rebuild, RebuildOptions } from './rebuild.js'; -export { rebuild, RebuildOptions }; diff --git a/node_modules/@electron/rebuild/lib/main.js b/node_modules/@electron/rebuild/lib/main.js deleted file mode 100644 index 2fcc7f8..0000000 --- a/node_modules/@electron/rebuild/lib/main.js +++ /dev/null @@ -1,3 +0,0 @@ -import { rebuild } from './rebuild.js'; -export { rebuild }; -//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/main.js.map b/node_modules/@electron/rebuild/lib/main.js.map deleted file mode 100644 index 3aed526..0000000 --- a/node_modules/@electron/rebuild/lib/main.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-rebuilder.d.ts b/node_modules/@electron/rebuild/lib/module-rebuilder.d.ts deleted file mode 100644 index b30c766..0000000 --- a/node_modules/@electron/rebuild/lib/module-rebuilder.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { IRebuilder } from './types.js'; -export declare class ModuleRebuilder { - private modulePath; - private nodeGyp; - private rebuilder; - private prebuildify; - private prebuildInstall; - private nodePreGyp; - constructor(rebuilder: IRebuilder, modulePath: string); - get metaPath(): string; - /** - * The marker written to `.forge-meta` after a successful rebuild, and compared against on - * subsequent runs to decide whether the module can be skipped. It must capture every input - * that changes the resulting binary, so that e.g. a Linux build is not reused for macOS. - */ - get metaData(): string; - alreadyBuiltByRebuild(): Promise; - cacheModuleState(cacheKey: string): Promise; - /** - * Whether a prebuild-install-generated native module exists. - */ - prebuildInstallNativeModuleExists(): Promise; - /** - * If the native module uses prebuildify, check to see if it comes with a prebuilt module for - * the given platform and arch. - */ - findPrebuildifyModule(cacheKey: string): Promise; - findPrebuildInstallModule(cacheKey: string): Promise; - findNodePreGypInstallModule(cacheKey: string): Promise; - rebuildNodeGypModule(cacheKey: string): Promise; - replaceExistingNativeModule(): Promise; - writeMetadata(): Promise; - rebuild(cacheKey: string): Promise; -} diff --git a/node_modules/@electron/rebuild/lib/module-rebuilder.js b/node_modules/@electron/rebuild/lib/module-rebuilder.js deleted file mode 100644 index bb51a96..0000000 --- a/node_modules/@electron/rebuild/lib/module-rebuilder.js +++ /dev/null @@ -1,132 +0,0 @@ -import debug from 'debug'; -import fs from 'node:fs'; -import path from 'node:path'; -import { cacheModuleState } from './cache.js'; -import { NodeGyp } from './module-type/node-gyp/node-gyp.js'; -import { Prebuildify } from './module-type/prebuildify.js'; -import { PrebuildInstall } from './module-type/prebuild-install.js'; -import { NodePreGyp } from './module-type/node-pre-gyp.js'; -const d = debug('electron-rebuild'); -export class ModuleRebuilder { - modulePath; - nodeGyp; - rebuilder; - prebuildify; - prebuildInstall; - nodePreGyp; - constructor(rebuilder, modulePath) { - this.modulePath = modulePath; - this.rebuilder = rebuilder; - this.nodeGyp = new NodeGyp(rebuilder, modulePath); - this.prebuildify = new Prebuildify(rebuilder, modulePath); - this.prebuildInstall = new PrebuildInstall(rebuilder, modulePath); - this.nodePreGyp = new NodePreGyp(rebuilder, modulePath); - } - get metaPath() { - return path.resolve(this.modulePath, 'build', this.rebuilder.buildType, '.forge-meta'); - } - /** - * The marker written to `.forge-meta` after a successful rebuild, and compared against on - * subsequent runs to decide whether the module can be skipped. It must capture every input - * that changes the resulting binary, so that e.g. a Linux build is not reused for macOS. - */ - get metaData() { - return `${this.rebuilder.platform}--${this.rebuilder.arch}--${this.rebuilder.ABI}`; - } - async alreadyBuiltByRebuild() { - if (fs.existsSync(this.metaPath)) { - const meta = await fs.promises.readFile(this.metaPath, 'utf8'); - return meta === this.metaData; - } - return false; - } - async cacheModuleState(cacheKey) { - if (this.rebuilder.useCache) { - await cacheModuleState(this.modulePath, this.rebuilder.cachePath, cacheKey); - } - } - /** - * Whether a prebuild-install-generated native module exists. - */ - async prebuildInstallNativeModuleExists() { - return this.prebuildInstall.prebuiltModuleExists(); - } - /** - * If the native module uses prebuildify, check to see if it comes with a prebuilt module for - * the given platform and arch. - */ - async findPrebuildifyModule(cacheKey) { - if (await this.prebuildify.usesTool()) { - d(`assuming is prebuildify powered: ${this.prebuildify.moduleName}`); - if (await this.prebuildify.findPrebuiltModule()) { - await this.writeMetadata(); - await this.cacheModuleState(cacheKey); - return true; - } - } - return false; - } - async findPrebuildInstallModule(cacheKey) { - if (await this.prebuildInstall.usesTool()) { - d(`assuming is prebuild-install powered: ${this.prebuildInstall.moduleName}`); - if (await this.prebuildInstall.findPrebuiltModule()) { - d('installed prebuilt module:', this.prebuildInstall.moduleName); - await this.writeMetadata(); - await this.cacheModuleState(cacheKey); - return true; - } - } - return false; - } - async findNodePreGypInstallModule(cacheKey) { - if (await this.nodePreGyp.usesTool()) { - d(`assuming is node-pre-gyp powered: ${this.nodePreGyp.moduleName}`); - if (await this.nodePreGyp.findPrebuiltModule()) { - d('installed prebuilt module:', this.nodePreGyp.moduleName); - await this.writeMetadata(); - await this.cacheModuleState(cacheKey); - return true; - } - } - return false; - } - async rebuildNodeGypModule(cacheKey) { - await this.nodeGyp.rebuildModule(); - d('built via node-gyp:', this.nodeGyp.moduleName); - await this.writeMetadata(); - await this.replaceExistingNativeModule(); - await this.cacheModuleState(cacheKey); - return true; - } - async replaceExistingNativeModule() { - const buildLocation = path.resolve(this.modulePath, 'build', this.rebuilder.buildType); - d('searching for .node file', buildLocation); - const buildLocationFiles = await fs.promises.readdir(buildLocation); - d('testing files', buildLocationFiles); - const nodeFile = buildLocationFiles.find((file) => file !== '.node' && file.endsWith('.node')); - const nodePath = nodeFile ? path.resolve(buildLocation, nodeFile) : undefined; - if (nodePath && fs.existsSync(nodePath)) { - d('found .node file', nodePath); - if (!this.rebuilder.disablePreGypCopy) { - const abiPath = path.resolve(this.modulePath, `bin/${this.rebuilder.platform}-${this.rebuilder.arch}-${this.rebuilder.ABI}`); - d('copying to prebuilt place:', abiPath); - await fs.promises.mkdir(abiPath, { recursive: true }); - await fs.promises.copyFile(nodePath, path.join(abiPath, `${this.nodeGyp.moduleName}.node`)); - } - } - } - async writeMetadata() { - await fs.promises.mkdir(path.dirname(this.metaPath), { recursive: true }); - await fs.promises.writeFile(this.metaPath, this.metaData); - } - async rebuild(cacheKey) { - if (!this.rebuilder.buildFromSource && - ((await this.findPrebuildifyModule(cacheKey)) || - (await this.findPrebuildInstallModule(cacheKey)) || - (await this.findNodePreGypInstallModule(cacheKey)))) { - return true; - } - return await this.rebuildNodeGypModule(cacheKey); - } -} -//# sourceMappingURL=module-rebuilder.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-rebuilder.js.map b/node_modules/@electron/rebuild/lib/module-rebuilder.js.map deleted file mode 100644 index 990a044..0000000 --- a/node_modules/@electron/rebuild/lib/module-rebuilder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"module-rebuilder.js","sourceRoot":"","sources":["../src/module-rebuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,MAAM,CAAC,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAEpC,MAAM,OAAO,eAAe;IAClB,UAAU,CAAS;IACnB,OAAO,C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,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAgB;QAC5B,IACE,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe;YAC/B,CAAC,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;gBAC3C,CAAC,MAAM,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;gBAChD,CAAC,MAAM,IAAI,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC,CAAC,EACrD,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-type/index.d.ts b/node_modules/@electron/rebuild/lib/module-type/index.d.ts deleted file mode 100644 index 81987c9..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NodeAPI } from '../node-api.js'; -import { IRebuilder } from '../types.js'; -type PackageJSONValue = string | Record; -export declare class NativeModule { - protected rebuilder: IRebuilder; - private _moduleName; - protected modulePath: string; - nodeAPI: NodeAPI; - private packageJSON; - constructor(rebuilder: IRebuilder, modulePath: string); - get moduleName(): string; - packageJSONFieldWithDefault(key: string, defaultValue: PackageJSONValue): Promise; - packageJSONField(key: string): Promise; - getSupportedNapiVersions(): Promise; - /** - * Search dependencies for package using either `packageName` or - * `@namespace/packageName` in the case of forks. - */ - findPackageInDependencies(packageName: string, packageProperty?: string): Promise; -} -export declare function locateBinary(basePath: string, suffix: string): Promise; -export {}; diff --git a/node_modules/@electron/rebuild/lib/module-type/index.js b/node_modules/@electron/rebuild/lib/module-type/index.js deleted file mode 100644 index 5e56f89..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/index.js +++ /dev/null @@ -1,68 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import { NodeAPI } from '../node-api.js'; -import { readPackageJson } from '../read-package-json.js'; -export class NativeModule { - rebuilder; - _moduleName; - modulePath; - nodeAPI; - packageJSON; - constructor(rebuilder, modulePath) { - this.rebuilder = rebuilder; - this.modulePath = modulePath; - this.nodeAPI = new NodeAPI(this.moduleName, this.rebuilder.electronVersion); - } - get moduleName() { - if (!this._moduleName) { - const basename = path.basename(this.modulePath); - const parentDir = path.basename(path.dirname(this.modulePath)); - if (parentDir.startsWith('@')) { - this._moduleName = `${parentDir}/${basename}`; - } - this._moduleName = basename; - } - return this._moduleName; - } - async packageJSONFieldWithDefault(key, defaultValue) { - const result = await this.packageJSONField(key); - return result === undefined ? defaultValue : result; - } - async packageJSONField(key) { - this.packageJSON ||= await readPackageJson(this.modulePath); - return this.packageJSON[key]; - } - async getSupportedNapiVersions() { - const binary = (await this.packageJSONFieldWithDefault('binary', {})); - return binary?.napi_versions; - } - /** - * Search dependencies for package using either `packageName` or - * `@namespace/packageName` in the case of forks. - */ - async findPackageInDependencies(packageName, packageProperty = 'dependencies') { - const dependencies = await this.packageJSONFieldWithDefault(packageProperty, {}); - if (typeof dependencies !== 'object') - return null; - // Look for direct dependency match - // eslint-disable-next-line no-prototype-builtins - if (dependencies.hasOwnProperty(packageName)) - return packageName; - const forkedPackage = Object.keys(dependencies).find((dependency) => dependency.startsWith('@') && dependency.endsWith(`/${packageName}`)); - return forkedPackage || null; - } -} -export async function locateBinary(basePath, suffix) { - let parentPath = basePath; - let testPath; - while (testPath !== parentPath) { - testPath = parentPath; - const checkPath = path.resolve(testPath, suffix); - if (fs.existsSync(checkPath)) { - return checkPath; - } - parentPath = path.resolve(testPath, '..'); - } - return null; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-type/index.js.map b/node_modules/@electron/rebuild/lib/module-type/index.js.map deleted file mode 100644 index c93efe7..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/index.js.map +++ /dev/null @@ -1 +0,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,QAAQ,GAAG,UAAU,CAAC;QACtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjD,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7B,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.d.ts b/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.d.ts deleted file mode 100644 index 4dcc2e5..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { NativeModule } from '../index.js'; -export declare class NodeGyp extends NativeModule { - buildArgs(prefixedArgs: string[]): Promise; - buildArgsFromBinaryField(): Promise; - rebuildModule(): Promise; -} diff --git a/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js b/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js deleted file mode 100644 index 63180dd..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js +++ /dev/null @@ -1,125 +0,0 @@ -import { fork } from 'node:child_process'; -import debug from 'debug'; -import path from 'node:path'; -import { ELECTRON_GYP_DIR } from '../../constants.js'; -import { getClangEnvironmentVars } from '../../clang-fetcher.js'; -import { NativeModule } from '../index.js'; -import { detectLibcFamily } from '../../detect-libc.js'; -const d = debug('electron-rebuild'); -export class NodeGyp extends NativeModule { - async buildArgs(prefixedArgs) { - const args = [ - 'node', - 'node-gyp', - 'rebuild', - ...prefixedArgs, - `--runtime=electron`, - `--target=${this.rebuilder.electronVersion}`, - `--arch=${this.rebuilder.arch}`, - `--dist-url=${this.rebuilder.headerURL}`, - '--build-from-source', - ]; - args.push(d.enabled ? '--verbose' : '--silent'); - if (this.rebuilder.debug) { - args.push('--debug'); - } - args.push(...(await this.buildArgsFromBinaryField())); - if (this.rebuilder.msvsVersion) { - args.push(`--msvs_version=${this.rebuilder.msvsVersion}`); - } - if (this.rebuilder.jobs) { - args.push(`--jobs=${this.rebuilder.jobs}`); - } - // Headers of old Electron versions do not have a valid config.gypi file - // and --force-process-config must be passed to node-gyp >= 8.4.0 to - // correctly build modules for them. - // See also https://github.com/nodejs/node-gyp/pull/2497 - const [maj, min] = this.rebuilder.electronVersion.split('.').map(Number); - if (maj < 14 || (maj === 14 && min < 2) || (maj === 15 && min < 3)) { - args.push('--force-process-config'); - } - return args; - } - async buildArgsFromBinaryField() { - const binary = (await this.packageJSONFieldWithDefault('binary', {})); - let napiBuildVersion = undefined; - if (Array.isArray(binary.napi_versions)) { - napiBuildVersion = this.nodeAPI.getNapiVersion(binary.napi_versions.map((str) => Number(str))); - } - const flags = await Promise.all(Object.entries(binary).map(async ([binaryKey, binaryValue]) => { - if (binaryKey === 'napi_versions') { - return; - } - let value = binaryValue; - if (binaryKey === 'module_path') { - value = path.resolve(this.modulePath, value); - } - value = value - .replace('{configuration}', this.rebuilder.buildType) - .replace('{node_abi}', `electron-v${this.rebuilder.electronVersion.split('.').slice(0, 2).join('.')}`) - .replace('{platform}', this.rebuilder.platform) - .replace('{arch}', this.rebuilder.arch) - .replace('{version}', (await this.packageJSONField('version'))) - .replace('{libc}', detectLibcFamily() || 'unknown'); - if (napiBuildVersion !== undefined) { - value = value.replace('{napi_build_version}', napiBuildVersion.toString()); - } - for (const [replaceKey, replaceValue] of Object.entries(binary)) { - value = value.replace(`{${replaceKey}}`, replaceValue); - } - return `--${binaryKey}=${value}`; - })); - return flags.filter((value) => value); - } - async rebuildModule() { - if (this.rebuilder.platform !== process.platform) { - throw new Error('node-gyp does not support cross-compiling native modules from source.'); - } - if (this.modulePath.includes(' ')) { - console.error('Attempting to build a module with a space in the path'); - console.error('See https://github.com/nodejs/node-gyp/issues/65#issuecomment-368820565 for reasons why this may not work'); - // FIXME: Re-enable the throw when more research has been done - // throw new Error(`node-gyp does not support building modules with spaces in their path, tried to build: ${modulePath}`); - } - const env = { - ...process.env, - }; - const extraNodeGypArgs = []; - if (this.rebuilder.useElectronClang) { - const { env: clangEnv, args: clangArgs } = await getClangEnvironmentVars(this.rebuilder.electronVersion, this.rebuilder.arch); - Object.assign(env, clangEnv); - extraNodeGypArgs.push(...clangArgs); - } - const nodeGypArgs = await this.buildArgs(extraNodeGypArgs); - d('rebuilding', this.moduleName, 'with args', nodeGypArgs); - const forkedChild = fork(path.resolve(import.meta.dirname, 'worker.js'), { - env, - cwd: this.modulePath, - stdio: 'pipe', - }); - const outputBuffers = []; - forkedChild.stdout?.on('data', (chunk) => { - outputBuffers.push(chunk); - }); - forkedChild.stderr?.on('data', (chunk) => { - outputBuffers.push(chunk); - }); - forkedChild.send({ - moduleName: this.moduleName, - nodeGypArgs, - extraNodeGypArgs, - devDir: this.rebuilder.mode === 'sequential' - ? ELECTRON_GYP_DIR - : path.resolve(ELECTRON_GYP_DIR, '_p', this.moduleName), - }); - await new Promise((resolve, reject) => { - forkedChild.on('exit', (code) => { - if (code === 0) - return resolve(); - console.error(Buffer.concat(outputBuffers).toString()); - reject(new Error(`node-gyp failed to rebuild '${this.modulePath}'`)); - }); - }); - } -} -//# sourceMappingURL=node-gyp.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js.map b/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js.map deleted file mode 100644 index b259ddf..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node-gyp.js","sourceRoot":"","sources":["../../../src/module-type/node-gyp/node-gyp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAC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C,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YACvC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YACvC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,WAAW,CAAC,IAAI,CAAC;YACf,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW;YACX,gBAAgB;YAChB,MAAM,EACJ,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,YAAY;gBAClC,CAAC,CAAC,gBAAgB;gBAClB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC;SAC5D,CAAC,CAAC;QAEH,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1C,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC9B,IAAI,IAAI,KAAK,CAAC;oBAAE,OAAO,OAAO,EAAE,CAAC;gBACjC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACvD,MAAM,CAAC,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;YACvE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.d.ts b/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js b/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js deleted file mode 100644 index 36ba6fd..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js +++ /dev/null @@ -1,32 +0,0 @@ -import NodeGypRunner from 'node-gyp'; -process.on('message', async ({ nodeGypArgs, devDir, extraNodeGypArgs }) => { - const nodeGyp = NodeGypRunner(); - nodeGyp.parseArgv(nodeGypArgs); - nodeGyp.devDir = devDir; - let command = nodeGyp.todo.shift(); - try { - while (command) { - if (command.name === 'configure') { - command.args = command.args.filter((arg) => !extraNodeGypArgs.includes(arg)); - } - else if (command.name === 'build' && process.platform === 'win32') { - // This is disgusting but it prevents node-gyp from destroying our MSBuild arguments - command.args.map = (fn) => { - return Array.prototype.map.call(command.args, (arg) => { - if (arg.startsWith('/p:')) - return arg; - return fn(arg); - }); - }; - } - await nodeGyp.commands[command.name](command.args); - command = nodeGyp.todo.shift(); - } - process.exit(0); - } - catch (err) { - console.error(err); - process.exit(1); - } -}); -//# sourceMappingURL=worker.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js.map b/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js.map deleted file mode 100644 index 36661d3..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/module-type/node-gyp/worker.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,UAAU,CAAC;AAErC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,EAAE;IACxE,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,OAAO,GAA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/rebuild/lib/module-type/node-pre-gyp.d.ts deleted file mode 100644 index 01eeb3d..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NativeModule } from './index.js'; -export declare class NodePreGyp extends NativeModule { - usesTool(): Promise; - locateBinary(): Promise; - run(nodePreGypPath: string): Promise; - findPrebuiltModule(): Promise; - getNodePreGypRuntimeArgs(): Promise; - private shouldUpdateBinary; - private getModulePaths; -} diff --git a/node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js b/node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js deleted file mode 100644 index e5767a8..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js +++ /dev/null @@ -1,110 +0,0 @@ -import debug from 'debug'; -import { readBinaryFileArch } from 'read-binary-file-arch'; -import { locateBinary, NativeModule } from './index.js'; -import { spawn } from '@malept/cross-spawn-promise'; -const d = debug('electron-rebuild'); -export class NodePreGyp extends NativeModule { - async usesTool() { - const packageName = await this.findPackageInDependencies('node-pre-gyp'); - return !!packageName; - } - async locateBinary() { - const packageName = await this.findPackageInDependencies('node-pre-gyp'); - if (!packageName) - return null; - return locateBinary(this.modulePath, `node_modules/${packageName}/bin/node-pre-gyp`); - } - async run(nodePreGypPath) { - const redownloadBinary = await this.shouldUpdateBinary(nodePreGypPath); - await spawn(process.execPath, [ - nodePreGypPath, - 'reinstall', - '--fallback-to-build', - ...(redownloadBinary ? ['--update-binary'] : []), - `--arch=${this.rebuilder.arch}`, // fallback build arch - `--target_arch=${this.rebuilder.arch}`, // prebuild arch - `--target_platform=${this.rebuilder.platform}`, - ...(await this.getNodePreGypRuntimeArgs()), - ], { - cwd: this.modulePath, - }); - } - async findPrebuiltModule() { - const nodePreGypPath = await this.locateBinary(); - if (nodePreGypPath) { - d(`triggering prebuild download step: ${this.moduleName}`); - try { - await this.run(nodePreGypPath); - return true; - } - catch (err) { - d('failed to use node-pre-gyp:', err); - if (err?.message?.includes('requires Node-API but Electron')) { - throw err; - } - } - } - else { - d(`could not find node-pre-gyp relative to: ${this.modulePath}`); - } - return false; - } - async getNodePreGypRuntimeArgs() { - const moduleNapiVersions = await this.getSupportedNapiVersions(); - if (moduleNapiVersions) { - return []; - } - else { - return [ - '--runtime=electron', - `--target=${this.rebuilder.electronVersion}`, - `--dist-url=${this.rebuilder.headerURL}`, - ]; - } - } - async shouldUpdateBinary(nodePreGypPath) { - let shouldUpdate = false; - // Redownload binary only if the existing module arch differs from the - // target arch. - try { - const modulePaths = await this.getModulePaths(nodePreGypPath); - d('module paths:', modulePaths); - for (const modulePath of modulePaths) { - let moduleArch; - try { - moduleArch = await readBinaryFileArch(modulePath); - d('module arch:', moduleArch); - } - catch (error) { - d('failed to read module arch:', error.message); - continue; - } - if (moduleArch && moduleArch !== this.rebuilder.arch) { - shouldUpdate = true; - d('module architecture differs:', `${moduleArch} !== ${this.rebuilder.arch}`); - break; - } - } - } - catch (error) { - d('failed to get existing binary arch:', error.message); - // Assume architecture differs - shouldUpdate = true; - } - return shouldUpdate; - } - async getModulePaths(nodePreGypPath) { - const results = await spawn(process.execPath, [ - nodePreGypPath, - 'reveal', - 'module', // pick property with module path - `--target_arch=${this.rebuilder.arch}`, - `--target_platform=${this.rebuilder.platform}`, - ], { - cwd: this.modulePath, - }); - // Packages with multiple binaries will output one per line - return results.split('\n').filter(Boolean); - } -} -//# sourceMappingURL=node-pre-gyp.js.map \ No newline at end of file diff --git a/node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js.map b/node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js.map deleted file mode 100644 index 2859af9..0000000 --- a/node_modules/@electron/rebuild/lib/module-type/node-pre-gyp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node-pre-gyp.js","sourceRoot":"","sources":["../../src/module-type/node-pre-gyp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAk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