create-cloudflare 2.50.8 → 2.51.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.
- package/dist/cli.js +10 -10
- package/package.json +5 -5
- package/templates/hello-world/py/src/entry.py +4 -4
- package/templates/hello-world-durable-object/py/src/entry.py +22 -22
- package/templates/hello-world-durable-object-with-assets/py/src/entry.py +14 -14
- package/templates/hello-world-with-assets/py/src/entry.py +9 -9
- package/templates/svelte/pages/templates/wrangler.jsonc +1 -0
- package/templates/svelte/workers/templates/wrangler.jsonc +1 -0
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.
|
|
78506
|
+
var version = "2.51.0";
|
|
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.
|
|
79311
|
+
"@angular/create": "20.1.6",
|
|
79312
79312
|
"create-docusaurus": "3.8.1",
|
|
79313
79313
|
"create-hono": "0.19.2",
|
|
79314
|
-
"create-next-app": "15.
|
|
79314
|
+
"create-next-app": "15.4.6",
|
|
79315
79315
|
"create-qwik": "1.15.0",
|
|
79316
|
-
"create-vite": "7.
|
|
79316
|
+
"create-vite": "7.1.1",
|
|
79317
79317
|
"create-remix": "2.16.8",
|
|
79318
|
-
"create-react-router": "7.
|
|
79319
|
-
"create-solid": "0.6.
|
|
79318
|
+
"create-react-router": "7.8.1",
|
|
79319
|
+
"create-solid": "0.6.7",
|
|
79320
79320
|
"create-vue": "3.18.0",
|
|
79321
|
-
gatsby: "5.14.
|
|
79322
|
-
sv: "0.9.
|
|
79323
|
-
nuxi: "3.
|
|
79321
|
+
gatsby: "5.14.6",
|
|
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.
|
|
81960
|
+
var version2 = "4.31.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.
|
|
3
|
+
"version": "2.51.0",
|
|
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.
|
|
33
|
+
"@cloudflare/workers-types": "^4.20250816.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/eslint-config-worker": "1.1.0",
|
|
77
76
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
78
|
-
"@cloudflare/vite-plugin": "1.11.
|
|
77
|
+
"@cloudflare/vite-plugin": "1.11.6",
|
|
79
78
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
80
|
-
"
|
|
79
|
+
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
80
|
+
"wrangler": "4.31.0"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=18.14.1"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from workers import Response,
|
|
1
|
+
from workers import Response, WorkerEntrypoint
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
async def
|
|
5
|
-
|
|
3
|
+
class Default(WorkerEntrypoint):
|
|
4
|
+
async def fetch(self, request):
|
|
5
|
+
return Response("Hello World!")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from workers import DurableObject, Response,
|
|
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,28 @@ class MyDurableObject(DurableObject):
|
|
|
40
40
|
return f"Hello, {name}!"
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @param {
|
|
48
|
-
* @param {
|
|
49
|
-
* @
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
async def
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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 `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 = self.env.MY_DURABLE_OBJECT.idFromName("foo")
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
# Create a stub to open a communication channel with the Durable
|
|
59
|
+
# Object instance.
|
|
60
|
+
stub = self.env.MY_DURABLE_OBJECT.get(id)
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
65
|
|
|
66
|
-
|
|
66
|
+
return Response(greeting)
|
|
67
67
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from workers import DurableObject, Response,
|
|
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,20 @@ 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
|
-
|
|
52
|
-
async def
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
class Default(WorkerEntrypoint):
|
|
52
|
+
async def fetch(self, request):
|
|
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 = self.env.MY_DURABLE_OBJECT.idFromName("foo")
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
# Create a stub to open a communication channel with the Durable
|
|
59
|
+
# Object instance.
|
|
60
|
+
stub = self.env.MY_DURABLE_OBJECT.get(id)
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
65
|
|
|
66
|
-
|
|
66
|
+
return Response(greeting)
|
|
67
67
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
from workers import Response,
|
|
1
|
+
from workers import Response, WorkerEntrypoint
|
|
2
2
|
from uuid import uuid4
|
|
3
3
|
from urllib.parse import urlparse
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
async def
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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)
|