-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: convert wrangler config from TOML to JSONC #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| // Cloudflare Workers configuration for ChittyFinance (System Mode) | ||
| // Deploys to Cloudflare Workers for ChittyOS ecosystem integration | ||
| // | ||
| // Canonical model: 3 explicit environments (dev, staging, production). | ||
| // Bindings (KV, R2, DO, tail_consumers) do NOT inherit from top-level | ||
| // into env blocks — each env must carry its own explicit bindings. | ||
| // | ||
| // Secrets (set per-env with: wrangler secret put SECRET_NAME --env <env>) | ||
| // Required: | ||
| // DATABASE_URL — Neon PostgreSQL connection string | ||
| // CHITTY_AUTH_SERVICE_TOKEN — ChittyAuth service token | ||
| // JWT_SECRET — JWT signing secret | ||
| // OAUTH_STATE_SECRET — HMAC secret for OAuth CSRF protection | ||
| // Integrations (optional): | ||
| // OPENAI_API_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, | ||
| // WAVE_CLIENT_ID, WAVE_CLIENT_SECRET, CHITTYCONNECT_API_TOKEN | ||
| { | ||
| "name": "chittyfinance", | ||
| "main": "../server/worker.ts", | ||
| "compatibility_date": "2026-03-01", | ||
| "compatibility_flags": ["nodejs_compat"], | ||
| "account_id": "0bc21e3a5a9de1a4cc843be9c3e98121", | ||
| "workers_dev": false, | ||
|
|
||
| "routes": [ | ||
| { "pattern": "finance.chitty.cc/*", "zone_name": "chitty.cc" } | ||
| ], | ||
|
|
||
| // Hyperdrive binding for fractal scope projection into ChittyOS-Core | ||
| "hyperdrive": [ | ||
| { "binding": "CHITTYOS_CORE_DB", "id": "1d126444cff1416cb415447e6cc6d15a" } | ||
| ], | ||
|
|
||
| // Cloudflare Email Service binding (beta, Workers Paid plan) | ||
| // Domain: chitty.cc — onboard at dashboard → Email Sending | ||
| "send_email": [ | ||
| { "name": "EMAIL", "allowed_sender_addresses": ["finance@chitty.cc", "noreply@chitty.cc"] } | ||
| ], | ||
|
|
||
| "vars": { | ||
| "MODE": "system", | ||
| "NODE_ENV": "production", | ||
| "APP_VERSION": "2.0.0", | ||
| "CHITTYCONNECT_API_BASE": "https://connect.chitty.cc" | ||
| }, | ||
|
|
||
| "observability": { "enabled": true }, | ||
|
|
||
| "tail_consumers": [ | ||
| { "service": "chittytrack" } | ||
| ], | ||
|
|
||
| "build": { | ||
| "command": "npx vite build --outDir dist/public" | ||
| }, | ||
|
|
||
| "assets": { | ||
| "directory": "../dist/public", | ||
| "binding": "ASSETS" | ||
| }, | ||
|
|
||
| "triggers": { | ||
| "crons": ["0 9 * * *"] // Daily at 9:00 AM UTC — lease expiration check | ||
| }, | ||
|
|
||
| "limits": { "cpu_ms": 50 }, | ||
|
|
||
| "kv_namespaces": [ | ||
| { | ||
| "binding": "FINANCE_KV", | ||
| "id": "517b63be4d7144c197b5bdf851f12041", | ||
| "preview_id": "89d0b3bc875e49c4a3a9091de6a080aa" | ||
| } | ||
| ], | ||
|
|
||
| "r2_buckets": [ | ||
| { | ||
| "binding": "FINANCE_R2", | ||
| "bucket_name": "chittyfinance-storage", | ||
| "preview_bucket_name": "chittyfinance-storage-preview" | ||
| } | ||
| ], | ||
|
|
||
| "durable_objects": { | ||
| "bindings": [ | ||
| { "name": "CF_AGENT", "class_name": "ChittyAgent" } | ||
| ] | ||
| }, | ||
|
|
||
| "migrations": [ | ||
| { "tag": "v1", "new_sqlite_classes": ["ChittyAgent"] } | ||
| ], | ||
|
|
||
| // ─── env.dev — local development via `wrangler dev --env dev` ─── | ||
| "env": { | ||
| "dev": { | ||
| "name": "chittyfinance-dev", | ||
| "workers_dev": true, | ||
| "send_email": [ | ||
| { "name": "EMAIL" } | ||
| ], | ||
| "vars": { | ||
| "MODE": "system", | ||
| "NODE_ENV": "development", | ||
| "APP_VERSION": "2.0.0", | ||
| "CHITTYCONNECT_API_BASE": "https://connect.chitty.cc" | ||
| }, | ||
| "triggers": { "crons": ["0 9 * * *"] }, | ||
| "tail_consumers": [{ "service": "chittytrack" }], | ||
| "kv_namespaces": [ | ||
| { "binding": "FINANCE_KV", "id": "89d0b3bc875e49c4a3a9091de6a080aa" } | ||
| ], | ||
| "r2_buckets": [ | ||
| { "binding": "FINANCE_R2", "bucket_name": "chittyfinance-storage-preview" } | ||
| ], | ||
| "durable_objects": { | ||
| "bindings": [ | ||
| { "name": "CF_AGENT", "class_name": "ChittyAgent" } | ||
| ] | ||
| } | ||
| }, | ||
|
|
||
| // ─── env.staging — `wrangler deploy --env staging` ─── | ||
| "staging": { | ||
| "name": "chittyfinance-staging", | ||
| "workers_dev": true, | ||
| "vars": { | ||
| "MODE": "system", | ||
| "NODE_ENV": "staging", | ||
| "APP_VERSION": "2.0.0", | ||
| "CHITTYCONNECT_API_BASE": "https://connect.chitty.cc" | ||
| }, | ||
| "triggers": { "crons": ["0 9 * * *"] }, | ||
| "tail_consumers": [{ "service": "chittytrack" }], | ||
| "kv_namespaces": [ | ||
| { "binding": "FINANCE_KV", "id": "517b63be4d7144c197b5bdf851f12041" } | ||
| ], | ||
| "r2_buckets": [ | ||
| { "binding": "FINANCE_R2", "bucket_name": "chittyfinance-storage" } | ||
| ], | ||
| "durable_objects": { | ||
| "bindings": [ | ||
| { "name": "CF_AGENT", "class_name": "ChittyAgent" } | ||
| ] | ||
| } | ||
| }, | ||
|
|
||
| // ─── env.production — `wrangler deploy --env production` ─── | ||
| "production": { | ||
| "name": "chittyfinance", | ||
| "workers_dev": false, | ||
| "routes": [ | ||
| { "pattern": "finance.chitty.cc/*", "zone_name": "chitty.cc" } | ||
| ], | ||
| "send_email": [ | ||
| { "name": "EMAIL", "allowed_sender_addresses": ["finance@chitty.cc", "noreply@chitty.cc"] } | ||
| ], | ||
| "vars": { | ||
| "MODE": "system", | ||
| "NODE_ENV": "production", | ||
| "APP_VERSION": "2.0.0", | ||
| "CHITTYCONNECT_API_BASE": "https://connect.chitty.cc" | ||
| }, | ||
| "triggers": { "crons": ["0 9 * * *"] }, | ||
| "tail_consumers": [{ "service": "chittytrack" }], | ||
| "kv_namespaces": [ | ||
| { "binding": "FINANCE_KV", "id": "517b63be4d7144c197b5bdf851f12041" } | ||
| ], | ||
| "r2_buckets": [ | ||
| { "binding": "FINANCE_R2", "bucket_name": "chittyfinance-storage" } | ||
| ], | ||
| "durable_objects": { | ||
| "bindings": [ | ||
| { "name": "CF_AGENT", "class_name": "ChittyAgent" } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |||||
| "test:run": "vitest run" | ||||||
| }, | ||||||
| "dependencies": { | ||||||
| "@chittyos/schema": "file:../../CHITTYFOUNDATION/chittyschema", | ||||||
|
||||||
| "@chittyos/schema": "file:../../CHITTYFOUNDATION/chittyschema", | |
| "@chittyos/schema": "2.0.0", |
Copilot
AI
Apr 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package.json was updated to add a new dependency, but pnpm-lock.yaml wasn’t updated in this PR. CI runs pnpm install --frozen-lockfile (see .github/workflows/security-gates.yml:91), so this will fail until the lockfile is regenerated and committed.
| "@hookform/resolvers": "^3.9.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new dependency specifier points to a filesystem path outside this repository (
file:../../CHITTYFOUNDATION/chittyschema), so a normal checkout cannot install dependencies unless that exact sibling directory exists; in CI this breakspnpm install(and with the current unchanged lockfile it also fails--frozen-lockfileimmediately). Becauseserver/lib/central-workflows.tsnow imports from@chittyos/schema/scope-projector, this makes build/test pipelines fail before compilation in environments that only have this repo.Useful? React with 👍 / 👎.