mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-07 10:36:05 -10:00
Use one authoritative typed Cloudflare config, preserving the existing Worker name, KV identities, Durable Object export, bindings, domains and cron. Generate the ignored OpenNext adapter config from it. Pin cf beta.12 and its official internal build delegate; build and populate OpenNext cache before cf deploy --prebuilt. Fail closed if deployment SHA or storage identities are missing. No production deployment, namespace creation or secret change was performed. Exclude generated cf/preview bundles from the source locale ceiling and fix two vulnerable transitive parser versions. The recovered terminal gallery remains explicitly a 0.10.1 pre-release preview with 0.10.0 the published release. Validation: npm test 1286 passed, 0 failed, 7 skipped (wrapper 101, SDK 19, extension host 399/406, web 767); npm run check:web passed. Focused deployment preflight 13/13 passed, TypeScript passed, OpenNext plus cf bundle build passed, cf deploy --dry-run passed, KV identity guard passed. Real local Worker /api/facts returned 200; browser interaction selected and rendered all six terminal views. Narrow viewport had no horizontal page overflow. No deploy/publication claim. Signed-off-by: CodeWhale Bot <[email protected]>
71 lines
1.7 KiB
TypeScript
71 lines
1.7 KiB
TypeScript
import { bindings, defineConfig, exports, triggers } from "cf/config";
|
|
|
|
export default defineConfig({
|
|
worker: {
|
|
name: "codewhale-web",
|
|
compatibilityDate: "2025-04-01",
|
|
compatibilityFlags: [
|
|
"nodejs_compat",
|
|
"global_fetch_strictly_public",
|
|
],
|
|
entrypoint: "worker.ts",
|
|
observability: {
|
|
enabled: true,
|
|
},
|
|
domains: [
|
|
"codewhale.net",
|
|
"www.codewhale.net",
|
|
],
|
|
triggers: [
|
|
triggers.scheduled({
|
|
schedule: "0 */6 * * *",
|
|
}),
|
|
triggers.scheduled({
|
|
schedule: "*/30 * * * *",
|
|
}),
|
|
triggers.scheduled({
|
|
schedule: "0 0 * * *",
|
|
}),
|
|
triggers.scheduled({
|
|
schedule: "0 9 * * 1",
|
|
}),
|
|
],
|
|
env: {
|
|
GITHUB_REPO: bindings.text("codewhale-hq/CodeWhale"),
|
|
DEEPSEEK_MODEL: bindings.text("deepseek-flash"),
|
|
DEEPSEEK_BASE_URL: bindings.text("https://gateway.ai.cloudflare.com/v1/cf50f793171d7cb3b2ce23368b69cdcb/codewhale-web/deepseek"),
|
|
SUPABASE_URL: bindings.text("https://mungbvkvpkxbkjzspehg.supabase.co"),
|
|
CURATED_KV: bindings.kv({
|
|
id: "abaa6a753c9d45bfa5c0afaf26dc67b3",
|
|
}),
|
|
NEXT_INC_CACHE_KV: bindings.kv({
|
|
id: "a2e6f324db9b4b03bbc940a4ba246985",
|
|
}),
|
|
WORKER_SELF_REFERENCE: bindings.worker({
|
|
worker: "codewhale-web",
|
|
}),
|
|
DRAFT_CLAIM_LOCK: bindings.durableObject({
|
|
worker: "codewhale-web",
|
|
exportName: "DraftClaimLock",
|
|
}),
|
|
ADMIN_LOGIN_LIMITER: bindings.rateLimit({
|
|
namespace: "913001",
|
|
simple: {
|
|
limit: 5,
|
|
period: 60,
|
|
},
|
|
}),
|
|
MERCH_INTEREST_LIMITER: bindings.rateLimit({
|
|
namespace: "913002",
|
|
simple: {
|
|
limit: 5,
|
|
period: 60,
|
|
},
|
|
}),
|
|
ASSETS: bindings.assets(),
|
|
},
|
|
// Same live class and SQLite storage as the former v1 migration.
|
|
exports: { DraftClaimLock: exports.durableObject({ storage: "sqlite" }) },
|
|
},
|
|
});
|