create-cloudflare 2.50.9 → 2.51.1

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 CHANGED
@@ -78503,7 +78503,7 @@ var Yargs = YargsFactory(esm_default);
78503
78503
  var yargs_default = Yargs;
78504
78504
 
78505
78505
  // package.json
78506
- var version = "2.50.9";
78506
+ var version = "2.51.1";
78507
78507
 
78508
78508
  // src/metrics.ts
78509
78509
  var import_node_async_hooks = require("node:async_hooks");
@@ -79308,19 +79308,19 @@ var package_default = {
79308
79308
  dependencies: {
79309
79309
  "create-astro": "4.13.1",
79310
79310
  "create-analog": "1.8.1",
79311
- "@angular/create": "20.1.5",
79311
+ "@angular/create": "20.1.6",
79312
79312
  "create-docusaurus": "3.8.1",
79313
79313
  "create-hono": "0.19.2",
79314
79314
  "create-next-app": "15.4.6",
79315
79315
  "create-qwik": "1.15.0",
79316
- "create-vite": "7.1.0",
79316
+ "create-vite": "7.1.1",
79317
79317
  "create-remix": "2.16.8",
79318
- "create-react-router": "7.8.0",
79318
+ "create-react-router": "7.8.1",
79319
79319
  "create-solid": "0.6.7",
79320
79320
  "create-vue": "3.18.0",
79321
79321
  gatsby: "5.14.6",
79322
- sv: "0.9.0",
79323
- nuxi: "3.27.0"
79322
+ sv: "0.9.2",
79323
+ nuxi: "3.28.0"
79324
79324
  }
79325
79325
  };
79326
79326
 
@@ -81957,7 +81957,7 @@ var c3_default50 = config46;
81957
81957
  var import_node_assert2 = __toESM(require("node:assert"));
81958
81958
 
81959
81959
  // ../wrangler/package.json
81960
- var version2 = "4.29.0";
81960
+ var version2 = "4.33.0";
81961
81961
 
81962
81962
  // src/git.ts
81963
81963
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.50.9",
3
+ "version": "2.51.1",
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/parser": "^7.21.3",
31
31
  "@babel/types": "^7.21.4",
32
32
  "@clack/prompts": "^0.6.3",
33
- "@cloudflare/workers-types": "^4.20250803.0",
33
+ "@cloudflare/workers-types": "^4.20250823.0",
34
34
  "@iarna/toml": "^3.0.0",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
@@ -73,11 +73,11 @@
73
73
  "xdg-app-paths": "^8.3.0",
74
74
  "yargs": "^17.7.2",
75
75
  "@cloudflare/cli": "1.1.1",
76
+ "@cloudflare/vite-plugin": "1.12.0",
76
77
  "@cloudflare/eslint-config-worker": "1.1.0",
77
78
  "@cloudflare/mock-npm-registry": "0.0.0",
78
- "@cloudflare/vite-plugin": "1.11.3",
79
- "wrangler": "4.29.0",
80
- "@cloudflare/workers-tsconfig": "0.0.0"
79
+ "@cloudflare/workers-tsconfig": "0.0.0",
80
+ "wrangler": "4.33.0"
81
81
  },
82
82
  "engines": {
83
83
  "node": ">=18.14.1"
@@ -1,5 +1,5 @@
1
- from workers import Response, handler
1
+ from workers import Response, WorkerEntrypoint
2
2
 
3
- @handler
4
- async def on_fetch(request, env):
5
- return Response("Hello World!")
3
+ class Default(WorkerEntrypoint):
4
+ async def fetch(self, request):
5
+ return Response("Hello World!")
@@ -52,17 +52,15 @@ export default {
52
52
  * @returns {Promise<Response>} The response to be sent back to the client
53
53
  */
54
54
  async fetch(request, env, ctx) {
55
- // Create a `DurableObjectId` for an instance of the `MyDurableObject`
56
- // class named "foo". Requests from all Workers to the instance named
57
- // "foo" will go to a single globally unique Durable Object instance.
58
- const id = env.MY_DURABLE_OBJECT.idFromName("foo");
59
-
60
- // Create a stub to open a communication channel with the Durable
61
- // Object instance.
62
- const stub = env.MY_DURABLE_OBJECT.get(id);
55
+ // Create a stub to open a communication channel with the Durable Object
56
+ // instance named "foo".
57
+ //
58
+ // Requests from all Workers to the Durable Object instance named "foo"
59
+ // will go to a single remote Durable Object instance.
60
+ const stub = env.MY_DURABLE_OBJECT.getByName("foo");
63
61
 
64
62
  // Call the `sayHello()` RPC method on the stub to invoke the method on
65
- // the remote Durable Object instance
63
+ // the remote Durable Object instance.
66
64
  const greeting = await stub.sayHello("world");
67
65
 
68
66
  return new Response(greeting);
@@ -1,4 +1,4 @@
1
- from workers import DurableObject, Response, handler
1
+ from workers import DurableObject, Response, WorkerEntrypoint
2
2
 
3
3
  """
4
4
  * Welcome to Cloudflare Workers! This is your first Durable Objects application.
@@ -40,28 +40,26 @@ class MyDurableObject(DurableObject):
40
40
  return f"Hello, {name}!"
41
41
 
42
42
 
43
- """
44
- * This is the standard fetch handler for a Cloudflare Worker
45
- *
46
- * @param {Request} request - The request submitted to the Worker from the client
47
- * @param {Env} env - The interface to reference bindings declared in wrangler.jsonc
48
- * @param {ExecutionContext} ctx - The execution context of the Worker
49
- * @returns {Promise<Response>} The response to be sent back to the client
50
- """
51
- @handler
52
- async def on_fetch(request, env, ctx):
53
- # Create a `DurableObjectId` for an instance of the `MyDurableObject`
54
- # class named "foo". Requests from all Workers to the instance named
55
- # "foo" will go to a single globally unique Durable Object instance.
56
- id = env.MY_DURABLE_OBJECT.idFromName("foo")
57
-
58
- # Create a stub to open a communication channel with the Durable
59
- # Object instance.
60
- stub = env.MY_DURABLE_OBJECT.get(id)
43
+ class Default(WorkerEntrypoint):
44
+ """
45
+ * This is the standard fetch handler for a Cloudflare Worker
46
+ *
47
+ * @param {Request} request - The request submitted to the Worker from the client
48
+ * @param {Env} env - The interface to reference bindings declared in wrangler.jsonc
49
+ * @param {ExecutionContext} ctx - The execution context of the Worker
50
+ * @returns {Promise<Response>} The response to be sent back to the client
51
+ """
52
+ async def fetch(self, request):
53
+ # Create a stub to open a communication channel with the Durable Object
54
+ # instance named "foo".
55
+ #
56
+ # Requests from all Workers to the Durable Object instance named "foo"
57
+ # will go to a single remote Durable Object instance.
58
+ stub = self.env.MY_DURABLE_OBJECT.getByName("foo")
61
59
 
62
- # Call the `say_hello()` RPC method on the stub to invoke the method on
63
- # the remote Durable Object instance
64
- greeting = await stub.say_hello("world")
60
+ # Call the `say_hello()` RPC method on the stub to invoke the method on
61
+ # the remote Durable Object instance.
62
+ greeting = await stub.say_hello("world")
65
63
 
66
- return Response(greeting)
64
+ return Response(greeting)
67
65
 
@@ -48,17 +48,15 @@ export default {
48
48
  * @returns The response to be sent back to the client
49
49
  */
50
50
  async fetch(request, env, ctx): Promise<Response> {
51
- // Create a `DurableObjectId` for an instance of the `MyDurableObject`
52
- // class named "foo". Requests from all Workers to the instance named
53
- // "foo" will go to a single globally unique Durable Object instance.
54
- const id: DurableObjectId = env.MY_DURABLE_OBJECT.idFromName("foo");
55
-
56
- // Create a stub to open a communication channel with the Durable
57
- // Object instance.
58
- const stub = env.MY_DURABLE_OBJECT.get(id);
51
+ // Create a stub to open a communication channel with the Durable Object
52
+ // instance named "foo".
53
+ //
54
+ // Requests from all Workers to the Durable Object instance named "foo"
55
+ // will go to a single remote Durable Object instance.
56
+ const stub = env.MY_DURABLE_OBJECT.getByName("foo");
59
57
 
60
58
  // Call the `sayHello()` RPC method on the stub to invoke the method on
61
- // the remote Durable Object instance
59
+ // the remote Durable Object instance.
62
60
  const greeting = await stub.sayHello("world");
63
61
 
64
62
  return new Response(greeting);
@@ -52,17 +52,15 @@ export default {
52
52
  * @returns {Promise<Response>} The response to be sent back to the client
53
53
  */
54
54
  async fetch(request, env, ctx) {
55
- // Create a `DurableObjectId` for an instance of the `MyDurableObject`
56
- // class named "foo". Requests from all Workers to the instance named
57
- // "foo" will go to a single globally unique Durable Object instance.
58
- const id = env.MY_DURABLE_OBJECT.idFromName("foo");
59
-
60
- // Create a stub to open a communication channel with the Durable
61
- // Object instance.
62
- const stub = env.MY_DURABLE_OBJECT.get(id);
55
+ // Create a stub to open a communication channel with the Durable Object
56
+ // instance named "foo".
57
+ //
58
+ // Requests from all Workers to the Durable Object instance named "foo"
59
+ // will go to a single remote Durable Object instance.
60
+ const stub = env.MY_DURABLE_OBJECT.getByName("foo");
63
61
 
64
62
  // Call the `sayHello()` RPC method on the stub to invoke the method on
65
- // the remote Durable Object instance
63
+ // the remote Durable Object instance.
66
64
  const greeting = await stub.sayHello("world");
67
65
 
68
66
  return new Response(greeting);
@@ -1,4 +1,4 @@
1
- from workers import DurableObject, Response, handler
1
+ from workers import DurableObject, Response, WorkerEntrypoint
2
2
 
3
3
  """
4
4
  * Welcome to Cloudflare Workers! This is your first Durable Objects application.
@@ -48,20 +48,18 @@ class MyDurableObject(DurableObject):
48
48
  * @param {ExecutionContext} ctx - The execution context of the Worker
49
49
  * @returns {Promise<Response>} The response to be sent back to the client
50
50
  """
51
- @handler
52
- async def on_fetch(request, env, ctx):
53
- # Create a `DurableObjectId` for an instance of the `MyDurableObject`
54
- # class named "foo". Requests from all Workers to the instance named
55
- # "foo" will go to a single globally unique Durable Object instance.
56
- id = env.MY_DURABLE_OBJECT.idFromName("foo")
51
+ class Default(WorkerEntrypoint):
52
+ async def fetch(self, request):
53
+ # Create a stub to open a communication channel with the Durable Object
54
+ # instance named "foo".
55
+ #
56
+ # Requests from all Workers to the Durable Object instance named "foo"
57
+ # will go to a single remote Durable Object instance.
58
+ stub = self.env.MY_DURABLE_OBJECT.getByName("foo")
57
59
 
58
- # Create a stub to open a communication channel with the Durable
59
- # Object instance.
60
- stub = env.MY_DURABLE_OBJECT.get(id)
60
+ # Call the `say_hello()` RPC method on the stub to invoke the method on
61
+ # the remote Durable Object instance.
62
+ greeting = await stub.say_hello("world")
61
63
 
62
- # Call the `say_hello()` RPC method on the stub to invoke the method on
63
- # the remote Durable Object instance
64
- greeting = await stub.say_hello("world")
65
-
66
- return Response(greeting)
64
+ return Response(greeting)
67
65
 
@@ -49,17 +49,15 @@ export default {
49
49
  * @returns The response to be sent back to the client
50
50
  */
51
51
  async fetch(request, env, ctx): Promise<Response> {
52
- // Create a `DurableObjectId` for an instance of the `MyDurableObject`
53
- // class named "foo". Requests from all Workers to the instance named
54
- // "foo" will go to a single globally unique Durable Object instance.
55
- const id: DurableObjectId = env.MY_DURABLE_OBJECT.idFromName("foo");
56
-
57
- // Create a stub to open a communication channel with the Durable
58
- // Object instance.
59
- const stub = env.MY_DURABLE_OBJECT.get(id);
52
+ // Create a stub to open a communication channel with the Durable Object
53
+ // instance named "foo".
54
+ //
55
+ // Requests from all Workers to the Durable Object instance named "foo"
56
+ // will go to a single remote Durable Object instance.
57
+ const stub = env.MY_DURABLE_OBJECT.getByName("foo");
60
58
 
61
59
  // Call the `sayHello()` RPC method on the stub to invoke the method on
62
- // the remote Durable Object instance
60
+ // the remote Durable Object instance.
63
61
  const greeting = await stub.sayHello("world");
64
62
 
65
63
  return new Response(greeting);
@@ -1,12 +1,12 @@
1
- from workers import Response, handler
1
+ from workers import Response, WorkerEntrypoint
2
2
  from uuid import uuid4
3
3
  from urllib.parse import urlparse
4
4
 
5
- @handler
6
- async def on_fetch(request, env):
7
- url = urlparse(request.url)
8
- if url.path == '/message':
9
- return Response('Hello, World!')
10
- if url.path == '/random':
11
- return Response(uuid4())
12
- return Response('Not Found', status=404)
5
+ class Default(WorkerEntrypoint):
6
+ async def fetch(self, request):
7
+ url = urlparse(request.url)
8
+ if url.path == '/message':
9
+ return Response('Hello, World!')
10
+ if url.path == '/random':
11
+ return Response(uuid4())
12
+ return Response('Not Found', status=404)