create-cloudflare 2.70.9 → 2.70.10

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
@@ -97210,7 +97210,7 @@ var Yargs = YargsFactory(esm_default2);
97210
97210
  var yargs_default = Yargs;
97211
97211
 
97212
97212
  // package.json
97213
- var version = "2.70.9";
97213
+ var version = "2.70.10";
97214
97214
 
97215
97215
  // src/metrics.ts
97216
97216
  var import_node_async_hooks = require("node:async_hooks");
@@ -99764,7 +99764,7 @@ var package_default = {
99764
99764
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
99765
99765
  gatsby: "5.16.1",
99766
99766
  nuxi: "3.36.1",
99767
- sv: "0.15.4"
99767
+ sv: "0.16.1"
99768
99768
  },
99769
99769
  info: [
99770
99770
  "This package.json is only used to keep track of the frameworks cli dependencies",
@@ -101723,13 +101723,14 @@ var configure13 = async (ctx) => {
101723
101723
  startText: "Adding the Cloudflare Pages adapter",
101724
101724
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`
101725
101725
  });
101726
- updateSvelteConfig();
101726
+ updateViteConfig(ctx);
101727
101727
  updatePlaywrightConfig(usesTypescript(ctx));
101728
101728
  updateTypeDefinitions(ctx);
101729
101729
  };
101730
- var updateSvelteConfig = () => {
101731
- updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
101732
- transformFile("svelte.config.js", {
101730
+ var updateViteConfig = (ctx) => {
101731
+ const configFile = usesTypescript(ctx) ? "vite.config.ts" : "vite.config.js";
101732
+ updateStatus(`Changing adapter in ${blue(configFile)}`);
101733
+ transformFile(configFile, {
101733
101734
  visitImportDeclaration: function(n) {
101734
101735
  const importSource = n.value.source;
101735
101736
  if (importSource.value === "@sveltejs/adapter-auto") {
@@ -101846,12 +101847,13 @@ var configure14 = async (ctx) => {
101846
101847
  startText: "Adding the Cloudflare adapter",
101847
101848
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`
101848
101849
  });
101849
- updateSvelteConfig2();
101850
+ updateViteConfig2(ctx);
101850
101851
  updateTypeDefinitions2(ctx);
101851
101852
  };
101852
- var updateSvelteConfig2 = () => {
101853
- updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
101854
- transformFile("svelte.config.js", {
101853
+ var updateViteConfig2 = (ctx) => {
101854
+ const configFile = usesTypescript(ctx) ? "vite.config.ts" : "vite.config.js";
101855
+ updateStatus(`Changing adapter in ${blue(configFile)}`);
101856
+ transformFile(configFile, {
101855
101857
  visitImportDeclaration: function(n) {
101856
101858
  const importSource = n.value.source;
101857
101859
  if (importSource.value === "@sveltejs/adapter-auto") {
@@ -102264,7 +102266,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
102264
102266
  var import_node_assert6 = __toESM(require("node:assert"));
102265
102267
 
102266
102268
  // ../wrangler/package.json
102267
- var version2 = "4.108.0";
102269
+ var version2 = "4.109.0";
102268
102270
 
102269
102271
  // src/git.ts
102270
102272
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.70.9",
3
+ "version": "2.70.10",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -31,7 +31,7 @@
31
31
  "@babel/parser": "^7.21.3",
32
32
  "@babel/types": "^7.21.4",
33
33
  "@clack/prompts": "^1.2.0",
34
- "@cloudflare/workers-types": "^5.20260706.1",
34
+ "@cloudflare/workers-types": "^5.20260708.1",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
37
37
  "@types/deepmerge": "^2.2.0",
@@ -74,10 +74,10 @@
74
74
  "@cloudflare/cli-shared-helpers": "0.1.12",
75
75
  "@cloudflare/codemod": "1.1.0",
76
76
  "@cloudflare/mock-npm-registry": "0.0.0",
77
- "@cloudflare/vite-plugin": "1.43.2",
77
+ "@cloudflare/vite-plugin": "1.43.3",
78
78
  "@cloudflare/workers-tsconfig": "0.0.0",
79
79
  "@cloudflare/workers-utils": "0.25.1",
80
- "wrangler": "4.108.0"
80
+ "wrangler": "4.109.0"
81
81
  },
82
82
  "engines": {
83
83
  "node": ">=22.0.0"
@@ -27,16 +27,19 @@ const configure = async (ctx: C3Context) => {
27
27
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`,
28
28
  });
29
29
 
30
- updateSvelteConfig();
30
+ updateViteConfig(ctx);
31
31
  updatePlaywrightConfig(usesTypescript(ctx));
32
32
  updateTypeDefinitions(ctx);
33
33
  };
34
34
 
35
- const updateSvelteConfig = () => {
36
- // All we need to do is change the import statement in svelte.config.js
37
- updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
35
+ const updateViteConfig = (ctx: C3Context) => {
36
+ // As of `sv` 0.16, the adapter is configured in the Vite config rather than
37
+ // in `svelte.config.js`, so all we need to do is change the adapter import
38
+ // statement there.
39
+ const configFile = usesTypescript(ctx) ? "vite.config.ts" : "vite.config.js";
40
+ updateStatus(`Changing adapter in ${blue(configFile)}`);
38
41
 
39
- transformFile("svelte.config.js", {
42
+ transformFile(configFile, {
40
43
  visitImportDeclaration: function (n) {
41
44
  // importSource is the `x` in `import y from "x"`
42
45
  const importSource = n.value.source;
@@ -26,15 +26,18 @@ const configure = async (ctx: C3Context) => {
26
26
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`,
27
27
  });
28
28
 
29
- updateSvelteConfig();
29
+ updateViteConfig(ctx);
30
30
  updateTypeDefinitions(ctx);
31
31
  };
32
32
 
33
- const updateSvelteConfig = () => {
34
- // All we need to do is change the import statement in svelte.config.js
35
- updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
33
+ const updateViteConfig = (ctx: C3Context) => {
34
+ // As of `sv` 0.16, the adapter is configured in the Vite config rather than
35
+ // in `svelte.config.js`, so all we need to do is change the adapter import
36
+ // statement there.
37
+ const configFile = usesTypescript(ctx) ? "vite.config.ts" : "vite.config.js";
38
+ updateStatus(`Changing adapter in ${blue(configFile)}`);
36
39
 
37
- transformFile("svelte.config.js", {
40
+ transformFile(configFile, {
38
41
  visitImportDeclaration: function (n) {
39
42
  // importSource is the `x` in `import y from "x"`
40
43
  const importSource = n.value.source;