create-cloudflare 0.0.0-8f799812 → 0.0.0-904f91a5
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/dist/cli.js +39 -18
- package/package.json +3 -3
- package/templates/astro/templates/wrangler.toml +30 -28
- package/templates/common/js/wrangler.toml +68 -22
- package/templates/common/ts/wrangler.toml +68 -22
- package/templates/hello-world/js/wrangler.toml +68 -22
- package/templates/hello-world/ts/wrangler.toml +68 -22
- package/templates/hello-world-durable-object/js/wrangler.toml +69 -23
- package/templates/hello-world-durable-object/ts/wrangler.toml +68 -21
- package/templates/next/README.md +11 -1
- package/templates/next/app/js/app/api/hello/route.js +1 -1
- package/templates/next/app/ts/app/api/hello/route.ts +1 -1
- package/templates/next/c3.ts +23 -4
- package/templates/next/env.d.ts +3 -5
- package/templates/next/pages/js/pages/api/hello.js +1 -1
- package/templates/next/pages/ts/pages/api/hello.ts +1 -1
- package/templates/next/wrangler.toml +29 -32
- package/templates/nuxt/templates/worker-configuration.d.ts +3 -2
- package/templates/nuxt/templates/wrangler.toml +30 -28
- package/templates/queues/js/wrangler.toml +85 -2
- package/templates/queues/ts/wrangler.toml +85 -2
- package/templates/qwik/templates/worker-configuration.d.ts +3 -2
- package/templates/qwik/templates/wrangler.toml +30 -28
- package/templates/remix/c3.ts +1 -1
- package/templates/remix/templates/worker-configuration.d.ts +3 -2
- package/templates/remix/templates/wrangler.toml +30 -28
- package/templates/scheduled/js/wrangler.toml +94 -0
- package/templates/scheduled/ts/wrangler.toml +94 -0
- package/templates/svelte/js/wrangler.toml +30 -28
- package/templates/svelte/ts/wrangler.toml +30 -28
package/dist/cli.js
CHANGED
|
@@ -3810,8 +3810,10 @@ ${grayBar} ${msg}`);
|
|
|
3810
3810
|
}
|
|
3811
3811
|
clearLoop();
|
|
3812
3812
|
} else {
|
|
3813
|
-
|
|
3813
|
+
if (msg) {
|
|
3814
|
+
logUpdate2(`
|
|
3814
3815
|
${grayBar} ${msg}`);
|
|
3816
|
+
}
|
|
3815
3817
|
newline();
|
|
3816
3818
|
}
|
|
3817
3819
|
}
|
|
@@ -3851,7 +3853,7 @@ var init_args = __esm({
|
|
|
3851
3853
|
var version, devDependencies;
|
|
3852
3854
|
var init_package = __esm({
|
|
3853
3855
|
"package.json"() {
|
|
3854
|
-
version = "0.0.0-
|
|
3856
|
+
version = "0.0.0-904f91a5";
|
|
3855
3857
|
devDependencies = {
|
|
3856
3858
|
"@babel/parser": "^7.21.3",
|
|
3857
3859
|
"@babel/types": "^7.21.4",
|
|
@@ -3859,7 +3861,7 @@ var init_package = __esm({
|
|
|
3859
3861
|
"@cloudflare/cli": "workspace:*",
|
|
3860
3862
|
"@cloudflare/eslint-config-worker": "*",
|
|
3861
3863
|
"@cloudflare/workers-tsconfig": "workspace:*",
|
|
3862
|
-
"@cloudflare/workers-types": "^4.
|
|
3864
|
+
"@cloudflare/workers-types": "^4.20240320.1",
|
|
3863
3865
|
"@iarna/toml": "^3.0.0",
|
|
3864
3866
|
"@types/command-exists": "^1.2.0",
|
|
3865
3867
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -24556,19 +24558,19 @@ var init_package2 = __esm({
|
|
|
24556
24558
|
"additionally it also contains a map that maps frameworks to their respective clis"
|
|
24557
24559
|
],
|
|
24558
24560
|
dependencies: {
|
|
24559
|
-
"create-astro": "4.7.
|
|
24561
|
+
"create-astro": "4.7.4",
|
|
24560
24562
|
"@angular/create": "17.2.3",
|
|
24561
24563
|
"create-docusaurus": "3.1.1",
|
|
24562
24564
|
"create-hono": "0.5.0",
|
|
24563
24565
|
"create-next-app": "14.1.0",
|
|
24564
24566
|
"create-qwik": "1.4.5",
|
|
24565
24567
|
"create-react-app": "5.0.1",
|
|
24566
|
-
"create-remix": "2.8.
|
|
24567
|
-
"create-solid": "0.5.
|
|
24568
|
-
"create-svelte": "6.0.
|
|
24568
|
+
"create-remix": "2.8.1",
|
|
24569
|
+
"create-solid": "0.5.5",
|
|
24570
|
+
"create-svelte": "6.0.10",
|
|
24569
24571
|
"create-vue": "3.9.2",
|
|
24570
24572
|
gatsby: "5.13.3",
|
|
24571
|
-
nuxi: "3.
|
|
24573
|
+
nuxi: "3.11.1"
|
|
24572
24574
|
},
|
|
24573
24575
|
frameworkCliMap: {
|
|
24574
24576
|
angular: "@angular/create",
|
|
@@ -70807,10 +70809,16 @@ var init_c36 = __esm({
|
|
|
70807
70809
|
generate6 = async (ctx) => {
|
|
70808
70810
|
const projectName = ctx.project.name;
|
|
70809
70811
|
await runFrameworkGenerator(ctx, [projectName]);
|
|
70810
|
-
|
|
70811
|
-
|
|
70812
|
-
|
|
70812
|
+
const wranglerToml = readFile((0, import_path13.join)(getTemplatePath(ctx), "wrangler.toml"));
|
|
70813
|
+
const newTomlContent = wranglerToml.replace(
|
|
70814
|
+
/#\s+\[\[kv_namespaces\]\]\n#\s+binding\s+=\s+"MY_KV_NAMESPACE"\n#\s+id\s+=\s+"[a-zA-Z0-9]+?"/,
|
|
70815
|
+
($1) => `# KV Example:
|
|
70816
|
+
${$1}`
|
|
70813
70817
|
);
|
|
70818
|
+
if (!/# KV Example/.test(newTomlContent)) {
|
|
70819
|
+
crash("Failed to properly generate the wrangler.toml file");
|
|
70820
|
+
}
|
|
70821
|
+
writeFile2((0, import_path13.join)(ctx.project.path, "wrangler.toml"), newTomlContent);
|
|
70814
70822
|
updateStatus("Created wrangler.toml file");
|
|
70815
70823
|
};
|
|
70816
70824
|
updateNextConfig = () => {
|
|
@@ -70941,7 +70949,7 @@ var init_c36 = __esm({
|
|
|
70941
70949
|
}
|
|
70942
70950
|
}
|
|
70943
70951
|
},
|
|
70944
|
-
transformPackageJson: async () => {
|
|
70952
|
+
transformPackageJson: async (_2, ctx) => {
|
|
70945
70953
|
const isNpm = npm4 === "npm";
|
|
70946
70954
|
const isBun = npm4 === "bun";
|
|
70947
70955
|
const isNpmOrBun = isNpm || isBun;
|
|
@@ -70953,7 +70961,10 @@ var init_c36 = __esm({
|
|
|
70953
70961
|
scripts: {
|
|
70954
70962
|
"pages:build": `${pmCommand} ${nextOnPagesCommand}`,
|
|
70955
70963
|
preview: `${pagesBuildRunCommand} && wrangler pages dev .vercel/output/static`,
|
|
70956
|
-
deploy: `${pagesBuildRunCommand} && wrangler pages deploy .vercel/output/static
|
|
70964
|
+
deploy: `${pagesBuildRunCommand} && wrangler pages deploy .vercel/output/static`,
|
|
70965
|
+
...usesTypescript(ctx) && {
|
|
70966
|
+
"build-cf-types": `wrangler types --env-interface CloudflareEnv env.d.ts`
|
|
70967
|
+
}
|
|
70957
70968
|
}
|
|
70958
70969
|
};
|
|
70959
70970
|
},
|
|
@@ -71257,7 +71268,7 @@ var init_c310 = __esm({
|
|
|
71257
71268
|
await runFrameworkGenerator(ctx, [
|
|
71258
71269
|
ctx.project.name,
|
|
71259
71270
|
"--template",
|
|
71260
|
-
"https://github.com/remix-run/remix/tree/main/templates/
|
|
71271
|
+
"https://github.com/remix-run/remix/tree/main/templates/cloudflare"
|
|
71261
71272
|
]);
|
|
71262
71273
|
logRaw("");
|
|
71263
71274
|
};
|
|
@@ -71843,7 +71854,7 @@ var init_templates = __esm({
|
|
|
71843
71854
|
"hello-world": (await Promise.resolve().then(() => (init_c314(), c3_exports14))).default,
|
|
71844
71855
|
"hello-world-durable-object": (await Promise.resolve().then(() => (init_c315(), c3_exports15))).default,
|
|
71845
71856
|
// Dummy record -- actual template config resolved in `selectFramework`
|
|
71846
|
-
|
|
71857
|
+
"web-framework": { displayName: "Website or web app" },
|
|
71847
71858
|
common: (await Promise.resolve().then(() => (init_c316(), c3_exports16))).default,
|
|
71848
71859
|
scheduled: (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
|
|
71849
71860
|
queues: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
|
|
@@ -71858,13 +71869,19 @@ var init_templates = __esm({
|
|
|
71858
71869
|
selectTemplate = async (args) => {
|
|
71859
71870
|
if (!args.type) {
|
|
71860
71871
|
if (args.framework) {
|
|
71861
|
-
args.type = "
|
|
71872
|
+
args.type = "web-framework";
|
|
71862
71873
|
} else if (args.existingScript) {
|
|
71863
71874
|
args.type = "pre-existing";
|
|
71864
71875
|
} else if (args.template) {
|
|
71865
71876
|
args.type = "remote-template";
|
|
71866
71877
|
}
|
|
71867
71878
|
}
|
|
71879
|
+
if (args.type && args.type === "webFramework") {
|
|
71880
|
+
warn(
|
|
71881
|
+
"The `webFramework` type is deprecated and will be removed in a future version. Please use `web-framework` instead."
|
|
71882
|
+
);
|
|
71883
|
+
args.type = "web-framework";
|
|
71884
|
+
}
|
|
71868
71885
|
const templateMap = await getTemplateMap();
|
|
71869
71886
|
const templateOptions = Object.entries(templateMap).map(
|
|
71870
71887
|
([value, { displayName, hidden: hidden2 }]) => ({
|
|
@@ -71886,7 +71903,7 @@ var init_templates = __esm({
|
|
|
71886
71903
|
if (!Object.keys(templateMap).includes(type)) {
|
|
71887
71904
|
return crash(`Unknown application type provided: ${type}.`);
|
|
71888
71905
|
}
|
|
71889
|
-
if (type === "
|
|
71906
|
+
if (type === "web-framework") {
|
|
71890
71907
|
return selectFramework(args);
|
|
71891
71908
|
}
|
|
71892
71909
|
if (type === "remote-template") {
|
|
@@ -76991,9 +77008,11 @@ var parseArgs = async (argv) => {
|
|
|
76991
77008
|
description: "The directory where the application should be created. The name of the application is taken from the directory name"
|
|
76992
77009
|
}).option("type", {
|
|
76993
77010
|
type: "string",
|
|
77011
|
+
requiresArg: true,
|
|
76994
77012
|
description: "The type of application that should be created"
|
|
76995
77013
|
}).option("framework", {
|
|
76996
77014
|
type: "string",
|
|
77015
|
+
requiresArg: true,
|
|
76997
77016
|
description: "The type of framework to use to create a web application (when using this option `--type` is ignored)"
|
|
76998
77017
|
}).option("deploy", {
|
|
76999
77018
|
type: "boolean",
|
|
@@ -77010,9 +77029,11 @@ var parseArgs = async (argv) => {
|
|
|
77010
77029
|
description: "Opens the deployed application in your browser (this option is ignored if the application is not deployed)"
|
|
77011
77030
|
}).option("existing-script", {
|
|
77012
77031
|
type: "string",
|
|
77032
|
+
requiresArg: true,
|
|
77013
77033
|
hidden: true
|
|
77014
77034
|
}).option("template", {
|
|
77015
77035
|
type: "string",
|
|
77036
|
+
requiresArg: true,
|
|
77016
77037
|
description: "A degit compatible string or the url to a git repository (with optionally a directory path) containing the C3 template to use"
|
|
77017
77038
|
}).option("accept-defaults", {
|
|
77018
77039
|
alias: "y",
|
|
@@ -77088,7 +77109,7 @@ init_command();
|
|
|
77088
77109
|
init_packageManagers();
|
|
77089
77110
|
|
|
77090
77111
|
// ../wrangler/package.json
|
|
77091
|
-
var version2 = "3.
|
|
77112
|
+
var version2 = "3.37.0";
|
|
77092
77113
|
|
|
77093
77114
|
// src/git.ts
|
|
77094
77115
|
init_package();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-904f91a5",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@babel/types": "^7.21.4",
|
|
31
31
|
"@clack/prompts": "^0.6.3",
|
|
32
32
|
"@cloudflare/eslint-config-worker": "*",
|
|
33
|
-
"@cloudflare/workers-types": "^4.
|
|
33
|
+
"@cloudflare/workers-types": "^4.20240320.1",
|
|
34
34
|
"@iarna/toml": "^3.0.0",
|
|
35
35
|
"@types/command-exists": "^1.2.0",
|
|
36
36
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"yarn": "^1.22.19",
|
|
69
69
|
"@cloudflare/cli": "1.1.1",
|
|
70
70
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
71
|
-
"wrangler": "3.
|
|
71
|
+
"wrangler": "3.37.0"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=18.14.1"
|
|
@@ -3,48 +3,50 @@ compatibility_date = "<TBD>"
|
|
|
3
3
|
|
|
4
4
|
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
|
5
5
|
# Note: Use secrets to store sensitive data.
|
|
6
|
-
# Docs: https://developers.cloudflare.com/
|
|
6
|
+
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
|
|
7
7
|
# [vars]
|
|
8
8
|
# MY_VARIABLE = "production_value"
|
|
9
9
|
|
|
10
|
+
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
|
11
|
+
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#workers-ai
|
|
12
|
+
# [ai]
|
|
13
|
+
# binding = "AI"
|
|
14
|
+
|
|
15
|
+
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
|
16
|
+
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#d1-databases
|
|
17
|
+
# [[d1_databases]]
|
|
18
|
+
# binding = "MY_DB"
|
|
19
|
+
# database_name = "my-database"
|
|
20
|
+
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
21
|
+
|
|
22
|
+
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
23
|
+
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
24
|
+
# Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
|
|
25
|
+
# [[durable_objects.bindings]]
|
|
26
|
+
# name = "MY_DURABLE_OBJECT"
|
|
27
|
+
# class_name = "MyDurableObject"
|
|
28
|
+
# script_name = 'my-durable-object'
|
|
29
|
+
|
|
10
30
|
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
|
11
|
-
# Docs: https://developers.cloudflare.com/
|
|
31
|
+
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#kv-namespaces
|
|
12
32
|
# [[kv_namespaces]]
|
|
13
33
|
# binding = "MY_KV_NAMESPACE"
|
|
14
34
|
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
15
35
|
|
|
16
|
-
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
|
17
|
-
# Docs: https://developers.cloudflare.com/r2/api/workers/workers-api-usage/
|
|
18
|
-
# [[r2_buckets]]
|
|
19
|
-
# binding = "MY_BUCKET"
|
|
20
|
-
# bucket_name = "my-bucket"
|
|
21
|
-
|
|
22
36
|
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
|
23
|
-
# Docs: https://developers.cloudflare.com/
|
|
37
|
+
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#queue-producers
|
|
24
38
|
# [[queues.producers]]
|
|
25
39
|
# binding = "MY_QUEUE"
|
|
26
40
|
# queue = "my-queue"
|
|
27
41
|
|
|
28
|
-
# Bind
|
|
29
|
-
# Docs: https://developers.cloudflare.com/
|
|
30
|
-
# [[
|
|
31
|
-
#
|
|
42
|
+
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
|
43
|
+
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#r2-buckets
|
|
44
|
+
# [[r2_buckets]]
|
|
45
|
+
# binding = "MY_BUCKET"
|
|
46
|
+
# bucket_name = "my-bucket"
|
|
32
47
|
|
|
33
48
|
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
|
34
|
-
# Docs: https://developers.cloudflare.com/
|
|
49
|
+
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#service-bindings
|
|
35
50
|
# [[services]]
|
|
36
51
|
# binding = "MY_SERVICE"
|
|
37
|
-
# service = "my-service"
|
|
38
|
-
|
|
39
|
-
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
40
|
-
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
41
|
-
# Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
|
|
42
|
-
# [[durable_objects.bindings]]
|
|
43
|
-
# name = "MY_DURABLE_OBJECT"
|
|
44
|
-
# class_name = "MyDurableObject"
|
|
45
|
-
|
|
46
|
-
# Durable Object migrations.
|
|
47
|
-
# Docs: https://developers.cloudflare.com/workers/learning/using-durable-objects#configure-durable-object-classes-with-migrations
|
|
48
|
-
# [[migrations]]
|
|
49
|
-
# tag = "v1"
|
|
50
|
-
# new_classes = ["MyDurableObject"]
|
|
52
|
+
# service = "my-service"
|
|
@@ -4,48 +4,94 @@ compatibility_date = "<TBD>"
|
|
|
4
4
|
|
|
5
5
|
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
|
6
6
|
# Note: Use secrets to store sensitive data.
|
|
7
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
7
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
|
8
8
|
# [vars]
|
|
9
9
|
# MY_VARIABLE = "production_value"
|
|
10
10
|
|
|
11
|
+
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
|
12
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
|
|
13
|
+
# [ai]
|
|
14
|
+
# binding = "AI"
|
|
15
|
+
|
|
16
|
+
# Bind an Analytics Engine dataset. Use Analytics Engine to write analytics within your Pages Function.
|
|
17
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
|
|
18
|
+
# [[analytics_engine_datasets]]
|
|
19
|
+
# binding = "MY_DATASET"
|
|
20
|
+
|
|
21
|
+
# Bind a headless browser instance running on Cloudflare's global network.
|
|
22
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
|
|
23
|
+
# [browser]
|
|
24
|
+
# binding = "MY_BROWSER"
|
|
25
|
+
|
|
26
|
+
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
|
27
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
|
|
28
|
+
# [[d1_databases]]
|
|
29
|
+
# binding = "MY_DB"
|
|
30
|
+
# database_name = "my-database"
|
|
31
|
+
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
32
|
+
|
|
33
|
+
# Bind a dispatch namespace. Use Workers for Platforms to deploy serverless functions programmatically on behalf of your customers.
|
|
34
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
|
|
35
|
+
# [[dispatch_namespaces]]
|
|
36
|
+
# binding = "MY_DISPATCHER"
|
|
37
|
+
# namespace = "my-namespace"
|
|
38
|
+
|
|
39
|
+
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
40
|
+
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
41
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
42
|
+
# [[durable_objects.bindings]]
|
|
43
|
+
# name = "MY_DURABLE_OBJECT"
|
|
44
|
+
# class_name = "MyDurableObject"
|
|
45
|
+
|
|
46
|
+
# Durable Object migrations.
|
|
47
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
|
48
|
+
# [[migrations]]
|
|
49
|
+
# tag = "v1"
|
|
50
|
+
# new_classes = ["MyDurableObject"]
|
|
51
|
+
|
|
52
|
+
# Bind a Hyperdrive configuration. Use to accelerate access to your existing databases from Cloudflare Workers.
|
|
53
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
|
|
54
|
+
# [[hyperdrive]]
|
|
55
|
+
# binding = "MY_HYPERDRIVE"
|
|
56
|
+
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
57
|
+
|
|
11
58
|
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
|
12
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
59
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
|
|
13
60
|
# [[kv_namespaces]]
|
|
14
61
|
# binding = "MY_KV_NAMESPACE"
|
|
15
62
|
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
16
63
|
|
|
17
|
-
# Bind an
|
|
18
|
-
# Docs: https://developers.cloudflare.com/
|
|
19
|
-
# [[
|
|
20
|
-
# binding = "
|
|
21
|
-
#
|
|
64
|
+
# Bind an mTLS certificate. Use to present a client certificate when communicating with another service.
|
|
65
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
|
|
66
|
+
# [[mtls_certificates]]
|
|
67
|
+
# binding = "MY_CERTIFICATE"
|
|
68
|
+
# certificate_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
22
69
|
|
|
23
70
|
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
|
24
|
-
# Docs: https://developers.cloudflare.com/queues
|
|
71
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
|
25
72
|
# [[queues.producers]]
|
|
26
73
|
# binding = "MY_QUEUE"
|
|
27
74
|
# queue = "my-queue"
|
|
28
75
|
|
|
29
76
|
# Bind a Queue consumer. Queue Consumers can retrieve tasks scheduled by Producers to act on them.
|
|
30
|
-
# Docs: https://developers.cloudflare.com/queues
|
|
77
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
|
31
78
|
# [[queues.consumers]]
|
|
32
79
|
# queue = "my-queue"
|
|
33
80
|
|
|
81
|
+
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
|
82
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
|
|
83
|
+
# [[r2_buckets]]
|
|
84
|
+
# binding = "MY_BUCKET"
|
|
85
|
+
# bucket_name = "my-bucket"
|
|
86
|
+
|
|
34
87
|
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
|
35
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
88
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
36
89
|
# [[services]]
|
|
37
90
|
# binding = "MY_SERVICE"
|
|
38
91
|
# service = "my-service"
|
|
39
92
|
|
|
40
|
-
# Bind a
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
# class_name = "MyDurableObject"
|
|
46
|
-
|
|
47
|
-
# Durable Object migrations.
|
|
48
|
-
# Docs: https://developers.cloudflare.com/workers/learning/using-durable-objects#configure-durable-object-classes-with-migrations
|
|
49
|
-
# [[migrations]]
|
|
50
|
-
# tag = "v1"
|
|
51
|
-
# new_classes = ["MyDurableObject"]
|
|
93
|
+
# Bind a Vectorize index. Use to store and query vector embeddings for semantic search, classification and other vector search use-cases.
|
|
94
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
|
|
95
|
+
# [[vectorize]]
|
|
96
|
+
# binding = "MY_INDEX"
|
|
97
|
+
# index_name = "my-index"
|
|
@@ -4,48 +4,94 @@ compatibility_date = "<TBD>"
|
|
|
4
4
|
|
|
5
5
|
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
|
6
6
|
# Note: Use secrets to store sensitive data.
|
|
7
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
7
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
|
8
8
|
# [vars]
|
|
9
9
|
# MY_VARIABLE = "production_value"
|
|
10
10
|
|
|
11
|
+
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
|
12
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
|
|
13
|
+
# [ai]
|
|
14
|
+
# binding = "AI"
|
|
15
|
+
|
|
16
|
+
# Bind an Analytics Engine dataset. Use Analytics Engine to write analytics within your Pages Function.
|
|
17
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
|
|
18
|
+
# [[analytics_engine_datasets]]
|
|
19
|
+
# binding = "MY_DATASET"
|
|
20
|
+
|
|
21
|
+
# Bind a headless browser instance running on Cloudflare's global network.
|
|
22
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
|
|
23
|
+
# [browser]
|
|
24
|
+
# binding = "MY_BROWSER"
|
|
25
|
+
|
|
26
|
+
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
|
27
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
|
|
28
|
+
# [[d1_databases]]
|
|
29
|
+
# binding = "MY_DB"
|
|
30
|
+
# database_name = "my-database"
|
|
31
|
+
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
32
|
+
|
|
33
|
+
# Bind a dispatch namespace. Use Workers for Platforms to deploy serverless functions programmatically on behalf of your customers.
|
|
34
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
|
|
35
|
+
# [[dispatch_namespaces]]
|
|
36
|
+
# binding = "MY_DISPATCHER"
|
|
37
|
+
# namespace = "my-namespace"
|
|
38
|
+
|
|
39
|
+
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
40
|
+
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
41
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
42
|
+
# [[durable_objects.bindings]]
|
|
43
|
+
# name = "MY_DURABLE_OBJECT"
|
|
44
|
+
# class_name = "MyDurableObject"
|
|
45
|
+
|
|
46
|
+
# Durable Object migrations.
|
|
47
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
|
48
|
+
# [[migrations]]
|
|
49
|
+
# tag = "v1"
|
|
50
|
+
# new_classes = ["MyDurableObject"]
|
|
51
|
+
|
|
52
|
+
# Bind a Hyperdrive configuration. Use to accelerate access to your existing databases from Cloudflare Workers.
|
|
53
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
|
|
54
|
+
# [[hyperdrive]]
|
|
55
|
+
# binding = "MY_HYPERDRIVE"
|
|
56
|
+
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
57
|
+
|
|
11
58
|
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
|
12
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
59
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
|
|
13
60
|
# [[kv_namespaces]]
|
|
14
61
|
# binding = "MY_KV_NAMESPACE"
|
|
15
62
|
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
16
63
|
|
|
17
|
-
# Bind an
|
|
18
|
-
# Docs: https://developers.cloudflare.com/
|
|
19
|
-
# [[
|
|
20
|
-
# binding = "
|
|
21
|
-
#
|
|
64
|
+
# Bind an mTLS certificate. Use to present a client certificate when communicating with another service.
|
|
65
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
|
|
66
|
+
# [[mtls_certificates]]
|
|
67
|
+
# binding = "MY_CERTIFICATE"
|
|
68
|
+
# certificate_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
22
69
|
|
|
23
70
|
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
|
24
|
-
# Docs: https://developers.cloudflare.com/queues
|
|
71
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
|
25
72
|
# [[queues.producers]]
|
|
26
73
|
# binding = "MY_QUEUE"
|
|
27
74
|
# queue = "my-queue"
|
|
28
75
|
|
|
29
76
|
# Bind a Queue consumer. Queue Consumers can retrieve tasks scheduled by Producers to act on them.
|
|
30
|
-
# Docs: https://developers.cloudflare.com/queues
|
|
77
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
|
31
78
|
# [[queues.consumers]]
|
|
32
79
|
# queue = "my-queue"
|
|
33
80
|
|
|
81
|
+
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
|
82
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
|
|
83
|
+
# [[r2_buckets]]
|
|
84
|
+
# binding = "MY_BUCKET"
|
|
85
|
+
# bucket_name = "my-bucket"
|
|
86
|
+
|
|
34
87
|
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
|
35
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
88
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
36
89
|
# [[services]]
|
|
37
90
|
# binding = "MY_SERVICE"
|
|
38
91
|
# service = "my-service"
|
|
39
92
|
|
|
40
|
-
# Bind a
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
# class_name = "MyDurableObject"
|
|
46
|
-
|
|
47
|
-
# Durable Object migrations.
|
|
48
|
-
# Docs: https://developers.cloudflare.com/workers/learning/using-durable-objects#configure-durable-object-classes-with-migrations
|
|
49
|
-
# [[migrations]]
|
|
50
|
-
# tag = "v1"
|
|
51
|
-
# new_classes = ["MyDurableObject"]
|
|
93
|
+
# Bind a Vectorize index. Use to store and query vector embeddings for semantic search, classification and other vector search use-cases.
|
|
94
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
|
|
95
|
+
# [[vectorize]]
|
|
96
|
+
# binding = "MY_INDEX"
|
|
97
|
+
# index_name = "my-index"
|
|
@@ -5,48 +5,94 @@ compatibility_flags = ["nodejs_compat"]
|
|
|
5
5
|
|
|
6
6
|
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
|
7
7
|
# Note: Use secrets to store sensitive data.
|
|
8
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
8
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
|
9
9
|
# [vars]
|
|
10
10
|
# MY_VARIABLE = "production_value"
|
|
11
11
|
|
|
12
|
+
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
|
13
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
|
|
14
|
+
# [ai]
|
|
15
|
+
# binding = "AI"
|
|
16
|
+
|
|
17
|
+
# Bind an Analytics Engine dataset. Use Analytics Engine to write analytics within your Pages Function.
|
|
18
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
|
|
19
|
+
# [[analytics_engine_datasets]]
|
|
20
|
+
# binding = "MY_DATASET"
|
|
21
|
+
|
|
22
|
+
# Bind a headless browser instance running on Cloudflare's global network.
|
|
23
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
|
|
24
|
+
# [browser]
|
|
25
|
+
# binding = "MY_BROWSER"
|
|
26
|
+
|
|
27
|
+
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
|
28
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
|
|
29
|
+
# [[d1_databases]]
|
|
30
|
+
# binding = "MY_DB"
|
|
31
|
+
# database_name = "my-database"
|
|
32
|
+
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
33
|
+
|
|
34
|
+
# Bind a dispatch namespace. Use Workers for Platforms to deploy serverless functions programmatically on behalf of your customers.
|
|
35
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
|
|
36
|
+
# [[dispatch_namespaces]]
|
|
37
|
+
# binding = "MY_DISPATCHER"
|
|
38
|
+
# namespace = "my-namespace"
|
|
39
|
+
|
|
40
|
+
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
41
|
+
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
42
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
43
|
+
# [[durable_objects.bindings]]
|
|
44
|
+
# name = "MY_DURABLE_OBJECT"
|
|
45
|
+
# class_name = "MyDurableObject"
|
|
46
|
+
|
|
47
|
+
# Durable Object migrations.
|
|
48
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
|
49
|
+
# [[migrations]]
|
|
50
|
+
# tag = "v1"
|
|
51
|
+
# new_classes = ["MyDurableObject"]
|
|
52
|
+
|
|
53
|
+
# Bind a Hyperdrive configuration. Use to accelerate access to your existing databases from Cloudflare Workers.
|
|
54
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
|
|
55
|
+
# [[hyperdrive]]
|
|
56
|
+
# binding = "MY_HYPERDRIVE"
|
|
57
|
+
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
58
|
+
|
|
12
59
|
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
|
13
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
60
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
|
|
14
61
|
# [[kv_namespaces]]
|
|
15
62
|
# binding = "MY_KV_NAMESPACE"
|
|
16
63
|
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
17
64
|
|
|
18
|
-
# Bind an
|
|
19
|
-
# Docs: https://developers.cloudflare.com/
|
|
20
|
-
# [[
|
|
21
|
-
# binding = "
|
|
22
|
-
#
|
|
65
|
+
# Bind an mTLS certificate. Use to present a client certificate when communicating with another service.
|
|
66
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
|
|
67
|
+
# [[mtls_certificates]]
|
|
68
|
+
# binding = "MY_CERTIFICATE"
|
|
69
|
+
# certificate_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
23
70
|
|
|
24
71
|
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
|
25
|
-
# Docs: https://developers.cloudflare.com/queues
|
|
72
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
|
26
73
|
# [[queues.producers]]
|
|
27
74
|
# binding = "MY_QUEUE"
|
|
28
75
|
# queue = "my-queue"
|
|
29
76
|
|
|
30
77
|
# Bind a Queue consumer. Queue Consumers can retrieve tasks scheduled by Producers to act on them.
|
|
31
|
-
# Docs: https://developers.cloudflare.com/queues
|
|
78
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
|
32
79
|
# [[queues.consumers]]
|
|
33
80
|
# queue = "my-queue"
|
|
34
81
|
|
|
82
|
+
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
|
83
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
|
|
84
|
+
# [[r2_buckets]]
|
|
85
|
+
# binding = "MY_BUCKET"
|
|
86
|
+
# bucket_name = "my-bucket"
|
|
87
|
+
|
|
35
88
|
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
|
36
|
-
# Docs: https://developers.cloudflare.com/workers/
|
|
89
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
37
90
|
# [[services]]
|
|
38
91
|
# binding = "MY_SERVICE"
|
|
39
92
|
# service = "my-service"
|
|
40
93
|
|
|
41
|
-
# Bind a
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
# class_name = "MyDurableObject"
|
|
47
|
-
|
|
48
|
-
# Durable Object migrations.
|
|
49
|
-
# Docs: https://developers.cloudflare.com/workers/learning/using-durable-objects#configure-durable-object-classes-with-migrations
|
|
50
|
-
# [[migrations]]
|
|
51
|
-
# tag = "v1"
|
|
52
|
-
# new_classes = ["MyDurableObject"]
|
|
94
|
+
# Bind a Vectorize index. Use to store and query vector embeddings for semantic search, classification and other vector search use-cases.
|
|
95
|
+
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
|
|
96
|
+
# [[vectorize]]
|
|
97
|
+
# binding = "MY_INDEX"
|
|
98
|
+
# index_name = "my-index"
|