refactor: ♻️emoves Env parameter

Removes the `Env` parameter from several functions to simplify their signatures and rely on the global `env` for configuration.

This change reduces the number of arguments passed around, making the code cleaner and easier to maintain.
This commit is contained in:
2025-08-10 19:22:14 -04:00
parent 0b0078328c
commit 8175d73df1
26 changed files with 8716 additions and 184 deletions

View File

@@ -1,7 +1,5 @@
import type { Env } from "~/types/env";
/** Should only be used when it doesn't make sense for 'Bindings' or 'Variables' to be set. Otherwise, use getTestEnv(). */
export function getTestEnvVariables(): Omit<Env, "Bindings" | "Variables"> {
export function getTestEnvVariables(): Cloudflare.Env {
return getTestEnv();
}
@@ -10,7 +8,7 @@ export function getTestEnv({
ENABLE_ANIFY = "true",
TURSO_AUTH_TOKEN = "123",
TURSO_URL = "http://127.0.0.1:3001",
}: Partial<Env> = {}): Env {
}: Partial<Cloudflare.Env> = {}): Cloudflare.Env {
return {
ADMIN_SDK_JSON,
ENABLE_ANIFY,