Refactor context handling and migrate Wrangler config format.

Replaces `createServerContext` with `createRequestContext` for clarity and consistency across the application. Migrates `wrangler.toml` to `wrangler.jsonc` for improved configuration management and compatibility. Updates related files to align with the new context model and configuration structure.
This commit is contained in:
geoffsee
2025-05-27 15:01:48 -04:00
committed by Geoff Seemueller
parent 6ce22d8ef2
commit d0d55f58a6
4 changed files with 70 additions and 33 deletions

54
wrangler.jsonc Normal file
View File

@@ -0,0 +1,54 @@
{
"name": "open-gsio",
"assets": {
"binding": "ASSETS",
"directory": "./dist/client"
},
"dev": {
"ip": "localhost",
"port": 3001
},
"compatibility_date": "2025-04-04",
"compatibility_flags": [
"nodejs_compat"
],
"main": "./workers/site/worker.ts",
"preview_urls": false,
"workers_dev": false,
"kv_namespaces": [
{
"binding": "KV_STORAGE",
// $ npx wrangler kv namespace create open-gsio
"id": "placeholderId",
// $ npx wrangler kv namespace create open-gsio --preview
"preview_id": "placeholderIdPreview"
}
],
"migrations": [
{
"new_classes": [
"SiteCoordinator"
],
"tag": "v1"
}
],
"services": [
{
"binding": "EMAIL_SERVICE",
"service": "email-service-rpc"
}
],
"durable_objects": {
"bindings": [
{
"class_name": "SiteCoordinator",
"name": "SITE_COORDINATOR",
"script_name": "open-gsio"
}
]
},
"observability": {
"enabled": true
}
}