Skip to content
Myr

wrangler.jsonc

This file

Path

apps/web/wrangler.jsonc

72 lines · 3.1 KiB

Last changed by

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–12why, one step back
1{
2 // The web Worker: TanStack Start's pages, and a same-origin /rpc that3 // forwards to the platform over the PLATFORM service binding. It holds no4 // storage binding of any kind (no Artifacts, D1, KV, R2, Durable Object or5 // Worker Loader), in any stage, so a bug in a public page cannot reach a6 // repo (AGENTS.md principle 7; packages/config/test/web-wiring.test.ts).7 // No secrets either: public values are vars. Deploy only through8 // infra/deploy.ts, to an explicit stage.9 //10 // The top level is stage `local`: `vite dev` and the type generation read11 // it, and it is never deployed. Each stage under `env` repeats the binding12 // and the vars, since wrangler does not inherit them into an environment.

Merge perf/workers-cache into mainoscabrielbefore adoptionccd5da2

lines 13–17why, one step back
13 //
14 // Workers Cache is on in each deployed stage, and off at the top, so `vite15 // dev` keeps nothing (ADR 0026). It keys by the Worker's version, so each16 // deploy starts cold and a kept page never names another version's hashed17 // assets: `cross_version_cache` stays off.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 18–19why, one step back
18 "$schema": "node_modules/wrangler/config-schema.json",
19 "name": "web",

Merge perf/workers-cache into mainoscabrielbefore adoptionccd5da2

lines 20–23why, one step back
20 // TanStack Start's own server entry, wrapped so every answer passes
21 // through what the edge may keep (src/server/edge-cache.ts; the Cloudflare22 // framework guide's custom entrypoint). The Cloudflare Vite plugin builds it.23 "main": "src/server.ts",

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 24–27why, one step back
24 "compatibility_date": "2026-10-05",
25 "compatibility_flags": ["nodejs_compat"],26 "workers_dev": true,27 "preview_urls": false,

Merge observability into mainoscabrielbefore adoption1985111

lines 28–39why, one step back
28 // Every invocation's logs and trace, unsampled, and Issues. Every stage
29 // inherits it, as it does the source maps below.30 "observability": {31 "enabled": true,32 "logs": {33 "enabled": true,34 "head_sampling_rate": 1,35 "invocation_logs": true,36 },37 "traces": { "enabled": true, "head_sampling_rate": 1 },38 "issues": { "enabled": true },39 },

Merge perf/minify-web into mainoscabrielbefore adoption260fd43

line 40why, one step back
40 // The server build is minified (vite.config.ts); its source maps let a

Merge observability into mainoscabrielbefore adoption1985111

line 41why, one step back
41 // stack trace in the logs, or an Issue, name the source.

Merge perf/minify-web into mainoscabrielbefore adoption260fd43

line 42why, one step back
42 "upload_source_maps": true,

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 43–50why, one step back
43 "services": [{ "binding": "PLATFORM", "service": "platform" }],
44 "vars": {45 // Where a browser reaches the platform itself: its sign-in pages and46 // git remotes. /rpc never needs it; that goes through PLATFORM.47 "PUBLIC_PLATFORM_URL": "http://localhost:8787",48 },49 "env": {50 "dev-oscabriel": {

Merge perf/workers-cache into mainoscabrielbefore adoptionccd5da2

line 51why, one step back
51 "cache": { "enabled": true },

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 52–58why, one step back
52 "services": [
53 { "binding": "PLATFORM", "service": "platform-dev-oscabriel" },54 ],55 "vars": {56 "PUBLIC_PLATFORM_URL": "https://platform-dev-oscabriel.oscargabriel.workers.dev",57 },58 },

Add a prod stage served on the brand's own domainoscabrielbefore adoption78a5062

line 59why, one step back
59 // Served on the brand's own domain, never workers.dev: infra/deploy.ts

Serve the web's www host as a redirect to its bare hostoscabrielbefore adoption05cecd1

line 60why, one step back
60 // passes its Custom Domains and PUBLIC_PLATFORM_URL, which name the brand,

Add a prod stage served on the brand's own domainoscabrielbefore adoption78a5062

lines 61–70why, one step back
61 // so they live in infra/stages.ts. The URL here is a stand-in the
62 // deploy's --var replaces, so the generated Env still types it a string.63 "prod": {64 "workers_dev": false,65 "cache": { "enabled": true },66 "services": [{ "binding": "PLATFORM", "service": "platform-prod" }],67 "vars": {68 "PUBLIC_PLATFORM_URL": "https://from-infra-deploy.invalid",69 },70 },

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 71–72why, one step back
71 },
72}