create-cloudflare 2.14.2 → 2.15.0

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.
Files changed (41) hide show
  1. package/dist/cli.js +31139 -31151
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +2 -2
  4. package/templates/angular/c3.ts +5 -3
  5. package/templates/astro/c3.ts +3 -2
  6. package/templates/astro/templates/wrangler.toml +30 -28
  7. package/templates/common/js/wrangler.toml +68 -22
  8. package/templates/common/ts/wrangler.toml +68 -22
  9. package/templates/docusaurus/c3.ts +2 -2
  10. package/templates/gatsby/c3.ts +2 -2
  11. package/templates/hello-world/js/wrangler.toml +68 -22
  12. package/templates/hello-world/ts/wrangler.toml +68 -22
  13. package/templates/hello-world-durable-object/js/wrangler.toml +69 -23
  14. package/templates/hello-world-durable-object/ts/wrangler.toml +68 -21
  15. package/templates/hono/c3.ts +1 -1
  16. package/templates/next/README.md +10 -0
  17. package/templates/next/c3.ts +7 -3
  18. package/templates/next/env.d.ts +3 -5
  19. package/templates/next/wrangler.toml +29 -28
  20. package/templates/nuxt/c3.ts +4 -3
  21. package/templates/nuxt/templates/worker-configuration.d.ts +3 -2
  22. package/templates/nuxt/templates/wrangler.toml +30 -28
  23. package/templates/pre-existing/c3.ts +2 -2
  24. package/templates/queues/js/wrangler.toml +85 -2
  25. package/templates/queues/ts/wrangler.toml +85 -2
  26. package/templates/qwik/c3.ts +3 -3
  27. package/templates/qwik/templates/worker-configuration.d.ts +3 -2
  28. package/templates/qwik/templates/wrangler.toml +30 -28
  29. package/templates/react/c3.ts +2 -2
  30. package/templates/remix/c3.ts +2 -2
  31. package/templates/remix/templates/worker-configuration.d.ts +3 -2
  32. package/templates/remix/templates/wrangler.toml +30 -28
  33. package/templates/scheduled/js/wrangler.toml +94 -0
  34. package/templates/scheduled/ts/wrangler.toml +94 -0
  35. package/templates/solid/c3.ts +4 -3
  36. package/templates/svelte/c3.ts +3 -2
  37. package/templates/svelte/js/wrangler.toml +30 -28
  38. package/templates/svelte/ts/wrangler.toml +30 -28
  39. package/templates/vue/c3.ts +2 -2
  40. package/templates/svelte/js/src/hooks.server.js +0 -25
  41. package/templates/svelte/ts/src/hooks.server.ts +0 -24
@@ -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/platform/environment-variables
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/runtime-apis/kv
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 R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
18
- # Docs: https://developers.cloudflare.com/r2/api/workers/workers-api-usage/
19
- # [[r2_buckets]]
20
- # binding = "MY_BUCKET"
21
- # bucket_name = "my-bucket"
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/get-started
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/get-started
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/platform/services
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 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/runtime-apis/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/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/platform/environment-variables
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/runtime-apis/kv
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 R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
18
- # Docs: https://developers.cloudflare.com/r2/api/workers/workers-api-usage/
19
- # [[r2_buckets]]
20
- # binding = "MY_BUCKET"
21
- # bucket_name = "my-bucket"
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/get-started
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/get-started
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/platform/services
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 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/runtime-apis/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/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"
@@ -1,5 +1,5 @@
1
- import { runFrameworkGenerator } from "helpers/command";
2
- import { detectPackageManager } from "helpers/packages";
1
+ import { runFrameworkGenerator } from "frameworks/index";
2
+ import { detectPackageManager } from "helpers/packageManagers";
3
3
  import type { TemplateConfig } from "../../src/templates";
4
4
  import type { C3Context } from "types";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { inputPrompt } from "@cloudflare/cli/interactive";
2
- import { runFrameworkGenerator } from "helpers/command";
3
- import { detectPackageManager } from "helpers/packages";
2
+ import { runFrameworkGenerator } from "frameworks/index";
3
+ import { detectPackageManager } from "helpers/packageManagers";
4
4
  import type { TemplateConfig } from "../../src/templates";
5
5
  import type { C3Context } from "types";
6
6
 
@@ -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/platform/environment-variables
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/runtime-apis/kv
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 R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
19
- # Docs: https://developers.cloudflare.com/r2/api/workers/workers-api-usage/
20
- # [[r2_buckets]]
21
- # binding = "MY_BUCKET"
22
- # bucket_name = "my-bucket"
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/get-started
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/get-started
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/platform/services
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 Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
42
- # Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
43
- # Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
44
- # [[durable_objects.bindings]]
45
- # name = "MY_DURABLE_OBJECT"
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"
@@ -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/platform/environment-variables
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/runtime-apis/kv
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 R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
19
- # Docs: https://developers.cloudflare.com/r2/api/workers/workers-api-usage/
20
- # [[r2_buckets]]
21
- # binding = "MY_BUCKET"
22
- # bucket_name = "my-bucket"
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/get-started
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/get-started
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/platform/services
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 Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
42
- # Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
43
- # Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
44
- # [[durable_objects.bindings]]
45
- # name = "MY_DURABLE_OBJECT"
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"
@@ -1,51 +1,97 @@
1
1
  name = "<TBD>"
2
- main = "src/index.js"
2
+ main = "src/index.ts"
3
3
  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/platform/environment-variables
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/runtime-apis/kv
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 R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
18
- # Docs: https://developers.cloudflare.com/r2/api/workers/workers-api-usage/
19
- # [[r2_buckets]]
20
- # binding = "MY_BUCKET"
21
- # bucket_name = "my-bucket"
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/get-started
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/get-started
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/platform/services
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 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/runtime-apis/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/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"