diff --git a/.dev.vars.example b/.dev.vars.example index 9899ea5..ef56a4f 100644 --- a/.dev.vars.example +++ b/.dev.vars.example @@ -1,3 +1,3 @@ -# Required when exercising production-mode admin routes locally. -CF_ACCESS_TEAM_DOMAIN=https://your-team.cloudflareaccess.com -CF_ACCESS_AUD=your-access-application-audience +# Optional local overrides. The deployed values live in wrangler.jsonc. +CF_ACCESS_TEAM_DOMAIN=https://hisland.cloudflareaccess.com +CF_ACCESS_AUD=35b84a1c6ea81e1c036272ee68ecc4197041aadc1bed0815accac283a30e01ff diff --git a/src/app.d.ts b/src/app.d.ts index a79f138..f83fb02 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -3,10 +3,7 @@ declare global { namespace App { interface Platform { - env: Env & { - CF_ACCESS_TEAM_DOMAIN?: string; - CF_ACCESS_AUD?: string; - }; + env: Env; context: ExecutionContext; caches: CacheStorage & { default: Cache }; cf?: IncomingRequestCfProperties; diff --git a/worker-configuration.d.ts b/worker-configuration.d.ts index e664b91..78b5592 100644 --- a/worker-configuration.d.ts +++ b/worker-configuration.d.ts @@ -1,14 +1,24 @@ /* eslint-disable */ -// Generated by Wrangler by running `wrangler types` (hash: 595eaffe197c5cd34fd594e9940c7cf0) +// Generated by Wrangler by running `wrangler types` (hash: 8e316e5cc1c036c1cc1ec926e6667c6d) // Runtime types generated with workerd@1.20260801.1 2026-08-07 nodejs_compat interface __BaseEnv_Env { R2: R2Bucket; DB: D1Database; + CF_ACCESS_TEAM_DOMAIN: 'https://hisland.cloudflareaccess.com'; + CF_ACCESS_AUD: '35b84a1c6ea81e1c036272ee68ecc4197041aadc1bed0815accac283a30e01ff'; } declare namespace Cloudflare { interface Env extends __BaseEnv_Env {} } interface Env extends __BaseEnv_Env {} +type StringifyValues> = { + [Binding in keyof EnvType]: EnvType[Binding] extends string ? EnvType[Binding] : string; +}; +declare namespace NodeJS { + interface ProcessEnv extends StringifyValues< + Pick + > {} +} // Begin runtime types /*! ***************************************************************************** diff --git a/wrangler.jsonc b/wrangler.jsonc index da2ae74..48d645f 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -4,6 +4,10 @@ "compatibility_date": "2026-08-07", "compatibility_flags": ["nodejs_compat"], "pages_build_output_dir": ".svelte-kit/cloudflare", + "vars": { + "CF_ACCESS_TEAM_DOMAIN": "https://hisland.cloudflareaccess.com", + "CF_ACCESS_AUD": "35b84a1c6ea81e1c036272ee68ecc4197041aadc1bed0815accac283a30e01ff" + }, "d1_databases": [ { "binding": "DB",