Refactor to more consistent structure (e.g. "plugins")

This commit is contained in:
2025-07-06 15:23:03 -04:00
parent a6255de889
commit 6fb38d36f3
22 changed files with 567 additions and 600 deletions

17
environ.ts Normal file
View File

@@ -0,0 +1,17 @@
export interface EnvSettings {
BLITZCRANK_API_TOKEN: string;
BLITZCRANK_APP_ID: string;
}
export function readEnvSettings(): EnvSettings {
// TODO(DWM): I hate this.
const BLITZCRANK_API_TOKEN = process.env.BLITZCRANK_API_TOKEN;
if (BLITZCRANK_API_TOKEN === undefined || BLITZCRANK_API_TOKEN === null) {
throw TypeError();
}
const BLITZCRANK_APP_ID = process.env.BLITZCRANK_APP_ID;
if (BLITZCRANK_APP_ID === undefined || BLITZCRANK_APP_ID === null) {
throw TypeError();
}
return { BLITZCRANK_API_TOKEN, BLITZCRANK_APP_ID };
}