create-better-t-stack 3.4.0 → 3.4.2-canary.39d948b7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.js +1 -1
- package/dist/{src-oHcpd_LW.js → src-BEzWAB2k.js} +58 -438
- package/package.json +1 -1
- package/templates/api/orpc/server/tsconfig.json.hbs +1 -4
- package/templates/api/trpc/server/tsconfig.json.hbs +1 -4
- package/templates/auth/better-auth/server/base/tsconfig.json.hbs +1 -4
- package/templates/db/base/tsconfig.json.hbs +1 -4
- package/templates/db/drizzle/sqlite/drizzle.config.ts.hbs +0 -7
- package/templates/db/prisma/postgres/src/index.ts.hbs +0 -5
- package/templates/deploy/alchemy/alchemy.run.ts.hbs +67 -5
- package/templates/examples/ai/web/react/next/src/app/ai/page.tsx.hbs +2 -2
- package/templates/extras/_npmrc.hbs +2 -2
- package/templates/frontend/react/next/next.config.ts.hbs +5 -2
- package/templates/frontend/react/next/tsconfig.json.hbs +0 -3
- package/templates/frontend/react/tanstack-start/package.json.hbs +4 -4
- package/templates/packages/config/tsconfig.base.json.hbs +1 -1
- package/templates/deploy/wrangler/server/wrangler.jsonc.hbs +0 -39
- package/templates/deploy/wrangler/web/nuxt/wrangler.jsonc.hbs +0 -51
- package/templates/deploy/wrangler/web/react/next/open-next.config.ts +0 -6
- package/templates/deploy/wrangler/web/react/next/wrangler.jsonc.hbs +0 -22
- package/templates/deploy/wrangler/web/react/react-router/wrangler.jsonc.hbs +0 -8
- package/templates/deploy/wrangler/web/react/tanstack-router/wrangler.jsonc.hbs +0 -8
- package/templates/deploy/wrangler/web/react/tanstack-start/wrangler.jsonc.hbs +0 -20
- package/templates/deploy/wrangler/web/solid/wrangler.jsonc.hbs +0 -8
- package/templates/deploy/wrangler/web/svelte/wrangler.jsonc.hbs +0 -51
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2-canary.39d948b7",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,13 +16,6 @@ export default defineConfig({
|
|
|
16
16
|
// DOCS: https://orm.drizzle.team/docs/guides/d1-http-with-drizzle-kit
|
|
17
17
|
dialect: "sqlite",
|
|
18
18
|
driver: "d1-http",
|
|
19
|
-
{{#if (eq serverDeploy "wrangler")}}
|
|
20
|
-
dbCredentials: {
|
|
21
|
-
accountId: process.env.CLOUDFLARE_ACCOUNT_ID!,
|
|
22
|
-
databaseId: process.env.CLOUDFLARE_DATABASE_ID!,
|
|
23
|
-
token: process.env.CLOUDFLARE_D1_TOKEN!,
|
|
24
|
-
},
|
|
25
|
-
{{/if}}
|
|
26
19
|
{{else}}
|
|
27
20
|
dialect: "turso",
|
|
28
21
|
dbCredentials: {
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { PrismaClient } from "../prisma/generated/client";
|
|
2
|
-
{{#if (and (eq dbSetup "prisma-postgres") (eq orm "prisma"))}}
|
|
3
|
-
import { withAccelerate } from "@prisma/extension-accelerate";
|
|
4
2
|
|
|
5
|
-
const prisma = new PrismaClient().$extends(withAccelerate());
|
|
6
|
-
{{else}}
|
|
7
3
|
const prisma = new PrismaClient();
|
|
8
|
-
{{/if}}
|
|
9
4
|
|
|
10
5
|
export default prisma;
|
|
@@ -18,11 +18,9 @@ import { Vite } from "alchemy/cloudflare";
|
|
|
18
18
|
{{/if}}
|
|
19
19
|
{{#if (eq serverDeploy "alchemy")}}
|
|
20
20
|
import { Worker } from "alchemy/cloudflare";
|
|
21
|
-
{{#if (eq dbSetup "d1")}}
|
|
22
|
-
import { D1Database } from "alchemy/cloudflare";
|
|
23
|
-
{{/if}}
|
|
24
21
|
{{/if}}
|
|
25
|
-
{{#if (and (eq serverDeploy "alchemy") (eq dbSetup "d1"))}}
|
|
22
|
+
{{#if (and (or (eq serverDeploy "alchemy") (and (eq webDeploy "alchemy") (eq backend "self"))) (eq dbSetup "d1"))}}
|
|
23
|
+
import { D1Database } from "alchemy/cloudflare";
|
|
26
24
|
import { Exec } from "alchemy/os";
|
|
27
25
|
{{/if}}
|
|
28
26
|
import { config } from "dotenv";
|
|
@@ -37,7 +35,7 @@ config({ path: "./.env" });
|
|
|
37
35
|
|
|
38
36
|
const app = await alchemy("{{projectName}}");
|
|
39
37
|
|
|
40
|
-
{{#if (and (eq serverDeploy "alchemy") (eq dbSetup "d1"))}}
|
|
38
|
+
{{#if (and (or (eq serverDeploy "alchemy") (and (eq webDeploy "alchemy") (eq backend "self"))) (eq dbSetup "d1"))}}
|
|
41
39
|
await Exec("db-generate", {
|
|
42
40
|
{{#if (and (eq webDeploy "alchemy") (eq serverDeploy "alchemy"))}}cwd: "packages/db",{{/if}}
|
|
43
41
|
command: "{{packageManager}} run db:generate",
|
|
@@ -62,6 +60,38 @@ export const web = await Nextjs("web", {
|
|
|
62
60
|
{{else if (ne backend "self")}}
|
|
63
61
|
NEXT_PUBLIC_SERVER_URL: process.env.NEXT_PUBLIC_SERVER_URL || "",
|
|
64
62
|
{{/if}}
|
|
63
|
+
{{#if (eq backend "self")}}
|
|
64
|
+
{{#if (eq dbSetup "d1")}}
|
|
65
|
+
DB: db,
|
|
66
|
+
{{else if (and (ne database "none") (ne dbSetup "none"))}}
|
|
67
|
+
DATABASE_URL: alchemy.secret(process.env.DATABASE_URL),
|
|
68
|
+
{{/if}}
|
|
69
|
+
CORS_ORIGIN: process.env.CORS_ORIGIN || "",
|
|
70
|
+
{{#if (eq auth "better-auth")}}
|
|
71
|
+
BETTER_AUTH_SECRET: alchemy.secret(process.env.BETTER_AUTH_SECRET),
|
|
72
|
+
BETTER_AUTH_URL: process.env.BETTER_AUTH_URL || "",
|
|
73
|
+
{{/if}}
|
|
74
|
+
{{#if (eq auth "clerk")}}
|
|
75
|
+
CLERK_SECRET_KEY: alchemy.secret(process.env.CLERK_SECRET_KEY),
|
|
76
|
+
{{/if}}
|
|
77
|
+
{{#if (includes examples "ai")}}
|
|
78
|
+
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret(process.env.GOOGLE_GENERATIVE_AI_API_KEY),
|
|
79
|
+
{{/if}}
|
|
80
|
+
{{#if (eq payments "polar")}}
|
|
81
|
+
POLAR_ACCESS_TOKEN: alchemy.secret(process.env.POLAR_ACCESS_TOKEN),
|
|
82
|
+
POLAR_SUCCESS_URL: process.env.POLAR_SUCCESS_URL || "",
|
|
83
|
+
{{/if}}
|
|
84
|
+
{{#if (eq dbSetup "turso")}}
|
|
85
|
+
DATABASE_AUTH_TOKEN: alchemy.secret(process.env.DATABASE_AUTH_TOKEN),
|
|
86
|
+
{{/if}}
|
|
87
|
+
{{#if (eq database "mysql")}}
|
|
88
|
+
{{#if (eq orm "drizzle")}}
|
|
89
|
+
DATABASE_HOST: process.env.DATABASE_HOST || "",
|
|
90
|
+
DATABASE_USERNAME: process.env.DATABASE_USERNAME || "",
|
|
91
|
+
DATABASE_PASSWORD: process.env.DATABASE_PASSWORD || "",
|
|
92
|
+
{{/if}}
|
|
93
|
+
{{/if}}
|
|
94
|
+
{{/if}}
|
|
65
95
|
},
|
|
66
96
|
dev: {
|
|
67
97
|
command: "{{packageManager}} run dev"
|
|
@@ -104,6 +134,38 @@ export const web = await TanStackStart("web", {
|
|
|
104
134
|
{{else if (ne backend "self")}}
|
|
105
135
|
VITE_SERVER_URL: process.env.VITE_SERVER_URL || "",
|
|
106
136
|
{{/if}}
|
|
137
|
+
{{#if (eq backend "self")}}
|
|
138
|
+
{{#if (eq dbSetup "d1")}}
|
|
139
|
+
DB: db,
|
|
140
|
+
{{else if (and (ne database "none") (ne dbSetup "none"))}}
|
|
141
|
+
DATABASE_URL: alchemy.secret(process.env.DATABASE_URL),
|
|
142
|
+
{{/if}}
|
|
143
|
+
CORS_ORIGIN: process.env.CORS_ORIGIN || "",
|
|
144
|
+
{{#if (eq auth "better-auth")}}
|
|
145
|
+
BETTER_AUTH_SECRET: alchemy.secret(process.env.BETTER_AUTH_SECRET),
|
|
146
|
+
BETTER_AUTH_URL: process.env.BETTER_AUTH_URL || "",
|
|
147
|
+
{{/if}}
|
|
148
|
+
{{#if (eq auth "clerk")}}
|
|
149
|
+
CLERK_SECRET_KEY: alchemy.secret(process.env.CLERK_SECRET_KEY),
|
|
150
|
+
{{/if}}
|
|
151
|
+
{{#if (includes examples "ai")}}
|
|
152
|
+
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret(process.env.GOOGLE_GENERATIVE_AI_API_KEY),
|
|
153
|
+
{{/if}}
|
|
154
|
+
{{#if (eq payments "polar")}}
|
|
155
|
+
POLAR_ACCESS_TOKEN: alchemy.secret(process.env.POLAR_ACCESS_TOKEN),
|
|
156
|
+
POLAR_SUCCESS_URL: process.env.POLAR_SUCCESS_URL || "",
|
|
157
|
+
{{/if}}
|
|
158
|
+
{{#if (eq dbSetup "turso")}}
|
|
159
|
+
DATABASE_AUTH_TOKEN: alchemy.secret(process.env.DATABASE_AUTH_TOKEN),
|
|
160
|
+
{{/if}}
|
|
161
|
+
{{#if (eq database "mysql")}}
|
|
162
|
+
{{#if (eq orm "drizzle")}}
|
|
163
|
+
DATABASE_HOST: process.env.DATABASE_HOST || "",
|
|
164
|
+
DATABASE_USERNAME: process.env.DATABASE_USERNAME || "",
|
|
165
|
+
DATABASE_PASSWORD: process.env.DATABASE_PASSWORD || "",
|
|
166
|
+
{{/if}}
|
|
167
|
+
{{/if}}
|
|
168
|
+
{{/if}}
|
|
107
169
|
},
|
|
108
170
|
dev: {
|
|
109
171
|
command: "{{packageManager}} run dev"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useChat } from "@ai-sdk/react";
|
|
4
4
|
import { DefaultChatTransport } from "ai";
|
|
5
5
|
import { Send } from "lucide-react";
|
|
6
|
-
{{#if (
|
|
6
|
+
{{#if (eq webDeploy "alchemy")}}
|
|
7
7
|
import dynamic from "next/dynamic";
|
|
8
8
|
{{else}}
|
|
9
9
|
import { Response } from "@/components/response";
|
|
@@ -12,7 +12,7 @@ import { useEffect, useRef, useState } from "react";
|
|
|
12
12
|
import { Button } from "@/components/ui/button";
|
|
13
13
|
import { Input } from "@/components/ui/input";
|
|
14
14
|
|
|
15
|
-
{{#if (
|
|
15
|
+
{{#if (eq webDeploy "alchemy")}}
|
|
16
16
|
const Response = dynamic(
|
|
17
17
|
() =>
|
|
18
18
|
import("@/components/response").then((mod) => ({ default: mod.Response })),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{{#if (
|
|
1
|
+
{{#if (eq webDeploy "alchemy")}}
|
|
2
2
|
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
|
|
3
3
|
{{/if}}
|
|
4
4
|
import type { NextConfig } from "next";
|
|
@@ -9,10 +9,13 @@ const nextConfig: NextConfig = {
|
|
|
9
9
|
{{#if (includes examples "ai")}}
|
|
10
10
|
transpilePackages: ["shiki"],
|
|
11
11
|
{{/if}}
|
|
12
|
+
{{#if (eq dbSetup "turso")}}
|
|
13
|
+
serverExternalPackages: ["libsql", "@libsql/client"],
|
|
14
|
+
{{/if}}
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
export default nextConfig;
|
|
15
18
|
|
|
16
|
-
{{#if (
|
|
19
|
+
{{#if (eq webDeploy "alchemy")}}
|
|
17
20
|
initOpenNextCloudflareForDev();
|
|
18
21
|
{{/if}}
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@tanstack/react-form": "^1.23.5",
|
|
13
13
|
"@tailwindcss/vite": "^4.1.8",
|
|
14
14
|
"@tanstack/react-query": "^5.80.6",
|
|
15
|
-
"@tanstack/react-router": "^1.132.31",
|
|
15
|
+
"@tanstack/react-router": {{#if (eq auth "clerk")}}"1.134.4"{{else}}"^1.132.31"{{/if}},
|
|
16
16
|
"@tanstack/react-router-with-query": "^1.130.17",
|
|
17
|
-
"@tanstack/react-start": "^1.132.31",
|
|
18
|
-
"@tanstack/router-plugin": "^1.132.31",
|
|
17
|
+
"@tanstack/react-start": {{#if (eq auth "clerk")}}"1.134.6"{{else}}"^1.132.31"{{/if}},
|
|
18
|
+
"@tanstack/router-plugin": {{#if (eq auth "clerk")}}"1.134.4"{{else}}"^1.132.31"{{/if}},
|
|
19
19
|
"class-variance-authority": "^0.7.1",
|
|
20
20
|
"clsx": "^2.1.1",
|
|
21
21
|
"lucide-react": "^0.525.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"zod": "^4.0.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@tanstack/react-router-devtools": "^1.132.31",
|
|
33
|
+
"@tanstack/react-router-devtools": {{#if (eq auth "clerk")}}"1.134.4"{{else}}"^1.132.31"{{/if}},
|
|
34
34
|
"@testing-library/dom": "^10.4.0",
|
|
35
35
|
"@testing-library/react": "^16.2.0",
|
|
36
36
|
"@types/react": "~19.1.10",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{projectName}}-server",
|
|
3
|
-
"main": "src/index.ts",
|
|
4
|
-
"compatibility_date": "2025-06-15",
|
|
5
|
-
"compatibility_flags": ["nodejs_compat"],
|
|
6
|
-
"vars": {
|
|
7
|
-
"NODE_ENV": "production"
|
|
8
|
-
// Add public environment variables here
|
|
9
|
-
// Example: "CORS_ORIGIN": "https://your-domain.com"
|
|
10
|
-
}
|
|
11
|
-
// For sensitive data, use:
|
|
12
|
-
// wrangler secret put SECRET_NAME
|
|
13
|
-
// Don't add secrets to "vars" - they're visible in the dashboard!
|
|
14
|
-
|
|
15
|
-
{{#if (eq dbSetup "d1")}},
|
|
16
|
-
// To set up D1 database:
|
|
17
|
-
// 1. Run: wrangler login
|
|
18
|
-
// 2. Run: wrangler d1 create your-database-name
|
|
19
|
-
// 3. Copy the output and paste below
|
|
20
|
-
// Then run migrations:
|
|
21
|
-
// bun db:generate
|
|
22
|
-
// To apply migrations locally, run:
|
|
23
|
-
// wrangler d1 migrations apply YOUR_DB_NAME --local
|
|
24
|
-
"d1_databases": [
|
|
25
|
-
{
|
|
26
|
-
"binding": "DB",
|
|
27
|
-
"database_name": "YOUR_DB_NAME",
|
|
28
|
-
"database_id": "YOUR_DB_ID",
|
|
29
|
-
"preview_database_id": "local-test-db",
|
|
30
|
-
{{#if (eq orm "drizzle")}}
|
|
31
|
-
"migrations_dir": "./src/db/migrations"
|
|
32
|
-
{{/if}}
|
|
33
|
-
{{#if (eq orm "prisma")}}
|
|
34
|
-
"migrations_dir": "./prisma/migrations"
|
|
35
|
-
{{/if}}
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
{{/if}}
|
|
39
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* For more details on how to configure Wrangler, refer to:
|
|
3
|
-
* https://developers.cloudflare.com/workers/wrangler/configuration/
|
|
4
|
-
*/
|
|
5
|
-
{
|
|
6
|
-
"$schema": "./node_modules/wrangler/config-schema.json",
|
|
7
|
-
"name": "{{projectName}}",
|
|
8
|
-
"main": "./.output/server/index.mjs",
|
|
9
|
-
"compatibility_date": "2025-07-01",
|
|
10
|
-
"assets": {
|
|
11
|
-
"binding": "ASSETS",
|
|
12
|
-
"directory": "./.output/public/"
|
|
13
|
-
},
|
|
14
|
-
"observability": {
|
|
15
|
-
"enabled": true
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Smart Placement
|
|
19
|
-
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
|
20
|
-
*/
|
|
21
|
-
// "placement": { "mode": "smart" },
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Bindings
|
|
25
|
-
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
|
|
26
|
-
* databases, object storage, AI inference, real-time communication and more.
|
|
27
|
-
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Environment Variables
|
|
32
|
-
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
|
33
|
-
*/
|
|
34
|
-
// "vars": { "MY_VARIABLE": "production_value" },
|
|
35
|
-
/**
|
|
36
|
-
* Note: Use secrets to store sensitive data.
|
|
37
|
-
* https://developers.cloudflare.com/workers/configuration/secrets/
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Static Assets
|
|
42
|
-
* https://developers.cloudflare.com/workers/static-assets/binding/
|
|
43
|
-
*/
|
|
44
|
-
// "assets": { "directory": "./public/", "binding": "ASSETS" },
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Service Bindings (communicate between multiple Workers)
|
|
48
|
-
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
49
|
-
*/
|
|
50
|
-
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
|
|
51
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { defineCloudflareConfig } from "@opennextjs/cloudflare/config";
|
|
2
|
-
// import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";
|
|
3
|
-
|
|
4
|
-
export default defineCloudflareConfig({
|
|
5
|
-
// incrementalCache: r2IncrementalCache,
|
|
6
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/wrangler/config-schema.json",
|
|
3
|
-
"main": ".open-next/worker.js",
|
|
4
|
-
"name": "{{projectName}}",
|
|
5
|
-
"compatibility_date": "2025-07-05",
|
|
6
|
-
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
|
|
7
|
-
"assets": {
|
|
8
|
-
"directory": ".open-next/assets",
|
|
9
|
-
"binding": "ASSETS"
|
|
10
|
-
},
|
|
11
|
-
// "r2_buckets": [
|
|
12
|
-
// // Use R2 incremental cache
|
|
13
|
-
// // See https://opennext.js.org/cloudflare/caching
|
|
14
|
-
// {
|
|
15
|
-
// "binding": "NEXT_INC_CACHE_R2_BUCKET",
|
|
16
|
-
// // Create the bucket before deploying
|
|
17
|
-
// // You can change the bucket name if you want
|
|
18
|
-
// // See https://developers.cloudflare.com/workers/wrangler/commands/#r2-bucket-create
|
|
19
|
-
// "bucket_name": "cache"
|
|
20
|
-
// }
|
|
21
|
-
// ]
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/wrangler/config-schema.json",
|
|
3
|
-
"name": "{{projectName}}",
|
|
4
|
-
"main": "@tanstack/react-start/server-entry",
|
|
5
|
-
"compatibility_date": "2025-09-15",
|
|
6
|
-
"compatibility_flags": ["nodejs_compat"],
|
|
7
|
-
"assets": {
|
|
8
|
-
"directory": ".output/public",
|
|
9
|
-
},
|
|
10
|
-
"observability": {
|
|
11
|
-
"enabled": true,
|
|
12
|
-
},
|
|
13
|
-
// "kv_namespaces": [
|
|
14
|
-
// {
|
|
15
|
-
// "binding": "CACHE",
|
|
16
|
-
// "id": "<Your KV ID>",
|
|
17
|
-
// },
|
|
18
|
-
// ],
|
|
19
|
-
}
|
|
20
|
-
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* For more details on how to configure Wrangler, refer to:
|
|
3
|
-
* https://developers.cloudflare.com/workers/wrangler/configuration/
|
|
4
|
-
*/
|
|
5
|
-
{
|
|
6
|
-
"$schema": "./node_modules/wrangler/config-schema.json",
|
|
7
|
-
"name": "{{projectName}}",
|
|
8
|
-
"main": ".svelte-kit/cloudflare/_worker.js",
|
|
9
|
-
"compatibility_date": "2025-07-05",
|
|
10
|
-
"assets": {
|
|
11
|
-
"binding": "ASSETS",
|
|
12
|
-
"directory": ".svelte-kit/cloudflare"
|
|
13
|
-
},
|
|
14
|
-
"observability": {
|
|
15
|
-
"enabled": true
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Smart Placement
|
|
19
|
-
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
|
20
|
-
*/
|
|
21
|
-
// "placement": { "mode": "smart" },
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Bindings
|
|
25
|
-
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
|
|
26
|
-
* databases, object storage, AI inference, real-time communication and more.
|
|
27
|
-
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Environment Variables
|
|
32
|
-
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
|
33
|
-
*/
|
|
34
|
-
// "vars": { "MY_VARIABLE": "production_value" },
|
|
35
|
-
/**
|
|
36
|
-
* Note: Use secrets to store sensitive data.
|
|
37
|
-
* https://developers.cloudflare.com/workers/configuration/secrets/
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Static Assets
|
|
42
|
-
* https://developers.cloudflare.com/workers/static-assets/binding/
|
|
43
|
-
*/
|
|
44
|
-
// "assets": { "directory": "./public/", "binding": "ASSETS" },
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Service Bindings (communicate between multiple Workers)
|
|
48
|
-
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
49
|
-
*/
|
|
50
|
-
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
|
|
51
|
-
}
|