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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.23.0",
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.20240725.0",
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.68.0"
70
+ "wrangler": "3.72.0"
71
71
  },
72
72
  "engines": {
73
73
  "node": ">=18.14.1"
@@ -2,7 +2,10 @@ export default {
2
2
  configVersion: 1,
3
3
  id: "common",
4
4
  displayName: "Example router & proxy Worker",
5
+ description:
6
+ "Create a Worker to route and forward requests to other services",
5
7
  platform: "workers",
8
+ hidden: true,
6
9
  copyFiles: {
7
10
  variants: {
8
11
  js: {
@@ -2,6 +2,7 @@ export default {
2
2
  configVersion: 1,
3
3
  id: "hello-world",
4
4
  displayName: "Hello World Worker",
5
+ description: "Get started with a basic Worker in the language of your choice",
5
6
  platform: "workers",
6
7
  copyFiles: {
7
8
  variants: {
@@ -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: {
@@ -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: Bindings }>()
1
+ new Hono<{ Bindings: CloudflareBindings }>()
@@ -2,6 +2,7 @@ export default {
2
2
  configVersion: 1,
3
3
  id: "openapi",
4
4
  displayName: "API starter (OpenAPI compliant)",
5
+ description: "Get started building a basic API on Workers",
5
6
  platform: "workers",
6
7
  copyFiles: {
7
8
  path: "./ts",
@@ -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: {
@@ -2,6 +2,8 @@ export default {
2
2
  configVersion: 1,
3
3
  id: "scheduled",
4
4
  displayName: "Scheduled Worker (Cron Trigger)",
5
+ description:
6
+ "Create a Worker to be executed on a schedule for periodic (cron) jobs",
5
7
  platform: "workers",
6
8
  copyFiles: {
7
9
  variants: {
@@ -1,3 +0,0 @@
1
- type Bindings = {
2
- [key in keyof CloudflareBindings]: CloudflareBindings[key]
3
- }