Files
cfw-autumn/server/experiments/experimentEnv.ts
imeepos a98f11c214 refactor: pass env explicitly across all remaining request-path modules
- Remove last runtimeEnv import from processMessage.ts
- Add env: Env param to all functions with 'Cannot find name env' errors
- Convert initRedisV2 to lazy initialization (ensureRedisV2 + Proxy)
- Add Bindings: Env to StripeWebhookHonoEnv
- Fix 12+ files across external/, internal/, queue/ modules
- Scanning test passes: 1/1 (runtime-env-imports.test.ts)
2026-06-17 07:08:41 -07:00

18 lines
473 B
TypeScript

const requireEnv = ({ key }: { key: string }) => {
const value = process.env[key];
if (!value) {
throw new Error(`${key} env var is required`);
}
return value;
};
export const prodTestOrgId = requireEnv({ key: "PROD_TEST_ORG_ID" });
export const prodTestCustomerId = requireEnv({
key: "PROD_TEST_CUSTOMER_ID",
});
export const prodTestEntityId = process.env.PROD_TEST_ENTITY_ID || undefined;
export const { initDrizzle } = await import("../src/db/initDrizzle");