22 lines
499 B
TypeScript
22 lines
499 B
TypeScript
// Get a secret email and password from input and set it to Bun.secrets
|
|
|
|
console.log("Usage: bun run setMail.ts <email> <password>");
|
|
if (process.argv.length !== 4) {
|
|
console.error("Expected exactly two arguments: <email> <password>");
|
|
process.exit(1);
|
|
}
|
|
|
|
const email = process.argv[2];
|
|
const password = process.argv[3];
|
|
|
|
await Bun.secrets.set({
|
|
service: "estia",
|
|
name: "email",
|
|
value: email || "",
|
|
});
|
|
|
|
await Bun.secrets.set({
|
|
service: "estia",
|
|
name: "password",
|
|
value: password || "",
|
|
});
|