create-cloudflare 2.51.0 → 2.51.2
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 +4 -4
- package/package.json +6 -6
- package/templates/hello-world-durable-object/js/src/index.js +7 -9
- package/templates/hello-world-durable-object/py/src/entry.py +8 -10
- package/templates/hello-world-durable-object/ts/src/index.ts +7 -9
- package/templates/hello-world-durable-object-with-assets/js/src/index.js +7 -9
- package/templates/hello-world-durable-object-with-assets/py/src/entry.py +8 -10
- package/templates/hello-world-durable-object-with-assets/ts/src/index.ts +7 -9
- package/templates/remix/pages/c3.ts +1 -1
- package/templates/remix/workers/c3.ts +1 -1
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.51.
|
|
78506
|
+
var version = "2.51.2";
|
|
78507
78507
|
|
|
78508
78508
|
// src/metrics.ts
|
|
78509
78509
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -81375,7 +81375,7 @@ var generate21 = async (ctx) => {
|
|
|
81375
81375
|
await runFrameworkGenerator(ctx, [
|
|
81376
81376
|
ctx.project.name,
|
|
81377
81377
|
"--template",
|
|
81378
|
-
"https://github.com/remix-run/remix/tree/main/templates/cloudflare"
|
|
81378
|
+
"https://github.com/remix-run/remix/tree/main-prev/templates/cloudflare"
|
|
81379
81379
|
]);
|
|
81380
81380
|
logRaw("");
|
|
81381
81381
|
};
|
|
@@ -81427,7 +81427,7 @@ var generate22 = async (ctx) => {
|
|
|
81427
81427
|
await runFrameworkGenerator(ctx, [
|
|
81428
81428
|
ctx.project.name,
|
|
81429
81429
|
"--template",
|
|
81430
|
-
"https://github.com/remix-run/remix/tree/main/templates/cloudflare-workers"
|
|
81430
|
+
"https://github.com/remix-run/remix/tree/main-prev/templates/cloudflare-workers"
|
|
81431
81431
|
]);
|
|
81432
81432
|
logRaw("");
|
|
81433
81433
|
};
|
|
@@ -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.33.1";
|
|
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.51.
|
|
3
|
+
"version": "2.51.2",
|
|
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.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/mock-npm-registry": "0.0.0",
|
|
77
|
-
"@cloudflare/vite-plugin": "1.11.6",
|
|
78
|
-
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
79
76
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
80
|
-
"
|
|
77
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
78
|
+
"@cloudflare/vite-plugin": "1.12.1",
|
|
79
|
+
"wrangler": "4.33.1",
|
|
80
|
+
"@cloudflare/mock-npm-registry": "0.0.0"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=18.14.1"
|
|
@@ -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
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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);
|
|
@@ -50,17 +50,15 @@ class Default(WorkerEntrypoint):
|
|
|
50
50
|
* @returns {Promise<Response>} The response to be sent back to the client
|
|
51
51
|
"""
|
|
52
52
|
async def fetch(self, request):
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
stub = self.env.MY_DURABLE_OBJECT.get(id)
|
|
61
|
-
|
|
62
|
-
# Call the `say_hello()` RPC method on the stub to invoke the method on
|
|
63
|
-
# the remote Durable Object instance
|
|
60
|
+
# Call the `say_hello()` RPC method on the stub to invoke the method on
|
|
61
|
+
# the remote Durable Object instance.
|
|
64
62
|
greeting = await stub.say_hello("world")
|
|
65
63
|
|
|
66
64
|
return Response(greeting)
|
|
@@ -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
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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);
|
|
@@ -50,17 +50,15 @@ class MyDurableObject(DurableObject):
|
|
|
50
50
|
"""
|
|
51
51
|
class Default(WorkerEntrypoint):
|
|
52
52
|
async def fetch(self, request):
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
stub = self.env.MY_DURABLE_OBJECT.get(id)
|
|
61
|
-
|
|
62
|
-
# Call the `say_hello()` RPC method on the stub to invoke the method on
|
|
63
|
-
# the remote Durable Object instance
|
|
60
|
+
# Call the `say_hello()` RPC method on the stub to invoke the method on
|
|
61
|
+
# the remote Durable Object instance.
|
|
64
62
|
greeting = await stub.say_hello("world")
|
|
65
63
|
|
|
66
64
|
return Response(greeting)
|
|
@@ -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
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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);
|
|
@@ -13,7 +13,7 @@ const generate = async (ctx: C3Context) => {
|
|
|
13
13
|
await runFrameworkGenerator(ctx, [
|
|
14
14
|
ctx.project.name,
|
|
15
15
|
"--template",
|
|
16
|
-
"https://github.com/remix-run/remix/tree/main/templates/cloudflare",
|
|
16
|
+
"https://github.com/remix-run/remix/tree/main-prev/templates/cloudflare",
|
|
17
17
|
]);
|
|
18
18
|
|
|
19
19
|
logRaw(""); // newline
|
|
@@ -12,7 +12,7 @@ const generate = async (ctx: C3Context) => {
|
|
|
12
12
|
await runFrameworkGenerator(ctx, [
|
|
13
13
|
ctx.project.name,
|
|
14
14
|
"--template",
|
|
15
|
-
"https://github.com/remix-run/remix/tree/main/templates/cloudflare-workers",
|
|
15
|
+
"https://github.com/remix-run/remix/tree/main-prev/templates/cloudflare-workers",
|
|
16
16
|
]);
|
|
17
17
|
|
|
18
18
|
logRaw(""); // newline
|