{"draft":null,"from":7,"to":318,"files":[{"path":"client/src/env-names.ts","added":18,"removed":0,"diff":"--- /dev/null\n+++ b/client/src/env-names.ts\n@@ -0,0 +1,18 @@\n+// Environment names: ABSO_<NAME>, or the older AVCS_<NAME> from before the rename.\n+// Read the new one first; where abso sets one for a program it runs, it sets both.\n+\n+export type EnvMap = Readonly<Record<string, string | undefined>>;\n+\n+/** ABSO_<name> if set (and not empty), else AVCS_<name>. */\n+export function fromEnv(env: EnvMap, name: string): string | undefined {\n+\treturn env[`ABSO_${name}`] || env[`AVCS_${name}`] || undefined;\n+}\n+\n+/** Each ABSO_ entry once more under its AVCS_ name, for programs written before the rename. */\n+export function withOldNames<T extends Record<string, string | undefined>>(\n+\tvars: T,\n+): Record<string, string | undefined> {\n+\tconst out: Record<string, string | undefined> = { ...vars };\n+\tfor (const [k, v] of Object.entries(vars)) if (k.startsWith(\"ABSO_\")) out[`AVCS_${k.slice(5)}`] = v;\n+\treturn out;\n+}"}],"unmatched":[]}