create-cloudflare 2.28.0 → 2.28.1

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.
Files changed (41) hide show
  1. package/dist/cli.js +9 -12
  2. package/package.json +2 -2
  3. package/templates-experimental/angular/c3.ts +6 -10
  4. package/templates-experimental/angular/templates/tools/alter-polyfills.mjs +12 -7
  5. package/templates-experimental/angular/templates/wrangler.toml +2 -2
  6. package/templates-experimental/astro/templates/wrangler.toml +1 -1
  7. package/templates-experimental/docusaurus/templates/wrangler.toml +1 -1
  8. package/templates-experimental/gatsby/templates/wrangler.toml +1 -1
  9. package/templates-experimental/hello-world-assets-only/templates/wrangler.toml +1 -1
  10. package/templates-experimental/hello-world-durable-object-with-assets/js/wrangler.toml +1 -1
  11. package/templates-experimental/hello-world-durable-object-with-assets/ts/wrangler.toml +1 -1
  12. package/templates-experimental/hello-world-with-assets/js/wrangler.toml +1 -1
  13. package/templates-experimental/hello-world-with-assets/py/wrangler.toml +1 -1
  14. package/templates-experimental/hello-world-with-assets/ts/wrangler.toml +1 -1
  15. package/templates-experimental/nuxt/templates/wrangler.toml +1 -1
  16. package/templates-experimental/qwik/templates/wrangler.toml +1 -1
  17. package/templates-experimental/remix/templates/wrangler.toml +1 -1
  18. package/templates-experimental/solid/templates/wrangler.toml +1 -1
  19. package/templates-experimental/svelte/js/wrangler.toml +1 -1
  20. package/templates-experimental/svelte/ts/wrangler.toml +1 -1
  21. package/templates/common/js/__dot__gitignore +0 -172
  22. package/templates/common/ts/__dot__gitignore +0 -172
  23. package/templates/hello-world/js/__dot__gitignore +0 -172
  24. package/templates/hello-world/py/__dot__gitignore +0 -68
  25. package/templates/hello-world/ts/__dot__gitignore +0 -172
  26. package/templates/hello-world-durable-object/js/__dot__gitignore +0 -172
  27. package/templates/hello-world-durable-object/ts/__dot__gitignore +0 -172
  28. package/templates/openapi/ts/__dot__gitignore +0 -171
  29. package/templates/pre-existing/js/__dot__gitignore +0 -172
  30. package/templates/queues/js/__dot__gitignore +0 -172
  31. package/templates/queues/ts/__dot__gitignore +0 -172
  32. package/templates/scheduled/js/__dot__gitignore +0 -172
  33. package/templates/scheduled/ts/__dot__gitignore +0 -172
  34. package/templates-experimental/angular/templates/src/.assetsignore +0 -4
  35. package/templates-experimental/angular/templates/tools/copy-files.mjs +0 -9
  36. package/templates-experimental/angular/templates/tools/paths.mjs +0 -9
  37. package/templates-experimental/hello-world-durable-object-with-assets/js/__dot__gitignore +0 -172
  38. package/templates-experimental/hello-world-durable-object-with-assets/ts/__dot__gitignore +0 -172
  39. package/templates-experimental/hello-world-with-assets/js/__dot__gitignore +0 -172
  40. package/templates-experimental/hello-world-with-assets/py/__dot__gitignore +0 -68
  41. package/templates-experimental/hello-world-with-assets/ts/__dot__gitignore +0 -172
package/dist/cli.js CHANGED
@@ -74090,7 +74090,7 @@ var Yargs = YargsFactory(esm_default);
74090
74090
  var yargs_default = Yargs;
74091
74091
 
74092
74092
  // package.json
74093
- var version = "2.28.0";
74093
+ var version = "2.28.1";
74094
74094
 
74095
74095
  // src/metrics.ts
74096
74096
  var import_node_async_hooks = require("node:async_hooks");
@@ -74828,7 +74828,7 @@ var usesEslint = (ctx) => {
74828
74828
  var import_node_path3 = require("node:path");
74829
74829
 
74830
74830
  // ../wrangler/package.json
74831
- var version2 = "3.78.8";
74831
+ var version2 = "3.78.9";
74832
74832
 
74833
74833
  // src/git.ts
74834
74834
  var offerGit = async (ctx) => {
@@ -75085,14 +75085,11 @@ var configure = async (ctx) => {
75085
75085
  await installCFWorker();
75086
75086
  };
75087
75087
  async function installCFWorker() {
75088
- await installPackages(
75089
- ["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
75090
- {
75091
- dev: true,
75092
- startText: "Installing adapter dependencies",
75093
- doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
75094
- }
75095
- );
75088
+ await installPackages(["@cloudflare/workers-types", "wrangler"], {
75089
+ dev: true,
75090
+ startText: "Installing adapter dependencies",
75091
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
75092
+ });
75096
75093
  }
75097
75094
  async function updateAppCode() {
75098
75095
  const s = spinner();
@@ -75142,7 +75139,7 @@ var config = {
75142
75139
  scripts: {
75143
75140
  start: `${npm} run build && wrangler dev`,
75144
75141
  build: `ng build && ${npm} run process`,
75145
- process: "node ./tools/copy-files.mjs && node ./tools/alter-polyfills.mjs",
75142
+ process: "node ./tools/alter-polyfills.mjs",
75146
75143
  deploy: `${npm} run build && wrangler deploy`
75147
75144
  }
75148
75145
  })
@@ -79508,7 +79505,7 @@ var hasBinding = (node) => {
79508
79505
  return false;
79509
79506
  }
79510
79507
  for (const key of Object.keys(node)) {
79511
- if (key === "experimental_assets" || key === "assets") {
79508
+ if (key === "assets") {
79512
79509
  continue;
79513
79510
  }
79514
79511
  if (key === "binding" || key === "bindings") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.28.0",
3
+ "version": "2.28.1",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -69,7 +69,7 @@
69
69
  "@cloudflare/cli": "1.1.1",
70
70
  "@cloudflare/eslint-config-worker": "1.1.0",
71
71
  "@cloudflare/workers-tsconfig": "0.0.0",
72
- "wrangler": "3.78.8"
72
+ "wrangler": "3.78.9"
73
73
  },
74
74
  "engines": {
75
75
  "node": ">=18.14.1"
@@ -23,14 +23,11 @@ const configure = async (ctx: C3Context) => {
23
23
  };
24
24
 
25
25
  async function installCFWorker() {
26
- await installPackages(
27
- ["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
28
- {
29
- dev: true,
30
- startText: "Installing adapter dependencies",
31
- doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`,
32
- },
33
- );
26
+ await installPackages(["@cloudflare/workers-types", "wrangler"], {
27
+ dev: true,
28
+ startText: "Installing adapter dependencies",
29
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`,
30
+ });
34
31
  }
35
32
  async function updateAppCode() {
36
33
  const s = spinner();
@@ -93,8 +90,7 @@ const config: TemplateConfig = {
93
90
  scripts: {
94
91
  start: `${npm} run build && wrangler dev`,
95
92
  build: `ng build && ${npm} run process`,
96
- process:
97
- "node ./tools/copy-files.mjs && node ./tools/alter-polyfills.mjs",
93
+ process: "node ./tools/alter-polyfills.mjs",
98
94
  deploy: `${npm} run build && wrangler deploy`,
99
95
  },
100
96
  }),
@@ -1,7 +1,9 @@
1
1
  import fs from "node:fs";
2
2
  import { EOL } from "node:os";
3
3
  import { join } from "node:path";
4
- import { worker } from "./paths.mjs";
4
+ import path from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ const dirname = path.dirname(fileURLToPath(import.meta.url));
5
7
 
6
8
  /**
7
9
  * Split by lines and comment the banner
@@ -10,15 +12,18 @@ import { worker } from "./paths.mjs";
10
12
  * globalThis['require'] ??= createRequire(import.meta.url);
11
13
  * ```
12
14
  */
13
- const serverPolyfillsFile = join(worker, "polyfills.server.mjs");
15
+ const serverPolyfillsFile = join(
16
+ dirname,
17
+ "../dist/server/polyfills.server.mjs"
18
+ );
14
19
  const serverPolyfillsData = fs
15
- .readFileSync(serverPolyfillsFile, "utf8")
16
- .split(/\r?\n/);
20
+ .readFileSync(serverPolyfillsFile, "utf8")
21
+ .split(/\r?\n/);
17
22
 
18
23
  for (let index = 0; index < 2; index++) {
19
- if (serverPolyfillsData[index].includes("createRequire")) {
20
- serverPolyfillsData[index] = "// " + serverPolyfillsData[index];
21
- }
24
+ if (serverPolyfillsData[index].includes("createRequire")) {
25
+ serverPolyfillsData[index] = "// " + serverPolyfillsData[index];
26
+ }
22
27
  }
23
28
 
24
29
  // Add needed polyfills
@@ -1,5 +1,5 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
- main = "./dist/cloudflare/_worker.js"
5
- experimental_assets = { directory = "./dist/cloudflare", binding = "ASSETS" }
4
+ main = "./dist/server/server.mjs"
5
+ assets = { directory = "./dist/browser", binding = "ASSETS" }
@@ -3,4 +3,4 @@ name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  compatibility_flags = ["nodejs_compat_v2"]
5
5
  main = "./dist/_worker.js"
6
- experimental_assets = { directory = "./dist", binding = "ASSETS" }
6
+ assets = { directory = "./dist", binding = "ASSETS" }
@@ -1,4 +1,4 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
- experimental_assets = { directory = "./build" }
4
+ assets = { directory = "./build" }
@@ -1,4 +1,4 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
- experimental_assets = { directory = "./public" }
4
+ assets = { directory = "./public" }
@@ -1,4 +1,4 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
- experimental_assets = { directory = "./public" }
4
+ assets = { directory = "./public" }
@@ -2,7 +2,7 @@
2
2
  name = "<TBD>"
3
3
  main = "src/index.js"
4
4
  compatibility_date = "<TBD>"
5
- experimental_assets = { directory = "./public", binding = "ASSETS" }
5
+ assets = { directory = "./public", binding = "ASSETS" }
6
6
 
7
7
  # Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
8
8
  # Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
@@ -2,7 +2,7 @@
2
2
  name = "<TBD>"
3
3
  main = "src/index.ts"
4
4
  compatibility_date = "<TBD>"
5
- experimental_assets = { directory = "./public", binding = "ASSETS" }
5
+ assets = { directory = "./public", binding = "ASSETS" }
6
6
 
7
7
  # Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
8
8
  # Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
@@ -3,4 +3,4 @@ name = "<TBD>"
3
3
  main = "src/index.js"
4
4
  compatibility_date = "<TBD>"
5
5
  compatibility_flags = ["nodejs_compat"]
6
- experimental_assets = { directory = "./public", binding = "ASSETS" }
6
+ assets = { directory = "./public", binding = "ASSETS" }
@@ -3,4 +3,4 @@ name = "<TBD>"
3
3
  main = "src/entry.py"
4
4
  compatibility_flags = ["python_workers"]
5
5
  compatibility_date = "<TBD>"
6
- experimental_assets = { directory = "./public", binding = "ASSETS" }
6
+ assets = { directory = "./public", binding = "ASSETS" }
@@ -3,4 +3,4 @@ name = "<TBD>"
3
3
  main = "src/index.ts"
4
4
  compatibility_date = "<TBD>"
5
5
  compatibility_flags = ["nodejs_compat"]
6
- experimental_assets = { directory = "./public", binding = "ASSETS" }
6
+ assets = { directory = "./public", binding = "ASSETS" }
@@ -2,4 +2,4 @@
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  main = "./dist/worker/index.js"
5
- experimental_assets = { directory = "./dist/public", binding = "ASSETS" }
5
+ assets = { directory = "./dist/public", binding = "ASSETS" }
@@ -3,4 +3,4 @@ name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  compatibility_flags = ["nodejs_compat"]
5
5
  main = "./dist/_worker.js"
6
- experimental_assets = { directory = "./dist", binding = "ASSET" }
6
+ assets = { directory = "./dist", binding = "ASSET" }
@@ -2,4 +2,4 @@
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  main = "./build/worker/index.js"
5
- experimental_assets = { directory = "./build/client" }
5
+ assets = { directory = "./build/client" }
@@ -3,4 +3,4 @@ name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  compatibility_flags = ["nodejs_compat"]
5
5
  main = "./dist/worker/index.js"
6
- experimental_assets = { directory = "./dist/public", binding = "ASSETS" }
6
+ assets = { directory = "./dist/public", binding = "ASSETS" }
@@ -2,4 +2,4 @@
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  main = ".svelte-kit/cloudflare/_worker.js"
5
- experimental_assets = { directory = ".svelte-kit/cloudflare", binding = "ASSETS" }
5
+ assets = { directory = ".svelte-kit/cloudflare", binding = "ASSETS" }
@@ -2,4 +2,4 @@
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  main = ".svelte-kit/cloudflare/_worker.js"
5
- experimental_assets = { directory = ".svelte-kit/cloudflare", binding = "ASSETS" }
5
+ assets = { directory = ".svelte-kit/cloudflare", binding = "ASSETS" }
@@ -1,172 +0,0 @@
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/
@@ -1,172 +0,0 @@
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/