create-cloudflare 2.37.2 → 2.37.4

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
@@ -73294,7 +73294,7 @@ var Yargs = YargsFactory(esm_default);
73294
73294
  var yargs_default = Yargs;
73295
73295
 
73296
73296
  // package.json
73297
- var version = "2.37.2";
73297
+ var version = "2.37.4";
73298
73298
 
73299
73299
  // src/metrics.ts
73300
73300
  var import_node_async_hooks = require("node:async_hooks");
@@ -75364,7 +75364,7 @@ var package_default = {
75364
75364
  "create-analog": "1.8.1",
75365
75365
  "@angular/create": "19.1.2",
75366
75366
  "create-docusaurus": "3.7.0",
75367
- "create-hono": "0.14.3",
75367
+ "create-hono": "0.15.2",
75368
75368
  "create-next-app": "15.1.5",
75369
75369
  "create-qwik": "1.12.0",
75370
75370
  "create-vite": "6.1.1",
@@ -75819,7 +75819,7 @@ var generate6 = async (ctx) => {
75819
75819
  };
75820
75820
  var configure3 = async () => {
75821
75821
  const packages = [
75822
- "@opennextjs/cloudflare@0.3.x",
75822
+ "@opennextjs/cloudflare@0.4.x",
75823
75823
  "@cloudflare/workers-types"
75824
75824
  ];
75825
75825
  await installPackages(packages, {
@@ -75827,6 +75827,20 @@ var configure3 = async () => {
75827
75827
  startText: "Adding the Cloudflare adapter",
75828
75828
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
75829
75829
  });
75830
+ updateNextConfig();
75831
+ };
75832
+ var updateNextConfig = () => {
75833
+ const s = spinner();
75834
+ const configFile = "next.config.mjs";
75835
+ s.start(`Updating \`${configFile}\``);
75836
+ const configContent = readFile(configFile);
75837
+ const updatedConfigFile = configContent + `
75838
+ // added by create cloudflare to enable calling \`getCloudflareContext()\` in \`next dev\`
75839
+ import { initOpenNextCloudflareForDev } from '@opennextjs/cloudflare';
75840
+ initOpenNextCloudflareForDev();
75841
+ `.replace(/\n\t*/g, "\n");
75842
+ writeFile2(configFile, updatedConfigFile);
75843
+ s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75830
75844
  };
75831
75845
  var c3_default9 = {
75832
75846
  configVersion: 1,
@@ -75868,13 +75882,17 @@ async function getWorkerdCompatibilityDate() {
75868
75882
  const match = latestWorkerdVersion.match(/\d+\.(\d{4})(\d{2})(\d{2})\.\d+/);
75869
75883
  if (match) {
75870
75884
  const [, year, month, date] = match;
75871
- const compatDate = `${year}-${month}-${date}`;
75872
- s.stop(`${brandColor("compatibility date")} ${dim(compatDate)}`);
75873
- return compatDate;
75885
+ let compatDate = /* @__PURE__ */ new Date(`${year}-${month}-${date}`);
75886
+ if (compatDate.getTime() > Date.now()) {
75887
+ compatDate = new Date(Date.now());
75888
+ }
75889
+ const compatDateString = compatDate.toISOString().slice(0, 10);
75890
+ s.stop(`${brandColor("compatibility date")} ${dim(compatDateString)}`);
75891
+ return compatDateString;
75874
75892
  }
75875
75893
  } catch {
75876
75894
  }
75877
- const fallbackDate = "2023-05-18";
75895
+ const fallbackDate = "2024-11-11";
75878
75896
  s.stop(
75879
75897
  `${brandColor("compatibility date")} ${dim(
75880
75898
  ` Could not find workerd date, falling back to ${fallbackDate}`
@@ -76807,7 +76825,7 @@ var generate19 = async (ctx) => {
76807
76825
  writeFile2((0, import_path10.join)(ctx.project.path, "wrangler.json"), wranglerConfig);
76808
76826
  updateStatus("Created wrangler.json file");
76809
76827
  };
76810
- var updateNextConfig = (usesTs) => {
76828
+ var updateNextConfig2 = (usesTs) => {
76811
76829
  const s = spinner();
76812
76830
  const configFile = `next.config.${usesTs ? "ts" : "mjs"}`;
76813
76831
  s.start(`Updating \`${configFile}\``);
@@ -76850,7 +76868,7 @@ var configure13 = async (ctx) => {
76850
76868
  if (installEslintPlugin) {
76851
76869
  await writeEslintrc(ctx);
76852
76870
  }
76853
- updateNextConfig(usesTs);
76871
+ updateNextConfig2(usesTs);
76854
76872
  copyFile(
76855
76873
  (0, import_path10.join)(getTemplatePath(ctx), "README.md"),
76856
76874
  (0, import_path10.join)(projectPath, "README.md")
@@ -77718,7 +77736,7 @@ var config26 = {
77718
77736
  var c3_default36 = config26;
77719
77737
 
77720
77738
  // ../wrangler/package.json
77721
- var version2 = "3.104.0";
77739
+ var version2 = "3.107.0";
77722
77740
 
77723
77741
  // src/git.ts
77724
77742
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.37.2",
3
+ "version": "2.37.4",
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.20241230.0",
33
+ "@cloudflare/workers-types": "^4.20250121.0",
34
34
  "@iarna/toml": "^3.0.0",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
@@ -38,7 +38,7 @@
38
38
  "@types/degit": "^2.8.6",
39
39
  "@types/dns2": "^2.0.3",
40
40
  "@types/esprima": "^4.0.3",
41
- "@types/node": "^18.19.59",
41
+ "@types/node": "^18.19.71",
42
42
  "@types/semver": "^7.5.1",
43
43
  "@types/which-pm-runs": "^1.0.0",
44
44
  "@types/yargs": "^17.0.22",
@@ -60,7 +60,7 @@
60
60
  "open": "^8.4.0",
61
61
  "recast": "^0.22.0",
62
62
  "semver": "^7.5.1",
63
- "typescript": "~5.6.3",
63
+ "typescript": "^5.7.2",
64
64
  "undici": "^5.28.4",
65
65
  "vite": "^5.0.12",
66
66
  "vite-tsconfig-paths": "^4.0.8",
@@ -71,7 +71,7 @@
71
71
  "yargs": "^17.7.2",
72
72
  "@cloudflare/cli": "1.1.1",
73
73
  "@cloudflare/workers-tsconfig": "0.0.0",
74
- "wrangler": "3.104.0",
74
+ "wrangler": "3.107.0",
75
75
  "@cloudflare/eslint-config-worker": "1.1.0"
76
76
  },
77
77
  "engines": {
@@ -96,7 +96,7 @@
96
96
  "test:e2e:yarn": "pnpm run build && cross-env TEST_PM=yarn vitest run --config ./vitest-e2e.config.mts",
97
97
  "test:unit": "vitest run --config ./vitest.config.mts",
98
98
  "test:unit:watch": "vitest --config ./vitest.config.mts",
99
- "watch": "node -r esbuild-register scripts/build.ts --watch",
99
+ "dev": "node -r esbuild-register scripts/build.ts --watch",
100
100
  "test:ci": "vitest run --config ./vitest.config.mts"
101
101
  }
102
102
  }
@@ -0,0 +1,172 @@
1
+ # Logs
2
+
3
+ logs
4
+ _.log
5
+ npm-debug.log_
6
+ yarn-debug.log*
7
+ yarn-error.log*
8
+ lerna-debug.log*
9
+ .pnpm-debug.log*
10
+
11
+ # Diagnostic reports (https://nodejs.org/api/report.html)
12
+
13
+ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
14
+
15
+ # Runtime data
16
+
17
+ pids
18
+ _.pid
19
+ _.seed
20
+ \*.pid.lock
21
+
22
+ # Directory for instrumented libs generated by jscoverage/JSCover
23
+
24
+ lib-cov
25
+
26
+ # Coverage directory used by tools like istanbul
27
+
28
+ coverage
29
+ \*.lcov
30
+
31
+ # nyc test coverage
32
+
33
+ .nyc_output
34
+
35
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
36
+
37
+ .grunt
38
+
39
+ # Bower dependency directory (https://bower.io/)
40
+
41
+ bower_components
42
+
43
+ # node-waf configuration
44
+
45
+ .lock-wscript
46
+
47
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
48
+
49
+ build/Release
50
+
51
+ # Dependency directories
52
+
53
+ node_modules/
54
+ jspm_packages/
55
+
56
+ # Snowpack dependency directory (https://snowpack.dev/)
57
+
58
+ web_modules/
59
+
60
+ # TypeScript cache
61
+
62
+ \*.tsbuildinfo
63
+
64
+ # Optional npm cache directory
65
+
66
+ .npm
67
+
68
+ # Optional eslint cache
69
+
70
+ .eslintcache
71
+
72
+ # Optional stylelint cache
73
+
74
+ .stylelintcache
75
+
76
+ # Microbundle cache
77
+
78
+ .rpt2_cache/
79
+ .rts2_cache_cjs/
80
+ .rts2_cache_es/
81
+ .rts2_cache_umd/
82
+
83
+ # Optional REPL history
84
+
85
+ .node_repl_history
86
+
87
+ # Output of 'npm pack'
88
+
89
+ \*.tgz
90
+
91
+ # Yarn Integrity file
92
+
93
+ .yarn-integrity
94
+
95
+ # dotenv environment variable files
96
+
97
+ .env
98
+ .env.development.local
99
+ .env.test.local
100
+ .env.production.local
101
+ .env.local
102
+
103
+ # parcel-bundler cache (https://parceljs.org/)
104
+
105
+ .cache
106
+ .parcel-cache
107
+
108
+ # Next.js build output
109
+
110
+ .next
111
+ out
112
+
113
+ # Nuxt.js build / generate output
114
+
115
+ .nuxt
116
+ dist
117
+
118
+ # Gatsby files
119
+
120
+ .cache/
121
+
122
+ # Comment in the public line in if your project uses Gatsby and not Next.js
123
+
124
+ # https://nextjs.org/blog/next-9-1#public-directory-support
125
+
126
+ # public
127
+
128
+ # vuepress build output
129
+
130
+ .vuepress/dist
131
+
132
+ # vuepress v2.x temp and cache directory
133
+
134
+ .temp
135
+ .cache
136
+
137
+ # Docusaurus cache and generated files
138
+
139
+ .docusaurus
140
+
141
+ # Serverless directories
142
+
143
+ .serverless/
144
+
145
+ # FuseBox cache
146
+
147
+ .fusebox/
148
+
149
+ # DynamoDB Local files
150
+
151
+ .dynamodb/
152
+
153
+ # TernJS port file
154
+
155
+ .tern-port
156
+
157
+ # Stores VSCode versions used for testing VSCode extensions
158
+
159
+ .vscode-test
160
+
161
+ # yarn v2
162
+
163
+ .yarn/cache
164
+ .yarn/unplugged
165
+ .yarn/build-state.yml
166
+ .yarn/install-state.gz
167
+ .pnp.\*
168
+
169
+ # wrangler project
170
+
171
+ .dev.vars
172
+ .wrangler/
@@ -0,0 +1,172 @@
1
+ # Logs
2
+
3
+ logs
4
+ _.log
5
+ npm-debug.log_
6
+ yarn-debug.log*
7
+ yarn-error.log*
8
+ lerna-debug.log*
9
+ .pnpm-debug.log*
10
+
11
+ # Diagnostic reports (https://nodejs.org/api/report.html)
12
+
13
+ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
14
+
15
+ # Runtime data
16
+
17
+ pids
18
+ _.pid
19
+ _.seed
20
+ \*.pid.lock
21
+
22
+ # Directory for instrumented libs generated by jscoverage/JSCover
23
+
24
+ lib-cov
25
+
26
+ # Coverage directory used by tools like istanbul
27
+
28
+ coverage
29
+ \*.lcov
30
+
31
+ # nyc test coverage
32
+
33
+ .nyc_output
34
+
35
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
36
+
37
+ .grunt
38
+
39
+ # Bower dependency directory (https://bower.io/)
40
+
41
+ bower_components
42
+
43
+ # node-waf configuration
44
+
45
+ .lock-wscript
46
+
47
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
48
+
49
+ build/Release
50
+
51
+ # Dependency directories
52
+
53
+ node_modules/
54
+ jspm_packages/
55
+
56
+ # Snowpack dependency directory (https://snowpack.dev/)
57
+
58
+ web_modules/
59
+
60
+ # TypeScript cache
61
+
62
+ \*.tsbuildinfo
63
+
64
+ # Optional npm cache directory
65
+
66
+ .npm
67
+
68
+ # Optional eslint cache
69
+
70
+ .eslintcache
71
+
72
+ # Optional stylelint cache
73
+
74
+ .stylelintcache
75
+
76
+ # Microbundle cache
77
+
78
+ .rpt2_cache/
79
+ .rts2_cache_cjs/
80
+ .rts2_cache_es/
81
+ .rts2_cache_umd/
82
+
83
+ # Optional REPL history
84
+
85
+ .node_repl_history
86
+
87
+ # Output of 'npm pack'
88
+
89
+ \*.tgz
90
+
91
+ # Yarn Integrity file
92
+
93
+ .yarn-integrity
94
+
95
+ # dotenv environment variable files
96
+
97
+ .env
98
+ .env.development.local
99
+ .env.test.local
100
+ .env.production.local
101
+ .env.local
102
+
103
+ # parcel-bundler cache (https://parceljs.org/)
104
+
105
+ .cache
106
+ .parcel-cache
107
+
108
+ # Next.js build output
109
+
110
+ .next
111
+ out
112
+
113
+ # Nuxt.js build / generate output
114
+
115
+ .nuxt
116
+ dist
117
+
118
+ # Gatsby files
119
+
120
+ .cache/
121
+
122
+ # Comment in the public line in if your project uses Gatsby and not Next.js
123
+
124
+ # https://nextjs.org/blog/next-9-1#public-directory-support
125
+
126
+ # public
127
+
128
+ # vuepress build output
129
+
130
+ .vuepress/dist
131
+
132
+ # vuepress v2.x temp and cache directory
133
+
134
+ .temp
135
+ .cache
136
+
137
+ # Docusaurus cache and generated files
138
+
139
+ .docusaurus
140
+
141
+ # Serverless directories
142
+
143
+ .serverless/
144
+
145
+ # FuseBox cache
146
+
147
+ .fusebox/
148
+
149
+ # DynamoDB Local files
150
+
151
+ .dynamodb/
152
+
153
+ # TernJS port file
154
+
155
+ .tern-port
156
+
157
+ # Stores VSCode versions used for testing VSCode extensions
158
+
159
+ .vscode-test
160
+
161
+ # yarn v2
162
+
163
+ .yarn/cache
164
+ .yarn/unplugged
165
+ .yarn/build-state.yml
166
+ .yarn/install-state.gz
167
+ .pnp.\*
168
+
169
+ # wrangler project
170
+
171
+ .dev.vars
172
+ .wrangler/
@@ -0,0 +1,172 @@
1
+ # Logs
2
+
3
+ logs
4
+ _.log
5
+ npm-debug.log_
6
+ yarn-debug.log*
7
+ yarn-error.log*
8
+ lerna-debug.log*
9
+ .pnpm-debug.log*
10
+
11
+ # Diagnostic reports (https://nodejs.org/api/report.html)
12
+
13
+ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
14
+
15
+ # Runtime data
16
+
17
+ pids
18
+ _.pid
19
+ _.seed
20
+ \*.pid.lock
21
+
22
+ # Directory for instrumented libs generated by jscoverage/JSCover
23
+
24
+ lib-cov
25
+
26
+ # Coverage directory used by tools like istanbul
27
+
28
+ coverage
29
+ \*.lcov
30
+
31
+ # nyc test coverage
32
+
33
+ .nyc_output
34
+
35
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
36
+
37
+ .grunt
38
+
39
+ # Bower dependency directory (https://bower.io/)
40
+
41
+ bower_components
42
+
43
+ # node-waf configuration
44
+
45
+ .lock-wscript
46
+
47
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
48
+
49
+ build/Release
50
+
51
+ # Dependency directories
52
+
53
+ node_modules/
54
+ jspm_packages/
55
+
56
+ # Snowpack dependency directory (https://snowpack.dev/)
57
+
58
+ web_modules/
59
+
60
+ # TypeScript cache
61
+
62
+ \*.tsbuildinfo
63
+
64
+ # Optional npm cache directory
65
+
66
+ .npm
67
+
68
+ # Optional eslint cache
69
+
70
+ .eslintcache
71
+
72
+ # Optional stylelint cache
73
+
74
+ .stylelintcache
75
+
76
+ # Microbundle cache
77
+
78
+ .rpt2_cache/
79
+ .rts2_cache_cjs/
80
+ .rts2_cache_es/
81
+ .rts2_cache_umd/
82
+
83
+ # Optional REPL history
84
+
85
+ .node_repl_history
86
+
87
+ # Output of 'npm pack'
88
+
89
+ \*.tgz
90
+
91
+ # Yarn Integrity file
92
+
93
+ .yarn-integrity
94
+
95
+ # dotenv environment variable files
96
+
97
+ .env
98
+ .env.development.local
99
+ .env.test.local
100
+ .env.production.local
101
+ .env.local
102
+
103
+ # parcel-bundler cache (https://parceljs.org/)
104
+
105
+ .cache
106
+ .parcel-cache
107
+
108
+ # Next.js build output
109
+
110
+ .next
111
+ out
112
+
113
+ # Nuxt.js build / generate output
114
+
115
+ .nuxt
116
+ dist
117
+
118
+ # Gatsby files
119
+
120
+ .cache/
121
+
122
+ # Comment in the public line in if your project uses Gatsby and not Next.js
123
+
124
+ # https://nextjs.org/blog/next-9-1#public-directory-support
125
+
126
+ # public
127
+
128
+ # vuepress build output
129
+
130
+ .vuepress/dist
131
+
132
+ # vuepress v2.x temp and cache directory
133
+
134
+ .temp
135
+ .cache
136
+
137
+ # Docusaurus cache and generated files
138
+
139
+ .docusaurus
140
+
141
+ # Serverless directories
142
+
143
+ .serverless/
144
+
145
+ # FuseBox cache
146
+
147
+ .fusebox/
148
+
149
+ # DynamoDB Local files
150
+
151
+ .dynamodb/
152
+
153
+ # TernJS port file
154
+
155
+ .tern-port
156
+
157
+ # Stores VSCode versions used for testing VSCode extensions
158
+
159
+ .vscode-test
160
+
161
+ # yarn v2
162
+
163
+ .yarn/cache
164
+ .yarn/unplugged
165
+ .yarn/build-state.yml
166
+ .yarn/install-state.gz
167
+ .pnp.\*
168
+
169
+ # wrangler project
170
+
171
+ .dev.vars
172
+ .wrangler/
@@ -0,0 +1,68 @@
1
+ # Logs
2
+
3
+ logs
4
+ _.log
5
+ npm-debug.log_
6
+ yarn-debug.log*
7
+ yarn-error.log*
8
+ lerna-debug.log*
9
+ .pnpm-debug.log*
10
+
11
+ # Diagnostic reports (https://nodejs.org/api/report.html)
12
+
13
+ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
14
+
15
+ # Runtime data
16
+
17
+ pids
18
+ _.pid
19
+ _.seed
20
+ \*.pid.lock
21
+
22
+ # Dependency directories
23
+
24
+ node_modules/
25
+ jspm_packages/
26
+
27
+ # TypeScript cache
28
+
29
+ \*.tsbuildinfo
30
+
31
+ # Optional npm cache directory
32
+
33
+ .npm
34
+
35
+ # Optional eslint cache
36
+
37
+ .eslintcache
38
+
39
+ # Optional stylelint cache
40
+
41
+ .stylelintcache
42
+
43
+ # Optional REPL history
44
+
45
+ .node_repl_history
46
+
47
+ # Output of 'npm pack'
48
+
49
+ \*.tgz
50
+
51
+ # dotenv environment variable files
52
+
53
+ .env
54
+ .env.development.local
55
+ .env.test.local
56
+ .env.production.local
57
+ .env.local
58
+
59
+ # public
60
+
61
+ # Stores VSCode versions used for testing VSCode extensions
62
+
63
+ .vscode-test
64
+
65
+ # wrangler project
66
+
67
+ .dev.vars
68
+ .wrangler/