untested WIP

This commit is contained in:
2026-01-24 16:59:50 -06:00
parent 935c7296f6
commit 4be36e6ca0
56 changed files with 8645 additions and 3 deletions
+37
View File
@@ -0,0 +1,37 @@
import keypair from "keypair";
console.log(`
Generating Private Keys
-----------------
This script will go through and genrate all the keys necessary for running the Credential Manager API locally.
This process might take several minutes.
-----------------`);
await Promise.all(
[
".accessToken.key",
".refreshToken.key",
".permissions.key",
".apiKeyToken.key",
].map(async (v) => {
if (
await Bun.file(v)
.exists()
.then((bool) => {
if (bool) {
console.log(`'${v}' already exists`);
return false;
}
return true;
})
) {
console.log(`Generating '${v}'...`);
const keys = keypair({ bits: 4096 });
await Bun.write(v, keys.private);
}
return;
})
);
console.log("\nGenerated All Keys Successfully!");