UNPKG

signing-enclave

Version:

A code signing and notarization tool for macOS and Windows applications. Uses Azure Key Vault for secret and certificate management.

46 lines 2.71 kB
"use strict"; // src/commands/watch.ts var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.persistCerts = void 0; const extra_typings_1 = require("@commander-js/extra-typings"); const path_1 = __importDefault(require("path")); const utils_1 = require("../utils"); const macOSSigning_1 = require("../signing/macOSSigning"); exports.persistCerts = new extra_typings_1.Command("persistCerts") .description("Start watching a folder for new files") .option("-f, --folder <path>", "Path to the folder to watch", "./watched_folder") .option("--mac-cert <name>", "Name of the mac certificate to use in Azure KeyVault") .option("--mac-installer-cert <name>", "Name of the mac installer certificate to use in Azure KeyVault") .option("--mas-development-cert <name>", "Name of the mac app store certificate to use in Azure KeyVault") .option("--mas-distribution-cert <name>", "Name of the mac app store certificate to use in Azure KeyVault") .option("--mas-installer-cert <name>", "Name of the mac app store certificate to use in Azure KeyVault") .action(async (options) => { const folder = path_1.default.resolve(process.cwd(), options.folder); // Ensure the watch folder exists await (0, utils_1.ensureDir)(folder); if (options.macCert) { const { secretFilePath } = await (0, macOSSigning_1.downloadMacCertificateFromHSM)(options.macCert); console.log(`Downloaded mac certificate to ${secretFilePath}`); } if (options.macInstallerCert) { const { secretFilePath } = await (0, macOSSigning_1.downloadMacCertificateFromHSM)(options.macInstallerCert); console.log(`Downloaded mac installer certificate to ${secretFilePath}`); } if (options.masDevelopmentCert) { const { secretFilePath } = await (0, macOSSigning_1.downloadMacCertificateFromHSM)(options.masDevelopmentCert); console.log(`Downloaded mac app store development certificate to ${secretFilePath}`); } if (options.masDistributionCert) { const { secretFilePath } = await (0, macOSSigning_1.downloadMacCertificateFromHSM)(options.masDistributionCert); console.log(`Downloaded mac app store distribution certificate to ${secretFilePath}`); } if (options.masInstallerCert) { const { secretFilePath } = await (0, macOSSigning_1.downloadMacCertificateFromHSM)(options.masInstallerCert); console.log(`Downloaded mac app store installer certificate to ${secretFilePath}`); } process.stdin.resume(); }); //# sourceMappingURL=persistCerts.js.map