create-cloudflare 2.73.1 → 2.73.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 CHANGED
@@ -98629,11 +98629,13 @@ var defaultWranglerConfig = {
98629
98629
  containers: void 0,
98630
98630
  send_email: [],
98631
98631
  browser: void 0,
98632
+ analytics: void 0,
98632
98633
  unsafe: {},
98633
98634
  mtls_certificates: [],
98634
98635
  tail_consumers: void 0,
98635
98636
  streaming_tail_consumers: void 0,
98636
98637
  pipelines: [],
98638
+ k2: [],
98637
98639
  vpc_services: [],
98638
98640
  vpc_networks: []
98639
98641
  };
@@ -99074,6 +99076,7 @@ var friendlyBindingNames = {
99074
99076
  analytics_engine_datasets: "Analytics Engine Dataset",
99075
99077
  text_blobs: "Text Blob",
99076
99078
  browser: "Browser Run",
99079
+ analytics: "Analytics SQL",
99077
99080
  ai: "AI",
99078
99081
  images: "Images",
99079
99082
  stream: "Stream",
@@ -99086,6 +99089,7 @@ var friendlyBindingNames = {
99086
99089
  mtls_certificates: "mTLS Certificate",
99087
99090
  workflows: "Workflow",
99088
99091
  pipelines: "Pipeline",
99092
+ k2: "K2 Stream",
99089
99093
  secrets_store_secrets: "Secrets Store Secret",
99090
99094
  artifacts: "Artifacts",
99091
99095
  ratelimits: "Rate Limit",
@@ -99106,6 +99110,7 @@ var bindingTypeFriendlyNames = {
99106
99110
  wasm_module: "Wasm Module",
99107
99111
  text_blob: "Text Blob",
99108
99112
  browser: "Browser Run",
99113
+ analytics: "Analytics SQL",
99109
99114
  ai: "AI",
99110
99115
  images: "Images",
99111
99116
  stream: "Stream",
@@ -99127,6 +99132,7 @@ var bindingTypeFriendlyNames = {
99127
99132
  dispatch_namespace: "Dispatch Namespace",
99128
99133
  mtls_certificate: "mTLS Certificate",
99129
99134
  pipeline: "Pipeline",
99135
+ k2: "K2 Stream",
99130
99136
  secrets_store_secret: "Secrets Store Secret",
99131
99137
  artifacts: "Artifacts",
99132
99138
  logfwdr: "logfwdr",
@@ -100494,6 +100500,16 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
100494
100500
  validateNamedSimpleBinding(envName),
100495
100501
  void 0
100496
100502
  ),
100503
+ analytics: notInheritable(
100504
+ diagnostics,
100505
+ topLevelEnv,
100506
+ rawConfig,
100507
+ rawEnv,
100508
+ envName,
100509
+ "analytics",
100510
+ validateNamedSimpleBinding(envName),
100511
+ void 0
100512
+ ),
100497
100513
  ai: notInheritable(
100498
100514
  diagnostics,
100499
100515
  topLevelEnv,
@@ -100544,6 +100560,16 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
100544
100560
  validateBindingArray(envName, validatePipelineBinding),
100545
100561
  []
100546
100562
  ),
100563
+ k2: notInheritable(
100564
+ diagnostics,
100565
+ topLevelEnv,
100566
+ rawConfig,
100567
+ rawEnv,
100568
+ envName,
100569
+ "k2",
100570
+ validateBindingArray(envName, validateK2Binding),
100571
+ []
100572
+ ),
100547
100573
  secrets_store_secrets: notInheritable(
100548
100574
  diagnostics,
100549
100575
  topLevelEnv,
@@ -101761,6 +101787,7 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
101761
101787
  "data_blob",
101762
101788
  "text_blob",
101763
101789
  "browser",
101790
+ "analytics",
101764
101791
  "ai",
101765
101792
  "ai_search_namespace",
101766
101793
  "ai_search",
@@ -101773,6 +101800,7 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
101773
101800
  "logfwdr",
101774
101801
  "mtls_certificate",
101775
101802
  "pipeline",
101803
+ "k2",
101776
101804
  "worker_loader",
101777
101805
  "vpc_service",
101778
101806
  "flagship",
@@ -102429,9 +102457,9 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
102429
102457
  constraints.jurisdiction,
102430
102458
  "string"
102431
102459
  );
102432
- if (constraints.jurisdiction && !["eu", "fedramp"].includes(constraints.jurisdiction)) {
102460
+ if (constraints.jurisdiction && !["eu", "fedramp", "us"].includes(constraints.jurisdiction)) {
102433
102461
  diagnostics.errors.push(
102434
- `${field}.constraints.jurisdiction must be one of: "eu", "fedramp"`
102462
+ `${field}.constraints.jurisdiction must be one of: "eu", "fedramp", "us"`
102435
102463
  );
102436
102464
  }
102437
102465
  if (validateOptionalTypedArray(
@@ -103724,6 +103752,38 @@ var validatePipelineBinding = /* @__PURE__ */ __name((diagnostics, field, value)
103724
103752
  ]);
103725
103753
  return isValid;
103726
103754
  }, "validatePipelineBinding");
103755
+ var validateK2Binding = /* @__PURE__ */ __name((diagnostics, field, value) => {
103756
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
103757
+ diagnostics.errors.push(
103758
+ `"${field}" bindings should be objects, but got ${JSON.stringify(value)}`
103759
+ );
103760
+ return false;
103761
+ }
103762
+ let isValid = true;
103763
+ if (!isRequiredProperty(value, "binding", "string")) {
103764
+ diagnostics.errors.push(`"${field}" must have a string "binding" field.`);
103765
+ isValid = false;
103766
+ }
103767
+ if (!isRequiredProperty(value, "stream", "string")) {
103768
+ diagnostics.errors.push(`"${field}" must have a string "stream" field.`);
103769
+ isValid = false;
103770
+ }
103771
+ if (!isRemoteValid(value, field, diagnostics)) {
103772
+ isValid = false;
103773
+ }
103774
+ if ("remote" in value && value.remote === false) {
103775
+ diagnostics.errors.push(
103776
+ `"${field}" does not support \`remote: false\`. K2 bindings always access remote resources; omit "remote" or set \`remote: true\`.`
103777
+ );
103778
+ isValid = false;
103779
+ }
103780
+ validateAdditionalProperties(diagnostics, field, Object.keys(value), [
103781
+ "binding",
103782
+ "stream",
103783
+ "remote"
103784
+ ]);
103785
+ return isValid;
103786
+ }, "validateK2Binding");
103727
103787
  var validateSecretsStoreSecretBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
103728
103788
  if (typeof value !== "object" || value === null) {
103729
103789
  diagnostics.errors.push(
@@ -104014,11 +104074,13 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
104014
104074
  "streaming_tail_consumers",
104015
104075
  "unsafe",
104016
104076
  "browser",
104077
+ "analytics",
104017
104078
  "ai",
104018
104079
  "images",
104019
104080
  "stream",
104020
104081
  "media",
104021
104082
  "pipelines",
104083
+ "k2",
104022
104084
  "secrets_store_secrets",
104023
104085
  "artifacts",
104024
104086
  "unsafe_hello_world",
@@ -104168,6 +104230,14 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
104168
104230
  void 0
104169
104231
  ) && isValid;
104170
104232
  }
104233
+ if (previews.analytics !== void 0) {
104234
+ isValid = validateNamedSimpleBinding(envName)(
104235
+ diagnostics,
104236
+ `${field}.analytics`,
104237
+ previews.analytics,
104238
+ void 0
104239
+ ) && isValid;
104240
+ }
104171
104241
  if (previews.ai !== void 0) {
104172
104242
  isValid = validateAIBinding(envName)(
104173
104243
  diagnostics,
@@ -104212,6 +104282,12 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName, configPath) => (di
104212
104282
  previews.secrets_store_secrets,
104213
104283
  void 0
104214
104284
  ) && isValid;
104285
+ isValid = validateBindingArray(envName, validateK2Binding)(
104286
+ diagnostics,
104287
+ `${field}.k2`,
104288
+ previews.k2,
104289
+ void 0
104290
+ ) && isValid;
104215
104291
  isValid = validateBindingArray(envName, validateArtifactsBinding)(
104216
104292
  diagnostics,
104217
104293
  `${field}.artifacts`,
@@ -105348,6 +105424,7 @@ var BINDING_LOCAL_SUPPORT = {
105348
105424
  mtls_certificate: "remote",
105349
105425
  dispatch_namespace: "remote",
105350
105426
  // Reach out to the @cloudflare/wrangler team before adding anything here
105427
+ k2: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
105351
105428
  ai: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
105352
105429
  ai_search: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
105353
105430
  ai_search_namespace: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
@@ -105355,7 +105432,8 @@ var BINDING_LOCAL_SUPPORT = {
105355
105432
  artifacts: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
105356
105433
  vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
105357
105434
  vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
105358
- agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
105435
+ agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
105436
+ analytics: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
105359
105437
  };
105360
105438
  function getBindingLocalSupport(type) {
105361
105439
  if (type in BINDING_LOCAL_SUPPORT) {
@@ -105686,6 +105764,13 @@ function mapWorkerMetadataBindings(bindings) {
105686
105764
  };
105687
105765
  }
105688
105766
  break;
105767
+ case "analytics":
105768
+ {
105769
+ configObj.analytics = {
105770
+ binding: binding.name
105771
+ };
105772
+ }
105773
+ break;
105689
105774
  case "ai":
105690
105775
  {
105691
105776
  configObj.ai = {
@@ -105941,6 +106026,12 @@ function mapWorkerMetadataBindings(bindings) {
105941
106026
  }
105942
106027
  ];
105943
106028
  break;
106029
+ case "k2":
106030
+ configObj.k2 = [
106031
+ ...configObj.k2 ?? [],
106032
+ { binding: binding.name, stream: binding.stream }
106033
+ ];
106034
+ break;
105944
106035
  case "assets":
105945
106036
  configObj.assets = {
105946
106037
  binding: binding.name
@@ -106030,7 +106121,7 @@ function mapWorkerMetadataBindings(bindings) {
106030
106121
  }, {});
106031
106122
  }
106032
106123
  __name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
106033
- var DEFAULT_COMPAT_DATE = "2026-09-26";
106124
+ var DEFAULT_COMPAT_DATE = "2026-10-01";
106034
106125
  function constructWranglerConfig(config50) {
106035
106126
  const mappedBindings = mapWorkerMetadataBindings(config50.bindings);
106036
106127
  const durableObjectClassNames = config50.bindings.filter(
@@ -106178,6 +106269,11 @@ function convertConfigToBindings(config50, options) {
106178
106269
  output[binding] = { type: "browser", ...x };
106179
106270
  break;
106180
106271
  }
106272
+ case "analytics": {
106273
+ const { binding, ...x } = info;
106274
+ output[binding] = { type: "analytics", ...x };
106275
+ break;
106276
+ }
106181
106277
  case "durable_objects": {
106182
106278
  for (const { name: name3, ...x } of info.bindings ?? []) {
106183
106279
  output[name3] = { type: "durable_object_namespace", ...x };
@@ -106333,6 +106429,15 @@ function convertConfigToBindings(config50, options) {
106333
106429
  }
106334
106430
  break;
106335
106431
  }
106432
+ case "k2": {
106433
+ if (pages) {
106434
+ break;
106435
+ }
106436
+ for (const { binding, ...x } of info) {
106437
+ output[binding] = { type: "k2", ...x };
106438
+ }
106439
+ break;
106440
+ }
106336
106441
  case "secrets_store_secrets": {
106337
106442
  for (const { binding, ...x } of info) {
106338
106443
  output[binding] = { type: "secrets_store_secret", ...x };
@@ -106490,6 +106595,7 @@ function printBindings(bindings, options) {
106490
106595
  );
106491
106596
  const text_blobs = extractBindingsOfType("text_blob", bindings);
106492
106597
  const browser = extractBindingsOfType("browser", bindings);
106598
+ const analytics = extractBindingsOfType("analytics", bindings);
106493
106599
  const images = extractBindingsOfType("images", bindings);
106494
106600
  const stream = extractBindingsOfType("stream", bindings);
106495
106601
  const ai = extractBindingsOfType("ai", bindings);
@@ -106507,6 +106613,7 @@ function printBindings(bindings, options) {
106507
106613
  );
106508
106614
  const mtls_certificates = extractBindingsOfType("mtls_certificate", bindings);
106509
106615
  const pipelines = extractBindingsOfType("pipeline", bindings);
106616
+ const k2 = extractBindingsOfType("k2", bindings);
106510
106617
  const ratelimits = extractBindingsOfType("ratelimit", bindings);
106511
106618
  const assets = extractBindingsOfType("assets", bindings);
106512
106619
  const unsafe_hello_world = extractBindingsOfType(
@@ -106886,6 +106993,18 @@ function printBindings(bindings, options) {
106886
106993
  }))
106887
106994
  );
106888
106995
  }
106996
+ if (analytics.length > 0) {
106997
+ output.push(
106998
+ ...analytics.map(({ binding, remote }) => ({
106999
+ name: binding,
107000
+ type: getBindingTypeFriendlyName("analytics"),
107001
+ value: void 0,
107002
+ mode: getMode({
107003
+ isSimulatedLocally: (remote === true || remote === void 0) && !context.remoteBindingsDisabled ? false : void 0
107004
+ })
107005
+ }))
107006
+ );
107007
+ }
106889
107008
  if (images.length > 0) {
106890
107009
  output.push(
106891
107010
  ...images.map(({ binding, remote }) => ({
@@ -106948,6 +107067,19 @@ function printBindings(bindings, options) {
106948
107067
  )
106949
107068
  );
106950
107069
  }
107070
+ if (k2.length > 0) {
107071
+ output.push(
107072
+ ...k2.map(({ binding, stream: k2Stream }) => ({
107073
+ name: binding,
107074
+ type: getBindingTypeFriendlyName("k2"),
107075
+ value: k2Stream,
107076
+ mode: getMode({
107077
+ // K2 always writes to the real stream; `remote: false` is rejected during validation.
107078
+ isSimulatedLocally: context.remoteBindingsDisabled ? void 0 : false
107079
+ })
107080
+ }))
107081
+ );
107082
+ }
106951
107083
  if (ratelimits.length > 0) {
106952
107084
  output.push(
106953
107085
  ...ratelimits.map(({ name: name3, simple }) => ({
@@ -108250,13 +108382,16 @@ You can try:
108250
108382
  __name(validateBinary, "validateBinary");
108251
108383
  function redactCloudflaredArgsForLogging(args) {
108252
108384
  const redacted = [...args];
108385
+ const sensitiveArgs = ["--token", "--allowed-mail"];
108253
108386
  for (let i = 0; i < redacted.length; i++) {
108254
108387
  const arg = redacted[i];
108255
- if (arg === "--token" && i + 1 < redacted.length) {
108256
- redacted[i + 1] = "[REDACTED]";
108257
- }
108258
- if (arg.startsWith("--token=")) {
108259
- redacted[i] = "--token=[REDACTED]";
108388
+ for (const sensitiveArg of sensitiveArgs) {
108389
+ if (arg === sensitiveArg && i + 1 < redacted.length) {
108390
+ redacted[i + 1] = "[REDACTED]";
108391
+ }
108392
+ if (arg.startsWith(`${sensitiveArg}=`)) {
108393
+ redacted[i] = `${sensitiveArg}=[REDACTED]`;
108394
+ }
108260
108395
  }
108261
108396
  }
108262
108397
  return redacted;
@@ -108535,6 +108670,27 @@ async function spawnCloudflared(args, options) {
108535
108670
  confirmDownload: options?.confirmDownload,
108536
108671
  logger
108537
108672
  });
108673
+ if (args.some(
108674
+ (arg) => arg === "--allowed-mail" || arg.startsWith("--allowed-mail=")
108675
+ )) {
108676
+ const minimumVersion = "2026.9.2";
108677
+ const installedVersion = getInstalledVersion(binPath);
108678
+ if (!installedVersion || isVersionOutdated(installedVersion, minimumVersion)) {
108679
+ throw new UserError(
108680
+ `[cloudflared] --allowed-mail requires cloudflared ${minimumVersion} or later.
108681
+
108682
+ ` + (installedVersion ? `The selected binary (${binPath}) is version ${installedVersion}.
108683
+
108684
+ ` : `Could not determine the version of the selected binary (${binPath}).
108685
+
108686
+ `) + `Update cloudflared in your PATH or set CLOUDFLARED_PATH to a compatible binary.
108687
+ Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`,
108688
+ {
108689
+ telemetryMessage: "tunnel cloudflared allowed mail unsupported version"
108690
+ }
108691
+ );
108692
+ }
108693
+ }
108538
108694
  logger?.debug(
108539
108695
  `Spawning cloudflared: ${binPath} ${redactCloudflaredArgsForLogging(args).join(" ")}`
108540
108696
  );
@@ -114190,7 +114346,7 @@ var Yargs = YargsFactory(esm_default2);
114190
114346
  var yargs_default = Yargs;
114191
114347
 
114192
114348
  // package.json
114193
- var version2 = "2.73.1";
114349
+ var version2 = "2.73.2";
114194
114350
 
114195
114351
  // src/metrics.ts
114196
114352
  var import_node_async_hooks = require("node:async_hooks");
@@ -116906,7 +117062,7 @@ var package_default = {
116906
117062
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
116907
117063
  gatsby: "5.16.1",
116908
117064
  nuxi: "3.37.0",
116909
- sv: "0.17.1"
117065
+ sv: "1.0.1"
116910
117066
  },
116911
117067
  info: [
116912
117068
  "This package.json is only used to keep track of the frameworks cli dependencies",
@@ -119103,7 +119259,7 @@ var updateTypeDefinitions = (ctx) => {
119103
119259
  }
119104
119260
  });
119105
119261
  };
119106
- var typesPath2 = "src/worker-configuration.d.ts";
119262
+ var typesPath2 = "./src/worker-configuration.d.ts";
119107
119263
  var config39 = {
119108
119264
  configVersion: 1,
119109
119265
  id: "svelte",
@@ -119601,7 +119757,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
119601
119757
  var import_node_assert7 = __toESM(require("node:assert"));
119602
119758
 
119603
119759
  // ../wrangler/package.json
119604
- var version3 = "4.143.1";
119760
+ var version3 = "4.147.0";
119605
119761
 
119606
119762
  // src/git.ts
119607
119763
  var offerGit = async (ctx) => {
@@ -123303,6 +123459,9 @@ async function updateTsConfig(ctx, { usesNodeCompat }) {
123303
123459
  }
123304
123460
  const currentTypes = config50.compilerOptions?.types ?? [];
123305
123461
  let newTypes = new Set(currentTypes);
123462
+ if (config50.extends === "$app/tsconfig") {
123463
+ newTypes.add("$app/types");
123464
+ }
123306
123465
  if (ctx.template.workersTypes === "installed") {
123307
123466
  const entrypointVersion = getLatestTypesEntrypoint(ctx);
123308
123467
  const explicitEntrypoint = currentTypes.some(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.73.1",
3
+ "version": "2.73.2",
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.20260926.1",
34
+ "@cloudflare/workers-types": "^5.20261001.1",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
37
37
  "@types/deepmerge": "^2.2.0",
@@ -70,13 +70,13 @@
70
70
  "which-pm-runs": "^1.1.0",
71
71
  "wrap-ansi": "^9.0.0",
72
72
  "yargs": "^17.7.2",
73
- "@cloudflare/cli-shared-helpers": "0.2.0",
74
- "@cloudflare/shared-ast-primitives": "1.1.0",
73
+ "@cloudflare/cli-shared-helpers": "0.2.3",
75
74
  "@cloudflare/mock-npm-registry": "0.0.0",
75
+ "@cloudflare/shared-ast-primitives": "1.1.0",
76
+ "@cloudflare/vite-plugin": "1.62.5",
76
77
  "@cloudflare/workers-tsconfig": "0.0.0",
77
- "@cloudflare/vite-plugin": "1.62.1",
78
- "@cloudflare/workers-utils": "0.44.0",
79
- "wrangler": "4.143.1"
78
+ "@cloudflare/workers-utils": "0.46.0",
79
+ "wrangler": "4.147.0"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22.0.0"
@@ -126,7 +126,7 @@ const updateTypeDefinitions = (ctx: C3Context) => {
126
126
  });
127
127
  };
128
128
 
129
- const typesPath = "src/worker-configuration.d.ts";
129
+ const typesPath = "./src/worker-configuration.d.ts";
130
130
  const config: TemplateConfig = {
131
131
  configVersion: 1,
132
132
  id: "svelte",