create-cloudflare 2.74.4 → 2.74.5

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
@@ -98328,7 +98328,7 @@ function formatZodError(error62) {
98328
98328
  }
98329
98329
  __name(formatZodError, "formatZodError");
98330
98330
 
98331
- // ../workers-utils/dist/chunk-2HLTAS5V.mjs
98331
+ // ../workers-utils/dist/chunk-AAQI36FL.mjs
98332
98332
  var import_node_module6 = require("node:module");
98333
98333
 
98334
98334
  // ../workers-utils/dist/chunk-M3RITKR3.mjs
@@ -98377,7 +98377,7 @@ function dedent(templ) {
98377
98377
  __name(dedent, "dedent");
98378
98378
  var esm_default = dedent;
98379
98379
 
98380
- // ../workers-utils/dist/chunk-2HLTAS5V.mjs
98380
+ // ../workers-utils/dist/chunk-AAQI36FL.mjs
98381
98381
  init_chunk_U6NEESU5();
98382
98382
  var import_node_fs = require("node:fs");
98383
98383
  var import_node_path = __toESM(require("node:path"), 1);
@@ -98561,7 +98561,7 @@ function validateDurableObjectContainerApplications(config50, containers = getDu
98561
98561
  { telemetryMessage: "no DO defined that matches container class_name" }
98562
98562
  );
98563
98563
  }
98564
- if (maybeBoundDO?.script_name !== void 0) {
98564
+ if (maybeBoundDO?.script_name !== void 0 && maybeBoundDO.script_name !== config50.name) {
98565
98565
  throw new UserError(
98566
98566
  `The container ${container.name} is referencing the durable object ${container.class_name}, which appears to be defined on the ${maybeBoundDO.script_name} Worker instead (via the 'script_name' field). You cannot configure a container on a Durable Object that is defined in another Worker.`,
98567
98567
  {
@@ -108224,8 +108224,12 @@ var validateAnalyticsEngineBinding = /* @__PURE__ */ __name((diagnostics, field,
108224
108224
  }
108225
108225
  validateAdditionalProperties(diagnostics, field, Object.keys(value), [
108226
108226
  "binding",
108227
- "dataset"
108227
+ "dataset",
108228
+ "remote"
108228
108229
  ]);
108230
+ if (!isRemoteValid(value, field, diagnostics)) {
108231
+ isValid = false;
108232
+ }
108229
108233
  return isValid;
108230
108234
  }, "validateAnalyticsEngineBinding");
108231
108235
  var validateWorkerNamespaceBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
@@ -110280,7 +110284,6 @@ var BINDING_LOCAL_SUPPORT = {
110280
110284
  unsafe_hello_world: "local-only",
110281
110285
  durable_object_namespace: "local-only",
110282
110286
  fetcher: "local-only",
110283
- analytics_engine: "local-only",
110284
110287
  secrets_store_secret: "local-only",
110285
110288
  ratelimit: "local-only",
110286
110289
  worker_loader: "local-only",
@@ -110298,6 +110301,7 @@ var BINDING_LOCAL_SUPPORT = {
110298
110301
  // TODO: Miniflare currently ignores `remote: true` on queues, tracked in #13727.
110299
110302
  queue: "local-and-remote",
110300
110303
  flagship: "local-and-remote",
110304
+ analytics_engine: "local-and-remote",
110301
110305
  vectorize: "remote",
110302
110306
  mtls_certificate: "remote",
110303
110307
  dispatch_namespace: "remote",
@@ -111841,12 +111845,14 @@ function printBindings(bindings, options) {
111841
111845
  }
111842
111846
  if (analytics_engine_datasets.length > 0) {
111843
111847
  output2.push(
111844
- ...analytics_engine_datasets.map(({ binding, dataset }) => {
111848
+ ...analytics_engine_datasets.map(({ binding, dataset, remote }) => {
111845
111849
  return {
111846
111850
  name: binding,
111847
111851
  type: getBindingTypeFriendlyName("analytics_engine"),
111848
111852
  value: dataset ?? binding,
111849
- mode: getMode({ isSimulatedLocally: true })
111853
+ mode: getMode({
111854
+ isSimulatedLocally: context.remoteBindingsDisabled || !remote
111855
+ })
111850
111856
  };
111851
111857
  })
111852
111858
  );
@@ -114425,7 +114431,7 @@ function leadingMigrationNumber(relativePath) {
114425
114431
  __name(leadingMigrationNumber, "leadingMigrationNumber");
114426
114432
 
114427
114433
  // ../cli/dist/gitignore.mjs
114428
- function maybeAppendWranglerToGitIgnoreLikeFile(filePath) {
114434
+ function maybeAppendWranglerToGitIgnoreLikeFile(filePath, { additionalEntries = [], requireEnvWildcard = false } = {}) {
114429
114435
  const filePreExisted = (0, import_node_fs5.existsSync)(filePath);
114430
114436
  if (!filePreExisted) (0, import_node_fs5.writeFileSync)(filePath, "");
114431
114437
  const existingGitIgnoreContent = readFileSync(filePath);
@@ -114434,8 +114440,10 @@ function maybeAppendWranglerToGitIgnoreLikeFile(filePath) {
114434
114440
  if (!hasDotWrangler) wranglerGitIgnoreFilesToAdd.push(".wrangler");
114435
114441
  if (!existingGitIgnoreContent.match(/^\/?\.dev\.vars\*(\s|$)/m)) wranglerGitIgnoreFilesToAdd.push(".dev.vars*");
114436
114442
  if (!existingGitIgnoreContent.match(/^!\/?\.dev\.vars\.example(\s|$)/m)) wranglerGitIgnoreFilesToAdd.push("!.dev.vars.example");
114437
- if (!existingGitIgnoreContent.match(/^\/?\.env\*?(\..*?)?(\s|$)/m)) wranglerGitIgnoreFilesToAdd.push(".env*");
114443
+ if (!existingGitIgnoreContent.match(requireEnvWildcard ? /^\.env\*(\s|$)/m : /^\/?\.env\*?(\..*?)?(\s|$)/m)) wranglerGitIgnoreFilesToAdd.push(".env*");
114438
114444
  if (!existingGitIgnoreContent.match(/^!\/?\.env\.example(\s|$)/m)) wranglerGitIgnoreFilesToAdd.push("!.env.example");
114445
+ const existingLines = new Set(existingGitIgnoreContent.split(/\r?\n/).map((line) => line.trim()));
114446
+ for (const entry of additionalEntries) if (!existingLines.has(entry) && !wranglerGitIgnoreFilesToAdd.includes(entry)) wranglerGitIgnoreFilesToAdd.push(entry);
114439
114447
  if (wranglerGitIgnoreFilesToAdd.length === 0) return;
114440
114448
  const s = spinner();
114441
114449
  s.start(`Adding Wrangler files to the ${(0, import_node_path6.basename)(filePath)} file`);
@@ -119314,7 +119322,7 @@ var Yargs = YargsFactory(esm_default2);
119314
119322
  var yargs_default = Yargs;
119315
119323
 
119316
119324
  // package.json
119317
- var version2 = "2.74.4";
119325
+ var version2 = "2.74.5";
119318
119326
 
119319
119327
  // src/metrics.ts
119320
119328
  var import_node_async_hooks = require("node:async_hooks");
@@ -124811,7 +124819,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
124811
124819
  var import_node_assert7 = __toESM(require("node:assert"));
124812
124820
 
124813
124821
  // ../wrangler/package.json
124814
- var version3 = "4.153.0";
124822
+ var version3 = "4.156.0";
124815
124823
 
124816
124824
  // src/git.ts
124817
124825
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.74.4",
3
+ "version": "2.74.5",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -71,12 +71,12 @@
71
71
  "which-pm-runs": "^1.1.0",
72
72
  "wrap-ansi": "^9.0.0",
73
73
  "yargs": "^17.7.2",
74
+ "@cloudflare/cli-shared-helpers": "0.3.0",
74
75
  "@cloudflare/shared-ast-primitives": "1.1.0",
75
- "@cloudflare/workers-tsconfig": "0.0.0",
76
76
  "@cloudflare/mock-npm-registry": "0.0.0",
77
- "@cloudflare/cli-shared-helpers": "0.2.9",
78
- "@cloudflare/workers-utils": "0.49.0",
79
- "wrangler": "4.153.0"
77
+ "@cloudflare/workers-utils": "0.50.1",
78
+ "@cloudflare/workers-tsconfig": "0.0.0",
79
+ "wrangler": "4.156.0"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22.0.0"
@@ -0,0 +1,167 @@
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
+ # parcel-bundler cache (https://parceljs.org/)
96
+
97
+ .cache
98
+ .parcel-cache
99
+
100
+ # Next.js build output
101
+
102
+ .next
103
+ out
104
+
105
+ # Nuxt.js build / generate output
106
+
107
+ .nuxt
108
+ dist
109
+
110
+ # Gatsby files
111
+
112
+ .cache/
113
+
114
+ # Comment in the public line in if your project uses Gatsby and not Next.js
115
+
116
+ # https://nextjs.org/blog/next-9-1#public-directory-support
117
+
118
+ # public
119
+
120
+ # vuepress build output
121
+
122
+ .vuepress/dist
123
+
124
+ # vuepress v2.x temp and cache directory
125
+
126
+ .temp
127
+ .cache
128
+
129
+ # Docusaurus cache and generated files
130
+
131
+ .docusaurus
132
+
133
+ # Serverless directories
134
+
135
+ .serverless/
136
+
137
+ # FuseBox cache
138
+
139
+ .fusebox/
140
+
141
+ # DynamoDB Local files
142
+
143
+ .dynamodb/
144
+
145
+ # TernJS port file
146
+
147
+ .tern-port
148
+
149
+ # Stores VSCode versions used for testing VSCode extensions
150
+
151
+ .vscode-test
152
+
153
+ # yarn v2
154
+
155
+ .yarn/cache
156
+ .yarn/unplugged
157
+ .yarn/build-state.yml
158
+ .yarn/install-state.gz
159
+ .pnp.\*
160
+
161
+ # wrangler project
162
+
163
+ .dev.vars*
164
+ !.dev.vars.example
165
+ .env*
166
+ !.env.example
167
+ .wrangler/
@@ -0,0 +1,167 @@
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
+ # parcel-bundler cache (https://parceljs.org/)
96
+
97
+ .cache
98
+ .parcel-cache
99
+
100
+ # Next.js build output
101
+
102
+ .next
103
+ out
104
+
105
+ # Nuxt.js build / generate output
106
+
107
+ .nuxt
108
+ dist
109
+
110
+ # Gatsby files
111
+
112
+ .cache/
113
+
114
+ # Comment in the public line in if your project uses Gatsby and not Next.js
115
+
116
+ # https://nextjs.org/blog/next-9-1#public-directory-support
117
+
118
+ # public
119
+
120
+ # vuepress build output
121
+
122
+ .vuepress/dist
123
+
124
+ # vuepress v2.x temp and cache directory
125
+
126
+ .temp
127
+ .cache
128
+
129
+ # Docusaurus cache and generated files
130
+
131
+ .docusaurus
132
+
133
+ # Serverless directories
134
+
135
+ .serverless/
136
+
137
+ # FuseBox cache
138
+
139
+ .fusebox/
140
+
141
+ # DynamoDB Local files
142
+
143
+ .dynamodb/
144
+
145
+ # TernJS port file
146
+
147
+ .tern-port
148
+
149
+ # Stores VSCode versions used for testing VSCode extensions
150
+
151
+ .vscode-test
152
+
153
+ # yarn v2
154
+
155
+ .yarn/cache
156
+ .yarn/unplugged
157
+ .yarn/build-state.yml
158
+ .yarn/install-state.gz
159
+ .pnp.\*
160
+
161
+ # wrangler project
162
+
163
+ .dev.vars*
164
+ !.dev.vars.example
165
+ .env*
166
+ !.env.example
167
+ .wrangler/