Removed unnecessary make_cred.mjs script.

This commit is contained in:
slawek committed 2026-10-17 09:17:16 +02:00
1 parent d53a1e55cc
commit 77232484ef
1 file changed
-29
-29
View File
@@ -1,29 +0,0 @@
#!/usr/bin/env node
import { readFileSync, writeFileSync } from "node:fs";
import { parseArgs } from "node:util";
const { values } = parseArgs({
options: {
"private-key-file": { type: "string" },
"client-email": { type: "string" },
output: { type: "string", default: "cred.json" },
},
});
if (!values["private-key-file"] || !values["client-email"]) {
console.error("Usage: make_cred.mjs --private-key-file FILE --client-email EMAIL [--output FILE]");
process.exit(1);
}
const privateKey = readFileSync(values["private-key-file"], "utf8");
const clientEmail = values["client-email"];
const cred = {
type: "service_account",
project_id: clientEmail.split("@")[1].split(".")[0],
private_key: privateKey,
client_email: clientEmail,
token_uri: "https://oauth2.googleapis.com/token",
};
writeFileSync(values.output, JSON.stringify(cred, null, 2) + "\n");