Files
Zero/apps/server/wrangler.jsonc
Aj Wazzan 95276e56bd Refactor: implement active connection management and update related components
- Removed unused esbuild configuration for dropping console statements.
- Updated `vite.config.ts` to streamline configuration.
- Enhanced `wrangler.jsonc` with environment-specific variables for local, staging, and production.
- Refactored components to utilize `useActiveConnection` for managing active connections, ensuring consistent access across the application.
- Adjusted various components (e.g., `page.tsx`, `mail-display.tsx`, `nav-user.tsx`) to replace session-based connection handling with active connection management.
- Cleaned up imports and improved code readability across multiple files.
2025-05-20 17:01:36 -07:00

184 lines
4.6 KiB
JSON

{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "zero-server",
"compatibility_date": "2025-05-01",
"compatibility_flags": ["nodejs_compat"],
"main": "src/main.ts",
"env": {
"local": {
"durable_objects": {
"bindings": [
{
"class_name": "DurableMailbox",
"name": "DURABLE_MAILBOX",
},
],
},
"migrations": [
{
"tag": "v1",
"new_classes": ["DurableMailbox"],
},
],
"services": [
{
"binding": "zero",
"service": "zero-worker",
},
],
"observability": {
"enabled": true,
},
"hyperdrive": [
{
"binding": "HYPERDRIVE",
"id": "57834ddb6716440496c8836f6d99bc9a",
"localConnectionString": "postgresql://postgres:postgres@localhost:5432/zerodotemail",
},
],
"vars": {
"NODE_ENV": "development",
"FORCE_GMAIL_CONSENT": "true",
"COOKIE_DOMAIN": "localhost",
"VITE_PUBLIC_BACKEND_URL": "http://localhost:8787",
"VITE_PUBLIC_APP_URL": "http://localhost:3000",
},
"kv_namespaces": [
{
"binding": "subscribed_accounts",
"id": "cd3ff4a80734444c98aee76ea9166e3d",
},
{
"binding": "connection_labels",
"id": "26c5a521b1294ef88d36b96e5617c428",
},
{
"binding": "prompts_storage",
"id": "1caf4e863e2149519cef97f2ba3c9851",
},
{
"binding": "connection_limits",
"id": "19d415777f554b7c8fbe6eca7dc87918",
},
],
},
"staging": {
"limits": {
"cpu_ms": 300000,
},
"durable_objects": {
"bindings": [
{
"class_name": "DurableMailbox",
"name": "DURABLE_MAILBOX",
},
],
},
"migrations": [
{
"tag": "v1",
"new_classes": ["DurableMailbox"],
},
],
"services": [
{
"binding": "zero",
"service": "zero-worker",
},
],
"observability": {
"enabled": true,
},
"hyperdrive": [
{
"binding": "HYPERDRIVE",
"id": "57834ddb6716440496c8836f6d99bc9a",
"localConnectionString": "postgresql://postgres:postgres@localhost:5432/zerodotemail",
},
],
"vars": {
"NODE_ENV": "development",
"FORCE_GMAIL_CONSENT": "true",
"COOKIE_DOMAIN": "0.email",
"VITE_PUBLIC_BACKEND_URL": "https://sapi.0.email",
"VITE_PUBLIC_APP_URL": "https://app.0.email",
},
"kv_namespaces": [
{
"binding": "subscribed_accounts",
"id": "cd3ff4a80734444c98aee76ea9166e3d",
},
{
"binding": "connection_labels",
"id": "26c5a521b1294ef88d36b96e5617c428",
},
{
"binding": "prompts_storage",
"id": "1caf4e863e2149519cef97f2ba3c9851",
},
{
"binding": "connection_limits",
"id": "19d415777f554b7c8fbe6eca7dc87918",
},
],
},
"production": {
"observability": {
"enabled": true,
},
"hyperdrive": [
{
"binding": "HYPERDRIVE",
"id": "27171042364248898fc8672c0fc532a0",
"localConnectionString": "postgresql://postgres:postgres@localhost:5432/zerodotemail",
},
],
"durable_objects": {
"bindings": [
{
"class_name": "DurableMailbox",
"name": "DURABLE_MAILBOX",
},
],
},
"migrations": [
{
"tag": "v1",
"new_classes": ["DurableMailbox"],
},
],
"services": [
{
"binding": "zero",
"service": "zero-worker",
},
],
"vars": {
"NODE_ENV": "production",
"FORCE_GMAIL_CONSENT": "true",
"COOKIE_DOMAIN": "0.email",
"VITE_PUBLIC_BACKEND_URL": "https://api.0.email",
"VITE_PUBLIC_APP_URL": "https://0.email",
},
"kv_namespaces": [
{
"binding": "subscribed_accounts",
"id": "f9be403a33354338b05474151fec8215",
},
{
"binding": "connection_labels",
"id": "26c5a521b1294ef88d36b96e5617c428",
},
{
"binding": "prompts_storage",
"id": "1caf4e863e2149519cef97f2ba3c9851",
},
{
"binding": "connection_limits",
"id": "19d415777f554b7c8fbe6eca7dc87918",
},
],
},
},
}