create-cloudflare 2.61.0 → 2.62.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.61.0",
3
+ "version": "2.62.0",
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.20251217.0",
33
+ "@cloudflare/workers-types": "^4.20260103.0",
34
34
  "@types/command-exists": "^1.2.0",
35
35
  "@types/cross-spawn": "^6.0.2",
36
36
  "@types/deepmerge": "^2.2.0",
@@ -74,12 +74,13 @@
74
74
  "wrap-ansi": "^9.0.0",
75
75
  "xdg-app-paths": "^8.3.0",
76
76
  "yargs": "^17.7.2",
77
- "@cloudflare/eslint-config-shared": "1.1.0",
77
+ "@cloudflare/workers-utils": "0.6.0",
78
78
  "@cloudflare/cli": "1.2.0",
79
+ "@cloudflare/eslint-config-shared": "1.1.0",
79
80
  "@cloudflare/mock-npm-registry": "0.0.0",
80
- "@cloudflare/vite-plugin": "1.19.0",
81
+ "@cloudflare/vite-plugin": "1.20.0",
81
82
  "@cloudflare/workers-tsconfig": "0.0.0",
82
- "wrangler": "4.56.0"
83
+ "wrangler": "4.57.0"
83
84
  },
84
85
  "engines": {
85
86
  "node": ">=18.14.1"
@@ -20,7 +20,7 @@ const configure = async (ctx: C3Context) => {
20
20
  usesTypescript(ctx);
21
21
  const filePath = `vite.config.${usesTypescript(ctx) ? "ts" : "js"}`;
22
22
 
23
- const compatDate = await getWorkerdCompatibilityDate();
23
+ const compatDate = getWorkerdCompatibilityDate(ctx.project.path);
24
24
 
25
25
  updateStatus(`Updating configuration in ${blue(filePath)}`);
26
26
 
@@ -1,8 +1,8 @@
1
1
  import { logRaw, updateStatus } from "@cloudflare/cli";
2
2
  import { blue } from "@cloudflare/cli/colors";
3
+ import { getLocalWorkerdCompatibilityDate } from "@cloudflare/workers-utils";
3
4
  import { runFrameworkGenerator } from "frameworks/index";
4
5
  import { mergeObjectProperties, transformFile } from "helpers/codemod";
5
- import { getWorkerdCompatibilityDate } from "helpers/compatDate";
6
6
  import { usesTypescript } from "helpers/files";
7
7
  import { detectPackageManager } from "helpers/packageManagers";
8
8
  import * as recast from "recast";
@@ -23,7 +23,9 @@ const configure = async (ctx: C3Context) => {
23
23
  usesTypescript(ctx);
24
24
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
25
25
 
26
- const compatDate = await getWorkerdCompatibilityDate();
26
+ const { date: compatDate } = getLocalWorkerdCompatibilityDate({
27
+ projectPath: ctx.project.path,
28
+ });
27
29
 
28
30
  updateStatus(`Updating configuration in ${blue(filePath)}`);
29
31
 
@@ -0,0 +1,30 @@
1
+ import { logRaw } from "@cloudflare/cli";
2
+ import { runFrameworkGenerator } from "frameworks/index";
3
+ import type { TemplateConfig } from "../../src/templates";
4
+ import type { C3Context } from "types";
5
+
6
+ const generate = async (ctx: C3Context) => {
7
+ await runFrameworkGenerator(ctx, [
8
+ ctx.project.name,
9
+ // Note: the vike create CLI supports a `--cloudflare` argument for creating cloudflare-ready
10
+ // projects, that works great but here we don't want to use that because we do want to
11
+ // exercise the general autoconfig/`wrangler setup` functionality (which amongst other
12
+ // things lets up ensure that we can support the migration of existing vike projects)
13
+ "--no-git",
14
+ ]);
15
+
16
+ logRaw(""); // newline
17
+ };
18
+
19
+ const config: TemplateConfig = {
20
+ configVersion: 1,
21
+ id: "vike",
22
+ platform: "workers",
23
+ frameworkCli: "create-vike",
24
+ displayName: "Vike",
25
+ generate,
26
+ devScript: "dev",
27
+ deployScript: "deploy",
28
+ previewScript: "preview",
29
+ };
30
+ export default config;
@@ -0,0 +1,30 @@
1
+ import { runFrameworkGenerator } from "frameworks/index";
2
+ import { detectPackageManager } from "helpers/packageManagers";
3
+ import type { TemplateConfig } from "../../src/templates";
4
+ import type { C3Context } from "types";
5
+
6
+ const { npm } = detectPackageManager();
7
+
8
+ const generate = async (ctx: C3Context) => {
9
+ await runFrameworkGenerator(ctx, [
10
+ "--project-name",
11
+ ctx.project.name,
12
+ // Note: we could point the waku create CLI to a cloudflare-ready template, that works great
13
+ // but here we don't want to use that because we do want to exercise the general
14
+ // autoconfig/`wrangler setup` functionality (which amongst other things lets up ensure
15
+ // that we can support the migration of existing waku projects)
16
+ ]);
17
+ };
18
+
19
+ const config: TemplateConfig = {
20
+ configVersion: 1,
21
+ id: "waku",
22
+ frameworkCli: "create-waku",
23
+ platform: "workers",
24
+ displayName: "Waku",
25
+ generate,
26
+ devScript: "dev",
27
+ deployScript: "deploy",
28
+ previewScript: "preview",
29
+ };
30
+ export default config;