create-cloudflare 2.66.0 → 2.66.2
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 +3914 -3542
- package/package.json +8 -8
- package/templates/analog/c3.ts +1 -1
- package/templates/astro/pages/c3.ts +2 -2
- package/templates/astro/workers/c3.ts +1 -1
- package/templates/nuxt/pages/c3.ts +1 -1
- package/templates/nuxt/workers/c3.ts +1 -1
- package/templates/pre-existing/c3.ts +1 -1
- package/templates/qwik/pages/c3.ts +3 -2
- package/templates/qwik/workers/c3.ts +3 -2
- package/templates/react/workers/c3.ts +6 -2
- package/templates/solid/c3.ts +1 -1
- package/templates/svelte/pages/c3.ts +1 -1
- package/templates/svelte/workers/c3.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.66.
|
|
3
|
+
"version": "2.66.2",
|
|
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.
|
|
33
|
+
"@cloudflare/workers-types": "^4.20260401.1",
|
|
34
34
|
"@types/command-exists": "^1.2.0",
|
|
35
35
|
"@types/cross-spawn": "^6.0.2",
|
|
36
36
|
"@types/deepmerge": "^2.2.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"jsonc-parser": "^3.2.0",
|
|
59
59
|
"magic-string": "^0.30.5",
|
|
60
60
|
"open": "^8.4.0",
|
|
61
|
-
"recast": "^0.
|
|
61
|
+
"recast": "^0.23.11",
|
|
62
62
|
"semver": "^7.7.1",
|
|
63
63
|
"smol-toml": "^1.5.2",
|
|
64
64
|
"tree-kill": "^1.2.2",
|
|
@@ -71,12 +71,13 @@
|
|
|
71
71
|
"wrap-ansi": "^9.0.0",
|
|
72
72
|
"xdg-app-paths": "^8.3.0",
|
|
73
73
|
"yargs": "^17.7.2",
|
|
74
|
-
"@cloudflare/cli": "1.
|
|
74
|
+
"@cloudflare/cli": "1.4.0",
|
|
75
|
+
"@cloudflare/codemod": "1.1.0",
|
|
75
76
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
76
|
-
"@cloudflare/vite-plugin": "1.
|
|
77
|
-
"@cloudflare/workers-utils": "0.14.0",
|
|
77
|
+
"@cloudflare/vite-plugin": "1.31.0",
|
|
78
78
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
79
|
-
"
|
|
79
|
+
"@cloudflare/workers-utils": "0.15.0",
|
|
80
|
+
"wrangler": "4.80.0"
|
|
80
81
|
},
|
|
81
82
|
"engines": {
|
|
82
83
|
"node": ">=18.14.1"
|
|
@@ -92,7 +93,6 @@
|
|
|
92
93
|
"build": "node -r esbuild-register scripts/build.ts",
|
|
93
94
|
"check:type": "tsc",
|
|
94
95
|
"dev": "node -r esbuild-register scripts/build.ts --watch",
|
|
95
|
-
"dev:codemod": "node -r esbuild-register scripts/codemodDev.ts",
|
|
96
96
|
"test:ci": "vitest run --config ./vitest.config.mts",
|
|
97
97
|
"test:e2e": "vitest run --config ./vitest-e2e.config.mts",
|
|
98
98
|
"test:unit": "vitest run --config ./vitest.config.mts",
|
package/templates/analog/c3.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logRaw, updateStatus } from "@cloudflare/cli";
|
|
2
2
|
import { blue } from "@cloudflare/cli/colors";
|
|
3
|
+
import { mergeObjectProperties, transformFile } from "@cloudflare/codemod";
|
|
3
4
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
4
|
-
import { mergeObjectProperties, transformFile } from "helpers/codemod";
|
|
5
5
|
import { getWorkerdCompatibilityDate } from "helpers/compatDate";
|
|
6
6
|
import { usesTypescript } from "helpers/files";
|
|
7
7
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { logRaw, updateStatus } from "@cloudflare/cli";
|
|
2
2
|
import { blue, brandColor, dim } from "@cloudflare/cli/colors";
|
|
3
|
+
import { runCommand } from "@cloudflare/cli/command";
|
|
4
|
+
import { transformFile } from "@cloudflare/codemod";
|
|
3
5
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
4
|
-
import { transformFile } from "helpers/codemod";
|
|
5
|
-
import { runCommand } from "helpers/command";
|
|
6
6
|
import { usesTypescript } from "helpers/files";
|
|
7
7
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
8
8
|
import * as recast from "recast";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logRaw } from "@cloudflare/cli";
|
|
2
2
|
import { brandColor, dim } from "@cloudflare/cli/colors";
|
|
3
|
+
import { runCommand } from "@cloudflare/cli/command";
|
|
3
4
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
4
|
-
import { runCommand } from "helpers/command";
|
|
5
5
|
import { usesTypescript } from "helpers/files";
|
|
6
6
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
7
7
|
import type { TemplateConfig } from "../../../src/templates";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { logRaw } from "@cloudflare/cli";
|
|
2
2
|
import { brandColor, dim } from "@cloudflare/cli/colors";
|
|
3
3
|
import { spinner } from "@cloudflare/cli/interactive";
|
|
4
|
+
import { mergeObjectProperties, transformFile } from "@cloudflare/codemod";
|
|
4
5
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
5
|
-
import { mergeObjectProperties, transformFile } from "helpers/codemod";
|
|
6
6
|
import { writeFile } from "helpers/files";
|
|
7
7
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
8
8
|
import { installPackages } from "helpers/packages";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { logRaw } from "@cloudflare/cli";
|
|
2
2
|
import { brandColor, dim } from "@cloudflare/cli/colors";
|
|
3
3
|
import { spinner } from "@cloudflare/cli/interactive";
|
|
4
|
+
import { mergeObjectProperties, transformFile } from "@cloudflare/codemod";
|
|
4
5
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
5
|
-
import { mergeObjectProperties, transformFile } from "helpers/codemod";
|
|
6
6
|
import { writeFile } from "helpers/files";
|
|
7
7
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
8
8
|
import { installPackages } from "helpers/packages";
|
|
@@ -3,8 +3,8 @@ import { cp, mkdtemp } from "node:fs/promises";
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { brandColor, dim } from "@cloudflare/cli/colors";
|
|
6
|
+
import { runCommand } from "@cloudflare/cli/command";
|
|
6
7
|
import { processArgument } from "helpers/args";
|
|
7
|
-
import { runCommand } from "helpers/command";
|
|
8
8
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
9
9
|
import { chooseAccount, wranglerLogin } from "../../src/wrangler/accounts";
|
|
10
10
|
import type { TemplateConfig } from "../../src/templates";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { endSection } from "@cloudflare/cli";
|
|
2
2
|
import { brandColor } from "@cloudflare/cli/colors";
|
|
3
|
+
import { quoteShellArgs, runCommand } from "@cloudflare/cli/command";
|
|
3
4
|
import { spinner } from "@cloudflare/cli/interactive";
|
|
5
|
+
import { transformFile } from "@cloudflare/codemod";
|
|
4
6
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
5
|
-
import { loadTemplateSnippets
|
|
6
|
-
import { quoteShellArgs, runCommand } from "helpers/command";
|
|
7
|
+
import { loadTemplateSnippets } from "helpers/codemod";
|
|
7
8
|
import { usesTypescript } from "helpers/files";
|
|
8
9
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
9
10
|
import * as recast from "recast";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { endSection } from "@cloudflare/cli";
|
|
2
2
|
import { brandColor } from "@cloudflare/cli/colors";
|
|
3
|
+
import { quoteShellArgs, runCommand } from "@cloudflare/cli/command";
|
|
3
4
|
import { spinner } from "@cloudflare/cli/interactive";
|
|
5
|
+
import { transformFile } from "@cloudflare/codemod";
|
|
4
6
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
5
|
-
import { loadTemplateSnippets
|
|
6
|
-
import { quoteShellArgs, runCommand } from "helpers/command";
|
|
7
|
+
import { loadTemplateSnippets } from "helpers/codemod";
|
|
7
8
|
import { usesTypescript } from "helpers/files";
|
|
8
9
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
9
10
|
import * as recast from "recast";
|
|
@@ -2,8 +2,8 @@ import assert from "node:assert";
|
|
|
2
2
|
import { logRaw } from "@cloudflare/cli";
|
|
3
3
|
import { brandColor, dim } from "@cloudflare/cli/colors";
|
|
4
4
|
import { inputPrompt, spinner } from "@cloudflare/cli/interactive";
|
|
5
|
+
import { transformFile } from "@cloudflare/codemod";
|
|
5
6
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
6
|
-
import { transformFile } from "helpers/codemod";
|
|
7
7
|
import { readJSON, usesTypescript, writeJSON } from "helpers/files";
|
|
8
8
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
9
9
|
import { installPackages } from "helpers/packages";
|
|
@@ -146,7 +146,11 @@ async function getVariant(ctx: C3Context) {
|
|
|
146
146
|
);
|
|
147
147
|
if (!selected) {
|
|
148
148
|
throw new Error(
|
|
149
|
-
`Unknown variant "${
|
|
149
|
+
`Unknown variant "${
|
|
150
|
+
ctx.args.variant
|
|
151
|
+
}". Valid variants are: ${variantsOptions
|
|
152
|
+
.map((v) => v.value)
|
|
153
|
+
.join(", ")}`
|
|
150
154
|
);
|
|
151
155
|
}
|
|
152
156
|
return selected;
|
package/templates/solid/c3.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logRaw, updateStatus } from "@cloudflare/cli";
|
|
2
2
|
import { blue } from "@cloudflare/cli/colors";
|
|
3
|
+
import { mergeObjectProperties, transformFile } from "@cloudflare/codemod";
|
|
3
4
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
4
|
-
import { mergeObjectProperties, transformFile } from "helpers/codemod";
|
|
5
5
|
import { usesTypescript } from "helpers/files";
|
|
6
6
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
7
7
|
import * as recast from "recast";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { logRaw, updateStatus } from "@cloudflare/cli";
|
|
3
3
|
import { blue, brandColor, dim } from "@cloudflare/cli/colors";
|
|
4
|
+
import { transformFile } from "@cloudflare/codemod";
|
|
4
5
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
5
|
-
import { transformFile } from "helpers/codemod";
|
|
6
6
|
import { usesTypescript } from "helpers/files";
|
|
7
7
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
8
8
|
import { installPackages } from "helpers/packages";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logRaw, updateStatus } from "@cloudflare/cli";
|
|
2
2
|
import { blue, brandColor, dim } from "@cloudflare/cli/colors";
|
|
3
|
+
import { transformFile } from "@cloudflare/codemod";
|
|
3
4
|
import { runFrameworkGenerator } from "frameworks/index";
|
|
4
|
-
import { transformFile } from "helpers/codemod";
|
|
5
5
|
import { usesTypescript } from "helpers/files";
|
|
6
6
|
import { detectPackageManager } from "helpers/packageManagers";
|
|
7
7
|
import { installPackages } from "helpers/packages";
|