create-cloudflare 2.73.4 → 2.74.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.73.4",
3
+ "version": "2.74.0",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -70,13 +70,13 @@
70
70
  "which-pm-runs": "^1.1.0",
71
71
  "wrap-ansi": "^9.0.0",
72
72
  "yargs": "^17.7.2",
73
- "@cloudflare/cli-shared-helpers": "0.2.5",
73
+ "@cloudflare/cli-shared-helpers": "0.2.6",
74
+ "@cloudflare/vite-plugin": "1.63.2",
74
75
  "@cloudflare/mock-npm-registry": "0.0.0",
75
- "@cloudflare/vite-plugin": "1.63.1",
76
- "@cloudflare/workers-tsconfig": "0.0.0",
77
76
  "@cloudflare/shared-ast-primitives": "1.1.0",
78
- "@cloudflare/workers-utils": "0.47.1",
79
- "wrangler": "4.149.0"
77
+ "@cloudflare/workers-tsconfig": "0.0.0",
78
+ "@cloudflare/workers-utils": "0.47.2",
79
+ "wrangler": "4.150.0"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22.0.0"
@@ -3,6 +3,7 @@ import { logRaw } from "@cloudflare/cli-shared-helpers";
3
3
  import { inputPrompt } from "@cloudflare/cli-shared-helpers/interactive";
4
4
  import { runFrameworkGenerator } from "frameworks/index";
5
5
  import { detectPackageManager } from "helpers/packageManagers";
6
+ import { usesCfCli } from "../../src/cf/config";
6
7
  import { downloadRemoteTemplate, updatePackageName } from "../../src/templates";
7
8
  import type { TemplateConfig } from "../../src/templates";
8
9
  import type { C3Context } from "types";
@@ -142,7 +143,11 @@ export default {
142
143
  // Align with OpenNext so the shared previewScript: "preview" works
143
144
  // for both variants (vinext only ships dev/build/start/deploy).
144
145
  preview: `${npm} run build && ${npm} run start${npm === "npm" ? " --" : ""}`,
145
- "cf-typegen": `wrangler types --env-interface ${envInterfaceName} ${VINEXT_TYPES_PATH}`,
146
+ // vinext configures projects for the `cf` CLI unless it is passed
147
+ // `--legacy-wrangler-cloudflare-init`
148
+ "cf-typegen": usesCfCli(ctx.project.path)
149
+ ? "cf workers types"
150
+ : `wrangler types --env-interface ${envInterfaceName} ${VINEXT_TYPES_PATH}`,
146
151
  },
147
152
  };
148
153
  },
@@ -1,3 +1,4 @@
1
+ import { join } from "node:path";
1
2
  import { logRaw } from "@cloudflare/cli-shared-helpers";
2
3
  import { brandColor, dim } from "@cloudflare/cli-shared-helpers/colors";
3
4
  import { spinner } from "@cloudflare/cli-shared-helpers/interactive";
@@ -27,7 +28,7 @@ const generate = async (ctx: C3Context) => {
27
28
  gitFlag,
28
29
  ]);
29
30
 
30
- writeFile("./.node-version", "18");
31
+ writeFile(join(ctx.project.path, ".node-version"), "22.23.1");
31
32
 
32
33
  logRaw(""); // newline
33
34
  };
@@ -106,6 +107,7 @@ const config: TemplateConfig = {
106
107
  configVersion: 1,
107
108
  id: "nuxt",
108
109
  frameworkCli: "nuxi",
110
+ frameworkCliNodeVersion: "^22.21.0 || ^24.11.0 || >=26.0.0",
109
111
  platform: "pages",
110
112
  languages: ["ts"],
111
113
  hidden: true,
@@ -1,3 +1,4 @@
1
+ import { join } from "node:path";
1
2
  import { logRaw } from "@cloudflare/cli-shared-helpers";
2
3
  import { brandColor, dim } from "@cloudflare/cli-shared-helpers/colors";
3
4
  import { spinner } from "@cloudflare/cli-shared-helpers/interactive";
@@ -27,7 +28,7 @@ const generate = async (ctx: C3Context) => {
27
28
  gitFlag,
28
29
  ]);
29
30
 
30
- writeFile("./.node-version", "18");
31
+ writeFile(join(ctx.project.path, ".node-version"), "22.23.1");
31
32
 
32
33
  logRaw(""); // newline
33
34
  };
@@ -106,6 +107,7 @@ const config: TemplateConfig = {
106
107
  configVersion: 1,
107
108
  id: "nuxt",
108
109
  frameworkCli: "nuxi",
110
+ frameworkCliNodeVersion: "^22.21.0 || ^24.11.0 || >=26.0.0",
109
111
  platform: "workers",
110
112
  languages: ["ts"],
111
113
  displayName: "Nuxt",
@@ -6,7 +6,7 @@ import { brandColor, dim } from "@cloudflare/cli-shared-helpers/colors";
6
6
  import { runCommand } from "@cloudflare/cli-shared-helpers/command";
7
7
  import { processArgument } from "helpers/args";
8
8
  import { detectPackageManager } from "helpers/packageManagers";
9
- import { chooseAccount, wranglerLogin } from "../../src/wrangler/accounts";
9
+ import { chooseAccount, login } from "../../src/wrangler/accounts";
10
10
  import type { TemplateConfig } from "../../src/templates";
11
11
  import type { C3Context } from "types";
12
12
 
@@ -90,7 +90,7 @@ const config: TemplateConfig = {
90
90
  },
91
91
  languages: ["js"],
92
92
  configure: buildConfigure({
93
- login: wranglerLogin,
93
+ login,
94
94
  chooseAccount,
95
95
  copyFiles: copyExistingWorkerFiles,
96
96
  }),