create-cloudflare 2.23.0 → 2.25.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 +3770 -3639
- package/package.json +3 -3
- package/templates/common/c3.ts +3 -0
- package/templates/hello-world/c3.ts +1 -0
- package/templates/hello-world-durable-object/c3.ts +2 -0
- package/templates/hono/c3.ts +0 -10
- package/templates/hono/snippets/appDeclaration.ts +1 -1
- package/templates/openapi/c3.ts +1 -0
- package/templates/queues/c3.ts +2 -0
- package/templates/scheduled/c3.ts +2 -0
- package/templates/hono/snippets/bindingsType.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@babel/parser": "^7.21.3",
|
|
30
30
|
"@babel/types": "^7.21.4",
|
|
31
31
|
"@clack/prompts": "^0.6.3",
|
|
32
|
-
"@cloudflare/workers-types": "^4.
|
|
32
|
+
"@cloudflare/workers-types": "^4.20240806.0",
|
|
33
33
|
"@iarna/toml": "^3.0.0",
|
|
34
34
|
"@types/command-exists": "^1.2.0",
|
|
35
35
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@cloudflare/cli": "1.1.1",
|
|
68
68
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
69
69
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
70
|
-
"wrangler": "3.
|
|
70
|
+
"wrangler": "3.72.0"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=18.14.1"
|
package/templates/common/c3.ts
CHANGED
|
@@ -2,6 +2,8 @@ export default {
|
|
|
2
2
|
configVersion: 1,
|
|
3
3
|
id: "hello-world-durable-object",
|
|
4
4
|
displayName: "Hello World Worker Using Durable Objects",
|
|
5
|
+
description:
|
|
6
|
+
"Get started with a basic stateful app to build projects like real-time chats, collaborative apps, and multiplayer games",
|
|
5
7
|
platform: "workers",
|
|
6
8
|
copyFiles: {
|
|
7
9
|
variants: {
|
package/templates/hono/c3.ts
CHANGED
|
@@ -32,16 +32,6 @@ const configure = async (ctx: C3Context) => {
|
|
|
32
32
|
const snippets = loadTemplateSnippets(ctx);
|
|
33
33
|
|
|
34
34
|
transformFile(indexFile, {
|
|
35
|
-
// Insert the env declaration after the last import (but before the rest of the body)
|
|
36
|
-
visitProgram: function (n) {
|
|
37
|
-
const lastImportIndex = n.node.body.findLastIndex(
|
|
38
|
-
(t) => t.type === "ImportDeclaration",
|
|
39
|
-
);
|
|
40
|
-
const lastImport = n.get("body", lastImportIndex);
|
|
41
|
-
lastImport.insertAfter(...snippets.bindingsTypeTs);
|
|
42
|
-
|
|
43
|
-
return this.traverse(n);
|
|
44
|
-
},
|
|
45
35
|
visitVariableDeclarator(n) {
|
|
46
36
|
if (n.node.id.type === "Identifier" && n.node.id.name === "app") {
|
|
47
37
|
n.node.init = snippets
|
|
@@ -1 +1 @@
|
|
|
1
|
-
new Hono<{ Bindings:
|
|
1
|
+
new Hono<{ Bindings: CloudflareBindings }>()
|
package/templates/openapi/c3.ts
CHANGED
package/templates/queues/c3.ts
CHANGED
|
@@ -2,6 +2,8 @@ export default {
|
|
|
2
2
|
configVersion: 1,
|
|
3
3
|
id: "queues",
|
|
4
4
|
displayName: "Queue consumer & producer Worker",
|
|
5
|
+
description:
|
|
6
|
+
"Get started with a Worker that processes background tasks and message batches with Cloudflare Queues",
|
|
5
7
|
platform: "workers",
|
|
6
8
|
copyFiles: {
|
|
7
9
|
variants: {
|