create-cloudflare 2.44.1 → 2.45.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
@@ -74560,7 +74560,7 @@ var Yargs = YargsFactory(esm_default);
74560
74560
  var yargs_default = Yargs;
74561
74561
 
74562
74562
  // package.json
74563
- var version = "2.44.1";
74563
+ var version = "2.45.1";
74564
74564
 
74565
74565
  // src/metrics.ts
74566
74566
  var import_node_async_hooks = require("node:async_hooks");
@@ -75335,21 +75335,21 @@ var package_default = {
75335
75335
  "so that we can use dependabot to update these dependencies automatically."
75336
75336
  ],
75337
75337
  dependencies: {
75338
- "create-astro": "4.11.1",
75338
+ "create-astro": "4.11.2",
75339
75339
  "create-analog": "1.8.1",
75340
- "@angular/create": "19.2.7",
75340
+ "@angular/create": "19.2.8",
75341
75341
  "create-docusaurus": "3.7.0",
75342
75342
  "create-hono": "0.17.0",
75343
- "create-next-app": "15.3.0",
75343
+ "create-next-app": "15.3.1",
75344
75344
  "create-qwik": "1.13.0",
75345
- "create-vite": "6.3.1",
75345
+ "create-vite": "6.4.1",
75346
75346
  "create-remix": "2.16.5",
75347
- "create-react-router": "7.5.0",
75347
+ "create-react-router": "7.5.1",
75348
75348
  "create-solid": "0.6.2",
75349
75349
  "create-vue": "3.16.4",
75350
75350
  gatsby: "5.14.3",
75351
75351
  sv: "0.8.1",
75352
- nuxi: "3.24.1"
75352
+ nuxi: "3.25.0"
75353
75353
  }
75354
75354
  };
75355
75355
 
@@ -77190,8 +77190,6 @@ var configure12 = async (ctx) => {
77190
77190
  const cmd = [name2 === "pnpm" ? npm13 : npx5, "qwik", "add", "cloudflare-pages"];
77191
77191
  endSection(`Running ${quoteShellArgs(cmd)}`);
77192
77192
  await runCommand(cmd);
77193
- removeFile("./public/_headers");
77194
- removeFile("./public/_redirects");
77195
77193
  removeFile("./public/_routes.json");
77196
77194
  addBindingsProxy2(ctx);
77197
77195
  populateCloudflareEnv2();
@@ -77231,7 +77229,7 @@ var addBindingsProxy2 = (ctx) => {
77231
77229
  return false;
77232
77230
  }
77233
77231
  if (configArgument.type !== "ObjectExpression") {
77234
- crash("Failed to update `vite.config.ts`");
77232
+ throw new Error("Failed to update `vite.config.ts`");
77235
77233
  }
77236
77234
  configArgument.properties.push(platformPropery);
77237
77235
  return false;
@@ -78065,7 +78063,7 @@ var c3_default50 = config47;
78065
78063
  var import_node_assert = __toESM(require("node:assert"));
78066
78064
 
78067
78065
  // ../wrangler/package.json
78068
- var version2 = "4.12.0";
78066
+ var version2 = "4.13.0";
78069
78067
 
78070
78068
  // src/git.ts
78071
78069
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.44.1",
3
+ "version": "2.45.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.20250415.0",
33
+ "@cloudflare/workers-types": "^4.20250422.0",
34
34
  "@iarna/toml": "^3.0.0",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
@@ -70,12 +70,12 @@
70
70
  "wrap-ansi": "^9.0.0",
71
71
  "xdg-app-paths": "^8.3.0",
72
72
  "yargs": "^17.7.2",
73
- "@cloudflare/cli": "1.1.1",
74
73
  "@cloudflare/eslint-config-worker": "1.1.0",
75
74
  "@cloudflare/mock-npm-registry": "0.0.0",
76
- "@cloudflare/vite-plugin": "1.0.8",
75
+ "@cloudflare/vite-plugin": "1.0.10",
76
+ "@cloudflare/cli": "1.1.1",
77
77
  "@cloudflare/workers-tsconfig": "0.0.0",
78
- "wrangler": "4.12.0"
78
+ "wrangler": "4.13.0"
79
79
  },
80
80
  "engines": {
81
81
  "node": ">=18.14.1"
@@ -169,3 +169,4 @@ dist
169
169
  # wrangler project
170
170
 
171
171
  .dev.vars
172
+ .wrangler/
@@ -9,13 +9,14 @@
9
9
  "cf-typegen": "wrangler types"
10
10
  },
11
11
  "dependencies": {
12
- "chanfana": "^2.0.2",
13
- "zod": "^3.23.8",
14
- "hono": "^4.4.7"
12
+ "chanfana": "^2.6.3",
13
+ "hono": "^4.6.20",
14
+ "zod": "^3.24.1"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/node": "20.8.3",
18
- "@types/service-worker-mock": "^2.0.1",
19
- "wrangler": "^3.101.0"
17
+ "@cloudflare/workers-types": "^4.20250129.0",
18
+ "@types/node": "22.13.0",
19
+ "@types/service-worker-mock": "^2.0.4",
20
+ "wrangler": "^3.107.2"
20
21
  }
21
22
  }
@@ -1,6 +1,6 @@
1
1
  import { Bool, OpenAPIRoute } from "chanfana";
2
2
  import { z } from "zod";
3
- import { Task } from "../types";
3
+ import { type AppContext, Task } from "../types";
4
4
 
5
5
  export class TaskCreate extends OpenAPIRoute {
6
6
  schema = {
@@ -34,7 +34,7 @@ export class TaskCreate extends OpenAPIRoute {
34
34
  },
35
35
  };
36
36
 
37
- async handle(c) {
37
+ async handle(c: AppContext) {
38
38
  // Get validated data
39
39
  const data = await this.getValidatedData<typeof this.schema>();
40
40
 
@@ -1,6 +1,6 @@
1
1
  import { Bool, OpenAPIRoute, Str } from "chanfana";
2
2
  import { z } from "zod";
3
- import { Task } from "../types";
3
+ import { type AppContext, Task } from "../types";
4
4
 
5
5
  export class TaskDelete extends OpenAPIRoute {
6
6
  schema = {
@@ -30,7 +30,7 @@ export class TaskDelete extends OpenAPIRoute {
30
30
  },
31
31
  };
32
32
 
33
- async handle(c) {
33
+ async handle(c: AppContext) {
34
34
  // Get validated data
35
35
  const data = await this.getValidatedData<typeof this.schema>();
36
36
 
@@ -1,6 +1,6 @@
1
1
  import { Bool, OpenAPIRoute, Str } from "chanfana";
2
2
  import { z } from "zod";
3
- import { Task } from "../types";
3
+ import { type AppContext, Task } from "../types";
4
4
 
5
5
  export class TaskFetch extends OpenAPIRoute {
6
6
  schema = {
@@ -43,7 +43,7 @@ export class TaskFetch extends OpenAPIRoute {
43
43
  },
44
44
  };
45
45
 
46
- async handle(c) {
46
+ async handle(c: AppContext) {
47
47
  // Get validated data
48
48
  const data = await this.getValidatedData<typeof this.schema>();
49
49
 
@@ -1,6 +1,6 @@
1
1
  import { Bool, Num, OpenAPIRoute } from "chanfana";
2
2
  import { z } from "zod";
3
- import { Task } from "../types";
3
+ import { type AppContext, Task } from "../types";
4
4
 
5
5
  export class TaskList extends OpenAPIRoute {
6
6
  schema = {
@@ -37,7 +37,7 @@ export class TaskList extends OpenAPIRoute {
37
37
  },
38
38
  };
39
39
 
40
- async handle(c) {
40
+ async handle(c: AppContext) {
41
41
  // Get validated data
42
42
  const data = await this.getValidatedData<typeof this.schema>();
43
43
 
@@ -6,7 +6,7 @@ import { TaskFetch } from "./endpoints/taskFetch";
6
6
  import { TaskList } from "./endpoints/taskList";
7
7
 
8
8
  // Start a Hono app
9
- const app = new Hono();
9
+ const app = new Hono<{ Bindings: Env }>();
10
10
 
11
11
  // Setup OpenAPI registry
12
12
  const openapi = fromHono(app, {
@@ -19,5 +19,8 @@ openapi.post("/api/tasks", TaskCreate);
19
19
  openapi.get("/api/tasks/:taskSlug", TaskFetch);
20
20
  openapi.delete("/api/tasks/:taskSlug", TaskDelete);
21
21
 
22
+ // You may also register routes for non OpenAPI directly on Hono
23
+ // app.get('/test', (c) => c.text('Hono!'))
24
+
22
25
  // Export the Hono app
23
26
  export default app;
@@ -1,6 +1,9 @@
1
1
  import { DateTime, Str } from "chanfana";
2
+ import type { Context } from "hono";
2
3
  import { z } from "zod";
3
4
 
5
+ export type AppContext = Context<{ Bindings: Env }>;
6
+
4
7
  export const Task = z.object({
5
8
  name: Str({ example: "lorem" }),
6
9
  slug: Str(),
@@ -1,26 +1,24 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "allowJs": true,
4
- "allowSyntheticDefaultImports": true,
5
- "baseUrl": "src",
6
- "declaration": true,
7
- "sourceMap": true,
3
+ /* Base Options: */
8
4
  "esModuleInterop": true,
9
- "inlineSourceMap": false,
10
- "lib": ["esnext"],
11
- "listEmittedFiles": false,
12
- "listFiles": false,
13
- "moduleResolution": "node",
14
- "noFallthroughCasesInSwitch": true,
15
- "pretty": true,
16
- "resolveJsonModule": true,
17
- "rootDir": ".",
18
5
  "skipLibCheck": true,
19
- "strict": false,
20
- "traceResolution": false,
21
- "outDir": "",
22
- "target": "esnext",
23
- "module": "esnext",
6
+ "target": "es2022",
7
+ "verbatimModuleSyntax": false,
8
+ "allowJs": true,
9
+ "resolveJsonModule": true,
10
+ "moduleDetection": "force",
11
+ /* Strictness */
12
+ "noImplicitAny": false,
13
+ "noImplicitThis": true,
14
+ "strictNullChecks": false,
15
+ "strict": true,
16
+ "noUncheckedIndexedAccess": true,
17
+ /* If NOT transpiling with TypeScript: */
18
+ "moduleResolution": "Bundler",
19
+ "module": "es2022",
20
+ "noEmit": true,
21
+ "lib": ["es2022"],
24
22
  "types": [
25
23
  "@types/node",
26
24
  "@types/service-worker-mock",
@@ -28,5 +26,5 @@
28
26
  ]
29
27
  },
30
28
  "exclude": ["node_modules", "dist", "tests"],
31
- "include": ["src", "scripts"]
29
+ "include": ["src", "worker-configuration.d.ts"]
32
30
  }
@@ -1,4 +1,4 @@
1
- import { crash, endSection } from "@cloudflare/cli";
1
+ import { endSection } from "@cloudflare/cli";
2
2
  import { brandColor } from "@cloudflare/cli/colors";
3
3
  import { spinner } from "@cloudflare/cli/interactive";
4
4
  import { runFrameworkGenerator } from "frameworks/index";
@@ -24,8 +24,6 @@ const configure = async (ctx: C3Context) => {
24
24
  await runCommand(cmd);
25
25
 
26
26
  // Remove the extraneous Pages files
27
- removeFile("./public/_headers");
28
- removeFile("./public/_redirects");
29
27
  removeFile("./public/_routes.json");
30
28
 
31
29
  addBindingsProxy(ctx);
@@ -81,7 +79,7 @@ const addBindingsProxy = (ctx: C3Context) => {
81
79
  }
82
80
 
83
81
  if (configArgument.type !== "ObjectExpression") {
84
- crash("Failed to update `vite.config.ts`");
82
+ throw new Error("Failed to update `vite.config.ts`");
85
83
  }
86
84
 
87
85
  // Add the `platform` object to the object