Add certificate command

This commit is contained in:
Sander Declerck 2025-11-28 14:51:54 +01:00
parent c59b8263ca
commit 0fffcf2cc1
No known key found for this signature in database

View file

@ -12,6 +12,7 @@ import { main } from "../src/main.js";
import path from "path"; import path from "path";
import { fileURLToPath } from "url"; import { fileURLToPath } from "url";
import fs from "fs"; import fs from "fs";
import { getCombinedCaBundlePath } from "../src/registryProxy/certBundle.js";
/** @type {string} */ /** @type {string} */
let dirname; let dirname;
@ -56,6 +57,12 @@ if (pkgManagerCommands.includes(command)) {
process.exit(0); process.exit(0);
} else if (command === "setup") { } else if (command === "setup") {
setup(); setup();
} else if (command === "certificate") {
(async function () {
const path = getCombinedCaBundlePath();
const data = await fs.promises.readFile(path);
ui.writeInformation(data.toString("utf8"));
})();
} else if (command === "teardown") { } else if (command === "teardown") {
teardown(); teardown();
} else if (command === "setup-ci") { } else if (command === "setup-ci") {